{"openapi":"3.1.0","info":{"title":"API Reference","version":"1.0.0"},"paths":{"/entityGroups":{"get":{"operationId":"entityGroup_getAll","summary":"Get All Groups","description":"Get all entity groups. If using a JWT, will return all groups the entity is part of. If using an API key, will return all groups for the organization.","tags":["entity-group"],"parameters":[{"name":"limit","in":"query","description":"The maximum number of results to return. Defaults to 1. Max is 20.","required":false,"schema":{"type":"integer"}},{"name":"startingAfter","in":"query","required":false,"schema":{"$ref":"#/components/schemas/entityGroupTypes_EntityGroupId"}},{"name":"search","in":"query","description":"Search entity groups by name. This will perform a case-insensitive search on the group name.","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/entityGroupTypes_EntityGroupFindResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"security":[{"default":[]}]}},"/entityGroup":{"post":{"operationId":"entityGroup_create","summary":"Create Group","description":"Create an entity group","tags":["entity-group"],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/entityGroupTypes_EntityGroupResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entityGroupTypes_EntityGroupCreateRequest"}}}},"security":[{"default":[]}]}},"/entityGroup/{entityGroupId}":{"get":{"operationId":"entityGroup_get","summary":"Get Group","description":"Get an entity group","tags":["entity-group"],"parameters":[{"name":"entityGroupId","in":"path","description":"Entity Group ID or Entity Group ForeignID","required":true,"schema":{"$ref":"#/components/schemas/entityGroupTypes_EntityGroupId"}},{"name":"returnEntityMetadata","in":"query","description":"Return simple key/value metadata for the specified keys for the entities in the group. For more complex metadata, use the Metadata API.","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/entityGroupTypes_EntityGroupResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"security":[{"default":[]}]},"post":{"operationId":"entityGroup_update","summary":"Update Group","description":"Update an entity group","tags":["entity-group"],"parameters":[{"name":"entityGroupId","in":"path","description":"Entity Group ID or Entity Group ForeignID","required":true,"schema":{"$ref":"#/components/schemas/entityGroupTypes_EntityGroupId"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/entityGroupTypes_EntityGroupResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entityGroupTypes_EntityGroupUpdateRequest"}}}},"security":[{"default":[]}]},"delete":{"operationId":"entityGroup_delete","summary":"Delete Group","description":"Delete an entity group","tags":["entity-group"],"parameters":[{"name":"entityGroupId","in":"path","description":"Entity Group ID or Entity Group ForeignID","required":true,"schema":{"$ref":"#/components/schemas/entityGroupTypes_EntityGroupId"}}],"responses":{"200":{"description":"Successful response"},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"security":[{"default":[]}]}},"/entityGroup/{entityGroupId}/token":{"post":{"operationId":"entityGroup_getToken","summary":"Generate JWT Token","description":"Generate a JWT token for an entity group with the given options. This token can be used to authenticate to any entity in the entity group in the Mercoa API and iFrame.\n\n<Warning>We recommend using [this endpoint](/api-reference/entity-group/user/get-token). This will enable features such as approvals and comments.</Warning>","tags":["entity-group"],"parameters":[{"name":"entityGroupId","in":"path","description":"Entity Group ID or Entity Group ForeignID","required":true,"schema":{"$ref":"#/components/schemas/entityGroupTypes_EntityGroupId"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"type":"string"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entityTypes_TokenGenerationOptions"}}}},"security":[{"default":[]}]}},"/entityGroup/{entityGroupId}/addEntities":{"post":{"operationId":"entityGroup_addEntities","summary":"Add Entities","description":"Add entities to an entity group","tags":["entity-group"],"parameters":[{"name":"entityGroupId","in":"path","description":"Entity Group ID or Entity Group ForeignID","required":true,"schema":{"$ref":"#/components/schemas/entityGroupTypes_EntityGroupId"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/entityGroupTypes_EntityGroupResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entityGroupTypes_EntityGroupAddEntitiesRequest"}}}},"security":[{"default":[]}]}},"/entityGroup/{entityGroupId}/removeEntities":{"post":{"operationId":"entityGroup_removeEntities","summary":"Remove Entities","description":"Remove entities from an entity group","tags":["entity-group"],"parameters":[{"name":"entityGroupId","in":"path","description":"Entity Group ID or Entity Group ForeignID","required":true,"schema":{"$ref":"#/components/schemas/entityGroupTypes_EntityGroupId"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/entityGroupTypes_EntityGroupResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entityGroupTypes_EntityGroupRemoveEntitiesRequest"}}}},"security":[{"default":[]}]}},"/entityGroup/{entityGroupId}/addPayees":{"post":{"operationId":"entityGroup_counterparty_addPayees","summary":"Link Payees to Group","description":"Create association between all entities in the group and a given list of Payees. If a Payee has previously been archived, unarchive the Payee.","tags":["entity-group > counterparty"],"parameters":[{"name":"entityGroupId","in":"path","description":"Entity Group ID or Entity Group ForeignID","required":true,"schema":{"$ref":"#/components/schemas/entityGroupTypes_EntityGroupId"}}],"responses":{"200":{"description":"Successful response"},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entityTypes_EntityAddPayeesRequest"}}}},"security":[{"default":[]}]}},"/entityGroup/{entityGroupId}/hidePayees":{"post":{"operationId":"entityGroup_counterparty_hidePayees","summary":"Hide Payees from Group","description":"Marks Payees as unsearchable by all entities in the group via Counterparty search. Invoices associated with these Payees will still be searchable via Invoice search.","tags":["entity-group > counterparty"],"parameters":[{"name":"entityGroupId","in":"path","description":"Entity Group ID or Entity Group ForeignID","required":true,"schema":{"$ref":"#/components/schemas/entityGroupTypes_EntityGroupId"}}],"responses":{"200":{"description":"Successful response"},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entityTypes_EntityHidePayeesRequest"}}}},"security":[{"default":[]}]}},"/entityGroup/{entityGroupId}/addPayors":{"post":{"operationId":"entityGroup_counterparty_addPayors","summary":"Link Payors to Group","description":"Create association between all entities in the group and a given list of Payors. If a Payor has previously been archived, unarchive the Payor.","tags":["entity-group > counterparty"],"parameters":[{"name":"entityGroupId","in":"path","description":"Entity Group ID or Entity Group ForeignID","required":true,"schema":{"$ref":"#/components/schemas/entityGroupTypes_EntityGroupId"}}],"responses":{"200":{"description":"Successful response"},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entityTypes_EntityAddPayorsRequest"}}}},"security":[{"default":[]}]}},"/entityGroup/{entityGroupId}/hidePayors":{"post":{"operationId":"entityGroup_counterparty_hidePayors","summary":"Hide Payors from Group","description":"Marks Payors as unsearchable by all entities in the group via Counterparty search. Invoices associated with these Payors will still be searchable via Invoice search.","tags":["entity-group > counterparty"],"parameters":[{"name":"entityGroupId","in":"path","description":"Entity Group ID or Entity Group ForeignID","required":true,"schema":{"$ref":"#/components/schemas/entityGroupTypes_EntityGroupId"}}],"responses":{"200":{"description":"Successful response"},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entityTypes_EntityHidePayorsRequest"}}}},"security":[{"default":[]}]}},"/entityGroup/{entityGroupId}/users":{"get":{"operationId":"entityGroup_user_find","summary":"Search Group Users","description":"Search entity group users","tags":["entity-group > user"],"parameters":[{"name":"entityGroupId","in":"path","description":"Entity Group ID or Entity Group ForeignID","required":true,"schema":{"$ref":"#/components/schemas/entityGroupTypes_EntityGroupId"}},{"name":"foreignId","in":"query","description":"ID used to identify user in your system","required":false,"schema":{"type":"string"}},{"name":"role","in":"query","description":"Filter users by role. If multiple roles are provided, users with any of the roles will be returned.","required":false,"schema":{"type":"string"}},{"name":"name","in":"query","description":"Filter users by name. Partial matches are supported.","required":false,"schema":{"type":"string"}},{"name":"email","in":"query","description":"Filter users by email. Partial matches are supported.","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","description":"Number of entities to return. Limit can range between 1 and 100, and the default is 10.","required":false,"schema":{"type":"integer"}},{"name":"startingAfter","in":"query","description":"The ID of the user to start after. If not provided, the first page of entities will be returned.","required":false,"schema":{"$ref":"#/components/schemas/entityTypes_EntityUserId"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/entityGroupTypes_FindEntityGroupUserResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"security":[{"default":[]}]}},"/entityGroup/{entityGroupId}/user":{"post":{"operationId":"entityGroup_user_create","summary":"Create Group User","description":"Create entity user that will be added to all entities in the group. If a user with the same foreignId already exists, the user will be updated with the new information.","tags":["entity-group > user"],"parameters":[{"name":"entityGroupId","in":"path","description":"Entity Group ID or Entity Group ForeignID","required":true,"schema":{"$ref":"#/components/schemas/entityGroupTypes_EntityGroupId"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/entityGroupTypes_EntityGroupUserResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entityGroupTypes_EntityGroupUserRequest"}}}},"security":[{"default":[]}]}},"/entityGroup/{entityGroupId}/user/{foreignId}":{"get":{"operationId":"entityGroup_user_get","summary":"Get Group User","description":"Get entity user from a group","tags":["entity-group > user"],"parameters":[{"name":"entityGroupId","in":"path","description":"Entity Group ID or Entity Group ForeignID","required":true,"schema":{"$ref":"#/components/schemas/entityGroupTypes_EntityGroupId"}},{"name":"foreignId","in":"path","description":"ID used to identify user in your system","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/entityGroupTypes_EntityGroupUserResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"security":[{"default":[]}]},"post":{"operationId":"entityGroup_user_update","summary":"Update Group User","description":"Update entity user for all entities in the group.","tags":["entity-group > user"],"parameters":[{"name":"entityGroupId","in":"path","description":"Entity Group ID or Entity Group ForeignID","required":true,"schema":{"$ref":"#/components/schemas/entityGroupTypes_EntityGroupId"}},{"name":"foreignId","in":"path","description":"ID used to identify user in your system","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/entityGroupTypes_EntityGroupUserResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entityGroupTypes_EntityGroupUserRequest"}}}},"security":[{"default":[]}]},"delete":{"operationId":"entityGroup_user_delete","summary":"Delete Group User","description":"Delete entity user from all entities in the group. This will also remove the user from all approval policies. If an approval policy will break as a result of this operation, this request will fail.","tags":["entity-group > user"],"parameters":[{"name":"entityGroupId","in":"path","description":"Entity Group ID or Entity Group ForeignID","required":true,"schema":{"$ref":"#/components/schemas/entityGroupTypes_EntityGroupId"}},{"name":"foreignId","in":"path","description":"ID used to identify user in your system","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"security":[{"default":[]}]}},"/entityGroup/{entityGroupId}/user/{foreignId}/token":{"post":{"operationId":"entityGroup_user_getToken","summary":"Generate JWT Token","description":"Generate a JWT token for an entity group with the given options. This token can be used to authenticate to any entity in the entity group as the user in the Mercoa API and iFrame.","tags":["entity-group > user"],"parameters":[{"name":"entityGroupId","in":"path","description":"Entity Group ID or Entity Group ForeignID","required":true,"schema":{"$ref":"#/components/schemas/entityGroupTypes_EntityGroupId"}},{"name":"foreignId","in":"path","description":"ID used to identify user in your system","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"type":"string"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entityTypes_TokenGenerationOptions"}}}},"security":[{"default":[]}]}},"/entityGroup/{entityGroupId}/sync-users":{"post":{"operationId":"entityGroup_user_sync","summary":"Sync Group Users","description":"Sync entity group users. This will add users to entities that do not have them and remove users from entities that have them.","tags":["entity-group > user"],"parameters":[{"name":"entityGroupId","in":"path","description":"Entity Group ID or Entity Group ForeignID","required":true,"schema":{"$ref":"#/components/schemas/entityGroupTypes_EntityGroupId"}}],"responses":{"200":{"description":"Successful response"},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entityGroupTypes_EntityGroupUserSyncRequest"}}}},"security":[{"default":[]}]}},"/entityGroup/{entityGroupId}/invoices":{"get":{"operationId":"entityGroup_invoice_find","summary":"Get All","description":"Get invoices for an entity group with the given filters.","tags":["entity-group > invoice"],"parameters":[{"name":"entityGroupId","in":"path","description":"Entity Group ID or Entity Group ForeignID","required":true,"schema":{"$ref":"#/components/schemas/entityGroupTypes_EntityGroupId"}},{"name":"excludePayables","in":"query","description":"Return only invoices that are receivable by the entity.","required":false,"schema":{"type":"boolean"}},{"name":"excludeReceivables","in":"query","description":"Return only invoices that are payable by the entity.","required":false,"schema":{"type":"boolean"}},{"name":"startDate","in":"query","description":"Start date for invoice created on date filter.","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"endDate","in":"query","description":"End date for invoice created date filter.","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"dateType","in":"query","description":"Type of date to filter by if startDate and endDate filters are provided. Defaults to CREATED_AT.","required":false,"schema":{"$ref":"#/components/schemas/invoiceTypes_InvoiceDateFilter"}},{"name":"orderBy","in":"query","description":"Field to order invoices by. Defaults to CREATED_AT.","required":false,"schema":{"$ref":"#/components/schemas/invoiceTypes_InvoiceOrderByField"}},{"name":"orderDirection","in":"query","description":"Direction to order invoices by. Defaults to asc.","required":false,"schema":{"$ref":"#/components/schemas/commons_OrderDirection"}},{"name":"limit","in":"query","description":"Number of invoices to return. Limit can range between 1 and 100, and the default is 10.","required":false,"schema":{"type":"integer"}},{"name":"startingAfter","in":"query","description":"The ID of the invoice to start after. If not provided, the first page of invoices will be returned.","required":false,"schema":{"$ref":"#/components/schemas/invoiceTypes_InvoiceId"}},{"name":"metadata","in":"query","description":"Filter invoices by metadata. Each filter will be applied as an AND condition. Duplicate keys will be ignored.","required":false,"schema":{"$ref":"#/components/schemas/invoiceTypes_MetadataFilter"}},{"name":"search","in":"query","description":"Find invoices by vendor name, invoice number, check number, or amount. Partial matches are supported.","required":false,"schema":{"type":"string"}},{"name":"payerId","in":"query","description":"Filter invoices by payer ID or payer foreign ID.","required":false,"schema":{"$ref":"#/components/schemas/entityTypes_EntityId"}},{"name":"vendorId","in":"query","description":"Filter invoices by vendor ID or vendor foreign ID.","required":false,"schema":{"$ref":"#/components/schemas/entityTypes_EntityId"}},{"name":"creatorUserId","in":"query","description":"Filter invoices by the ID or foreign ID of the user that created the invoice.","required":false,"schema":{"$ref":"#/components/schemas/entityTypes_EntityUserId"}},{"name":"approverId","in":"query","description":"Filter invoices by assigned approver user ID.","required":false,"schema":{"$ref":"#/components/schemas/entityTypes_EntityUserId"}},{"name":"approverAction","in":"query","description":"Filter invoices by approver action. Needs to be used with approverId. For example, if you want to find all invoices that have been approved by a specific user, you would use approverId and approverAction=APPROVE.","required":false,"schema":{"$ref":"#/components/schemas/invoiceTypes_ApproverAction"}},{"name":"approverCount","in":"query","description":"Filter invoices by the number of approvers. Use exact number (e.g., 3) or range (e.g., \">3\", \"<5\", \">=2\", \"<=4\").","required":false,"schema":{"type":"string"}},{"name":"invoiceId","in":"query","description":"Filter invoices by invoice ID or invoice foreign ID.","required":false,"schema":{"$ref":"#/components/schemas/invoiceTypes_InvoiceId"}},{"name":"status","in":"query","description":"Invoice status to filter on.","required":false,"schema":{"$ref":"#/components/schemas/invoiceTypes_InvoiceStatus"}},{"name":"paymentType","in":"query","description":"Filter invoices by recurring status","required":false,"schema":{"type":"array","items":{"$ref":"#/components/schemas/invoiceTypes_PaymentType"}}},{"name":"returnPayerMetadata","in":"query","description":"Whether to return payer metadata in the response","required":false,"schema":{"type":"boolean"}},{"name":"returnVendorMetadata","in":"query","description":"Whether to return vendor metadata in the response","required":false,"schema":{"type":"boolean"}},{"name":"returnPaymentTiming","in":"query","description":"Whether to return payment timing in the response","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/invoiceTypes_FindInvoiceResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"security":[{"default":[]}]}},"/entityGroup/{entityGroupId}/invoices/download":{"get":{"operationId":"entityGroup_invoice_download","summary":"Download Invoices","description":"Get a URL to download invoices for an entity group as a CSV/JSON file.","tags":["entity-group > invoice"],"parameters":[{"name":"entityGroupId","in":"path","description":"Entity Group ID or Entity Group ForeignID","required":true,"schema":{"$ref":"#/components/schemas/entityGroupTypes_EntityGroupId"}},{"name":"format","in":"query","description":"Format of the file to download. Defaults to CSV.","required":false,"schema":{"$ref":"#/components/schemas/commons_BulkDownloadFormat"}},{"name":"startDate","in":"query","description":"Start date filter. Defaults to CREATED_AT unless specified the dateType is specified","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"endDate","in":"query","description":"End date filter. Defaults to CREATED_AT unless specified the dateType is specified","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"dateType","in":"query","description":"Type of date to filter by if startDate and endDate filters are provided. Defaults to CREATED_AT.","required":false,"schema":{"$ref":"#/components/schemas/invoiceTypes_InvoiceDateFilter"}},{"name":"orderBy","in":"query","description":"Field to order invoices by. Defaults to CREATED_AT.","required":false,"schema":{"$ref":"#/components/schemas/invoiceTypes_InvoiceOrderByField"}},{"name":"orderDirection","in":"query","description":"Direction to order invoices by. Defaults to asc.","required":false,"schema":{"$ref":"#/components/schemas/commons_OrderDirection"}},{"name":"search","in":"query","description":"Find invoices by vendor name, invoice number, check number, or amount. Partial matches are supported.","required":false,"schema":{"type":"string"}},{"name":"metadata","in":"query","description":"Filter invoices by metadata. Each filter will be applied as an AND condition. Duplicate keys will be ignored.","required":false,"schema":{"$ref":"#/components/schemas/invoiceTypes_MetadataFilter"}},{"name":"lineItemMetadata","in":"query","description":"Filter invoices by line item metadata. Each filter will be applied as an AND condition. Duplicate keys will be ignored.","required":false,"schema":{"$ref":"#/components/schemas/invoiceTypes_MetadataFilter"}},{"name":"lineItemGlAccountId","in":"query","description":"Filter invoices by line item GL account ID. Each filter will be applied as an OR condition. Duplicate keys will be ignored.","required":false,"schema":{"type":"string"}},{"name":"payerId","in":"query","description":"Filter invoices by payer ID or payer foreign ID.","required":false,"schema":{"$ref":"#/components/schemas/entityTypes_EntityId"}},{"name":"vendorId","in":"query","description":"Filter invoices by vendor ID or vendor foreign ID.","required":false,"schema":{"$ref":"#/components/schemas/entityTypes_EntityId"}},{"name":"creatorUserId","in":"query","description":"Filter invoices by the ID or foreign ID of the user that created the invoice.","required":false,"schema":{"$ref":"#/components/schemas/entityTypes_EntityUserId"}},{"name":"approverId","in":"query","description":"Filter invoices by assigned approver user ID. Only invoices with all upstream policies approved will be returned.","required":false,"schema":{"$ref":"#/components/schemas/entityTypes_EntityUserId"}},{"name":"approverAction","in":"query","description":"Filter invoices by approver action. Needs to be used with approverId. For example, if you want to find all invoices that have been approved by a specific user, you would use approverId and approverAction=APPROVE.","required":false,"schema":{"$ref":"#/components/schemas/invoiceTypes_ApproverAction"}},{"name":"invoiceId","in":"query","description":"Filter invoices by invoice ID or invoice foreign ID.","required":false,"schema":{"$ref":"#/components/schemas/invoiceTypes_InvoiceId"}},{"name":"status","in":"query","description":"Invoice status to filter on","required":false,"schema":{"$ref":"#/components/schemas/invoiceTypes_InvoiceStatus"}},{"name":"paymentType","in":"query","description":"Filter invoices by recurring status","required":false,"schema":{"type":"array","items":{"$ref":"#/components/schemas/invoiceTypes_PaymentType"}}},{"name":"invoiceTemplateId","in":"query","description":"Filter invoice by invoice template ID","required":false,"schema":{"$ref":"#/components/schemas/invoiceTypes_InvoiceTemplateId"}},{"name":"excludePayables","in":"query","description":"Return only invoices that are receivable by the entity.","required":false,"schema":{"type":"boolean"}},{"name":"excludeReceivables","in":"query","description":"Return only invoices that are payable by the entity.","required":false,"schema":{"type":"boolean"}},{"name":"returnPayerMetadata","in":"query","description":"Whether to return payer metadata in the response","required":false,"schema":{"type":"boolean"}},{"name":"returnVendorMetadata","in":"query","description":"Whether to return vendor metadata in the response","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/commons_BulkDownloadResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"security":[{"default":[]}]}},"/entityGroup/{entityGroupId}/invoice-metrics":{"get":{"operationId":"entityGroup_invoice_metrics","summary":"Get Metrics","description":"Get invoice metrics for an entity group with the given filters. Invoices will be grouped by currency. If none of excludePayables, excludeReceivables, payerId, vendorId, or invoiceId status filters are provided, excludeReceivables will be set to true.","tags":["entity-group > invoice"],"parameters":[{"name":"entityGroupId","in":"path","description":"Entity Group ID or Entity Group ForeignID","required":true,"schema":{"$ref":"#/components/schemas/entityGroupTypes_EntityGroupId"}},{"name":"search","in":"query","description":"Find invoices by vendor name, invoice number, check number, or amount. Partial matches are supported.","required":false,"schema":{"type":"string"}},{"name":"excludePayables","in":"query","description":"Only return invoices that are not payable by the entity. This will return only invoices that are receivable by the entity.","required":false,"schema":{"type":"boolean"}},{"name":"excludeReceivables","in":"query","description":"Only return invoices that are not receivable by the entity. This will return only invoices that are payable by the entity.","required":false,"schema":{"type":"boolean"}},{"name":"returnByDate","in":"query","description":"Return invoice metrics grouped by date.","required":false,"schema":{"$ref":"#/components/schemas/invoiceTypes_InvoiceMetricsPerDateGroupBy"}},{"name":"returnByDateFrequency","in":"query","description":"Return invoice metrics grouped by date. Defaults to daily.","required":false,"schema":{"$ref":"#/components/schemas/invoiceTypes_InvoiceMetricsPerDateFrequency"}},{"name":"groupBy","in":"query","description":"Return invoice metrics grouped by.","required":false,"schema":{"$ref":"#/components/schemas/invoiceTypes_InvoiceMetricsGroupBy"}},{"name":"payerId","in":"query","description":"Filter invoices by payer ID.","required":false,"schema":{"$ref":"#/components/schemas/entityTypes_EntityId"}},{"name":"vendorId","in":"query","description":"Filter invoices by vendor ID.","required":false,"schema":{"$ref":"#/components/schemas/entityTypes_EntityId"}},{"name":"approverId","in":"query","description":"Filter invoices by assigned approver user ID.","required":false,"schema":{"$ref":"#/components/schemas/entityTypes_EntityUserId"}},{"name":"approverCount","in":"query","description":"Filter invoices by the number of approvers. Use exact number (e.g., 3) or range (e.g., \">3\", \"<5\", \">=2\", \"<=4\").","required":false,"schema":{"type":"string"}},{"name":"invoiceId","in":"query","description":"Filter invoices by invoice ID or invoice foreign ID.","required":false,"schema":{"$ref":"#/components/schemas/invoiceTypes_InvoiceId"}},{"name":"status","in":"query","description":"Invoice status to filter on","required":false,"schema":{"$ref":"#/components/schemas/invoiceTypes_InvoiceStatus"}},{"name":"startDate","in":"query","description":"Start date filter. Defaults to CREATED_AT unless specified the dateType is specified","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"endDate","in":"query","description":"End date filter. Defaults to CREATED_AT unless specified the dateType is specified","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"dateType","in":"query","description":"Type of date to filter by if startDate and endDate filters are provided. Defaults to CREATED_AT.","required":false,"schema":{"$ref":"#/components/schemas/invoiceTypes_InvoiceDateFilter"}},{"name":"currency","in":"query","description":"Currency to filter on","required":false,"schema":{"$ref":"#/components/schemas/paymentMethodTypes_CurrencyCode"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/invoiceTypes_InvoiceMetricsResponse"}}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"security":[{"default":[]}]}},"/entity":{"get":{"operationId":"entity_find","summary":"Search entities","description":"Search all entities with the given filters. If no filters are provided, all entities will be returned.","tags":["entity"],"parameters":[{"name":"paymentMethods","in":"query","description":"If true, will include entity payment methods as part of the response","required":false,"schema":{"type":"boolean"}},{"name":"isCustomer","in":"query","description":"If true, only entities with a direct relationship to the requesting organization will be returned. If false or not provided, all entities will be returned.","required":false,"schema":{"type":"boolean"}},{"name":"foreignId","in":"query","description":"ID used to identify this entity in your system","required":false,"schema":{"type":"string"}},{"name":"status","in":"query","required":false,"schema":{"$ref":"#/components/schemas/entityTypes_EntityStatus"}},{"name":"isPayee","in":"query","description":"If true, entities that are marked as payees will be returned.\nIf false or not provided, entities that are marked as payees will not be returned.","required":false,"schema":{"type":"boolean"}},{"name":"isPayor","in":"query","description":"If true or not provided, entities that are marked as payors will be returned.\nIf false, entities that are marked as payors will not be returned.","required":false,"schema":{"type":"boolean"}},{"name":"name","in":"query","description":"Use search instead. Deprecated. Filter entities by name. Partial matches are supported.","required":false,"schema":{"type":"string"},"deprecated":true},{"name":"search","in":"query","description":"Find entities by name, email, emailTo, entity ID, or foreign ID. Partial matches are supported for name, email, and emailTo. Exact matches are used for entity ID and foreign ID.","required":false,"schema":{"type":"string"}},{"name":"metadata","in":"query","description":"Filter entities by simple key/value metadata. Each filter will be applied as an AND condition. Duplicate keys will be ignored.","required":false,"schema":{"$ref":"#/components/schemas/invoiceTypes_MetadataFilter"}},{"name":"returnMetadata","in":"query","description":"Return simple key/value metadata for the specified keys for the entities. For more complex metadata, use the Metadata API.","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","description":"Number of entities to return. Limit can range between 1 and 100, and the default is 10.","required":false,"schema":{"type":"integer"}},{"name":"startingAfter","in":"query","description":"The ID of the entity to start after. If not provided, the first page of entities will be returned.","required":false,"schema":{"$ref":"#/components/schemas/entityTypes_EntityId"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/entityTypes_FindEntityResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"security":[{"default":[]}]},"post":{"operationId":"entity_create","summary":"Create entity","tags":["entity"],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/entityTypes_EntityResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entityTypes_EntityRequest"}}}},"security":[{"default":[]}]}},"/entity/{entityId}":{"get":{"operationId":"entity_get","summary":"Get entity","tags":["entity"],"parameters":[{"name":"entityId","in":"path","description":"Entity ID or Entity ForeignID","required":true,"schema":{"$ref":"#/components/schemas/entityTypes_EntityId"}},{"name":"returnMetadata","in":"query","description":"Return simple key/value metadata for the specified keys for the entities. For more complex metadata, use the Metadata API.","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/entityTypes_EntityResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"security":[{"default":[]}]},"post":{"operationId":"entity_update","summary":"Update entity","tags":["entity"],"parameters":[{"name":"entityId","in":"path","description":"Entity ID or Entity ForeignID","required":true,"schema":{"$ref":"#/components/schemas/entityTypes_EntityId"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/entityTypes_EntityResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entityTypes_EntityUpdateRequest"}}}},"security":[{"default":[]}]},"delete":{"operationId":"entity_delete","summary":"Delete entity","description":"Will archive the entity. This action cannot be undone, and the entity will no longer be available for use. The foreignId on the entity will be cleared as well.","tags":["entity"],"parameters":[{"name":"entityId","in":"path","description":"Entity ID or Entity ForeignID","required":true,"schema":{"$ref":"#/components/schemas/entityTypes_EntityId"}}],"responses":{"200":{"description":"Successful response"},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"security":[{"default":[]}]}},"/entity/{entityId}/accept-tos":{"post":{"operationId":"entity_acceptTermsOfService","summary":"Accept Terms of Service","description":"This endpoint is used to indicate acceptance of Mercoa's terms of service for an entity. Send a request to this endpoint only after the entity has accepted the Mercoa ToS. Entities must accept Mercoa ToS before they can be send or pay invoices using Mercoa's payment rails.","tags":["entity"],"parameters":[{"name":"entityId","in":"path","description":"Entity ID or Entity ForeignID","required":true,"schema":{"$ref":"#/components/schemas/entityTypes_EntityId"}}],"responses":{"200":{"description":"Successful response"},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"security":[{"default":[]}]}},"/entity/{entityId}/request-kyb":{"post":{"operationId":"entity_initiateKyb","summary":"Initiate KYB","description":"This endpoint is used to initiate KYB for an entity. \nSend a request to this endpoint only after the entity has accepted the Mercoa ToS,\nall representatives have been added, and all required fields have been filled out.","tags":["entity"],"parameters":[{"name":"entityId","in":"path","description":"Entity ID or Entity ForeignID","required":true,"schema":{"$ref":"#/components/schemas/entityTypes_EntityId"}}],"responses":{"200":{"description":"Successful response"},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"security":[{"default":[]}]}},"/entity/{entityId}/token":{"post":{"operationId":"entity_getToken","summary":"Generate JWT Token","description":"Generate a JWT token for an entity with the given options. This token can be used to authenticate the entity in the Mercoa API and iFrame.\n\n<Warning>We recommend using [this endpoint](/api-reference/entity/user/get-token). This will enable features such as approvals and comments.</Warning>","tags":["entity"],"parameters":[{"name":"entityId","in":"path","description":"Entity ID or Entity ForeignID","required":true,"schema":{"$ref":"#/components/schemas/entityTypes_EntityId"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"type":"string"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entityTypes_TokenGenerationOptions"}}}},"security":[{"default":[]}]}},"/entity/{entityId}/onboarding":{"get":{"operationId":"entity_getOnboardingLink","summary":"Generate Onboarding Link","description":"Generate an onboarding link for the entity.","tags":["entity"],"parameters":[{"name":"entityId","in":"path","description":"Entity ID or Entity ForeignID","required":true,"schema":{"$ref":"#/components/schemas/entityTypes_EntityId"}},{"name":"type","in":"query","description":"The type of onboarding link to generate. If not provided, the default is payee. The onboarding options are determined by your organization's onboarding configuration.","required":true,"schema":{"$ref":"#/components/schemas/entityTypes_EntityOnboardingLinkType"}},{"name":"expiresIn","in":"query","description":"Expressed in seconds or a string describing a time span. The default is 24h.","required":false,"schema":{"type":"string"}},{"name":"connectedEntityId","in":"query","description":"The ID of the entity to connect to. If onboarding a payee, this should be the payor entity ID. If onboarding a payor, this should be the payee entity ID. If no connected entity ID is provided, the onboarding link will be for a standalone entity.","required":false,"schema":{"$ref":"#/components/schemas/entityTypes_EntityId"}},{"name":"redirectToPortal","in":"query","description":"If true, the onboarding link will redirect to the vendor/customer portal if the entity is already onboarded. If false, the onboarding link will not redirect to the portal. The default is false.","required":false,"schema":{"type":"boolean"}},{"name":"vendorPortalOptions","in":"query","description":"The options for the vendor portal.","required":false,"schema":{"$ref":"#/components/schemas/entityTypes_VendorPortalOptions"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"type":"string"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"security":[{"default":[]}]},"post":{"operationId":"entity_sendOnboardingLink","summary":"Send Onboarding Email","description":"Send an email with a onboarding link to the entity. The email will be sent to the email address associated with the entity.","tags":["entity"],"parameters":[{"name":"entityId","in":"path","description":"Entity ID or Entity ForeignID","required":true,"schema":{"$ref":"#/components/schemas/entityTypes_EntityId"}},{"name":"type","in":"query","description":"The type of onboarding link to generate. If not provided, the default is payee. The onboarding options are determined by your organization's onboarding configuration.","required":true,"schema":{"$ref":"#/components/schemas/entityTypes_EntityOnboardingLinkType"}},{"name":"expiresIn","in":"query","description":"Expressed in seconds or a string describing a time span. The default is 7 days.","required":false,"schema":{"type":"string"}},{"name":"connectedEntityId","in":"query","description":"The ID of the entity to connect to. If onboarding a payee, this should be the payor entity ID. If onboarding a payor, this should be the payee entity ID. If no connected entity ID is provided, the onboarding link will be for a standalone entity.","required":false,"schema":{"$ref":"#/components/schemas/entityTypes_EntityId"}},{"name":"redirectToPortal","in":"query","description":"If true, the onboarding link will redirect to the vendor/customer portal if the entity is already onboarded. If false, the onboarding link will not redirect to the portal. The default is false.","required":false,"schema":{"type":"boolean"}},{"name":"vendorPortalOptions","in":"query","description":"The options for the vendor portal.","required":false,"schema":{"$ref":"#/components/schemas/entityTypes_VendorPortalOptions"}}],"responses":{"200":{"description":"Successful response"},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"security":[{"default":[]}]}},"/entity/{entityId}/events":{"get":{"operationId":"entity_events","summary":"Events","description":"Get all events for an entity","tags":["entity"],"parameters":[{"name":"entityId","in":"path","description":"Entity ID or Entity ForeignID","required":true,"schema":{"$ref":"#/components/schemas/entityTypes_EntityId"}},{"name":"startDate","in":"query","description":"Start date filter. If not provided, events from the start of time will be returned.","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"endDate","in":"query","description":"End date filter. If not provided, events to the end of time will be returned.","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"limit","in":"query","description":"Number of events to return. Limit can range between 1 and 100, and the default is 50.","required":false,"schema":{"type":"integer"}},{"name":"startingAfter","in":"query","description":"The ID of the event to start after. If not provided, the first page of events will be returned.","required":false,"schema":{"$ref":"#/components/schemas/entityTypes_EntityEventId"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/entityTypes_EntityEventsResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"security":[{"default":[]}]}},"/entity/{entityId}/counterparties/payees":{"get":{"operationId":"entity_counterparty_findPayees","summary":"Find payee counterparties","description":"Find payee counterparties. This endpoint lets you find vendors linked to the entity.","tags":["entity > counterparty"],"parameters":[{"name":"entityId","in":"path","description":"Entity ID or Entity ForeignID","required":true,"schema":{"$ref":"#/components/schemas/entityTypes_EntityId"}},{"name":"name","in":"query","description":"Use search instead. Deprecated. Filter counterparties by name. Partial matches are supported.","required":false,"schema":{"type":"string"},"deprecated":true},{"name":"search","in":"query","description":"Filter counterparties by name or email. Partial matches are supported.","required":false,"schema":{"type":"string"}},{"name":"networkType","in":"query","description":"Filter by network type. By default, only ENTITY counterparties are returned.","required":false,"schema":{"$ref":"#/components/schemas/entityTypes_CounterpartyNetworkType"}},{"name":"paymentMethods","in":"query","description":"If true, will include counterparty payment methods as part of the response","required":false,"schema":{"type":"boolean"}},{"name":"invoiceMetrics","in":"query","description":"If true, will include counterparty invoice metrics as part of the response","required":false,"schema":{"type":"boolean"}},{"name":"counterpartyId","in":"query","description":"Filter by counterparty ids (Foreign ID is supported)","required":false,"schema":{"$ref":"#/components/schemas/entityTypes_EntityId"}},{"name":"metadata","in":"query","description":"Filter counterparties by simple key/value metadata. Each filter will be applied as an AND condition. Duplicate keys will be ignored.","required":false,"schema":{"$ref":"#/components/schemas/invoiceTypes_MetadataFilter"}},{"name":"returnMetadata","in":"query","description":"If true, will return simple key/value metadata for the counterparties. For more complex metadata, use the Metadata API.","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","description":"Number of counterparties to return. Limit can range between 1 and 100, and the default is 10.","required":false,"schema":{"type":"integer"}},{"name":"startingAfter","in":"query","description":"The ID of the counterparties to start after. If not provided, the first page of counterparties will be returned.","required":false,"schema":{"$ref":"#/components/schemas/entityTypes_EntityId"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/entityTypes_FindCounterpartiesResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"security":[{"default":[]}]}},"/entity/{entityId}/counterparties/payors":{"get":{"operationId":"entity_counterparty_findPayors","summary":"Find payor counterparties","description":"Find payor counterparties. This endpoint lets you find customers linked to the entity.","tags":["entity > counterparty"],"parameters":[{"name":"entityId","in":"path","description":"Entity ID or Entity ForeignID","required":true,"schema":{"$ref":"#/components/schemas/entityTypes_EntityId"}},{"name":"name","in":"query","description":"Use search instead. Deprecated. Filter counterparties by name. Partial matches are supported.","required":false,"schema":{"type":"string"},"deprecated":true},{"name":"search","in":"query","description":"Filter counterparties by name or email. Partial matches are supported.","required":false,"schema":{"type":"string"}},{"name":"networkType","in":"query","description":"Filter by network type. By default, only ENTITY counterparties are returned.","required":false,"schema":{"$ref":"#/components/schemas/entityTypes_CounterpartyNetworkType"}},{"name":"paymentMethods","in":"query","description":"If true, will include counterparty payment methods as part of the response","required":false,"schema":{"type":"boolean"}},{"name":"invoiceMetrics","in":"query","description":"If true, will include counterparty invoice metrics as part of the response","required":false,"schema":{"type":"boolean"}},{"name":"counterpartyId","in":"query","description":"Filter by counterparty ids (Foreign ID is supported)","required":false,"schema":{"$ref":"#/components/schemas/entityTypes_EntityId"}},{"name":"metadata","in":"query","description":"Filter counterparties by simple key/value metadata. Each filter will be applied as an AND condition. Duplicate keys will be ignored.","required":false,"schema":{"$ref":"#/components/schemas/invoiceTypes_MetadataFilter"}},{"name":"returnMetadata","in":"query","description":"If true, will return simple key/value metadata for the counterparties. For more complex metadata, use the Metadata API.","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","description":"Number of counterparties to return. Limit can range between 1 and 100, and the default is 10.","required":false,"schema":{"type":"integer"}},{"name":"startingAfter","in":"query","description":"The ID of the counterparties to start after. If not provided, the first page of counterparties will be returned.","required":false,"schema":{"$ref":"#/components/schemas/entityTypes_EntityId"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/entityTypes_FindCounterpartiesResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"security":[{"default":[]}]}},"/entity/{entityId}/addPayees":{"post":{"operationId":"entity_counterparty_addPayees","summary":"Link Payees","description":"Create association between Entity and a given list of Payees. If a Payee has previously been archived, unarchive the Payee.","tags":["entity > counterparty"],"parameters":[{"name":"entityId","in":"path","description":"Entity ID or Entity ForeignID","required":true,"schema":{"$ref":"#/components/schemas/entityTypes_EntityId"}}],"responses":{"200":{"description":"Successful response"},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entityTypes_EntityAddPayeesRequest"}}}},"security":[{"default":[]}]}},"/entity/{entityId}/hidePayees":{"post":{"operationId":"entity_counterparty_hidePayees","summary":"Hide Payee","description":"Marks Payees as unsearchable by Entity via Counterparty search. Invoices associated with these Payees will still be searchable via Invoice search.","tags":["entity > counterparty"],"parameters":[{"name":"entityId","in":"path","description":"Entity ID or Entity ForeignID","required":true,"schema":{"$ref":"#/components/schemas/entityTypes_EntityId"}}],"responses":{"200":{"description":"Successful response"},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entityTypes_EntityHidePayeesRequest"}}}},"security":[{"default":[]}]}},"/entity/{entityId}/addPayors":{"post":{"operationId":"entity_counterparty_addPayors","summary":"Link Payors","description":"Create association between Entity and a given list of Payors. If a Payor has previously been archived, unarchive the Payor.","tags":["entity > counterparty"],"parameters":[{"name":"entityId","in":"path","description":"Entity ID or Entity ForeignID","required":true,"schema":{"$ref":"#/components/schemas/entityTypes_EntityId"}}],"responses":{"200":{"description":"Successful response"},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entityTypes_EntityAddPayorsRequest"}}}},"security":[{"default":[]}]}},"/entity/{entityId}/hidePayors":{"post":{"operationId":"entity_counterparty_hidePayors","summary":"Hide Payors","description":"Marks Payors as unsearchable by Entity via Counterparty search. Invoices associated with these Payors will still be searchable via Invoice search.","tags":["entity > counterparty"],"parameters":[{"name":"entityId","in":"path","description":"Entity ID or Entity ForeignID","required":true,"schema":{"$ref":"#/components/schemas/entityTypes_EntityId"}}],"responses":{"200":{"description":"Successful response"},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entityTypes_EntityHidePayorsRequest"}}}},"security":[{"default":[]}]}},"/entity/{entityId}/counterparties/payees/download":{"get":{"operationId":"entity_counterparty_bulk_downloadPayees","summary":"Download Bulk Payees","description":"Get a URL to download payee counterparties as a CSV/JSON file. This endpoint lets you download vendors linked to the entity.","tags":["entity > counterparty > bulk"],"parameters":[{"name":"entityId","in":"path","description":"Entity ID or Entity ForeignID","required":true,"schema":{"$ref":"#/components/schemas/entityTypes_EntityId"}},{"name":"format","in":"query","description":"Format of the file to download. Defaults to CSV.","required":false,"schema":{"$ref":"#/components/schemas/commons_BulkDownloadFormat"}},{"name":"search","in":"query","description":"Filter counterparties by name or email. Partial matches are supported.","required":false,"schema":{"type":"string"}},{"name":"networkType","in":"query","description":"Filter by network type. By default, only ENTITY counterparties are returned.","required":false,"schema":{"$ref":"#/components/schemas/entityTypes_CounterpartyNetworkType"}},{"name":"paymentMethods","in":"query","description":"If true, will include counterparty payment methods as part of the response","required":false,"schema":{"type":"boolean"}},{"name":"invoiceMetrics","in":"query","description":"If true, will include counterparty invoice metrics as part of the response","required":false,"schema":{"type":"boolean"}},{"name":"counterpartyId","in":"query","description":"Filter by counterparty ids (Foreign ID is supported)","required":false,"schema":{"$ref":"#/components/schemas/entityTypes_EntityId"}},{"name":"metadata","in":"query","description":"Filter counterparties by simple key/value metadata. Each filter will be applied as an AND condition. Duplicate keys will be ignored.","required":false,"schema":{"$ref":"#/components/schemas/invoiceTypes_MetadataFilter"}},{"name":"returnMetadata","in":"query","description":"If true, will return simple key/value metadata for the counterparties. For more complex metadata, use the Metadata API.","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/commons_BulkDownloadResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"security":[{"default":[]}]}},"/entity/{entityId}/counterparties/payors/download":{"get":{"operationId":"entity_counterparty_bulk_downloadPayors","summary":"Download Bulk Payors","description":"Get a URL to download payor counterparties as a CSV/JSON file. This endpoint lets you download customers linked to the entity.","tags":["entity > counterparty > bulk"],"parameters":[{"name":"entityId","in":"path","description":"Entity ID or Entity ForeignID","required":true,"schema":{"$ref":"#/components/schemas/entityTypes_EntityId"}},{"name":"format","in":"query","description":"Format of the file to download. Defaults to CSV.","required":false,"schema":{"$ref":"#/components/schemas/commons_BulkDownloadFormat"}},{"name":"search","in":"query","description":"Filter counterparties by name or email. Partial matches are supported.","required":false,"schema":{"type":"string"}},{"name":"networkType","in":"query","description":"Filter by network type. By default, only ENTITY counterparties are returned.","required":false,"schema":{"$ref":"#/components/schemas/entityTypes_CounterpartyNetworkType"}},{"name":"paymentMethods","in":"query","description":"If true, will include counterparty payment methods as part of the response","required":false,"schema":{"type":"boolean"}},{"name":"invoiceMetrics","in":"query","description":"If true, will include counterparty invoice metrics as part of the response","required":false,"schema":{"type":"boolean"}},{"name":"counterpartyId","in":"query","description":"Filter by counterparty ids (Foreign ID is supported)","required":false,"schema":{"$ref":"#/components/schemas/entityTypes_EntityId"}},{"name":"metadata","in":"query","description":"Filter counterparties by simple key/value metadata. Each filter will be applied as an AND condition. Duplicate keys will be ignored.","required":false,"schema":{"$ref":"#/components/schemas/invoiceTypes_MetadataFilter"}},{"name":"returnMetadata","in":"query","description":"If true, will return simple key/value metadata for the counterparties. For more complex metadata, use the Metadata API.","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/commons_BulkDownloadResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"security":[{"default":[]}]}},"/entity/{entityId}/counterparty/{counterpartyId}/vendor-credits":{"get":{"operationId":"entity_counterparty_vendorCredit_getAll","summary":"Get All","tags":["entity > counterparty > vendor-credit"],"parameters":[{"name":"entityId","in":"path","description":"Entity ID or Entity ForeignID","required":true,"schema":{"$ref":"#/components/schemas/entityTypes_EntityId"}},{"name":"counterpartyId","in":"path","description":"Counterparty Entity ID or Counterparty Entity ForeignID","required":true,"schema":{"$ref":"#/components/schemas/entityTypes_EntityId"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/vendorCreditTypes_FindVendorCreditResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"security":[{"default":[]}]}},"/entity/{entityId}/counterparty/{counterpartyId}/vendor-credit/{vendorCreditId}":{"get":{"operationId":"entity_counterparty_vendorCredit_get","summary":"Get","tags":["entity > counterparty > vendor-credit"],"parameters":[{"name":"entityId","in":"path","description":"Entity ID or Entity ForeignID","required":true,"schema":{"$ref":"#/components/schemas/entityTypes_EntityId"}},{"name":"counterpartyId","in":"path","description":"Counterparty Entity ID or Counterparty Entity ForeignID","required":true,"schema":{"$ref":"#/components/schemas/entityTypes_EntityId"}},{"name":"vendorCreditId","in":"path","description":"ID of the vendor credit to retrieve","required":true,"schema":{"$ref":"#/components/schemas/vendorCreditTypes_VendorCreditId"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/vendorCreditTypes_VendorCreditResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"security":[{"default":[]}]},"delete":{"operationId":"entity_counterparty_vendorCredit_delete","summary":"Delete","tags":["entity > counterparty > vendor-credit"],"parameters":[{"name":"entityId","in":"path","description":"Entity ID or Entity ForeignID","required":true,"schema":{"$ref":"#/components/schemas/entityTypes_EntityId"}},{"name":"counterpartyId","in":"path","description":"Counterparty Entity ID or Counterparty Entity ForeignID","required":true,"schema":{"$ref":"#/components/schemas/entityTypes_EntityId"}},{"name":"vendorCreditId","in":"path","description":"ID of the vendor credit to delete","required":true,"schema":{"$ref":"#/components/schemas/vendorCreditTypes_VendorCreditId"}}],"responses":{"200":{"description":"Successful response"},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"security":[{"default":[]}]}},"/entity/{entityId}/counterparty/{counterpartyId}/vendor-credit":{"post":{"operationId":"entity_counterparty_vendorCredit_create","summary":"Create","tags":["entity > counterparty > vendor-credit"],"parameters":[{"name":"entityId","in":"path","description":"Entity ID or Entity ForeignID","required":true,"schema":{"$ref":"#/components/schemas/entityTypes_EntityId"}},{"name":"counterpartyId","in":"path","description":"Counterparty Entity ID or Counterparty Entity ForeignID","required":true,"schema":{"$ref":"#/components/schemas/entityTypes_EntityId"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/vendorCreditTypes_VendorCreditResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/vendorCreditTypes_VendorCreditRequest"}}}},"security":[{"default":[]}]}},"/entity/{entityId}/counterparty/{counterpartyId}/vendor-credits/estimate-usage":{"get":{"operationId":"entity_counterparty_vendorCredit_estimateUsage","summary":"Estimate Vendor Credit Usage","description":"Estimate the usage of vendor credits on an invoice of a given amount","tags":["entity > counterparty > vendor-credit"],"parameters":[{"name":"entityId","in":"path","description":"Entity ID or Entity ForeignID","required":true,"schema":{"$ref":"#/components/schemas/entityTypes_EntityId"}},{"name":"counterpartyId","in":"path","description":"Counterparty Entity ID or Counterparty Entity ForeignID","required":true,"schema":{"$ref":"#/components/schemas/entityTypes_EntityId"}},{"name":"amount","in":"query","description":"The amount of the invoice to calculate vendor credit usage for.","required":true,"schema":{"type":"number","format":"double"}},{"name":"currency","in":"query","description":"The currency of the invoice to calculate vendor credit usage for. Defaults to USD.","required":false,"schema":{"$ref":"#/components/schemas/paymentMethodTypes_CurrencyCode"}},{"name":"excludedInvoiceIds","in":"query","description":"List of invoice IDs to exclude from the calculation. If not provided or an empty list, no invoices will be excluded. This is useful for recalculating vendor credit usage on invoices that already have vendor credits applied.","required":false,"schema":{"type":"array","items":{"$ref":"#/components/schemas/invoiceTypes_InvoiceId"}}},{"name":"includedVendorCreditIds","in":"query","description":"List of vendor credit IDs to include in the calculation. If not provided, all applicable vendor credits will be included, while an empty list will not include ANY vendor credits.  This is useful for recalculating vendor credit usage on invoices that have a fixed list of applied vendor credits (e.g. a SCHEDULED or PENDING invoice).","required":false,"schema":{"type":"array","items":{"$ref":"#/components/schemas/vendorCreditTypes_VendorCreditId"}}}],"responses":{"200":{"description":"The vendor credit usage estimate","content":{"application/json":{"schema":{"$ref":"#/components/schemas/vendorCreditTypes_CalculateVendorCreditUsageResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"security":[{"default":[]}]}},"/entity/{entityId}/emailLogs":{"get":{"operationId":"entity_emailLog_find","summary":"Get all incoming email logs","description":"Get all incoming invoice emails for an entity.","tags":["entity > email-log"],"parameters":[{"name":"entityId","in":"path","description":"Entity ID or Entity ForeignID","required":true,"schema":{"$ref":"#/components/schemas/entityTypes_EntityId"}},{"name":"startDate","in":"query","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"endDate","in":"query","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"limit","in":"query","description":"Number of logs to return. Limit can range between 1 and 100, and the default is 10.","required":false,"schema":{"type":"integer"}},{"name":"startingAfter","in":"query","description":"The ID of the log to start after. If not provided, the first page of logs will be returned.","required":false,"schema":{"$ref":"#/components/schemas/entityTypes_EntityId"}},{"name":"search","in":"query","description":"Search for logs by email address or subject","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/emailLogTypes_EmailLogResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"security":[{"default":[]}]}},"/entity/{entityId}/emailLog/{logId}":{"get":{"operationId":"entity_emailLog_get","summary":"Get incoming email log","description":"Get an email log by ID","tags":["entity > email-log"],"parameters":[{"name":"entityId","in":"path","description":"Entity ID or Entity ForeignID","required":true,"schema":{"$ref":"#/components/schemas/entityTypes_EntityId"}},{"name":"logId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/emailLogTypes_EmailLogId"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/emailLogTypes_EmailLog"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"security":[{"default":[]}]}},"/entity/{entityId}/paymentMethods":{"get":{"operationId":"entity_paymentMethod_getAll","summary":"Get All","tags":["entity > payment-method"],"parameters":[{"name":"entityId","in":"path","description":"Entity ID or Entity ForeignID","required":true,"schema":{"$ref":"#/components/schemas/entityTypes_EntityId"}},{"name":"type","in":"query","description":"Type of payment method to filter","required":false,"schema":{"$ref":"#/components/schemas/paymentMethodTypes_PaymentMethodType"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/paymentMethodTypes_PaymentMethodResponse"}}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"security":[{"default":[]}]}},"/entity/{entityId}/paymentMethod":{"post":{"operationId":"entity_paymentMethod_create","summary":"Create","tags":["entity > payment-method"],"parameters":[{"name":"entityId","in":"path","description":"Entity ID or Entity ForeignID","required":true,"schema":{"$ref":"#/components/schemas/entityTypes_EntityId"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/paymentMethodTypes_PaymentMethodResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/paymentMethodTypes_PaymentMethodRequest"}}}},"security":[{"default":[]}]}},"/entity/{entityId}/paymentMethod/{paymentMethodId}":{"get":{"operationId":"entity_paymentMethod_get","summary":"Get","tags":["entity > payment-method"],"parameters":[{"name":"entityId","in":"path","description":"Entity ID or Entity ForeignID","required":true,"schema":{"$ref":"#/components/schemas/entityTypes_EntityId"}},{"name":"paymentMethodId","in":"path","description":"Payment Method ID or Payment Method ForeignID","required":true,"schema":{"$ref":"#/components/schemas/paymentMethodTypes_PaymentMethodId"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/paymentMethodTypes_PaymentMethodResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"security":[{"default":[]}]},"put":{"operationId":"entity_paymentMethod_update","summary":"Update","description":"Only custom payment methods can be updated.","tags":["entity > payment-method"],"parameters":[{"name":"entityId","in":"path","description":"Entity ID or Entity ForeignID","required":true,"schema":{"$ref":"#/components/schemas/entityTypes_EntityId"}},{"name":"paymentMethodId","in":"path","description":"Payment Method ID or Payment Method ForeignID","required":true,"schema":{"$ref":"#/components/schemas/paymentMethodTypes_PaymentMethodId"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/paymentMethodTypes_PaymentMethodResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/paymentMethodTypes_PaymentMethodUpdateRequest"}}}},"security":[{"default":[]}]},"delete":{"operationId":"entity_paymentMethod_delete","summary":"Delete","description":"Mark a payment method as inactive. This will not remove the payment method from the system, but will prevent it from being used in the future.","tags":["entity > payment-method"],"parameters":[{"name":"entityId","in":"path","description":"Entity ID or Entity ForeignID","required":true,"schema":{"$ref":"#/components/schemas/entityTypes_EntityId"}},{"name":"paymentMethodId","in":"path","description":"Payment Method ID or Payment Method ForeignID","required":true,"schema":{"$ref":"#/components/schemas/paymentMethodTypes_PaymentMethodId"}}],"responses":{"200":{"description":"Successful response"},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"security":[{"default":[]}]}},"/entity/{entityId}/plaidLinkToken":{"get":{"operationId":"entity_paymentMethod_plaidLinkToken","summary":"Plaid Link token","description":"Get a Plaid link token for an entity. This token can be used to add or update a bank account to the entity using Plaid Link.","tags":["entity > payment-method"],"parameters":[{"name":"entityId","in":"path","description":"Entity ID or Entity ForeignID","required":true,"schema":{"$ref":"#/components/schemas/entityTypes_EntityId"}},{"name":"paymentMethodId","in":"query","description":"ID of Bank Account to update","required":false,"schema":{"$ref":"#/components/schemas/paymentMethodTypes_PaymentMethodId"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"type":"string"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"security":[{"default":[]}]}},"/entity/{entityId}/cardLinkToken":{"get":{"operationId":"entity_paymentMethod_cardLinkToken","summary":"Card Link token","description":"Get a card link token for an entity. This token is used by the frontend components to generate a PCI compliant form to add a card to the entity.","tags":["entity > payment-method"],"parameters":[{"name":"entityId","in":"path","description":"Entity ID or Entity ForeignID","required":true,"schema":{"$ref":"#/components/schemas/entityTypes_EntityId"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/entityTypes_CardLinkTokenResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"security":[{"default":[]}]}},"/entity/{entityId}/paymentMethod/{paymentMethodId}/events":{"get":{"operationId":"entity_paymentMethod_events","summary":"Get Events","tags":["entity > payment-method"],"parameters":[{"name":"entityId","in":"path","description":"Entity ID or Entity ForeignID","required":true,"schema":{"$ref":"#/components/schemas/entityTypes_EntityId"}},{"name":"paymentMethodId","in":"path","description":"Payment Method ID or Payment Method ForeignID","required":true,"schema":{"$ref":"#/components/schemas/paymentMethodTypes_PaymentMethodId"}},{"name":"startDate","in":"query","description":"Start date filter. If not provided, events from the start of time will be returned.","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"endDate","in":"query","description":"End date filter. If not provided, events to the end of time will be returned.","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"limit","in":"query","description":"Limit the number of events returned. Limit can range between 1 and 100, and the default is 50.","required":false,"schema":{"type":"integer"}},{"name":"startingAfter","in":"query","description":"The ID of the event to start after.","required":false,"schema":{"$ref":"#/components/schemas/paymentMethodTypes_PaymentMethodEventId"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/paymentMethodTypes_PaymentMethodEventsResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"security":[{"default":[]}]}},"/entity/{entityId}/paymentMethod/{paymentMethodId}/micro-deposits":{"post":{"operationId":"entity_paymentMethod_bankAccount_initiateMicroDeposits","summary":"Initiate micro deposits","description":"Initiate micro deposits for a bank account","tags":["entity > payment-method > bank-account"],"parameters":[{"name":"entityId","in":"path","description":"Entity ID or Entity ForeignID","required":true,"schema":{"$ref":"#/components/schemas/entityTypes_EntityId"}},{"name":"paymentMethodId","in":"path","description":"Payment Method ID or Payment Method ForeignID","required":true,"schema":{"$ref":"#/components/schemas/paymentMethodTypes_PaymentMethodId"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/paymentMethodTypes_PaymentMethodResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"security":[{"default":[]}]},"put":{"operationId":"entity_paymentMethod_bankAccount_completeMicroDeposits","summary":"Verify micro deposits","description":"Complete micro deposit verification","tags":["entity > payment-method > bank-account"],"parameters":[{"name":"entityId","in":"path","description":"Entity ID or Entity ForeignID","required":true,"schema":{"$ref":"#/components/schemas/entityTypes_EntityId"}},{"name":"paymentMethodId","in":"path","description":"Payment Method ID or Payment Method ForeignID","required":true,"schema":{"$ref":"#/components/schemas/paymentMethodTypes_PaymentMethodId"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/paymentMethodTypes_PaymentMethodResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"amounts":{"type":"array","items":{"type":"integer"},"description":"The amounts of the micro deposits in cents"}},"required":["amounts"]}}}},"security":[{"default":[]}]}},"/entity/{entityId}/paymentMethod/{paymentMethodId}/wallet-balance":{"get":{"operationId":"entity_paymentMethod_wallet_getWalletBalance","summary":"Get wallet balance","description":"Get the available and pending balance of this entity's wallet. The specified payment method ID must refer to the entity's wallet.","tags":["entity > payment-method > wallet"],"parameters":[{"name":"entityId","in":"path","description":"Entity ID or Entity ForeignID","required":true,"schema":{"$ref":"#/components/schemas/entityTypes_EntityId"}},{"name":"paymentMethodId","in":"path","description":"Payment Method ID or Payment Method ForeignID","required":true,"schema":{"$ref":"#/components/schemas/paymentMethodTypes_PaymentMethodId"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/paymentMethodTypes_WalletBalanceResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"security":[{"default":[]}]}},"/entity/{entityId}/paymentMethod/{paymentMethodId}/add-wallet-funds":{"post":{"operationId":"entity_paymentMethod_wallet_addWalletFunds","summary":"Add wallet funds","description":"Add funds to this wallet from a bank account (this transfer is D+2). The source payment method ID must refer to a bank account.","tags":["entity > payment-method > wallet"],"parameters":[{"name":"entityId","in":"path","description":"Entity ID or Entity ForeignID","required":true,"schema":{"$ref":"#/components/schemas/entityTypes_EntityId"}},{"name":"paymentMethodId","in":"path","description":"Payment Method ID or Payment Method ForeignID","required":true,"schema":{"$ref":"#/components/schemas/paymentMethodTypes_PaymentMethodId"}}],"responses":{"200":{"description":"Successful response"},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"amount":{"type":"number","format":"double","description":"The amount of the funds to add. If the entered amount has more decimal places than the currency supports, trailing decimals will be truncated."},"currency":{"$ref":"#/components/schemas/paymentMethodTypes_CurrencyCode","description":"The currency of the funds to add. (Defaults to USD, currently only USD is supported.)"},"sourcePaymentMethodId":{"$ref":"#/components/schemas/paymentMethodTypes_PaymentMethodId","description":"The ID of the bank account to add funds from. The source payment method ID must refer to a bank account."}},"required":["amount","sourcePaymentMethodId"]}}}},"security":[{"default":[]}]}},"/entity/{entityId}/paymentMethod/{paymentMethodId}/withdraw-wallet-funds":{"post":{"operationId":"entity_paymentMethod_wallet_withdrawWalletFunds","summary":"Withdraw wallet funds","description":"Withdraw funds from this wallet to a bank account (this transfer is D+0). The destination payment method ID must refer to a bank account.","tags":["entity > payment-method > wallet"],"parameters":[{"name":"entityId","in":"path","description":"Entity ID or Entity ForeignID","required":true,"schema":{"$ref":"#/components/schemas/entityTypes_EntityId"}},{"name":"paymentMethodId","in":"path","description":"Payment Method ID or Payment Method ForeignID","required":true,"schema":{"$ref":"#/components/schemas/paymentMethodTypes_PaymentMethodId"}}],"responses":{"200":{"description":"Successful response"},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"amount":{"type":"number","format":"double","description":"The amount of the funds to withdraw. If the entered amount has more decimal places than the currency supports, trailing decimals will be truncated."},"currency":{"$ref":"#/components/schemas/paymentMethodTypes_CurrencyCode","description":"The currency of the funds to withdraw. (Defaults to USD, currently only USD is supported.)"},"destinationPaymentMethodId":{"$ref":"#/components/schemas/paymentMethodTypes_PaymentMethodId","description":"The ID of the bank account to withdraw funds to. The destination payment method ID must refer to a bank account."}},"required":["amount","destinationPaymentMethodId"]}}}},"security":[{"default":[]}]}},"/entity/{entityId}/users":{"get":{"operationId":"entity_user_find","summary":"Search entity users","description":"Search entity users","tags":["entity > user"],"parameters":[{"name":"entityId","in":"path","description":"Entity ID or Entity ForeignID","required":true,"schema":{"$ref":"#/components/schemas/entityTypes_EntityId"}},{"name":"foreignId","in":"query","description":"ID used to identify user in your system","required":false,"schema":{"type":"string"}},{"name":"role","in":"query","description":"Filter users by role. If multiple roles are provided, users with any of the roles will be returned.","required":false,"schema":{"type":"string"}},{"name":"name","in":"query","description":"Filter users by name. Partial matches are supported.","required":false,"schema":{"type":"string"}},{"name":"email","in":"query","description":"Filter users by email. Partial matches are supported.","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","description":"Number of entities to return. Limit can range between 1 and 100, and the default is 10.","required":false,"schema":{"type":"integer"}},{"name":"startingAfter","in":"query","description":"The ID of the user to start after. If not provided, the first page of entities will be returned.","required":false,"schema":{"$ref":"#/components/schemas/entityTypes_EntityUserId"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/entityTypes_FindEntityUserResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"security":[{"default":[]}]}},"/entity/{entityId}/user":{"post":{"operationId":"entity_user_create","summary":"Create entity user","tags":["entity > user"],"parameters":[{"name":"entityId","in":"path","description":"Entity ID or Entity ForeignID","required":true,"schema":{"$ref":"#/components/schemas/entityTypes_EntityId"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/entityTypes_EntityUserResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entityTypes_EntityUserRequest"}}}},"security":[{"default":[]}]}},"/entity/{entityId}/user/{userId}":{"get":{"operationId":"entity_user_get","summary":"Get entity user","description":"Get entity user","tags":["entity > user"],"parameters":[{"name":"entityId","in":"path","description":"Entity ID or Entity ForeignID","required":true,"schema":{"$ref":"#/components/schemas/entityTypes_EntityId"}},{"name":"userId","in":"path","description":"User ID or User ForeignID","required":true,"schema":{"$ref":"#/components/schemas/entityTypes_EntityUserId"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/entityTypes_EntityUserResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"security":[{"default":[]}]},"post":{"operationId":"entity_user_update","summary":"Update entity user","description":"Update entity user","tags":["entity > user"],"parameters":[{"name":"entityId","in":"path","description":"Entity ID or Entity ForeignID","required":true,"schema":{"$ref":"#/components/schemas/entityTypes_EntityId"}},{"name":"userId","in":"path","description":"User ID or User ForeignID","required":true,"schema":{"$ref":"#/components/schemas/entityTypes_EntityUserId"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/entityTypes_EntityUserResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entityTypes_EntityUserRequest"}}}},"security":[{"default":[]}]},"delete":{"operationId":"entity_user_delete","summary":"Delete entity user","description":"Delete entity user. This will also remove the user from all approval policies. If an approval policy will break as a result of this operation, this request will fail.","tags":["entity > user"],"parameters":[{"name":"entityId","in":"path","description":"Entity ID or Entity ForeignID","required":true,"schema":{"$ref":"#/components/schemas/entityTypes_EntityId"}},{"name":"userId","in":"path","description":"User ID or User ForeignID","required":true,"schema":{"$ref":"#/components/schemas/entityTypes_EntityUserId"}}],"responses":{"200":{"description":"Successful response"},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"security":[{"default":[]}]}},"/entity/{entityId}/user/{userId}/token":{"post":{"operationId":"entity_user_getToken","summary":"Generate JWT Token","description":"Generate a JWT token for an entity user with the given options. This token can be used to authenticate the entity and entity user in the Mercoa API and iFrame.","tags":["entity > user"],"parameters":[{"name":"entityId","in":"path","description":"Entity ID or Entity ForeignID","required":true,"schema":{"$ref":"#/components/schemas/entityTypes_EntityId"}},{"name":"userId","in":"path","description":"User ID or User ForeignID","required":true,"schema":{"$ref":"#/components/schemas/entityTypes_EntityUserId"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"type":"string"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entityTypes_TokenGenerationOptions"}}}},"security":[{"default":[]}]}},"/entity/{entityId}/user/{userId}/notification-policies":{"get":{"operationId":"entity_user_notificationPolicy_getAll","summary":"Get All","description":"Retrieve all notification policies associated with this entity user","tags":["entity > user > notification-policy"],"parameters":[{"name":"entityId","in":"path","description":"Entity ID or Entity ForeignID","required":true,"schema":{"$ref":"#/components/schemas/entityTypes_EntityId"}},{"name":"userId","in":"path","description":"User ID or User ForeignID","required":true,"schema":{"$ref":"#/components/schemas/entityTypes_EntityUserId"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/entityTypes_UserNotificationPolicyResponse"}}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"security":[{"default":[]}]}},"/entity/{entityId}/user/{userId}/notification-policy/{notificationType}":{"get":{"operationId":"entity_user_notificationPolicy_get","summary":"Get","description":"Retrieve notification policy associated with this entity user","tags":["entity > user > notification-policy"],"parameters":[{"name":"entityId","in":"path","description":"Entity ID or Entity ForeignID","required":true,"schema":{"$ref":"#/components/schemas/entityTypes_EntityId"}},{"name":"userId","in":"path","description":"User ID or User ForeignID","required":true,"schema":{"$ref":"#/components/schemas/entityTypes_EntityUserId"}},{"name":"notificationType","in":"path","required":true,"schema":{"$ref":"#/components/schemas/entityTypes_NotificationType"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/entityTypes_UserNotificationPolicyResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"security":[{"default":[]}]},"post":{"operationId":"entity_user_notificationPolicy_update","summary":"Update","description":"Update notification policy associated with this entity user","tags":["entity > user > notification-policy"],"parameters":[{"name":"entityId","in":"path","description":"Entity ID or Entity ForeignID","required":true,"schema":{"$ref":"#/components/schemas/entityTypes_EntityId"}},{"name":"userId","in":"path","description":"User ID or User ForeignID","required":true,"schema":{"$ref":"#/components/schemas/entityTypes_EntityUserId"}},{"name":"notificationType","in":"path","required":true,"schema":{"$ref":"#/components/schemas/entityTypes_NotificationType"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/entityTypes_UserNotificationPolicyResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entityTypes_UserNotificationPolicyRequest"}}}},"security":[{"default":[]}]}},"/entity/{entityId}/user/{userId}/notifications":{"get":{"operationId":"entity_user_notifications_find","summary":"Get All","tags":["entity > user > notifications"],"parameters":[{"name":"entityId","in":"path","description":"Entity ID or Entity ForeignID","required":true,"schema":{"$ref":"#/components/schemas/entityTypes_EntityId"}},{"name":"userId","in":"path","description":"User ID or User ForeignID","required":true,"schema":{"$ref":"#/components/schemas/entityTypes_EntityUserId"}},{"name":"startDate","in":"query","description":"Start date for notification created on date filter.","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"endDate","in":"query","description":"End date for notification created date filter.","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"orderDirection","in":"query","description":"Direction to order notifications by. Defaults to asc.","required":false,"schema":{"$ref":"#/components/schemas/commons_OrderDirection"}},{"name":"limit","in":"query","description":"Number of invoices to return. Limit can range between 1 and 100, and the default is 10.","required":false,"schema":{"type":"integer"}},{"name":"startingAfter","in":"query","description":"The ID of the notification to start after. If not provided, the first page of invoices will be returned.","required":false,"schema":{"$ref":"#/components/schemas/entityTypes_NotificationId"}},{"name":"notificationType","in":"query","description":"The type of notification to filter by.","required":false,"schema":{"$ref":"#/components/schemas/entityTypes_NotificationType"}},{"name":"status","in":"query","description":"The status of the notification to filter by.","required":false,"schema":{"$ref":"#/components/schemas/entityTypes_NotificationStatus"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/entityTypes_FindNotificationResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"security":[{"default":[]}]}},"/entity/{entityId}/user/{userId}/notification/{notificationId}":{"get":{"operationId":"entity_user_notifications_get","summary":"Get","tags":["entity > user > notifications"],"parameters":[{"name":"entityId","in":"path","description":"Entity ID or Entity ForeignID","required":true,"schema":{"$ref":"#/components/schemas/entityTypes_EntityId"}},{"name":"userId","in":"path","description":"User ID or User ForeignID","required":true,"schema":{"$ref":"#/components/schemas/entityTypes_EntityUserId"}},{"name":"notificationId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/entityTypes_NotificationId"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/entityTypes_NotificationResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"security":[{"default":[]}]},"put":{"operationId":"entity_user_notifications_update","summary":"Update","description":"Update the status of a notification.","tags":["entity > user > notifications"],"parameters":[{"name":"entityId","in":"path","description":"Entity ID or Entity ForeignID","required":true,"schema":{"$ref":"#/components/schemas/entityTypes_EntityId"}},{"name":"userId","in":"path","description":"User ID or User ForeignID","required":true,"schema":{"$ref":"#/components/schemas/entityTypes_EntityUserId"}},{"name":"notificationId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/entityTypes_NotificationId"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/entityTypes_NotificationResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entityTypes_NotificationUpdateRequest"}}}},"security":[{"default":[]}]}},"/entity/{entityId}/approval-policies":{"get":{"operationId":"entity_approvalPolicy_getAll","summary":"Get All","description":"Retrieve all invoice approval policies associated with an entity","tags":["entity > approval-policy"],"parameters":[{"name":"entityId","in":"path","description":"Entity ID or Entity ForeignID","required":true,"schema":{"$ref":"#/components/schemas/entityTypes_EntityId"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/entityTypes_ApprovalPolicyResponse"}}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"security":[{"default":[]}]}},"/entity/{entityId}/approval-policy":{"post":{"operationId":"entity_approvalPolicy_create","summary":"Create","description":"Create an invoice approval policy associated with an entity","tags":["entity > approval-policy"],"parameters":[{"name":"entityId","in":"path","description":"Entity ID or Entity ForeignID","required":true,"schema":{"$ref":"#/components/schemas/entityTypes_EntityId"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/entityTypes_ApprovalPolicyResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entityTypes_ApprovalPolicyRequest"}}}},"security":[{"default":[]}]}},"/entity/{entityId}/approval-policy/{policyId}":{"get":{"operationId":"entity_approvalPolicy_get","summary":"Get","description":"Retrieve an invoice approval policy associated with an entity","tags":["entity > approval-policy"],"parameters":[{"name":"entityId","in":"path","description":"Entity ID or Entity ForeignID","required":true,"schema":{"$ref":"#/components/schemas/entityTypes_EntityId"}},{"name":"policyId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/entityTypes_ApprovalPolicyId"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/entityTypes_ApprovalPolicyResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"security":[{"default":[]}]},"post":{"operationId":"entity_approvalPolicy_update","summary":"Update","description":"Update an invoice approval policy associated with an entity","tags":["entity > approval-policy"],"parameters":[{"name":"entityId","in":"path","description":"Entity ID or Entity ForeignID","required":true,"schema":{"$ref":"#/components/schemas/entityTypes_EntityId"}},{"name":"policyId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/entityTypes_ApprovalPolicyId"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/entityTypes_ApprovalPolicyResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entityTypes_ApprovalPolicyUpdateRequest"}}}},"security":[{"default":[]}]},"delete":{"operationId":"entity_approvalPolicy_delete","summary":"Delete","description":"Delete an invoice approval policy associated with Entity. BEWARE: Any approval policy deletion will result in all associated downstream policies also being deleted.","tags":["entity > approval-policy"],"parameters":[{"name":"entityId","in":"path","description":"Entity ID or Entity ForeignID","required":true,"schema":{"$ref":"#/components/schemas/entityTypes_EntityId"}},{"name":"policyId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/entityTypes_ApprovalPolicyId"}}],"responses":{"200":{"description":"Successful response"},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"security":[{"default":[]}]}},"/entity/{entityId}/approval-policies/history":{"get":{"operationId":"entity_approvalPolicy_history","summary":"Get History","description":"Retrieve the history of approval policy changes for an entity","tags":["entity > approval-policy"],"parameters":[{"name":"entityId","in":"path","description":"Entity ID or Entity ForeignID","required":true,"schema":{"$ref":"#/components/schemas/entityTypes_EntityId"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/entityTypes_ApprovalPolicyHistoryResponse"}}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"security":[{"default":[]}]}},"/entity/{entityId}/approval-policies/history/{approvalPolicyHistoryId}/restore":{"post":{"operationId":"entity_approvalPolicy_restore","summary":"Restore","description":"Restore approval policies from a history entry.","tags":["entity > approval-policy"],"parameters":[{"name":"entityId","in":"path","description":"Entity ID or Entity ForeignID","required":true,"schema":{"$ref":"#/components/schemas/entityTypes_EntityId"}},{"name":"approvalPolicyHistoryId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/entityTypes_ApprovalPolicyResponse"}}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"security":[{"default":[]}]}},"/entity/{entityId}/bnpl/loans":{"get":{"operationId":"entity_bnpl_getLoans","summary":"Get Entity BNPL Loans","description":"Get all BNPL loans associated with an entity","tags":["entity > bnpl"],"parameters":[{"name":"entityId","in":"path","description":"The ID of the entity to get loans for","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/invoiceTypes_BnplLoanResponse"}}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"security":[{"default":[]}]}},"/entities":{"post":{"operationId":"entity_bulk_create","summary":"Create Bulk Entities (Sync)","description":"Create multiple entities in bulk. This endpoint will process synchronously and return a list of entities that were created or failed to create.","tags":["entity > bulk"],"parameters":[{"name":"emitWebhooks","in":"query","description":"If true, webhooks will be emitted for each entity that is created. By default, webhooks are not emitted.","required":false,"schema":{"type":"boolean","default":false}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/entityTypes_BulkEntityCreationResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entityTypes_BulkEntityCreationRequest"}}}},"security":[{"default":[]}]}},"/entities/download":{"get":{"operationId":"entity_bulk_download","summary":"Download Bulk Entities (Sync)","description":"Get a URL to download a bulk entity as a CSV/JSON file.","tags":["entity > bulk"],"parameters":[{"name":"format","in":"query","description":"Format of the file to download. Defaults to CSV.","required":false,"schema":{"$ref":"#/components/schemas/commons_BulkDownloadFormat"}},{"name":"paymentMethods","in":"query","description":"If true, will include entity payment methods as part of the response","required":false,"schema":{"type":"boolean"}},{"name":"isCustomer","in":"query","description":"If true, only entities with a direct relationship to the requesting organization will be returned. If false or not provided, all entities will be returned.","required":false,"schema":{"type":"boolean"}},{"name":"foreignId","in":"query","description":"ID used to identify this entity in your system","required":false,"schema":{"type":"string"}},{"name":"status","in":"query","required":false,"schema":{"$ref":"#/components/schemas/entityTypes_EntityStatus"}},{"name":"isPayee","in":"query","description":"If true, entities that are marked as payees will be returned.\nIf false or not provided, entities that are marked as payees will not be returned.","required":false,"schema":{"type":"boolean"}},{"name":"isPayor","in":"query","description":"If true or not provided, entities that are marked as payors will be returned.\nIf false, entities that are marked as payors will not be returned.","required":false,"schema":{"type":"boolean"}},{"name":"name","in":"query","description":"Use search instead. Deprecated. Filter entities by name. Partial matches are supported.","required":false,"schema":{"type":"string"},"deprecated":true},{"name":"search","in":"query","description":"Find entities by name, email, emailTo, entity ID, or foreign ID. Partial matches are supported for name, email, and emailTo. Exact matches are used for entity ID and foreign ID.","required":false,"schema":{"type":"string"}},{"name":"metadata","in":"query","description":"Filter entities by simple key/value metadata. Each filter will be applied as an AND condition. Duplicate keys will be ignored.","required":false,"schema":{"$ref":"#/components/schemas/invoiceTypes_MetadataFilter"}},{"name":"returnMetadata","in":"query","description":"Return simple key/value metadata for the specified keys for the entities. For more complex metadata, use the Metadata API.","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","description":"Number of entities to return. Limit can range between 1 and 100, and the default is 10.","required":false,"schema":{"type":"integer"}},{"name":"startingAfter","in":"query","description":"The ID of the entity to start after. If not provided, the first page of entities will be returned.","required":false,"schema":{"$ref":"#/components/schemas/entityTypes_EntityId"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/commons_BulkDownloadResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"security":[{"default":[]}]}},"/entity/{entityId}/customization":{"get":{"operationId":"entity_customization_get","summary":"Get","description":"Get entity customization.","tags":["entity > customization"],"parameters":[{"name":"entityId","in":"path","description":"Entity ID or Entity ForeignID","required":true,"schema":{"$ref":"#/components/schemas/entityTypes_EntityId"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/entityTypes_EntityCustomizationResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"security":[{"default":[]}]},"post":{"operationId":"entity_customization_update","summary":"Update","description":"Update entity customization. This lets you turn off metadata and payment methods for an entity.","tags":["entity > customization"],"parameters":[{"name":"entityId","in":"path","description":"Entity ID or Entity ForeignID","required":true,"schema":{"$ref":"#/components/schemas/entityTypes_EntityId"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/entityTypes_EntityCustomizationResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entityTypes_EntityCustomizationRequest"}}}},"security":[{"default":[]}]}},"/entity/{entityId}/documents":{"get":{"operationId":"entity_document_getAll","summary":"Get Documents","description":"Get documents (1099/W9) associated with this entity","tags":["entity > document"],"parameters":[{"name":"entityId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/entityTypes_EntityId"}},{"name":"type","in":"query","description":"Filter by document type","required":false,"schema":{"$ref":"#/components/schemas/commons_DocumentType"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/commons_DocumentResponse"}}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"security":[{"default":[]}]}},"/entity/{entityId}/document":{"post":{"operationId":"entity_document_upload","summary":"Upload Document","description":"Upload documents associated with this entity","tags":["entity > document"],"parameters":[{"name":"entityId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/entityTypes_EntityId"}}],"responses":{"200":{"description":"Successful response"},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"document":{"type":"string","description":"Base64 encoded image or PDF of document. PNG, JPG, WEBP, and PDF are supported. 10MB max."},"type":{"$ref":"#/components/schemas/commons_DocumentType"}},"required":["document","type"]}}}},"security":[{"default":[]}]}},"/entity/{entityId}/document/{documentId}":{"delete":{"operationId":"entity_document_delete","summary":"Delete Document","description":"Delete a document associated with this entity","tags":["entity > document"],"parameters":[{"name":"entityId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/entityTypes_EntityId"}},{"name":"documentId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"security":[{"default":[]}]}},"/entity/{entityId}/email-templates":{"get":{"operationId":"entity_emailTemplate_getAll","summary":"Get all email templates","description":"Get all email templates for the entity","tags":["entity > email-template"],"parameters":[{"name":"entityId","in":"path","description":"Entity ID or Entity ForeignID","required":true,"schema":{"$ref":"#/components/schemas/entityTypes_EntityId"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/entityTypes_EmailTemplateResponse"}}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"security":[{"default":[]}]}},"/entity/{entityId}/email-template":{"post":{"operationId":"entity_emailTemplate_create","summary":"Create entity email template","tags":["entity > email-template"],"parameters":[{"name":"entityId","in":"path","description":"Entity ID or Entity ForeignID","required":true,"schema":{"$ref":"#/components/schemas/entityTypes_EntityId"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/entityTypes_EmailTemplateResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entityTypes_EmailTemplateRequest"}}}},"security":[{"default":[]}]}},"/entity/{entityId}/email-template/{emailTemplateId}":{"get":{"operationId":"entity_emailTemplate_get","summary":"Get entity email template","description":"Get entity email template","tags":["entity > email-template"],"parameters":[{"name":"entityId","in":"path","description":"Entity ID or Entity ForeignID","required":true,"schema":{"$ref":"#/components/schemas/entityTypes_EntityId"}},{"name":"emailTemplateId","in":"path","description":"Email Template ID or Email Template ForeignID","required":true,"schema":{"$ref":"#/components/schemas/entityTypes_EmailTemplateId"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/entityTypes_EmailTemplateResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"security":[{"default":[]}]},"put":{"operationId":"entity_emailTemplate_update","summary":"Update entity email template","description":"Update entity email template","tags":["entity > email-template"],"parameters":[{"name":"entityId","in":"path","description":"Entity ID or Entity ForeignID","required":true,"schema":{"$ref":"#/components/schemas/entityTypes_EntityId"}},{"name":"emailTemplateId","in":"path","description":"Email Template ID or Email Template ForeignID","required":true,"schema":{"$ref":"#/components/schemas/entityTypes_EmailTemplateId"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/entityTypes_EmailTemplateResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entityTypes_EmailTemplateRequest"}}}},"security":[{"default":[]}]},"delete":{"operationId":"entity_emailTemplate_delete","summary":"Delete entity email template","description":"Delete entity email template. This will also remove the email template from all entities.","tags":["entity > email-template"],"parameters":[{"name":"entityId","in":"path","description":"Entity ID or Entity ForeignID","required":true,"schema":{"$ref":"#/components/schemas/entityTypes_EntityId"}},{"name":"emailTemplateId","in":"path","description":"Email Template ID or Email Template ForeignID","required":true,"schema":{"$ref":"#/components/schemas/entityTypes_EmailTemplateId"}}],"responses":{"200":{"description":"Successful response"},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"security":[{"default":[]}]}},"/entity/{entityId}/external-accounting-system":{"get":{"operationId":"entity_externalAccountingSystem_get","summary":"Get External System","description":"Get the external accounting system connected to an entity","tags":["entity > external-accounting-system"],"parameters":[{"name":"entityId","in":"path","description":"Entity ID or Entity ForeignID","required":true,"schema":{"$ref":"#/components/schemas/entityTypes_EntityId"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/entity_externalAccountingSystem_externalAccountingSystemCompanyResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"security":[{"default":[]}]}},"/entity/{entityId}/external-accounting-system/create":{"post":{"operationId":"entity_externalAccountingSystem_create","summary":"Create/Update External Entity","description":"Create/Link an entity to an external accounting system like Codat or Rutter. If the entity is already linked to an external accounting system, this will return the existing connection.","tags":["entity > external-accounting-system"],"parameters":[{"name":"entityId","in":"path","description":"Entity ID or Entity ForeignID","required":true,"schema":{"$ref":"#/components/schemas/entityTypes_EntityId"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/entity_externalAccountingSystem_externalAccountingSystemCompanyResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entity_externalAccountingSystem_externalAccountingSystemCompanyCreationRequest"}}}},"security":[{"default":[]}]}},"/entity/{entityId}/external-accounting-system/connect":{"get":{"operationId":"entity_externalAccountingSystem_connect","summary":"Connect External System","description":"Get a link to connect an entity to an external accounting system like Quickbooks or Xero","tags":["entity > external-accounting-system"],"parameters":[{"name":"entityId","in":"path","description":"Entity ID or Entity ForeignID","required":true,"schema":{"$ref":"#/components/schemas/entityTypes_EntityId"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"type":"string"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"security":[{"default":[]}]}},"/entity/{entityId}/external-accounting-system/sync":{"get":{"operationId":"entity_externalAccountingSystem_sync","summary":"Sync External System","description":"Sync an entity with an external accounting system. Will sync customers/vendors and invoices.","tags":["entity > external-accounting-system"],"parameters":[{"name":"entityId","in":"path","description":"Entity ID or Entity ForeignID","required":true,"schema":{"$ref":"#/components/schemas/entityTypes_EntityId"}},{"name":"vendors","in":"query","description":"Sync vendors from external accounting system. Default is to pull vendors from external system.","required":false,"schema":{"$ref":"#/components/schemas/entity_externalAccountingSystem_syncType"}},{"name":"bills","in":"query","description":"Sync bills from external accounting system. Default is to not sync bills. Invoices that already exist in both systems will not be updated, only new invoices not present in the other system will be created.","required":false,"schema":{"$ref":"#/components/schemas/entity_externalAccountingSystem_syncType"}},{"name":"glAccounts","in":"query","description":"Sync GL accounts from external accounting system. Default is to pull GL accounts from external system. Pushing GL accounts is not supported.","required":false,"schema":{"$ref":"#/components/schemas/entity_externalAccountingSystem_syncType"}}],"responses":{"200":{"description":"Successful response"},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"security":[{"default":[]}]}},"/entity/{entityId}/invoices":{"get":{"operationId":"entity_invoice_find","summary":"Get All","description":"Get invoices for an entity with the given filters.","tags":["entity > invoice"],"parameters":[{"name":"entityId","in":"path","description":"Entity ID or Entity ForeignID","required":true,"schema":{"$ref":"#/components/schemas/entityTypes_EntityId"}},{"name":"excludePayables","in":"query","description":"Return only invoices that are receivable by the entity.","required":false,"schema":{"type":"boolean"}},{"name":"excludeReceivables","in":"query","description":"Return only invoices that are payable by the entity.","required":false,"schema":{"type":"boolean"}},{"name":"startDate","in":"query","description":"Start date filter. Defaults to CREATED_AT unless specified the dateType is specified","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"endDate","in":"query","description":"End date filter. Defaults to CREATED_AT unless specified the dateType is specified","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"dateType","in":"query","description":"Type of date to filter by if startDate and endDate filters are provided. Defaults to CREATED_AT.","required":false,"schema":{"$ref":"#/components/schemas/invoiceTypes_InvoiceDateFilter"}},{"name":"orderBy","in":"query","description":"Field to order invoices by. Defaults to CREATED_AT.","required":false,"schema":{"$ref":"#/components/schemas/invoiceTypes_InvoiceOrderByField"}},{"name":"orderDirection","in":"query","description":"Direction to order invoices by. Defaults to asc.","required":false,"schema":{"$ref":"#/components/schemas/commons_OrderDirection"}},{"name":"limit","in":"query","description":"Number of invoices to return. Limit can range between 1 and 100, and the default is 10.","required":false,"schema":{"type":"integer"}},{"name":"startingAfter","in":"query","description":"The ID of the invoice to start after. If not provided, the first page of invoices will be returned.","required":false,"schema":{"$ref":"#/components/schemas/invoiceTypes_InvoiceId"}},{"name":"metadata","in":"query","description":"Filter invoices by metadata. Each filter will be applied as an AND condition. Duplicate keys will be ignored.","required":false,"schema":{"$ref":"#/components/schemas/invoiceTypes_MetadataFilter"}},{"name":"lineItemMetadata","in":"query","description":"Filter invoices by line item metadata. Each filter will be applied as an AND condition. Duplicate keys will be ignored.","required":false,"schema":{"$ref":"#/components/schemas/invoiceTypes_MetadataFilter"}},{"name":"lineItemGlAccountId","in":"query","description":"Filter invoices by line item GL account ID. Each filter will be applied as an OR condition. Duplicate keys will be ignored.","required":false,"schema":{"type":"string"}},{"name":"search","in":"query","description":"Find invoices by vendor name, invoice number, check number, or amount. Partial matches are supported.","required":false,"schema":{"type":"string"}},{"name":"payerId","in":"query","description":"Filter invoices by payer ID or payer foreign ID.","required":false,"schema":{"$ref":"#/components/schemas/entityTypes_EntityId"}},{"name":"vendorId","in":"query","description":"Filter invoices by vendor ID or vendor foreign ID.","required":false,"schema":{"$ref":"#/components/schemas/entityTypes_EntityId"}},{"name":"creatorUserId","in":"query","description":"Filter invoices by the ID or foreign ID of the user that created the invoice.","required":false,"schema":{"$ref":"#/components/schemas/entityTypes_EntityUserId"}},{"name":"approverId","in":"query","description":"Filter invoices by assigned approver user ID.","required":false,"schema":{"$ref":"#/components/schemas/entityTypes_EntityUserId"}},{"name":"approverAction","in":"query","description":"Filter invoices by approver action. Needs to be used with approverId. For example, if you want to find all invoices that have been approved by a specific user, you would use approverId and approverAction=APPROVE.","required":false,"schema":{"$ref":"#/components/schemas/invoiceTypes_ApproverAction"}},{"name":"approverCount","in":"query","description":"Filter invoices by the number of approvers. Use exact number (e.g., 3) or range (e.g., \">3\", \"<5\", \">=2\", \"<=4\").","required":false,"schema":{"type":"string"}},{"name":"invoiceId","in":"query","description":"Filter invoices by invoice ID or invoice foreign ID.","required":false,"schema":{"$ref":"#/components/schemas/invoiceTypes_InvoiceId"}},{"name":"status","in":"query","description":"Invoice status to filter on.","required":false,"schema":{"$ref":"#/components/schemas/invoiceTypes_InvoiceStatus"}},{"name":"paymentType","in":"query","description":"Filter invoices by payment type.","required":false,"schema":{"type":"array","items":{"$ref":"#/components/schemas/invoiceTypes_PaymentType"}}},{"name":"returnPayerMetadata","in":"query","description":"Whether to return payer metadata in the response","required":false,"schema":{"type":"boolean"}},{"name":"returnVendorMetadata","in":"query","description":"Whether to return vendor metadata in the response","required":false,"schema":{"type":"boolean"}},{"name":"returnPaymentTiming","in":"query","description":"Whether to return payment timing in the response","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/invoiceTypes_FindInvoiceResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"security":[{"default":[]}]}},"/entity/{entityId}/invoice-metrics":{"get":{"operationId":"entity_invoice_metrics","summary":"Get Metrics","description":"Get invoice metrics for an entity with the given filters. Invoices will always be grouped by currency. If none of excludePayables, excludeReceivables, payerId, vendorId, or invoiceId status filters are provided, excludeReceivables will be set to true.","tags":["entity > invoice"],"parameters":[{"name":"entityId","in":"path","description":"Entity ID or Entity ForeignID","required":true,"schema":{"$ref":"#/components/schemas/entityTypes_EntityId"}},{"name":"search","in":"query","description":"Find invoices by vendor name, invoice number, check number, or amount. Partial matches are supported.","required":false,"schema":{"type":"string"}},{"name":"excludePayables","in":"query","description":"Only return invoices that are not payable by the entity. This will return only invoices that are receivable by the entity.","required":false,"schema":{"type":"boolean"}},{"name":"excludeReceivables","in":"query","description":"Only return invoices that are not receivable by the entity. This will return only invoices that are payable by the entity.","required":false,"schema":{"type":"boolean"}},{"name":"returnByDate","in":"query","description":"Return invoice metrics grouped by date.","required":false,"schema":{"$ref":"#/components/schemas/invoiceTypes_InvoiceMetricsPerDateGroupBy"}},{"name":"returnByDateFrequency","in":"query","description":"Return invoice metrics grouped by date. Defaults to daily.","required":false,"schema":{"$ref":"#/components/schemas/invoiceTypes_InvoiceMetricsPerDateFrequency"}},{"name":"groupBy","in":"query","description":"Return invoice metrics grouped by.","required":false,"schema":{"$ref":"#/components/schemas/invoiceTypes_InvoiceMetricsGroupBy"}},{"name":"payerId","in":"query","description":"Filter invoices by payer ID.","required":false,"schema":{"$ref":"#/components/schemas/entityTypes_EntityId"}},{"name":"vendorId","in":"query","description":"Filter invoices by vendor ID.","required":false,"schema":{"$ref":"#/components/schemas/entityTypes_EntityId"}},{"name":"approverId","in":"query","description":"Filter invoices by assigned approver user ID.","required":false,"schema":{"$ref":"#/components/schemas/entityTypes_EntityUserId"}},{"name":"approverCount","in":"query","description":"Filter invoices by the number of approvers. Use exact number (e.g., 3) or range (e.g., \">3\", \"<5\", \">=2\", \"<=4\").","required":false,"schema":{"type":"string"}},{"name":"invoiceId","in":"query","description":"Filter invoices by invoice ID or invoice foreign ID.","required":false,"schema":{"$ref":"#/components/schemas/invoiceTypes_InvoiceId"}},{"name":"status","in":"query","description":"Invoice status to filter on","required":false,"schema":{"$ref":"#/components/schemas/invoiceTypes_InvoiceStatus"}},{"name":"startDate","in":"query","description":"Start date filter. Defaults to CREATED_AT unless specified the dateType is specified","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"endDate","in":"query","description":"End date filter. Defaults to CREATED_AT unless specified the dateType is specified","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"dateType","in":"query","description":"Type of date to filter by if startDate and endDate filters are provided. Defaults to CREATED_AT.","required":false,"schema":{"$ref":"#/components/schemas/invoiceTypes_InvoiceDateFilter"}},{"name":"currency","in":"query","description":"Currency to filter on","required":false,"schema":{"$ref":"#/components/schemas/paymentMethodTypes_CurrencyCode"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/invoiceTypes_InvoiceMetricsResponse"}}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"security":[{"default":[]}]}},"/entity/{entityId}/invoices/download":{"get":{"operationId":"entity_invoice_download","summary":"Download Bulk Invoices (Sync)","description":"Get a URL to download invoices for an entity as a CSV/JSON file.","tags":["entity > invoice"],"parameters":[{"name":"entityId","in":"path","description":"Entity ID or Entity ForeignID","required":true,"schema":{"$ref":"#/components/schemas/entityTypes_EntityId"}},{"name":"format","in":"query","description":"Format of the file to download. Defaults to CSV.","required":false,"schema":{"$ref":"#/components/schemas/commons_BulkDownloadFormat"}},{"name":"excludePayables","in":"query","description":"Return only invoices that are receivable by the entity.","required":false,"schema":{"type":"boolean"}},{"name":"excludeReceivables","in":"query","description":"Return only invoices that are payable by the entity.","required":false,"schema":{"type":"boolean"}},{"name":"startDate","in":"query","description":"Start date filter. Defaults to CREATED_AT unless specified the dateType is specified","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"endDate","in":"query","description":"End date filter. Defaults to CREATED_AT unless specified the dateType is specified","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"dateType","in":"query","description":"Type of date to filter by if startDate and endDate filters are provided. Defaults to CREATED_AT.","required":false,"schema":{"$ref":"#/components/schemas/invoiceTypes_InvoiceDateFilter"}},{"name":"orderBy","in":"query","description":"Field to order invoices by. Defaults to CREATED_AT.","required":false,"schema":{"$ref":"#/components/schemas/invoiceTypes_InvoiceOrderByField"}},{"name":"orderDirection","in":"query","description":"Direction to order invoices by. Defaults to asc.","required":false,"schema":{"$ref":"#/components/schemas/commons_OrderDirection"}},{"name":"search","in":"query","description":"Find invoices by vendor name, invoice number, check number, or amount. Partial matches are supported.","required":false,"schema":{"type":"string"}},{"name":"metadata","in":"query","description":"Filter invoices by metadata. Each filter will be applied as an AND condition. Duplicate keys will be ignored.","required":false,"schema":{"$ref":"#/components/schemas/invoiceTypes_MetadataFilter"}},{"name":"lineItemMetadata","in":"query","description":"Filter invoices by line item metadata. Each filter will be applied as an AND condition. Duplicate keys will be ignored.","required":false,"schema":{"$ref":"#/components/schemas/invoiceTypes_MetadataFilter"}},{"name":"lineItemGlAccountId","in":"query","description":"Filter invoices by line item GL account ID. Each filter will be applied as an OR condition. Duplicate keys will be ignored.","required":false,"schema":{"type":"string"}},{"name":"payerId","in":"query","description":"Filter invoices by payer ID or payer foreign ID.","required":false,"schema":{"$ref":"#/components/schemas/entityTypes_EntityId"}},{"name":"vendorId","in":"query","description":"Filter invoices by vendor ID or vendor foreign ID.","required":false,"schema":{"$ref":"#/components/schemas/entityTypes_EntityId"}},{"name":"creatorUserId","in":"query","description":"Filter invoices by the ID or foreign ID of the user that created the invoice.","required":false,"schema":{"$ref":"#/components/schemas/entityTypes_EntityUserId"}},{"name":"approverId","in":"query","description":"Filter invoices by assigned approver user ID.","required":false,"schema":{"$ref":"#/components/schemas/entityTypes_EntityUserId"}},{"name":"approverAction","in":"query","description":"Filter invoices by approver action. Needs to be used with approverId. For example, if you want to find all invoices that have been approved by a specific user, you would use approverId and approverAction=APPROVE.","required":false,"schema":{"$ref":"#/components/schemas/invoiceTypes_ApproverAction"}},{"name":"invoiceId","in":"query","description":"Filter invoices by invoice ID or invoice foreign ID.","required":false,"schema":{"$ref":"#/components/schemas/invoiceTypes_InvoiceId"}},{"name":"status","in":"query","description":"Invoice status to filter on.","required":false,"schema":{"$ref":"#/components/schemas/invoiceTypes_InvoiceStatus"}},{"name":"paymentType","in":"query","description":"Filter invoices by payment type.","required":false,"schema":{"type":"array","items":{"$ref":"#/components/schemas/invoiceTypes_PaymentType"}}},{"name":"returnPayerMetadata","in":"query","description":"Whether to return payer metadata in the response","required":false,"schema":{"type":"boolean"}},{"name":"returnVendorMetadata","in":"query","description":"Whether to return vendor metadata in the response","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/commons_BulkDownloadResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"security":[{"default":[]}]}},"/entity/{entityId}/metadata":{"get":{"operationId":"entity_metadata_getAll","summary":"Get All","description":"Retrieve all metadata options associated with this entity","tags":["entity > metadata"],"parameters":[{"name":"entityId","in":"path","description":"Entity ID or Entity ForeignID","required":true,"schema":{"$ref":"#/components/schemas/entityTypes_EntityId"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/entityTypes_EntityMetadataResponse"}}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"security":[{"default":[]}]}},"/entity/{entityId}/metadata/{key}":{"get":{"operationId":"entity_metadata_get","summary":"Get","description":"Retrieve metadata associated with a specific key","tags":["entity > metadata"],"parameters":[{"name":"entityId","in":"path","description":"Entity ID or Entity ForeignID","required":true,"schema":{"$ref":"#/components/schemas/entityTypes_EntityId"}},{"name":"key","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"type":"array","items":{"type":"string"}}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"security":[{"default":[]}]},"post":{"operationId":"entity_metadata_update","summary":"Update","description":"Update metadata associated with a specific key","tags":["entity > metadata"],"parameters":[{"name":"entityId","in":"path","description":"Entity ID or Entity ForeignID","required":true,"schema":{"$ref":"#/components/schemas/entityTypes_EntityId"}},{"name":"key","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"type":"array","items":{"type":"string"}}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"type":"string"}}}}},"security":[{"default":[]}]},"delete":{"operationId":"entity_metadata_delete","summary":"Delete","description":"Delete all metadata associated with a specific key","tags":["entity > metadata"],"parameters":[{"name":"entityId","in":"path","description":"Entity ID or Entity ForeignID","required":true,"schema":{"$ref":"#/components/schemas/entityTypes_EntityId"}},{"name":"key","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"security":[{"default":[]}]}},"/entity/{entityId}/notification-policies":{"get":{"operationId":"entity_notificationPolicy_getAll","summary":"Get All","description":"Retrieve all notification policies associated with this entity","tags":["entity > notification-policy"],"parameters":[{"name":"entityId","in":"path","description":"Entity ID or Entity ForeignID","required":true,"schema":{"$ref":"#/components/schemas/entityTypes_EntityId"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/entityTypes_NotificationPolicyResponse"}}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"security":[{"default":[]}]}},"/entity/{entityId}/notification-policy/{notificationType}":{"get":{"operationId":"entity_notificationPolicy_get","summary":"Get","description":"Retrieve notification policy associated with this entity","tags":["entity > notification-policy"],"parameters":[{"name":"entityId","in":"path","description":"Entity ID or Entity ForeignID","required":true,"schema":{"$ref":"#/components/schemas/entityTypes_EntityId"}},{"name":"notificationType","in":"path","required":true,"schema":{"$ref":"#/components/schemas/entityTypes_NotificationType"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/entityTypes_NotificationPolicyResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"security":[{"default":[]}]},"post":{"operationId":"entity_notificationPolicy_update","summary":"Update","description":"Update notification policy associated with this entity","tags":["entity > notification-policy"],"parameters":[{"name":"entityId","in":"path","description":"Entity ID or Entity ForeignID","required":true,"schema":{"$ref":"#/components/schemas/entityTypes_EntityId"}},{"name":"notificationType","in":"path","required":true,"schema":{"$ref":"#/components/schemas/entityTypes_NotificationType"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/entityTypes_NotificationPolicyResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entityTypes_NotificationPolicyRequest"}}}},"security":[{"default":[]}]}},"/entity/{entityId}/representatives":{"get":{"operationId":"entity_representative_getAll","summary":"Get All","description":"Get representatives for an entity","tags":["entity > representative"],"parameters":[{"name":"entityId","in":"path","description":"Entity ID or Entity ForeignID","required":true,"schema":{"$ref":"#/components/schemas/entityTypes_EntityId"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/entityTypes_RepresentativeResponse"}}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"security":[{"default":[]}]}},"/entity/{entityId}/representative":{"post":{"operationId":"entity_representative_create","summary":"Create","tags":["entity > representative"],"parameters":[{"name":"entityId","in":"path","description":"Entity ID or Entity ForeignID","required":true,"schema":{"$ref":"#/components/schemas/entityTypes_EntityId"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/entityTypes_RepresentativeResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entityTypes_RepresentativeRequest"}}}},"security":[{"default":[]}]}},"/entity/{entityId}/representative/{representativeId}":{"get":{"operationId":"entity_representative_get","summary":"Get","tags":["entity > representative"],"parameters":[{"name":"entityId","in":"path","description":"Entity ID or Entity ForeignID","required":true,"schema":{"$ref":"#/components/schemas/entityTypes_EntityId"}},{"name":"representativeId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/entityTypes_RepresentativeId"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/entityTypes_RepresentativeResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"security":[{"default":[]}]},"post":{"operationId":"entity_representative_update","summary":"Update","tags":["entity > representative"],"parameters":[{"name":"entityId","in":"path","description":"Entity ID or Entity ForeignID","required":true,"schema":{"$ref":"#/components/schemas/entityTypes_EntityId"}},{"name":"representativeId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/entityTypes_RepresentativeId"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/entityTypes_RepresentativeResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/entityTypes_RepresentativeUpdateRequest"}}}},"security":[{"default":[]}]},"delete":{"operationId":"entity_representative_delete","summary":"Delete","tags":["entity > representative"],"parameters":[{"name":"entityId","in":"path","description":"Entity ID or Entity ForeignID","required":true,"schema":{"$ref":"#/components/schemas/entityTypes_EntityId"}},{"name":"representativeId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/entityTypes_RepresentativeId"}}],"responses":{"200":{"description":"Successful response"},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"security":[{"default":[]}]}},"/invoice-templates":{"get":{"operationId":"invoiceTemplate_find","summary":"Search invoice templates","description":"Search invoice templates for all entities in the organization","tags":["invoice-template"],"parameters":[{"name":"entityId","in":"query","description":"Filter invoice templates by the ID or foreign ID of the entity that is the payer or the vendor of the invoice template.","required":false,"schema":{"$ref":"#/components/schemas/entityTypes_EntityId"}},{"name":"startDate","in":"query","description":"Start date filter. Defaults to CREATED_AT unless specified the dateType is specified","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"endDate","in":"query","description":"End date filter. Defaults to CREATED_AT unless specified the dateType is specified","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"dateType","in":"query","description":"Type of date to filter by if startDate and endDate filters are provided. Defaults to CREATED_AT.","required":false,"schema":{"$ref":"#/components/schemas/invoiceTypes_InvoiceDateFilter"}},{"name":"orderBy","in":"query","description":"Field to order invoice templates by. Defaults to CREATED_AT.","required":false,"schema":{"$ref":"#/components/schemas/invoiceTypes_InvoiceOrderByField"}},{"name":"orderDirection","in":"query","description":"Direction to order invoice templates by. Defaults to asc.","required":false,"schema":{"$ref":"#/components/schemas/commons_OrderDirection"}},{"name":"limit","in":"query","description":"Number of invoice templates to return. Limit can range between 1 and 100, and the default is 10.","required":false,"schema":{"type":"integer"}},{"name":"startingAfter","in":"query","description":"The ID of the invoice template to start after. If not provided, the first page of invoice templates will be returned.","required":false,"schema":{"$ref":"#/components/schemas/invoiceTypes_InvoiceTemplateId"}},{"name":"search","in":"query","description":"Find invoice templates by vendor name, check number, invoice number, or amount. Partial matches are supported.","required":false,"schema":{"type":"string"}},{"name":"metadata","in":"query","description":"Filter invoice templates by metadata. Each filter will be applied as an AND condition. Duplicate keys will be ignored.","required":false,"schema":{"$ref":"#/components/schemas/invoiceTypes_MetadataFilter"}},{"name":"lineItemMetadata","in":"query","description":"Filter invoice templates by line item metadata. Each filter will be applied as an AND condition. Duplicate keys will be ignored.","required":false,"schema":{"$ref":"#/components/schemas/invoiceTypes_MetadataFilter"}},{"name":"lineItemGlAccountId","in":"query","description":"Filter invoice templates by line item GL account ID. Each filter will be applied as an OR condition. Duplicate keys will be ignored.","required":false,"schema":{"type":"string"}},{"name":"payerId","in":"query","description":"Filter invoice templates by payer ID or payer foreign ID.","required":false,"schema":{"$ref":"#/components/schemas/entityTypes_EntityId"}},{"name":"vendorId","in":"query","description":"Filter invoice templates by vendor ID or vendor foreign ID.","required":false,"schema":{"$ref":"#/components/schemas/entityTypes_EntityId"}},{"name":"creatorUserId","in":"query","description":"Filter invoices by the ID or foreign ID of the user that created the invoice.","required":false,"schema":{"$ref":"#/components/schemas/entityTypes_EntityUserId"}},{"name":"approverId","in":"query","description":"Filter invoice templates by assigned approver user ID.","required":false,"schema":{"$ref":"#/components/schemas/entityTypes_EntityUserId"}},{"name":"approverAction","in":"query","description":"Filter invoice templates by approver action. Needs to be used with approverId. For example, if you want to find all invoice templates that have been approved by a specific user, you would use approverId and approverAction=APPROVE.","required":false,"schema":{"$ref":"#/components/schemas/invoiceTypes_ApproverAction"}},{"name":"invoiceId","in":"query","description":"Filter invoice templates by invoice ID.","required":false,"schema":{"$ref":"#/components/schemas/invoiceTypes_InvoiceId"}},{"name":"status","in":"query","description":"Invoice status to filter on","required":false,"schema":{"$ref":"#/components/schemas/invoiceTypes_InvoiceStatus"}},{"name":"paymentType","in":"query","description":"Filter invoice templates by recurring status","required":false,"schema":{"type":"array","items":{"$ref":"#/components/schemas/invoiceTypes_PaymentType"}}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/invoiceTypes_FindInvoiceTemplateResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"security":[{"default":[]}]}},"/invoice-template":{"post":{"operationId":"invoiceTemplate_create","summary":"Create","tags":["invoice-template"],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/invoiceTypes_InvoiceTemplateResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/invoiceTypes_InvoiceTemplateCreationRequest"}}}},"security":[{"default":[]}]}},"/invoice-template/{invoiceTemplateId}":{"get":{"operationId":"invoiceTemplate_get","summary":"Get","tags":["invoice-template"],"parameters":[{"name":"invoiceTemplateId","in":"path","description":"Invoice Template ID","required":true,"schema":{"$ref":"#/components/schemas/invoiceTypes_InvoiceTemplateId"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/invoiceTypes_InvoiceTemplateResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"security":[{"default":[]}]},"post":{"operationId":"invoiceTemplate_update","summary":"Update","tags":["invoice-template"],"parameters":[{"name":"invoiceTemplateId","in":"path","description":"Invoice Template ID","required":true,"schema":{"$ref":"#/components/schemas/invoiceTypes_InvoiceTemplateId"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/invoiceTypes_InvoiceTemplateResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/invoiceTypes_InvoiceTemplateUpdateRequest"}}}},"security":[{"default":[]}]},"delete":{"operationId":"invoiceTemplate_delete","summary":"Delete","description":"Only invoice templates in the UNASSIGNED and DRAFT statuses can be deleted.","tags":["invoice-template"],"parameters":[{"name":"invoiceTemplateId","in":"path","description":"Invoice Template ID","required":true,"schema":{"$ref":"#/components/schemas/invoiceTypes_InvoiceTemplateId"}}],"responses":{"200":{"description":"Successful response"},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"security":[{"default":[]}]}},"/invoice-template/{invoiceTemplateId}/line-item/{lineItemId}":{"put":{"operationId":"invoiceTemplate_lineItem_update","summary":"Update invoice template line item","description":"Update invoice template line item","tags":["invoice-template > line-item"],"parameters":[{"name":"invoiceTemplateId","in":"path","description":"Invoice Template ID","required":true,"schema":{"$ref":"#/components/schemas/invoiceTypes_InvoiceTemplateId"}},{"name":"lineItemId","in":"path","description":"Invoice Line Item ID","required":true,"schema":{"$ref":"#/components/schemas/invoiceTypes_InvoiceLineItemId"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/invoiceTypes_InvoiceTemplateResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/invoiceTypes_InvoiceLineItemIndividualUpdateRequest"}}}},"security":[{"default":[]}]}},"/invoice-template/{invoiceTemplateId}/add-approver":{"post":{"operationId":"invoiceTemplate_approval_addApprover","summary":"Add Approver","description":"Adds an approver to the invoice template. Will select the first available approver slot that is not already filled and assign the approver to it. If no approver slots are available, an error will be returned. An explicit approver slot can be specified by setting the `approverSlot` field.","tags":["invoice-template > approval"],"parameters":[{"name":"invoiceTemplateId","in":"path","description":"Invoice Template ID","required":true,"schema":{"$ref":"#/components/schemas/invoiceTypes_InvoiceTemplateId"}}],"responses":{"200":{"description":"Successful response"},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/invoiceTypes_AddApproverRequest"}}}},"security":[{"default":[]}]}},"/invoice-template/{invoiceTemplateId}/approve":{"post":{"operationId":"invoiceTemplate_approval_approve","summary":"Approve","tags":["invoice-template > approval"],"parameters":[{"name":"invoiceTemplateId","in":"path","description":"Invoice Template ID","required":true,"schema":{"$ref":"#/components/schemas/invoiceTypes_InvoiceTemplateId"}}],"responses":{"200":{"description":"Successful response"},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/invoiceTypes_ApprovalRequest"}}}},"security":[{"default":[]}]}},"/invoice-template/{invoiceTemplateId}/reject":{"post":{"operationId":"invoiceTemplate_approval_reject","summary":"Reject","tags":["invoice-template > approval"],"parameters":[{"name":"invoiceTemplateId","in":"path","description":"Invoice Template ID","required":true,"schema":{"$ref":"#/components/schemas/invoiceTypes_InvoiceTemplateId"}}],"responses":{"200":{"description":"Successful response"},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/invoiceTypes_ApprovalRequest"}}}},"security":[{"default":[]}]}},"/invoice-template/{invoiceTemplateId}/documents":{"get":{"operationId":"invoiceTemplate_document_getAll","summary":"Get Attachments","description":"Get attachments (scanned/uploaded PDFs and images) associated with this invoice template","tags":["invoice-template > document"],"parameters":[{"name":"invoiceTemplateId","in":"path","description":"Invoice Template ID","required":true,"schema":{"$ref":"#/components/schemas/invoiceTypes_InvoiceTemplateId"}},{"name":"type","in":"query","description":"Filter by document type","required":false,"schema":{"$ref":"#/components/schemas/commons_DocumentType"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/commons_DocumentResponse"}}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"security":[{"default":[]}]}},"/invoice-template/{invoiceTemplateId}/document":{"post":{"operationId":"invoiceTemplate_document_upload","summary":"Upload Attachment","description":"Upload documents (scanned/uploaded PDFs and images) associated with this invoice template","tags":["invoice-template > document"],"parameters":[{"name":"invoiceTemplateId","in":"path","description":"Invoice Template ID","required":true,"schema":{"$ref":"#/components/schemas/invoiceTypes_InvoiceTemplateId"}}],"responses":{"200":{"description":"Successful response"},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"document":{"type":"string","description":"Base64-encoded string. Supported file types include PNG, JPG, WEBP, PDF, and all Microsoft Office formats (automatically converted to PDF). Max file size 10MB."},"type":{"$ref":"#/components/schemas/commons_DocumentType","description":"Specify Document Type, defaults to INVOICE"}},"required":["document"]}}}},"security":[{"default":[]}]}},"/invoice-template/{invoiceTemplateId}/document/{documentId}":{"delete":{"operationId":"invoiceTemplate_document_delete","summary":"Delete Attachment","description":"Delete an attachment (scanned/uploaded PDFs and images) associated with this invoice template","tags":["invoice-template > document"],"parameters":[{"name":"invoiceTemplateId","in":"path","description":"Invoice Template ID","required":true,"schema":{"$ref":"#/components/schemas/invoiceTypes_InvoiceTemplateId"}},{"name":"documentId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"security":[{"default":[]}]}},"/invoice-template/{invoiceTemplateId}/pdf/generate":{"get":{"operationId":"invoiceTemplate_document_generateInvoicePdf","summary":"Get Invoice PDF","description":"Generate a PDF of the invoice. This PDF is generated from the data in the invoice, not from the uploaded documents.","tags":["invoice-template > document"],"parameters":[{"name":"invoiceTemplateId","in":"path","description":"Invoice Template ID","required":true,"schema":{"$ref":"#/components/schemas/invoiceTypes_InvoiceTemplateId"}}],"responses":{"200":{"description":"Link to the PDF file. Will expire after 1 hour.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/commons_DocumentResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"security":[{"default":[]}]}},"/invoice-template/{invoiceTemplateId}/check/generate":{"get":{"operationId":"invoiceTemplate_document_generateCheckPdf","summary":"Get Check PDF","description":"Get a PDF of the check for the invoice. If the invoice does not have check as the disbursement method, an error will be returned. If the disbursement option for the check is set to 'MAIL', a void copy of the check will be returned. If the disbursement option for the check is set to 'PRINT', a printable check will be returned. If the invoice is NOT marked as PAID, the check will be a void copy.","tags":["invoice-template > document"],"parameters":[{"name":"invoiceTemplateId","in":"path","description":"Invoice Template ID","required":true,"schema":{"$ref":"#/components/schemas/invoiceTypes_InvoiceTemplateId"}}],"responses":{"200":{"description":"Link to the PDF file. Will expire after 1 hour.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/commons_DocumentResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"security":[{"default":[]}]}},"/invoice-template/{invoiceTemplateId}/source-email":{"get":{"operationId":"invoiceTemplate_document_getSourceEmail","summary":"Get Source Email","description":"Get the email subject and body that was used to create this invoice.","tags":["invoice-template > document"],"parameters":[{"name":"invoiceTemplateId","in":"path","description":"Invoice Template ID","required":true,"schema":{"$ref":"#/components/schemas/invoiceTypes_InvoiceTemplateId"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/emailLogTypes_EmailLogResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"security":[{"default":[]}]}},"/invoices":{"get":{"operationId":"invoice_find","summary":"Search invoices","description":"Search invoices for all entities in the organization","tags":["invoice"],"parameters":[{"name":"entityId","in":"query","description":"Filter invoices by the ID or foreign ID of the entity that is the payer or the vendor of the invoice.","required":false,"schema":{"$ref":"#/components/schemas/entityTypes_EntityId"}},{"name":"entityGroupId","in":"query","description":"Filter invoices by the ID or foreign ID of the entity group that the entity belongs to.","required":false,"schema":{"$ref":"#/components/schemas/entityGroupTypes_EntityGroupId"}},{"name":"startDate","in":"query","description":"Start date filter. Defaults to CREATED_AT unless specified the dateType is specified","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"endDate","in":"query","description":"End date filter. Defaults to CREATED_AT unless specified the dateType is specified","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"dateType","in":"query","description":"Type of date to filter by if startDate and endDate filters are provided. Defaults to CREATED_AT.","required":false,"schema":{"$ref":"#/components/schemas/invoiceTypes_InvoiceDateFilter"}},{"name":"orderBy","in":"query","description":"Field to order invoices by. Defaults to CREATED_AT.","required":false,"schema":{"$ref":"#/components/schemas/invoiceTypes_InvoiceOrderByField"}},{"name":"orderDirection","in":"query","description":"Direction to order invoices by. Defaults to asc.","required":false,"schema":{"$ref":"#/components/schemas/commons_OrderDirection"}},{"name":"limit","in":"query","description":"Number of invoices to return. Limit can range between 1 and 100, and the default is 10.","required":false,"schema":{"type":"integer"}},{"name":"startingAfter","in":"query","description":"The ID of the invoice to start after. If not provided, the first page of invoices will be returned.","required":false,"schema":{"$ref":"#/components/schemas/invoiceTypes_InvoiceId"}},{"name":"search","in":"query","description":"Find invoices by vendor name, invoice number, check number, or amount. Partial matches are supported.","required":false,"schema":{"type":"string"}},{"name":"metadata","in":"query","description":"Filter invoices by metadata. Each filter will be applied as an AND condition. Duplicate keys will be ignored.","required":false,"schema":{"$ref":"#/components/schemas/invoiceTypes_MetadataFilter"}},{"name":"lineItemMetadata","in":"query","description":"Filter invoices by line item metadata. Each filter will be applied as an AND condition. Duplicate keys will be ignored.","required":false,"schema":{"$ref":"#/components/schemas/invoiceTypes_MetadataFilter"}},{"name":"lineItemGlAccountId","in":"query","description":"Filter invoices by line item GL account ID. Each filter will be applied as an OR condition. Duplicate keys will be ignored.","required":false,"schema":{"type":"string"}},{"name":"payerId","in":"query","description":"Filter invoices by payer ID or payer foreign ID.","required":false,"schema":{"$ref":"#/components/schemas/entityTypes_EntityId"}},{"name":"vendorId","in":"query","description":"Filter invoices by vendor ID or vendor foreign ID.","required":false,"schema":{"$ref":"#/components/schemas/entityTypes_EntityId"}},{"name":"creatorUserId","in":"query","description":"Filter invoices by the ID or foreign ID of the user that created the invoice.","required":false,"schema":{"$ref":"#/components/schemas/entityTypes_EntityUserId"}},{"name":"approverId","in":"query","description":"Filter invoices by assigned approver user ID. Only invoices with all upstream policies approved will be returned.","required":false,"schema":{"$ref":"#/components/schemas/entityTypes_EntityUserId"}},{"name":"approverAction","in":"query","description":"Filter invoices by approver action. Needs to be used with approverId. For example, if you want to find all invoices that have been approved by a specific user, you would use approverId and approverAction=APPROVE.","required":false,"schema":{"$ref":"#/components/schemas/invoiceTypes_ApproverAction"}},{"name":"approverCount","in":"query","description":"Filter invoices by the number of approvers. Use exact number (e.g., 3) or range (e.g., \">3\", \"<5\", \">=2\", \"<=4\").","required":false,"schema":{"type":"string"}},{"name":"invoiceId","in":"query","description":"Filter invoices by invoice ID or invoice foreign ID.","required":false,"schema":{"$ref":"#/components/schemas/invoiceTypes_InvoiceId"}},{"name":"status","in":"query","description":"Invoice status to filter on","required":false,"schema":{"$ref":"#/components/schemas/invoiceTypes_InvoiceStatus"}},{"name":"paymentType","in":"query","description":"Filter invoices by recurring status","required":false,"schema":{"type":"array","items":{"$ref":"#/components/schemas/invoiceTypes_PaymentType"}}},{"name":"invoiceTemplateId","in":"query","description":"Filter invoice by invoice template ID","required":false,"schema":{"$ref":"#/components/schemas/invoiceTypes_InvoiceTemplateId"}},{"name":"returnPayerMetadata","in":"query","description":"Whether to return payer metadata in the response","required":false,"schema":{"type":"boolean"}},{"name":"returnVendorMetadata","in":"query","description":"Whether to return vendor metadata in the response","required":false,"schema":{"type":"boolean"}},{"name":"returnPaymentTiming","in":"query","description":"Whether to return payment timing in the response","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/invoiceTypes_FindInvoiceResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"security":[{"default":[]}]},"post":{"operationId":"invoice_bulk_create","summary":"Create Bulk Invoices (Sync)","description":"Create multiple invoices in bulk. This endpoint will process synchronously and return a list of invoices that were created or failed to create.","tags":["invoice > bulk"],"parameters":[{"name":"emitWebhooks","in":"query","description":"If true, webhooks will be emitted for each invoice that is created. By default, webhooks are not emitted.","required":false,"schema":{"type":"boolean","default":false}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/invoiceTypes_BulkInvoiceCreationResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/invoiceTypes_BulkInvoiceCreationRequest"}}}},"security":[{"default":[]}]},"put":{"operationId":"invoice_bulk_update","summary":"Update Bulk Invoices (Sync)","description":"Update multiple invoices in bulk. This endpoint will process synchronously and return a list of invoices that were updated or failed to update.","tags":["invoice > bulk"],"parameters":[{"name":"emitWebhooks","in":"query","description":"If true, webhooks will be emitted for each invoice that is updated. By default, webhooks are not emitted.","required":false,"schema":{"type":"boolean","default":false}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/invoiceTypes_BulkInvoiceUpdateResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/invoiceTypes_BulkInvoiceUpdateRequest"}}}},"security":[{"default":[]}]}},"/invoice":{"post":{"operationId":"invoice_create","summary":"Create","tags":["invoice"],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/invoiceTypes_InvoiceResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/invoiceTypes_InvoiceCreationRequest"}}}},"security":[{"default":[]}]}},"/invoice/{invoiceId}":{"get":{"operationId":"invoice_get","summary":"Get","tags":["invoice"],"parameters":[{"name":"invoiceId","in":"path","description":"Invoice ID or Invoice ForeignID","required":true,"schema":{"$ref":"#/components/schemas/invoiceTypes_InvoiceId"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/invoiceTypes_InvoiceResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"security":[{"default":[]}]},"post":{"operationId":"invoice_update","summary":"Update","tags":["invoice"],"parameters":[{"name":"invoiceId","in":"path","description":"Invoice ID or Invoice ForeignID","required":true,"schema":{"$ref":"#/components/schemas/invoiceTypes_InvoiceId"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/invoiceTypes_InvoiceResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/invoiceTypes_InvoiceUpdateRequest"}}}},"security":[{"default":[]}]},"delete":{"operationId":"invoice_delete","summary":"Delete","description":"Only invoices in the UNASSIGNED and DRAFT statuses can be deleted.","tags":["invoice"],"parameters":[{"name":"invoiceId","in":"path","description":"Invoice ID or Invoice ForeignID","required":true,"schema":{"$ref":"#/components/schemas/invoiceTypes_InvoiceId"}}],"responses":{"200":{"description":"Successful response"},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"security":[{"default":[]}]}},"/invoice/{invoiceId}/events":{"get":{"operationId":"invoice_events","summary":"Events","description":"Get all events for an invoice","tags":["invoice"],"parameters":[{"name":"invoiceId","in":"path","description":"Invoice ID or Invoice ForeignID","required":true,"schema":{"$ref":"#/components/schemas/invoiceTypes_InvoiceId"}},{"name":"startDate","in":"query","description":"Start date filter. If not provided, events from the start of time will be returned.","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"endDate","in":"query","description":"End date filter. If not provided, events to the end of time will be returned.","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"limit","in":"query","description":"Number of events to return. Limit can range between 1 and 100, and the default is 50.","required":false,"schema":{"type":"integer"}},{"name":"startingAfter","in":"query","description":"The ID of the event to start after. If not provided, the first page of events will be returned.","required":false,"schema":{"$ref":"#/components/schemas/invoiceTypes_InvoiceEventId"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/invoiceTypes_InvoiceEventsResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"security":[{"default":[]}]}},"/invoice/{invoiceId}/line-item/{lineItemId}":{"put":{"operationId":"invoice_lineItem_update","summary":"Update invoice line item","description":"Update invoice line item","tags":["invoice > line-item"],"parameters":[{"name":"invoiceId","in":"path","description":"Invoice ID","required":true,"schema":{"$ref":"#/components/schemas/invoiceTypes_InvoiceId"}},{"name":"lineItemId","in":"path","description":"Invoice Line Item ID","required":true,"schema":{"$ref":"#/components/schemas/invoiceTypes_InvoiceLineItemId"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/invoiceTypes_InvoiceResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/invoiceTypes_InvoiceLineItemIndividualUpdateRequest"}}}},"security":[{"default":[]}]}},"/invoice/{invoiceId}/add-approver":{"post":{"operationId":"invoice_approval_addApprover","summary":"Add Approver","description":"Adds an approver to the invoice. Will select the first available approver slot that is not already filled and assign the approver to it. If no approver slots are available, an error will be returned. An explicit approver slot can be specified by setting the `approverSlot` field.","tags":["invoice > approval"],"parameters":[{"name":"invoiceId","in":"path","description":"Invoice ID or Invoice ForeignID","required":true,"schema":{"$ref":"#/components/schemas/invoiceTypes_InvoiceId"}}],"responses":{"200":{"description":"Successful response"},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/invoiceTypes_AddApproverRequest"}}}},"security":[{"default":[]}]}},"/invoice/{invoiceId}/approve":{"post":{"operationId":"invoice_approval_approve","summary":"Approve","tags":["invoice > approval"],"parameters":[{"name":"invoiceId","in":"path","description":"Invoice ID or Invoice ForeignID","required":true,"schema":{"$ref":"#/components/schemas/invoiceTypes_InvoiceId"}}],"responses":{"200":{"description":"Successful response"},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/invoiceTypes_ApprovalRequest"}}}},"security":[{"default":[]}]}},"/invoice/{invoiceId}/reject":{"post":{"operationId":"invoice_approval_reject","summary":"Reject","tags":["invoice > approval"],"parameters":[{"name":"invoiceId","in":"path","description":"Invoice ID or Invoice ForeignID","required":true,"schema":{"$ref":"#/components/schemas/invoiceTypes_InvoiceId"}}],"responses":{"200":{"description":"Successful response"},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/invoiceTypes_ApprovalRequest"}}}},"security":[{"default":[]}]}},"/invoice/{invoiceId}/bnpl/offer":{"post":{"operationId":"invoice_bnpl_offer","summary":"Get BNPL Offer","description":"Get a BNPL offer for an invoice","tags":["invoice > bnpl"],"parameters":[{"name":"invoiceId","in":"path","description":"Invoice ID or Invoice ForeignID","required":true,"schema":{"$ref":"#/components/schemas/invoiceTypes_InvoiceId"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/invoiceTypes_BnplOfferResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/invoiceTypes_BnplOfferRequest"}}}},"security":[{"default":[]}]}},"/bnpl/loan/{loanId}":{"get":{"operationId":"invoice_bnpl_loan","summary":"Get BNPL Loan","description":"Get information about a specific BNPL loan by loan ID","tags":["invoice > bnpl"],"parameters":[{"name":"loanId","in":"path","description":"The ID of the loan to retrieve","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/invoiceTypes_BnplLoanResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"security":[{"default":[]}]}},"/invoices/approve":{"post":{"operationId":"invoice_bulk_approve","summary":"Approve Bulk Invoices (Sync)","description":"Approve multiple invoices in bulk. This endpoint will process synchronously and return a list of invoices that were approved or failed to approve.","tags":["invoice > bulk"],"parameters":[{"name":"emitWebhooks","in":"query","description":"If true, webhooks will be emitted for each invoice that is approved. By default, webhooks are not emitted.","required":false,"schema":{"type":"boolean","default":false}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/invoiceTypes_BulkInvoiceApprovalResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/invoiceTypes_BulkInvoiceApprovalRequest"}}}},"security":[{"default":[]}]}},"/invoices/download":{"get":{"operationId":"invoice_bulk_download","summary":"Download Bulk Invoices (Sync)","description":"Get a URL to download a bulk invoice as a CSV/JSON file.","tags":["invoice > bulk"],"parameters":[{"name":"format","in":"query","description":"Format of the file to download. Defaults to CSV.","required":false,"schema":{"$ref":"#/components/schemas/commons_BulkDownloadFormat"}},{"name":"entityId","in":"query","description":"Filter invoices by the ID or foreign ID of the entity that is the payer or the vendor of the invoice.","required":false,"schema":{"$ref":"#/components/schemas/entityTypes_EntityId"}},{"name":"entityGroupId","in":"query","description":"Filter invoices by the ID or foreign ID of the entity group that the entity belongs to.","required":false,"schema":{"$ref":"#/components/schemas/entityGroupTypes_EntityGroupId"}},{"name":"startDate","in":"query","description":"Start date filter. Defaults to CREATED_AT unless specified the dateType is specified","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"endDate","in":"query","description":"End date filter. Defaults to CREATED_AT unless specified the dateType is specified","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"dateType","in":"query","description":"Type of date to filter by if startDate and endDate filters are provided. Defaults to CREATED_AT.","required":false,"schema":{"$ref":"#/components/schemas/invoiceTypes_InvoiceDateFilter"}},{"name":"orderBy","in":"query","description":"Field to order invoices by. Defaults to CREATED_AT.","required":false,"schema":{"$ref":"#/components/schemas/invoiceTypes_InvoiceOrderByField"}},{"name":"orderDirection","in":"query","description":"Direction to order invoices by. Defaults to asc.","required":false,"schema":{"$ref":"#/components/schemas/commons_OrderDirection"}},{"name":"startingAfter","in":"query","description":"The ID of the invoice to start after. If not provided, the first page of invoices will be returned.","required":false,"schema":{"$ref":"#/components/schemas/invoiceTypes_InvoiceId"}},{"name":"search","in":"query","description":"Find invoices by vendor name, invoice number, check number, or amount. Partial matches are supported.","required":false,"schema":{"type":"string"}},{"name":"metadata","in":"query","description":"Filter invoices by metadata. Each filter will be applied as an AND condition. Duplicate keys will be ignored.","required":false,"schema":{"$ref":"#/components/schemas/invoiceTypes_MetadataFilter"}},{"name":"lineItemMetadata","in":"query","description":"Filter invoices by line item metadata. Each filter will be applied as an AND condition. Duplicate keys will be ignored.","required":false,"schema":{"$ref":"#/components/schemas/invoiceTypes_MetadataFilter"}},{"name":"lineItemGlAccountId","in":"query","description":"Filter invoices by line item GL account ID. Each filter will be applied as an OR condition. Duplicate keys will be ignored.","required":false,"schema":{"type":"string"}},{"name":"payerId","in":"query","description":"Filter invoices by payer ID or payer foreign ID.","required":false,"schema":{"$ref":"#/components/schemas/entityTypes_EntityId"}},{"name":"vendorId","in":"query","description":"Filter invoices by vendor ID or vendor foreign ID.","required":false,"schema":{"$ref":"#/components/schemas/entityTypes_EntityId"}},{"name":"creatorUserId","in":"query","description":"Filter invoices by the ID or foreign ID of the user that created the invoice.","required":false,"schema":{"$ref":"#/components/schemas/entityTypes_EntityUserId"}},{"name":"approverId","in":"query","description":"Filter invoices by assigned approver user ID. Only invoices with all upstream policies approved will be returned.","required":false,"schema":{"$ref":"#/components/schemas/entityTypes_EntityUserId"}},{"name":"approverAction","in":"query","description":"Filter invoices by approver action. Needs to be used with approverId. For example, if you want to find all invoices that have been approved by a specific user, you would use approverId and approverAction=APPROVE.","required":false,"schema":{"$ref":"#/components/schemas/invoiceTypes_ApproverAction"}},{"name":"invoiceId","in":"query","description":"Filter invoices by invoice ID or invoice foreign ID.","required":false,"schema":{"$ref":"#/components/schemas/invoiceTypes_InvoiceId"}},{"name":"status","in":"query","description":"Invoice status to filter on","required":false,"schema":{"$ref":"#/components/schemas/invoiceTypes_InvoiceStatus"}},{"name":"paymentType","in":"query","description":"Filter invoices by recurring status","required":false,"schema":{"type":"array","items":{"$ref":"#/components/schemas/invoiceTypes_PaymentType"}}},{"name":"invoiceTemplateId","in":"query","description":"Filter invoice by invoice template ID","required":false,"schema":{"$ref":"#/components/schemas/invoiceTypes_InvoiceTemplateId"}},{"name":"returnPayerMetadata","in":"query","description":"Whether to return payer metadata in the response","required":false,"schema":{"type":"boolean"}},{"name":"returnVendorMetadata","in":"query","description":"Whether to return vendor metadata in the response","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/commons_BulkDownloadResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"security":[{"default":[]}]}},"/invoice/{invoiceId}/collection/next-action":{"get":{"operationId":"invoice_collection_getNextAction","summary":"Get Next Action","description":"Get the collection agent's next action on this invoice. This endpoint will return an empty object if there is no action to return.","tags":["invoice > collection"],"parameters":[{"name":"invoiceId","in":"path","description":"Invoice ID or Invoice ForeignID","required":true,"schema":{"$ref":"#/components/schemas/invoiceTypes_InvoiceId"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/collectionTypes_ActionResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"security":[{"default":[]}]},"patch":{"operationId":"invoice_collection_updateNextAction","summary":"Update Next Action","description":"Update the collection agent's next action on this invoice with natural language. Note that updating any APPROVED action will reset the action to SUGGESTED.  This endpoint will throw an error if there is no action to update.","tags":["invoice > collection"],"parameters":[{"name":"invoiceId","in":"path","description":"Invoice ID or Invoice ForeignID","required":true,"schema":{"$ref":"#/components/schemas/invoiceTypes_InvoiceId"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/collectionTypes_ActionResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/collectionTypes_UpdateNextActionRequest"}}}},"security":[{"default":[]}]}},"/invoice/{invoiceId}/collection/next-action/approve":{"patch":{"operationId":"invoice_collection_approveNextAction","summary":"Approve Next Action","description":"Approve the collection agent's next action on this invoice. This endpoint will throw an error if there is no action to approve.","tags":["invoice > collection"],"parameters":[{"name":"invoiceId","in":"path","description":"Invoice ID or Invoice ForeignID","required":true,"schema":{"$ref":"#/components/schemas/invoiceTypes_InvoiceId"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/collectionTypes_ActionResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"security":[{"default":[]}]}},"/invoice/{invoiceId}/comments":{"get":{"operationId":"invoice_comment_getAll","summary":"Get All","description":"Get all comments associated with this invoice","tags":["invoice > comment"],"parameters":[{"name":"invoiceId","in":"path","description":"Invoice ID or Invoice ForeignID","required":true,"schema":{"$ref":"#/components/schemas/invoiceTypes_InvoiceId"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/invoiceTypes_CommentResponse"}}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"security":[{"default":[]}]}},"/invoice/{invoiceId}/comment":{"post":{"operationId":"invoice_comment_create","summary":"Create","description":"Add a comment to this invoice","tags":["invoice > comment"],"parameters":[{"name":"invoiceId","in":"path","description":"Invoice ID or Invoice ForeignID","required":true,"schema":{"$ref":"#/components/schemas/invoiceTypes_InvoiceId"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/invoiceTypes_CommentResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/invoiceTypes_CommentRequest"}}}},"security":[{"default":[]}]}},"/invoice/{invoiceId}/comment/{commentId}":{"get":{"operationId":"invoice_comment_get","summary":"Get","tags":["invoice > comment"],"parameters":[{"name":"invoiceId","in":"path","description":"Invoice ID or Invoice ForeignID","required":true,"schema":{"$ref":"#/components/schemas/invoiceTypes_InvoiceId"}},{"name":"commentId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/invoiceTypes_CommentId"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/invoiceTypes_CommentResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"security":[{"default":[]}]},"post":{"operationId":"invoice_comment_update","summary":"Update","description":"Edit a comment on this invoice","tags":["invoice > comment"],"parameters":[{"name":"invoiceId","in":"path","description":"Invoice ID or Invoice ForeignID","required":true,"schema":{"$ref":"#/components/schemas/invoiceTypes_InvoiceId"}},{"name":"commentId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/invoiceTypes_CommentId"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/invoiceTypes_CommentResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/invoiceTypes_CommentRequest"}}}},"security":[{"default":[]}]},"delete":{"operationId":"invoice_comment_delete","summary":"Delete","description":"Delete a comment on this invoice","tags":["invoice > comment"],"parameters":[{"name":"invoiceId","in":"path","description":"Invoice ID or Invoice ForeignID","required":true,"schema":{"$ref":"#/components/schemas/invoiceTypes_InvoiceId"}},{"name":"commentId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/invoiceTypes_CommentId"}}],"responses":{"200":{"description":"Successful response"},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"security":[{"default":[]}]}},"/invoice/{invoiceId}/documents":{"get":{"operationId":"invoice_document_getAll","summary":"Get Attachments","description":"Get attachments (scanned/uploaded PDFs and images) associated with this invoice","tags":["invoice > document"],"parameters":[{"name":"invoiceId","in":"path","description":"Invoice ID or Invoice ForeignID","required":true,"schema":{"$ref":"#/components/schemas/invoiceTypes_InvoiceId"}},{"name":"type","in":"query","description":"Filter by document type","required":false,"schema":{"$ref":"#/components/schemas/commons_DocumentType"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/commons_DocumentResponse"}}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"security":[{"default":[]}]}},"/invoice/{invoiceId}/document":{"post":{"operationId":"invoice_document_upload","summary":"Upload Attachment","description":"Upload documents (scanned/uploaded PDFs and images) associated with this Invoice","tags":["invoice > document"],"parameters":[{"name":"invoiceId","in":"path","description":"Invoice ID or Invoice ForeignID","required":true,"schema":{"$ref":"#/components/schemas/invoiceTypes_InvoiceId"}}],"responses":{"200":{"description":"Successful response"},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"document":{"type":"string","description":"Base64-encoded string. Supported file types include PNG, JPG, WEBP, PDF, and all Microsoft Office formats (automatically converted to PDF). Max file size 10MB."},"type":{"$ref":"#/components/schemas/commons_DocumentType","description":"Specify Document Type, defaults to INVOICE"}},"required":["document"]}}}},"security":[{"default":[]}]}},"/invoice/{invoiceId}/document/{documentId}":{"delete":{"operationId":"invoice_document_delete","summary":"Delete Attachment","description":"Delete an attachment (scanned/uploaded PDFs and images) associated with this invoice","tags":["invoice > document"],"parameters":[{"name":"invoiceId","in":"path","description":"Invoice ID or Invoice ForeignID","required":true,"schema":{"$ref":"#/components/schemas/invoiceTypes_InvoiceId"}},{"name":"documentId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"security":[{"default":[]}]}},"/invoice/{invoiceId}/pdf/generate":{"get":{"operationId":"invoice_document_generateInvoicePdf","summary":"Get Invoice PDF","description":"Generate a PDF of the invoice. This PDF is generated from the data in the invoice, not from the uploaded documents.","tags":["invoice > document"],"parameters":[{"name":"invoiceId","in":"path","description":"Invoice ID or Invoice ForeignID","required":true,"schema":{"$ref":"#/components/schemas/invoiceTypes_InvoiceId"}}],"responses":{"200":{"description":"Link to the PDF file. Will expire after 1 hour.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/commons_DocumentResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"security":[{"default":[]}]}},"/invoice/{invoiceId}/check/generate":{"get":{"operationId":"invoice_document_generateCheckPdf","summary":"Get Check PDF","description":"Get a PDF of the check for the invoice. If the invoice does not have check as the disbursement method, an error will be returned. If the disbursement option for the check is set to 'MAIL', a void copy of the check will be returned. If the disbursement option for the check is set to 'PRINT', a printable check will be returned. If the invoice is NOT marked as PAID, the check will be a void copy.","tags":["invoice > document"],"parameters":[{"name":"invoiceId","in":"path","description":"Invoice ID or Invoice ForeignID","required":true,"schema":{"$ref":"#/components/schemas/invoiceTypes_InvoiceId"}}],"responses":{"200":{"description":"Link to the PDF file. Will expire after 1 hour.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/commons_DocumentResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"security":[{"default":[]}]}},"/invoice/{invoiceId}/payment-confirmation/generate":{"get":{"operationId":"invoice_document_generatePaymentConfirmationPdf","summary":"Get Payment Confirmation PDF","description":"Generate a PDF of the payment confirmation for the invoice. This PDF is generated from the data in the invoice, not from the uploaded documents.","tags":["invoice > document"],"parameters":[{"name":"invoiceId","in":"path","description":"Invoice ID or Invoice ForeignID","required":true,"schema":{"$ref":"#/components/schemas/invoiceTypes_InvoiceId"}}],"responses":{"200":{"description":"Link to the PDF file. Will expire after 1 hour.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/commons_DocumentResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"security":[{"default":[]}]}},"/invoice/{invoiceId}/source-email":{"get":{"operationId":"invoice_document_getSourceEmail","summary":"Get Source Email","description":"Get the email subject and body that was used to create this invoice.","tags":["invoice > document"],"parameters":[{"name":"invoiceId","in":"path","description":"Invoice ID or Invoice ForeignID","required":true,"schema":{"$ref":"#/components/schemas/invoiceTypes_InvoiceId"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/emailLogTypes_EmailLogResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"security":[{"default":[]}]}},"/invoice/{invoiceId}/payerLink":{"get":{"operationId":"invoice_paymentLinks_getPayerLink","summary":"Get payment link","description":"Get temporary link for payer to send payment","tags":["invoice > payment-links"],"parameters":[{"name":"invoiceId","in":"path","description":"Invoice ID or Invoice ForeignID","required":true,"schema":{"$ref":"#/components/schemas/invoiceTypes_InvoiceId"}},{"name":"expiresIn","in":"query","description":"Expressed in seconds or a string describing a time span. The default is 30d.","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"type":"string"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"security":[{"default":[]}]}},"/invoice/{invoiceId}/sendPayerEmail":{"post":{"operationId":"invoice_paymentLinks_sendPayerEmail","summary":"Send payment email","description":"Trigger email to payer inviting them to make payment","tags":["invoice > payment-links"],"parameters":[{"name":"invoiceId","in":"path","description":"Invoice ID or Invoice ForeignID","required":true,"schema":{"$ref":"#/components/schemas/invoiceTypes_InvoiceId"}},{"name":"attachInvoice","in":"query","description":"Whether to attach the invoice to the email","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"description":"Successful response"},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"security":[{"default":[]}]}},"/invoice/{invoiceId}/vendorLink":{"get":{"operationId":"invoice_paymentLinks_getVendorLink","summary":"Get disbursement link","description":"Get temporary link for vendor to accept payment","tags":["invoice > payment-links"],"parameters":[{"name":"invoiceId","in":"path","description":"Invoice ID or Invoice ForeignID","required":true,"schema":{"$ref":"#/components/schemas/invoiceTypes_InvoiceId"}},{"name":"expiresIn","in":"query","description":"Expressed in seconds or a string describing a time span. The default is 30d.","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"type":"string"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"security":[{"default":[]}]}},"/invoice/{invoiceId}/sendVendorEmail":{"post":{"operationId":"invoice_paymentLinks_sendVendorEmail","summary":"Send disbursement email","description":"Trigger email to vendor inviting them into the vendor portal","tags":["invoice > payment-links"],"parameters":[{"name":"invoiceId","in":"path","description":"Invoice ID or Invoice ForeignID","required":true,"schema":{"$ref":"#/components/schemas/invoiceTypes_InvoiceId"}}],"responses":{"200":{"description":"Successful response"},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"security":[{"default":[]}]}},"/organization":{"get":{"operationId":"organization_get","summary":"Get","description":"Get current organization information","tags":["organization"],"parameters":[{"name":"paymentMethods","in":"query","description":"include supported payment methods in response","required":false,"schema":{"type":"boolean"}},{"name":"emailProvider","in":"query","description":"include email provider info in response","required":false,"schema":{"type":"boolean"}},{"name":"externalAccountingSystemProvider","in":"query","description":"include external accounting system provider info in response","required":false,"schema":{"type":"boolean"}},{"name":"colorScheme","in":"query","description":"include color scheme info in response","required":false,"schema":{"type":"boolean"}},{"name":"payeeOnboardingOptions","in":"query","description":"include payee onboarding options in response","required":false,"schema":{"type":"boolean"}},{"name":"payorOnboardingOptions","in":"query","description":"include payor onboarding options in response","required":false,"schema":{"type":"boolean"}},{"name":"metadataSchema","in":"query","description":"include metadata schema in response","required":false,"schema":{"type":"boolean"}},{"name":"notificationEmailTemplate","in":"query","description":"include notification-email-template in response","required":false,"schema":{"type":"boolean"}},{"name":"rolePermissions","in":"query","description":"include role permission config in response","required":false,"schema":{"type":"boolean"}},{"name":"customDomains","in":"query","description":"include custom domains in response","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/organizationTypes_OrganizationResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"security":[{"default":[]}]},"post":{"operationId":"organization_update","summary":"Update","description":"Update current organization","tags":["organization"],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/organizationTypes_OrganizationResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/organizationTypes_OrganizationRequest"}}}},"security":[{"default":[]}]}},"/organization/emailLog":{"get":{"operationId":"organization_emailLog","summary":"Email Log","description":"Get log of all emails sent to this organization. Content format subject to change.","tags":["organization"],"parameters":[{"name":"startDate","in":"query","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"endDate","in":"query","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"from","in":"query","description":"Filter by sender email address","required":false,"schema":{"type":"string"}},{"name":"to","in":"query","description":"Filter by recipient email address","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","description":"Number of logs to return. Limit can range between 1 and 100, and the default is 10.","required":false,"schema":{"type":"integer"}},{"name":"startingAfter","in":"query","description":"The ID of the log to start after. If not provided, the first page of logs will be returned.","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/emailLogTypes_EmailLogResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"security":[{"default":[]}]}},"/organization/invalidateTokens":{"post":{"operationId":"organization_invalidateTokens","summary":"Invalidate Tokens","description":"Invalidate all JWT tokens for the current organization. This is considered a break-glass action and should be used only if tokens have been compromised. All tokens will be invalidated, including tokens on links, emails, and currently logged in sessions. API keys are not affected by this action. This action may take 60 seconds to propagate.","tags":["organization"],"responses":{"200":{"description":"Successful response"},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"sessionId":{"type":"array","items":{"type":"string"},"description":"Optional list of session IDs to invalidate. If not provided, all sessions will be invalidated."}}}}}},"security":[{"default":[]}]}},"/organization/notification-configurations":{"get":{"operationId":"organization_notificationConfiguration_getAll","summary":"Get All","description":"Retrieve all notification configurations","tags":["organization > notification-configuration"],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/organizationTypes_NotificationConfigurationResponse"}}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"security":[{"default":[]}]}},"/organization/notification-configuration/{notificationType}":{"get":{"operationId":"organization_notificationConfiguration_get","summary":"Get","description":"Retrieve notification configuration for this notification type","tags":["organization > notification-configuration"],"parameters":[{"name":"notificationType","in":"path","required":true,"schema":{"$ref":"#/components/schemas/entityTypes_NotificationType"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/organizationTypes_NotificationConfigurationResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"security":[{"default":[]}]},"post":{"operationId":"organization_notificationConfiguration_update","summary":"Update","description":"Update notification configuration for this notification type","tags":["organization > notification-configuration"],"parameters":[{"name":"notificationType","in":"path","required":true,"schema":{"$ref":"#/components/schemas/entityTypes_NotificationType"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/organizationTypes_NotificationConfigurationResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/organizationTypes_NotificationConfigurationRequest"}}}},"security":[{"default":[]}]},"delete":{"operationId":"organization_notificationConfiguration_reset","summary":"Reset","description":"Reset notification configuration for this notification type","tags":["organization > notification-configuration"],"parameters":[{"name":"notificationType","in":"path","required":true,"schema":{"$ref":"#/components/schemas/entityTypes_NotificationType"}}],"responses":{"200":{"description":"Successful response"},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"security":[{"default":[]}]}},"/bankLookup":{"get":{"operationId":"bankLookup_find","summary":"Find bank","description":"Find bank account details","tags":["bank-lookup"],"parameters":[{"name":"routingNumber","in":"query","description":"Routing number to validate","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/bankLookup_BankLookupResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"security":[{"default":[]}]}},"/fees":{"post":{"operationId":"calculate_fee","summary":"Calculate fees","description":"Calculate the estimated fees associated with an payment given the amount, payment source, and disbursement method. Can be used to calculate fees for a payment before creating an invoice.","tags":["calculate"],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/invoiceTypes_InvoiceFeesResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/calculate_CalculateFeesRequest"}}}},"security":[{"default":[]}]}},"/paymentTiming":{"post":{"operationId":"calculate_paymentTiming","summary":"Calculate payment timing","description":"Calculate the estimated payment timing given the deduction date, payment source, and disbursement method. Can be used to calculate timing for a payment.","tags":["calculate"],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/calculate_CalculatePaymentTimingResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/calculate_CalculatePaymentTimingRequest"}}}},"security":[{"default":[]}]}},"/paymentMethod/schema":{"get":{"operationId":"customPaymentMethodSchema_getAll","summary":"Get All","description":"Get all custom payment method schemas","tags":["custom-payment-method-schema"],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/paymentMethodTypes_CustomPaymentMethodSchemaResponse"}}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"security":[{"default":[]}]},"post":{"operationId":"customPaymentMethodSchema_create","summary":"Create","description":"Create custom payment method schema","tags":["custom-payment-method-schema"],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/paymentMethodTypes_CustomPaymentMethodSchemaResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/paymentMethodTypes_CustomPaymentMethodSchemaRequest"}}}},"security":[{"default":[]}]}},"/paymentMethod/schema/{schemaId}":{"post":{"operationId":"customPaymentMethodSchema_update","summary":"Update","description":"Update custom payment method schema","tags":["custom-payment-method-schema"],"parameters":[{"name":"schemaId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/paymentMethodTypes_CustomPaymentMethodSchemaId"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/paymentMethodTypes_CustomPaymentMethodSchemaResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/paymentMethodTypes_CustomPaymentMethodSchemaRequest"}}}},"security":[{"default":[]}]},"get":{"operationId":"customPaymentMethodSchema_get","summary":"Get","description":"Get custom payment method schema","tags":["custom-payment-method-schema"],"parameters":[{"name":"schemaId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/paymentMethodTypes_CustomPaymentMethodSchemaId"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/paymentMethodTypes_CustomPaymentMethodSchemaResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"security":[{"default":[]}]},"delete":{"operationId":"customPaymentMethodSchema_delete","summary":"Delete","description":"Delete custom payment method schema. Schema that have been used in an invoice cannot be deleted.","tags":["custom-payment-method-schema"],"parameters":[{"name":"schemaId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/paymentMethodTypes_CustomPaymentMethodSchemaId"}}],"responses":{"200":{"description":"Successful response"},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"security":[{"default":[]}]}},"/ocr":{"post":{"operationId":"ocr_ocr","summary":"Run OCR (Sync)","description":"Run OCR on an Base64 encoded image or PDF. This endpoint will block until the OCR is complete.","tags":["ocr"],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ocr_OCRResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"deprecated":true,"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ocr_OCRRequest"}}}},"security":[{"default":[]}]}},"/ocr-async":{"post":{"operationId":"ocr_runAsyncOcr","summary":"Run OCR (Async)","description":"Run OCR on an Base64 encoded image or PDF. This endpoint will return immediately and the OCR will be processed asynchronously.","tags":["ocr"],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ocr_OCRAsyncResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ocr_OCRRequest"}}}},"security":[{"default":[]}]}},"/ocr-async/{jobId}":{"get":{"operationId":"ocr_getAsyncOcr","summary":"Get OCR Response (Async)","description":"Get the status and results of an asynchronous OCR job.","tags":["ocr"],"parameters":[{"name":"jobId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ocr_OCRJobResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"security":[{"default":[]}]}},"/payment-gateway/process-jobs":{"get":{"operationId":"paymentGateway_process_find","summary":"Find Process Jobs","description":"Search payment gateway process jobs","tags":["payment-gateway > process"],"parameters":[{"name":"status","in":"query","description":"Filter jobs by status","required":false,"schema":{"$ref":"#/components/schemas/paymentGatewayTypes_PaymentGatewayJobStatus"}},{"name":"startDate","in":"query","description":"Start date filter for job creation time","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"endDate","in":"query","description":"End date filter for job creation time","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"orderBy","in":"query","description":"Field to order jobs by. Defaults to CREATED_AT.","required":false,"schema":{"$ref":"#/components/schemas/paymentGatewayTypes_PaymentGatewayJobOrderByField"}},{"name":"orderDirection","in":"query","description":"Direction to order jobs by. Defaults to desc.","required":false,"schema":{"$ref":"#/components/schemas/commons_OrderDirection"}},{"name":"limit","in":"query","description":"Number of jobs to return. Limit can range between 1 and 100, and the default is 10.","required":false,"schema":{"type":"integer"}},{"name":"startingAfter","in":"query","description":"The ID of the job to start after. If not provided, the first page of jobs will be returned.","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/paymentGatewayTypes_SearchPaymentGatewayProcessJobsResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"security":[{"default":[]}]}},"/payment-gateway/process":{"post":{"operationId":"paymentGateway_process_create","summary":"Create Process Job","description":"Create a job to process a payment through a payment gateway","tags":["payment-gateway > process"],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/paymentGatewayTypes_ProcessPaymentGatewayResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/paymentGatewayTypes_ProcessPaymentGatewayRequest"}}}},"security":[{"default":[]}]}},"/payment-gateway/process/{jobId}":{"get":{"operationId":"paymentGateway_process_get","summary":"Get Process Job","description":"Get the status of a payment gateway processing job","tags":["payment-gateway > process"],"parameters":[{"name":"jobId","in":"path","description":"The ID of the payment gateway processing job","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/paymentGatewayTypes_ProcessPaymentGatewayResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"security":[{"default":[]}]}},"/payment-gateway/validation-jobs":{"get":{"operationId":"paymentGateway_validate_find","summary":"Find Validation Jobs","description":"Search payment gateway validation jobs","tags":["payment-gateway > validate"],"parameters":[{"name":"status","in":"query","description":"Filter jobs by status","required":false,"schema":{"$ref":"#/components/schemas/paymentGatewayTypes_PaymentGatewayJobStatus"}},{"name":"startDate","in":"query","description":"Start date filter for job creation time","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"endDate","in":"query","description":"End date filter for job creation time","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"orderBy","in":"query","description":"Field to order jobs by. Defaults to CREATED_AT.","required":false,"schema":{"$ref":"#/components/schemas/paymentGatewayTypes_PaymentGatewayJobOrderByField"}},{"name":"orderDirection","in":"query","description":"Direction to order jobs by. Defaults to desc.","required":false,"schema":{"$ref":"#/components/schemas/commons_OrderDirection"}},{"name":"limit","in":"query","description":"Number of jobs to return. Limit can range between 1 and 100, and the default is 10.","required":false,"schema":{"type":"integer"}},{"name":"startingAfter","in":"query","description":"The ID of the job to start after. If not provided, the first page of jobs will be returned.","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/paymentGatewayTypes_SearchPaymentGatewayValidationJobsResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"security":[{"default":[]}]}},"/payment-gateway/validate":{"post":{"operationId":"paymentGateway_validate_create","summary":"Create Validation Job","description":"Create a job to validate a payment gateway","tags":["payment-gateway > validate"],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/paymentGatewayTypes_ValidatePaymentGatewayResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/paymentGatewayTypes_ValidatePaymentGatewayRequest"}}}},"security":[{"default":[]}]}},"/payment-gateway/validate/{jobId}":{"get":{"operationId":"paymentGateway_validate_get","summary":"Get Validation Job","description":"Get the status of a payment gateway validation job","tags":["payment-gateway > validate"],"parameters":[{"name":"jobId","in":"path","description":"The ID of the payment gateway validation job","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/paymentGatewayTypes_ValidatePaymentGatewayResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"security":[{"default":[]}]}},"/paymentMethods":{"get":{"operationId":"paymentMethods_find","summary":"Find","tags":["payment-methods"],"parameters":[{"name":"limit","in":"query","description":"Number of payment methods to return. Limit can range between 1 and 100, and the default is 10.","required":false,"schema":{"type":"integer"}},{"name":"startingAfter","in":"query","description":"The ID of the payment method to start after. If not provided, the first page of payment methods will be returned.","required":false,"schema":{"$ref":"#/components/schemas/paymentMethodTypes_PaymentMethodId"}},{"name":"type","in":"query","description":"Type of payment method to filter","required":false,"schema":{"$ref":"#/components/schemas/paymentMethodTypes_PaymentMethodType"}},{"name":"entityId","in":"query","description":"Entity ID to filter","required":false,"schema":{"$ref":"#/components/schemas/entityTypes_EntityId"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/paymentMethodTypes_PaymentMethodWithEntityFindResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"security":[{"default":[]}]}},"/transactions":{"get":{"operationId":"transaction_find","summary":"Search transactions","description":"Search transactions","tags":["transaction"],"parameters":[{"name":"entityId","in":"query","description":"Filter transactions by the ID or foreign ID of the entity that created the transaction.","required":false,"schema":{"$ref":"#/components/schemas/entityTypes_EntityId"}},{"name":"entityGroupId","in":"query","description":"Filter transactions by the ID or foreign ID of the entity group that the entity belongs to.","required":false,"schema":{"$ref":"#/components/schemas/entityGroupTypes_EntityGroupId"}},{"name":"startDate","in":"query","description":"CREATED_AT Start date filter.","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"endDate","in":"query","description":"CREATED_AT End date filter.","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"limit","in":"query","description":"Number of transactions to return. Limit can range between 1 and 100, and the default is 10.","required":false,"schema":{"type":"integer"}},{"name":"startingAfter","in":"query","description":"The ID of the transactions to start after. If not provided, the first page of transactions will be returned.","required":false,"schema":{"$ref":"#/components/schemas/transaction_TransactionId"}},{"name":"search","in":"query","description":"Find transactions by vendor name, invoice number, check number, or amount. Partial matches are supported.","required":false,"schema":{"type":"string"}},{"name":"metadata","in":"query","description":"Filter transactions by invoice metadata. Each filter will be applied as an AND condition. Duplicate keys will be ignored.","required":false,"schema":{"$ref":"#/components/schemas/invoiceTypes_MetadataFilter"}},{"name":"lineItemMetadata","in":"query","description":"Filter transactions by invoice line item metadata. Each filter will be applied as an AND condition. Duplicate keys will be ignored.","required":false,"schema":{"$ref":"#/components/schemas/invoiceTypes_MetadataFilter"}},{"name":"lineItemGlAccountId","in":"query","description":"Filter transactions by invoice line item GL account ID. Each filter will be applied as an OR condition. Duplicate keys will be ignored.","required":false,"schema":{"type":"string"}},{"name":"payerId","in":"query","description":"Filter transactions by payer ID or payer foreign ID.","required":false,"schema":{"$ref":"#/components/schemas/entityTypes_EntityId"}},{"name":"vendorId","in":"query","description":"Filter transactions by vendor ID or vendor foreign ID.","required":false,"schema":{"$ref":"#/components/schemas/entityTypes_EntityId"}},{"name":"invoiceId","in":"query","description":"Filter transactions by invoice ID or invoice foreign ID.","required":false,"schema":{"$ref":"#/components/schemas/invoiceTypes_InvoiceId"}},{"name":"transactionId","in":"query","description":"Filter transactions by transaction ID.","required":false,"schema":{"$ref":"#/components/schemas/transaction_TransactionId"}},{"name":"status","in":"query","description":"Transaction status to filter on","required":false,"schema":{"$ref":"#/components/schemas/transaction_TransactionStatus"}},{"name":"transactionType","in":"query","description":"Filter transactions by transaction type","required":false,"schema":{"$ref":"#/components/schemas/transaction_TransactionType"}},{"name":"creatorUserId","in":"query","description":"Filter transactions by creator user ID. Does not work, do not use.","required":false,"schema":{"type":"string"},"deprecated":true}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/transaction_FindTransactionsResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"security":[{"default":[]}]}},"/transaction/{transactionId}":{"get":{"operationId":"transaction_get","summary":"Get Transaction","description":"Get Transaction","tags":["transaction"],"parameters":[{"name":"transactionId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/transaction_TransactionId"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/transaction_TransactionResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"security":[{"default":[]}]}},"/transactions/download":{"get":{"operationId":"transaction_download","summary":"Download Transactions (Sync)","description":"Get a URL to download transactions as a CSV/JSON file.","tags":["transaction"],"parameters":[{"name":"format","in":"query","description":"Format of the file to download. Defaults to CSV.","required":false,"schema":{"$ref":"#/components/schemas/commons_BulkDownloadFormat"}},{"name":"entityId","in":"query","description":"Filter transactions by the ID or foreign ID of the entity that created the transaction.","required":false,"schema":{"$ref":"#/components/schemas/entityTypes_EntityId"}},{"name":"entityGroupId","in":"query","description":"Filter transactions by the ID or foreign ID of the entity group that the entity belongs to.","required":false,"schema":{"$ref":"#/components/schemas/entityGroupTypes_EntityGroupId"}},{"name":"startDate","in":"query","description":"CREATED_AT Start date filter.","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"endDate","in":"query","description":"CREATED_AT End date filter.","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"limit","in":"query","description":"Number of transactions to return. Limit can range between 1 and 100, and the default is 10.","required":false,"schema":{"type":"integer"}},{"name":"startingAfter","in":"query","description":"The ID of the transactions to start after. If not provided, the first page of transactions will be returned.","required":false,"schema":{"$ref":"#/components/schemas/transaction_TransactionId"}},{"name":"search","in":"query","description":"Find transactions by vendor name, invoice number, check number, or amount. Partial matches are supported.","required":false,"schema":{"type":"string"}},{"name":"metadata","in":"query","description":"Filter transactions by invoice metadata. Each filter will be applied as an AND condition. Duplicate keys will be ignored.","required":false,"schema":{"$ref":"#/components/schemas/invoiceTypes_MetadataFilter"}},{"name":"lineItemMetadata","in":"query","description":"Filter transactions by invoice line item metadata. Each filter will be applied as an AND condition. Duplicate keys will be ignored.","required":false,"schema":{"$ref":"#/components/schemas/invoiceTypes_MetadataFilter"}},{"name":"lineItemGlAccountId","in":"query","description":"Filter transactions by invoice line item GL account ID. Each filter will be applied as an OR condition. Duplicate keys will be ignored.","required":false,"schema":{"type":"string"}},{"name":"payerId","in":"query","description":"Filter transactions by payer ID or payer foreign ID.","required":false,"schema":{"$ref":"#/components/schemas/entityTypes_EntityId"}},{"name":"vendorId","in":"query","description":"Filter transactions by vendor ID or vendor foreign ID.","required":false,"schema":{"$ref":"#/components/schemas/entityTypes_EntityId"}},{"name":"invoiceId","in":"query","description":"Filter transactions by invoice ID or invoice foreign ID.","required":false,"schema":{"$ref":"#/components/schemas/invoiceTypes_InvoiceId"}},{"name":"transactionId","in":"query","description":"Filter transactions by transaction ID.","required":false,"schema":{"$ref":"#/components/schemas/transaction_TransactionId"}},{"name":"status","in":"query","description":"Transaction status to filter on","required":false,"schema":{"$ref":"#/components/schemas/transaction_TransactionStatus"}},{"name":"transactionType","in":"query","description":"Filter transactions by transaction type","required":false,"schema":{"$ref":"#/components/schemas/transaction_TransactionType"}},{"name":"creatorUserId","in":"query","description":"Filter transactions by creator user ID. Does not work, do not use.","required":false,"schema":{"type":"string"},"deprecated":true}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/commons_BulkDownloadResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["BadRequest"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"401":{"description":"Error response with status 401","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unauthorized"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Forbidden"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["NotFound"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Conflict"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"500":{"description":"Error response with status 500","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["InternalServerError"]},"content":{"type":"string"}},"required":["errorName","content"]}}}},"501":{"description":"Error response with status 501","content":{"application/json":{"schema":{"type":"object","properties":{"errorName":{"type":"string","enum":["Unimplemented"]},"content":{"type":"string"}},"required":["errorName","content"]}}}}},"security":[{"default":[]}]}}},"tags":[{"name":"entity-group"},{"name":"entity-group > counterparty"},{"name":"entity-group > user"},{"name":"entity-group > invoice"},{"name":"entity"},{"name":"entity > counterparty"},{"name":"entity > counterparty > bulk"},{"name":"entity > counterparty > vendor-credit"},{"name":"entity > email-log"},{"name":"entity > payment-method"},{"name":"entity > payment-method > bank-account"},{"name":"entity > payment-method > wallet"},{"name":"entity > user"},{"name":"entity > user > notification-policy"},{"name":"entity > user > notifications"},{"name":"entity > approval-policy"},{"name":"entity > bnpl"},{"name":"entity > bulk"},{"name":"entity > customization"},{"name":"entity > document"},{"name":"entity > email-template"},{"name":"entity > external-accounting-system"},{"name":"entity > invoice"},{"name":"entity > metadata"},{"name":"entity > notification-policy"},{"name":"entity > representative"},{"name":"invoice-template"},{"name":"invoice-template > line-item"},{"name":"invoice-template > approval"},{"name":"invoice-template > document"},{"name":"invoice"},{"name":"invoice > line-item"},{"name":"invoice > approval"},{"name":"invoice > bnpl"},{"name":"invoice > bulk"},{"name":"invoice > collection"},{"name":"invoice > comment"},{"name":"invoice > document"},{"name":"invoice > payment-links"},{"name":"organization"},{"name":"organization > notification-configuration"},{"name":"bank-lookup"},{"name":"calculate"},{"name":"custom-payment-method-schema"},{"name":"ocr"},{"name":"payment-gateway > process"},{"name":"payment-gateway > validate"},{"name":"payment-methods"},{"name":"transaction"}],"servers":[{"url":"https://api.mercoa.com","description":"Production"}],"webhooks":{"webhooks_counterpartyAdded":{"post":{"operationId":"webhooks_counterpartyAdded","summary":"Counterparty Added","description":"A payee-payor relationship was created","responses":{"200":{"description":"Webhook received successfully"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/webhooks_CounterpartyWebhook"}}}}}},"webhooks_counterpartyHidden":{"post":{"operationId":"webhooks_counterpartyHidden","summary":"Counterparty Hidden","description":"A payee-payor relationship was hidden","responses":{"200":{"description":"Webhook received successfully"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/webhooks_CounterpartyWebhook"}}}}}},"webhooks_counterpartyOnboardingCompleted":{"post":{"operationId":"webhooks_counterpartyOnboardingCompleted","summary":"Counterparty Onboarding Completed","description":"A payee-payor relationship was updated","responses":{"200":{"description":"Webhook received successfully"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/webhooks_CounterpartyEventWebhook"}}}}}},"webhooks_entityCreated":{"post":{"operationId":"webhooks_entityCreated","summary":"Entity Created","description":"A new entity was created","responses":{"200":{"description":"Webhook received successfully"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/webhooks_EntityWebhook"}}}}}},"webhooks_entityUpdated":{"post":{"operationId":"webhooks_entityUpdated","summary":"Entity Updated","description":"An entity was updated","responses":{"200":{"description":"Webhook received successfully"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/webhooks_EntityWebhook"}}}}}},"webhooks_entityStatusChanged":{"post":{"operationId":"webhooks_entityStatusChanged","summary":"Entity Status Changed","description":"An entity's status was changed","responses":{"200":{"description":"Webhook received successfully"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/webhooks_EntityStatusChangedWebhook"}}}}}},"webhooks_entityMetadataUpdated":{"post":{"operationId":"webhooks_entityMetadataUpdated","summary":"Entity Metadata Updated","description":"An entity's metadata was updated","responses":{"200":{"description":"Webhook received successfully"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/webhooks_EntityMetadataUpdatedWebhook"}}}}}},"webhooks_paymentMethodCreated":{"post":{"operationId":"webhooks_paymentMethodCreated","summary":"Payment Method Created","description":"A new payment method was created","responses":{"200":{"description":"Webhook received successfully"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/webhooks_PaymentMethodWebhook"}}}}}},"webhooks_paymentMethodUpdated":{"post":{"operationId":"webhooks_paymentMethodUpdated","summary":"Payment Method Updated","description":"A payment method was updated","responses":{"200":{"description":"Webhook received successfully"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/webhooks_PaymentMethodWebhook"}}}}}},"webhooks_paymentMethodDeleted":{"post":{"operationId":"webhooks_paymentMethodDeleted","summary":"Payment Method Deleted","description":"A payment method was deleted","responses":{"200":{"description":"Webhook received successfully"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/webhooks_PaymentMethodWebhook"}}}}}},"webhooks_invoiceCreated":{"post":{"operationId":"webhooks_invoiceCreated","summary":"Invoice Created","description":"A new invoice was created","responses":{"200":{"description":"Webhook received successfully"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/webhooks_InvoiceWebhook"}}}}}},"webhooks_invoiceUpdated":{"post":{"operationId":"webhooks_invoiceUpdated","summary":"Invoice Updated","description":"An invoice was updated","responses":{"200":{"description":"Webhook received successfully"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/webhooks_InvoiceWebhook"}}}}}},"webhooks_invoiceDeleted":{"post":{"operationId":"webhooks_invoiceDeleted","summary":"Invoice Deleted","description":"An invoice was deleted","responses":{"200":{"description":"Webhook received successfully"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/webhooks_InvoiceWebhook"}}}}}},"webhooks_invoiceCommentCreated":{"post":{"operationId":"webhooks_invoiceCommentCreated","summary":"Invoice Comment Created","description":"A comment was added to an invoice","responses":{"200":{"description":"Webhook received successfully"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/webhooks_InvoiceCommentWebhook"}}}}}},"webhooks_invoiceCommentDeleted":{"post":{"operationId":"webhooks_invoiceCommentDeleted","summary":"Invoice Comment Deleted","description":"A comment was deleted from an invoice","responses":{"200":{"description":"Webhook received successfully"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/webhooks_InvoiceCommentWebhook"}}}}}},"webhooks_invoiceStatusChanged":{"post":{"operationId":"webhooks_invoiceStatusChanged","summary":"Invoice Status Changed","description":"An invoice's status was changed","responses":{"200":{"description":"Webhook received successfully"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/webhooks_InvoiceStatusChangedWebhook"}}}}}},"webhooks_invoiceEmail":{"post":{"operationId":"webhooks_invoiceEmail","summary":"Incoming Invoice Email","description":"An email was received to an entity's email inbox","responses":{"200":{"description":"Webhook received successfully"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/webhooks_InvoiceEmailWebhook"}}}}}},"webhooks_invoiceStatusDraft":{"post":{"operationId":"webhooks_invoiceStatusDraft","summary":"Invoice Status Draft","description":"An invoice's status was changed to draft","responses":{"200":{"description":"Webhook received successfully"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/webhooks_InvoiceWebhook"}}}}}},"webhooks_invoiceStatusNew":{"post":{"operationId":"webhooks_invoiceStatusNew","summary":"Invoice Status New","description":"An invoice's status was changed to new","responses":{"200":{"description":"Webhook received successfully"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/webhooks_InvoiceWebhook"}}}}}},"webhooks_invoiceStatusApproved":{"post":{"operationId":"webhooks_invoiceStatusApproved","summary":"Invoice Status Approved","description":"An invoice's status was changed to approved","responses":{"200":{"description":"Webhook received successfully"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/webhooks_InvoiceWebhook"}}}}}},"webhooks_invoiceStatusRefused":{"post":{"operationId":"webhooks_invoiceStatusRefused","summary":"Invoice Status Refused","description":"An invoice's status was changed to refused","responses":{"200":{"description":"Webhook received successfully"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/webhooks_InvoiceWebhook"}}}}}},"webhooks_invoiceStatusScheduled":{"post":{"operationId":"webhooks_invoiceStatusScheduled","summary":"Invoice Status Scheduled","description":"An invoice's status was changed to scheduled","responses":{"200":{"description":"Webhook received successfully"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/webhooks_InvoiceWebhook"}}}}}},"webhooks_invoiceStatusPending":{"post":{"operationId":"webhooks_invoiceStatusPending","summary":"Invoice Status Pending","description":"An invoice's status was changed to pending","responses":{"200":{"description":"Webhook received successfully"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/webhooks_InvoiceWebhook"}}}}}},"webhooks_invoiceStatusCanceled":{"post":{"operationId":"webhooks_invoiceStatusCanceled","summary":"Invoice Status Canceled","description":"An invoice's status was changed to canceled","responses":{"200":{"description":"Webhook received successfully"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/webhooks_InvoiceWebhook"}}}}}},"webhooks_invoiceStatusPaid":{"post":{"operationId":"webhooks_invoiceStatusPaid","summary":"Invoice Status Paid","description":"An invoice's status was changed to paid","responses":{"200":{"description":"Webhook received successfully"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/webhooks_InvoiceWebhook"}}}}}},"webhooks_invoiceStatusFailed":{"post":{"operationId":"webhooks_invoiceStatusFailed","summary":"Invoice Status Failed","description":"An invoice's status was changed to failed","responses":{"200":{"description":"Webhook received successfully"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/webhooks_InvoiceWebhook"}}}}}},"webhooks_invoiceStatusArchived":{"post":{"operationId":"webhooks_invoiceStatusArchived","summary":"Invoice Status Archived","description":"An invoice's status was changed to archived","responses":{"200":{"description":"Webhook received successfully"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/webhooks_InvoiceWebhook"}}}}}},"webhooks_transactionCreated":{"post":{"operationId":"webhooks_transactionCreated","summary":"Transaction Created","description":"A transaction was created","responses":{"200":{"description":"Webhook received successfully"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/webhooks_TransactionWebhook"}}}}}},"webhooks_transactionPending":{"post":{"operationId":"webhooks_transactionPending","summary":"Transaction Pending","description":"A transaction was pending","responses":{"200":{"description":"Webhook received successfully"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/webhooks_TransactionWebhook"}}}}}},"webhooks_transactionCompleted":{"post":{"operationId":"webhooks_transactionCompleted","summary":"Transaction Completed","description":"A transaction was completed","responses":{"200":{"description":"Webhook received successfully"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/webhooks_TransactionWebhook"}}}}}},"webhooks_transactionFailed":{"post":{"operationId":"webhooks_transactionFailed","summary":"Transaction Failed","description":"A transaction was failed","responses":{"200":{"description":"Webhook received successfully"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/webhooks_TransactionWebhook"}}}}}},"webhooks_transactionReturned":{"post":{"operationId":"webhooks_transactionReturned","summary":"Transaction Returned","description":"A transaction was returned to the payer","responses":{"200":{"description":"Webhook received successfully"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/webhooks_TransactionWebhook"}}}}}},"webhooks_bulkInvoicesCreated":{"post":{"operationId":"webhooks_bulkInvoicesCreated","summary":"Bulk Invoices Created","description":"A bulk invoice creation job has completed","responses":{"200":{"description":"Webhook received successfully"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/webhooks_BulkInvoiceCreationWebhook"}}}}}},"webhooks_bulkInvoicesUpdated":{"post":{"operationId":"webhooks_bulkInvoicesUpdated","summary":"Bulk Invoices Updated","description":"A bulk invoice update job has completed","responses":{"200":{"description":"Webhook received successfully"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/webhooks_BulkInvoiceUpdateWebhook"}}}}}},"webhooks_bulkInvoicesApproved":{"post":{"operationId":"webhooks_bulkInvoicesApproved","summary":"Bulk Invoices Approved","description":"A bulk invoice approval job has completed","responses":{"200":{"description":"Webhook received successfully"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/webhooks_BulkInvoiceApprovalWebhook"}}}}}},"webhooks_bulkEntitiesCreated":{"post":{"operationId":"webhooks_bulkEntitiesCreated","summary":"Bulk Entities Created","description":"A bulk entity creation job has completed","responses":{"200":{"description":"Webhook received successfully"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/webhooks_BulkEntityCreationWebhook"}}}}}},"webhooks_invoiceCollectionEventOverdue":{"post":{"operationId":"webhooks_invoiceCollectionEventOverdue","summary":"Invoice Collection Event - Overdue Invoice","description":"An invoice passes its due date without being paid (in development)","responses":{"200":{"description":"Webhook received successfully"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/webhooks_InvoiceCollectionEventWebhook"}}}}}},"webhooks_invoiceCollectionEventEmailSent":{"post":{"operationId":"webhooks_invoiceCollectionEventEmailSent","summary":"Invoice Collection Event - Email Sent","description":"An email was sent to a payee to collect an overdue invoice (in development)","responses":{"200":{"description":"Webhook received successfully"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/webhooks_InvoiceCollectionEventWebhook"}}}}}},"webhooks_invoiceCollectionEventEmailReceived":{"post":{"operationId":"webhooks_invoiceCollectionEventEmailReceived","summary":"Invoice Collection Event - Email Received","description":"An email was received from a payee to collect an overdue invoice (in development)","responses":{"200":{"description":"Webhook received successfully"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/webhooks_InvoiceCollectionEventWebhook"}}}}}},"webhooks_ocrJobCompleted":{"post":{"operationId":"webhooks_ocrJobCompleted","summary":"OCR Job Completed","description":"An asynchronous OCR job has completed processing","responses":{"200":{"description":"Webhook received successfully"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/webhooks_OCRJobCompletedWebhook"}}}}}},"webhooks_paymentGatewayValidationJobCompleted":{"post":{"operationId":"webhooks_paymentGatewayValidationJobCompleted","summary":"Payment Gateway Validation Job Completed","description":"A payment gateway validation job has completed processing","responses":{"200":{"description":"Webhook received successfully"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/webhooks_PaymentGatewayValidationJobCompletedWebhook"}}}}}},"webhooks_paymentGatewayProcessJobCompleted":{"post":{"operationId":"webhooks_paymentGatewayProcessJobCompleted","summary":"Payment Gateway Process Job Completed","description":"A payment gateway processing job has completed processing","responses":{"200":{"description":"Webhook received successfully"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/webhooks_PaymentGatewayProcessJobCompletedWebhook"}}}}}}},"components":{"schemas":{"entityGroupTypes_EntityGroupId":{"type":"string","title":"EntityGroupId"},"entityTypes_EntityId":{"type":"string","title":"EntityId"},"entityTypes_AccountType":{"type":"string","enum":["business","individual"],"title":"AccountType"},"entityTypes_BusinessType":{"type":"string","enum":["soleProprietorship","unincorporatedAssociation","trust","publicCorporation","privateCorporation","llc","partnership","unincorporatedNonProfit","incorporatedNonProfit"],"title":"BusinessType"},"commons_PhoneNumber":{"type":"object","properties":{"countryCode":{"type":"string"},"number":{"type":"string"}},"required":["countryCode","number"],"title":"PhoneNumber"},"commons_Address":{"type":"object","properties":{"addressLine1":{"type":"string"},"addressLine2":{"type":"string"},"city":{"type":"string"},"stateOrProvince":{"type":"string","description":"State or province code. Must be in the format XX."},"postalCode":{"type":"string","description":"Postal code. Must be in the format XXXXX or XXXXX-XXXX."},"country":{"type":"string"}},"required":["addressLine1","city","stateOrProvince","postalCode"],"title":"Address"},"entityTypes_Ein":{"type":"object","properties":{"number":{"type":"string","description":"Must be in the format XX-XXXXXXX."}},"required":["number"],"title":"Ein"},"entityTypes_TaxID":{"type":"object","properties":{"ein":{"$ref":"#/components/schemas/entityTypes_Ein"}},"required":["ein"],"title":"TaxID"},"entityTypes_IndustryCodes":{"type":"object","properties":{"mcc":{"type":"string"}},"title":"IndustryCodes"},"entityTypes_BusinessProfileResponse":{"type":"object","properties":{"email":{"type":"string"},"legalBusinessName":{"type":"string"},"businessType":{"$ref":"#/components/schemas/entityTypes_BusinessType"},"phone":{"$ref":"#/components/schemas/commons_PhoneNumber"},"doingBusinessAs":{"type":"string"},"website":{"type":"string"},"description":{"type":"string"},"address":{"$ref":"#/components/schemas/commons_Address"},"ownersProvided":{"type":"boolean","description":"True if all representatives have been provided for this business."},"taxIDProvided":{"type":"boolean"},"taxId":{"$ref":"#/components/schemas/entityTypes_TaxID"},"formationDate":{"type":"string","format":"date-time"},"industryCodes":{"$ref":"#/components/schemas/entityTypes_IndustryCodes"},"averageMonthlyTransactionVolume":{"type":"number","format":"double"},"averageTransactionSize":{"type":"number","format":"double"},"maxTransactionSize":{"type":"number","format":"double"}},"required":["legalBusinessName","taxIDProvided"],"title":"BusinessProfileResponse"},"commons_FullName":{"type":"object","properties":{"firstName":{"type":"string"},"middleName":{"type":"string"},"lastName":{"type":"string"},"suffix":{"type":"string"}},"required":["firstName","lastName"],"title":"FullName"},"entityTypes_IndividualProfileResponse":{"type":"object","properties":{"email":{"type":"string"},"name":{"$ref":"#/components/schemas/commons_FullName"},"phone":{"$ref":"#/components/schemas/commons_PhoneNumber"},"address":{"$ref":"#/components/schemas/commons_Address"},"birthDateProvided":{"type":"boolean"},"governmentIDProvided":{"type":"boolean"}},"required":["name","birthDateProvided","governmentIDProvided"],"title":"IndividualProfileResponse"},"entityTypes_ProfileResponse":{"type":"object","properties":{"business":{"$ref":"#/components/schemas/entityTypes_BusinessProfileResponse","description":"Will be set if the entity is a business"},"individual":{"$ref":"#/components/schemas/entityTypes_IndividualProfileResponse","description":"Will be set if the entity is a individual"}},"title":"ProfileResponse"},"entityTypes_EntityStatus":{"type":"string","enum":["unverified","pending","resubmit","review","verified","failed"],"title":"EntityStatus"},"entityTypes_EntityResponse":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/entityTypes_EntityId"},"name":{"type":"string"},"email":{"type":"string"},"foreignId":{"type":"string","description":"The ID used to identify this entity in your system"},"emailTo":{"type":"string","description":"Local-part/username of the email address to which to send invoices to be added to the Invoice Inbox."},"emailToAlias":{"type":"array","items":{"type":"string"},"description":"Email inbox alias addresses. Used when forwarding emails to the emailTo address from an alias."},"isCustomer":{"type":"boolean","description":"True if this entity has a direct relationship with your organization."},"accountType":{"$ref":"#/components/schemas/entityTypes_AccountType"},"profile":{"$ref":"#/components/schemas/entityTypes_ProfileResponse"},"logo":{"type":"string","description":"URL for the entity logo"},"status":{"$ref":"#/components/schemas/entityTypes_EntityStatus"},"oatfiStatus":{"type":"string","description":"The OatFi status of this entity"},"oatfiUnderwritingResponse":{"type":"object","additionalProperties":{"type":"string"},"description":"The OatFi underwriting response of this entity"},"acceptedTos":{"type":"boolean","description":"True if this entity has accepted the terms of service."},"isPayor":{"type":"boolean","description":"True if this entity can pay invoices."},"isPayee":{"type":"boolean","description":"True if this entity can receive payments."},"isNetworkPayor":{"type":"boolean","description":"True if this entity is available as a payor to any entity on your platform. Otherwise this entity will only be available as a payor to entities that have a direct relationship with this entity."},"isNetworkPayee":{"type":"boolean","description":"True if this entity is available as a payee to any entity on your platform. Otherwise this entity will only be available as a payee to entities that have a direct relationship with this entity."},"metadata":{"type":"object","additionalProperties":{"type":"string"},"description":"Simple key/value metadata associated with this entity. For more complex metadata, use the Metadata API."},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","name","email","isCustomer","accountType","profile","status","acceptedTos","isPayor","isPayee","isNetworkPayor","isNetworkPayee","createdAt","updatedAt"],"title":"EntityResponse"},"entityGroupTypes_EntityGroupResponse":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/entityGroupTypes_EntityGroupId"},"foreignId":{"type":"string"},"name":{"type":"string"},"emailToName":{"type":"string"},"entities":{"type":"array","items":{"$ref":"#/components/schemas/entityTypes_EntityResponse"}},"metadata":{"type":"object","additionalProperties":{"type":"string"}}},"required":["id","entities","metadata"],"title":"EntityGroupResponse"},"entityGroupTypes_EntityGroupFindResponse":{"type":"object","properties":{"count":{"type":"integer"},"hasMore":{"type":"boolean"},"data":{"type":"array","items":{"$ref":"#/components/schemas/entityGroupTypes_EntityGroupResponse"}}},"required":["count","hasMore","data"],"title":"EntityGroupFindResponse"},"entityGroupTypes_EntityGroupCreateRequest":{"type":"object","properties":{"foreignId":{"type":"string"},"name":{"type":"string"},"emailToName":{"type":"string"},"metadata":{"type":"object","additionalProperties":{"type":"string"},"description":"Metadata key/value pairs to associate with this group. Will overwrite existing metadata."},"entityIds":{"type":"array","items":{"$ref":"#/components/schemas/entityTypes_EntityId"},"description":"List of entity IDs or foreign IDs"}},"title":"EntityGroupCreateRequest"},"entityGroupTypes_EntityGroupUpdateRequest":{"type":"object","properties":{"foreignId":{"type":"string"},"name":{"type":"string"},"emailToName":{"type":"string"},"metadata":{"type":"object","additionalProperties":{"type":"string"},"description":"Metadata key/value pairs to associate with this group. Will overwrite existing metadata."}},"title":"EntityGroupUpdateRequest"},"entityTypes_LineItemAvailabilities":{"type":"string","enum":["DISABLED","OPTIONAL","REQUIRED"],"title":"LineItemAvailabilities"},"invoiceTypes_InvoiceStatus":{"type":"string","enum":["UNASSIGNED","DRAFT","NEW","APPROVED","SCHEDULED","PENDING","PAID","ARCHIVED","REFUSED","CANCELED","FAILED"],"title":"InvoiceStatus"},"entityTypes_TokenGenerationInvoiceOptions":{"type":"object","properties":{"lineItems":{"$ref":"#/components/schemas/entityTypes_LineItemAvailabilities","description":"Defaults to OPTIONAL. If set to REQUIRED, the user will be required to provide at least one line item when creating an invoice. If set to DISABLED, the user will not be able to provide line items when creating an invoice."},"status":{"type":"array","items":{"$ref":"#/components/schemas/invoiceTypes_InvoiceStatus"}},"recurring":{"type":"boolean","description":"If true, recurring invoice templates will be available to the user."}},"required":["status"],"title":"TokenGenerationInvoiceOptions"},"entityTypes_TokenGenerationPagesOptions":{"type":"object","properties":{"paymentMethods":{"type":"boolean"},"representatives":{"type":"boolean"},"notifications":{"type":"boolean"},"counterparties":{"type":"boolean"},"approvals":{"type":"boolean"},"emailLog":{"type":"boolean"}},"title":"TokenGenerationPagesOptions"},"entityTypes_TokenGenerationStyleOptions":{"type":"object","properties":{"primaryColor":{"type":"string"}},"required":["primaryColor"],"title":"TokenGenerationStyleOptions"},"entityTypes_VendorNetwork":{"type":"string","enum":["all","platform","entity"],"title":"VendorNetwork"},"entityTypes_TokenGenerationVendorOptions":{"type":"object","properties":{"disableCreation":{"type":"boolean","description":"If true, the user will not be able to create new vendors."},"network":{"$ref":"#/components/schemas/entityTypes_VendorNetwork"}},"required":["network"],"title":"TokenGenerationVendorOptions"},"entityTypes_TokenGenerationEntityOptions":{"type":"object","properties":{"enableMercoaPayments":{"type":"boolean","description":"If true, will require entity to undergo KYB to use Mercoa payment rails and will capture required KYB data in the portal."}},"title":"TokenGenerationEntityOptions"},"entityTypes_TokenGenerationOptions":{"type":"object","properties":{"expiresIn":{"type":"string","description":"Expressed in seconds or a string describing a time span. The default is 1h."},"invoice":{"$ref":"#/components/schemas/entityTypes_TokenGenerationInvoiceOptions"},"pages":{"$ref":"#/components/schemas/entityTypes_TokenGenerationPagesOptions"},"style":{"$ref":"#/components/schemas/entityTypes_TokenGenerationStyleOptions"},"vendors":{"$ref":"#/components/schemas/entityTypes_TokenGenerationVendorOptions"},"entity":{"$ref":"#/components/schemas/entityTypes_TokenGenerationEntityOptions"},"sessionId":{"type":"string","description":"Optional session ID to use for the token. If not provided, this token will not be associated with a session."}},"title":"TokenGenerationOptions"},"entityGroupTypes_EntityIdOrBoolean":{"oneOf":[{"type":"boolean"},{"$ref":"#/components/schemas/entityTypes_EntityId"}],"title":"EntityIdOrBoolean"},"entityGroupTypes_EntityGroupAddEntitiesRequest":{"type":"object","properties":{"entityIds":{"type":"array","items":{"$ref":"#/components/schemas/entityTypes_EntityId"},"description":"List of entity IDs or foreign IDs to add to the group"},"copyUsersFrom":{"$ref":"#/components/schemas/entityGroupTypes_EntityIdOrBoolean","description":"Entity ID / foreign ID of an entity currently in the group to copy users and roles from OR a boolean defining if users should be copied to the new entities.\n\nIf not provided or false, users and roles will not be copied.\nIf true, users and roles will be copied from the entity with the most users that has been updated most recently.\nIf a valid ID is provided, users and roles will be copied from the corresponding provided entity in the group.\n\nNote: If users copied, any preexisting users will be left alone, and users with the same foreign ID will not be copied."},"filterRoles":{"type":"array","items":{"type":"string"},"description":"List of roles to filter users by. If not provided, all users will be copied. If provided, only users with the provided roles will be copied."}},"required":["entityIds"],"title":"EntityGroupAddEntitiesRequest"},"entityGroupTypes_EntityGroupRemoveEntitiesRequest":{"type":"object","properties":{"entityIds":{"type":"array","items":{"$ref":"#/components/schemas/entityTypes_EntityId"},"description":"List of entity IDs or foreign IDs to remove from the group"}},"required":["entityIds"],"title":"EntityGroupRemoveEntitiesRequest"},"entityTypes_CounterpartyCustomizationAccount":{"type":"object","properties":{"accountId":{"type":"string","description":"The ID the counterparty has assigned to this account."},"postalCode":{"type":"string","description":"The postal code the counterparty has assigned to this account."},"nameOnAccount":{"type":"string","description":"The name on the account the counterparty has assigned to this account."}},"required":["accountId"],"title":"CounterpartyCustomizationAccount"},"entityTypes_CounterpartyCustomizationRequest":{"type":"object","properties":{"counterpartyId":{"$ref":"#/components/schemas/entityTypes_EntityId"},"accounts":{"type":"array","items":{"$ref":"#/components/schemas/entityTypes_CounterpartyCustomizationAccount"},"description":"The list of accounts the entity has with the counterparty."}},"required":["counterpartyId"],"title":"CounterpartyCustomizationRequest"},"entityTypes_EntityAddPayeesRequest":{"type":"object","properties":{"payees":{"type":"array","items":{"$ref":"#/components/schemas/entityTypes_EntityId"},"description":"List of payee entity IDs or foreign IDs to associate with the entity"},"customizations":{"type":"array","items":{"$ref":"#/components/schemas/entityTypes_CounterpartyCustomizationRequest"},"description":"List of customizations to apply to the payees. If the payee is not currently a counterparty of the entity, the counterparty will be created with the provided customizations."}},"required":["payees"],"title":"EntityAddPayeesRequest"},"entityTypes_EntityHidePayeesRequest":{"type":"object","properties":{"payees":{"type":"array","items":{"$ref":"#/components/schemas/entityTypes_EntityId"},"description":"List of payee entity IDs or foreign IDs to hide"}},"required":["payees"],"title":"EntityHidePayeesRequest"},"entityTypes_EntityAddPayorsRequest":{"type":"object","properties":{"payors":{"type":"array","items":{"$ref":"#/components/schemas/entityTypes_EntityId"},"description":"List of payor entity IDs or foreign IDs to associate with the entity"},"customizations":{"type":"array","items":{"$ref":"#/components/schemas/entityTypes_CounterpartyCustomizationRequest"},"description":"List of customizations to apply to the payors. If the payor is not currently a counterparty of the entity, the counterparty will be created with the provided customizations."}},"required":["payors"],"title":"EntityAddPayorsRequest"},"entityTypes_EntityHidePayorsRequest":{"type":"object","properties":{"payors":{"type":"array","items":{"$ref":"#/components/schemas/entityTypes_EntityId"},"description":"List of payor entity IDs or foreign IDs to hide"}},"required":["payors"],"title":"EntityHidePayorsRequest"},"entityTypes_EntityUserId":{"type":"string","title":"EntityUserId"},"entityGroupTypes_EntityGroupUserEntityResponse":{"type":"object","properties":{"roles":{"type":"array","items":{"type":"string"},"description":"List of roles. A role can be any string. For example: \"payer\", \"approver\", \"viewer\""},"entityId":{"$ref":"#/components/schemas/entityTypes_EntityId","description":"The IDs of the entities that these roles applies to."},"id":{"$ref":"#/components/schemas/entityTypes_EntityUserId"}},"required":["roles","entityId","id"],"title":"EntityGroupUserEntityResponse"},"entityGroupTypes_EntityGroupUserResponse":{"type":"object","properties":{"foreignId":{"type":"string","description":"The ID used to identify this user in your system."},"email":{"type":"string"},"name":{"type":"string"},"entities":{"type":"array","items":{"$ref":"#/components/schemas/entityGroupTypes_EntityGroupUserEntityResponse"},"description":"List of roles per entity."},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["foreignId","entities","createdAt","updatedAt"],"title":"EntityGroupUserResponse"},"entityGroupTypes_FindEntityGroupUserResponse":{"type":"object","properties":{"count":{"type":"integer","description":"Total number of users for the given filters. This value is not limited by the limit parameter. It is provided so that you can determine how many pages of results are available."},"hasMore":{"type":"boolean","description":"True if there are more users available for the given filters."},"data":{"type":"array","items":{"$ref":"#/components/schemas/entityGroupTypes_EntityGroupUserResponse"}}},"required":["count","hasMore","data"],"title":"FindEntityGroupUserResponse"},"entityGroupTypes_EntityGroupUserEntityRequest":{"type":"object","properties":{"roles":{"type":"array","items":{"type":"string"},"description":"List of roles. A role can be any string. For example: \"payer\", \"approver\", \"viewer\""},"entityId":{"$ref":"#/components/schemas/entityTypes_EntityId","description":"The IDs of the entities that these roles applies to."}},"required":["roles","entityId"],"title":"EntityGroupUserEntityRequest"},"entityGroupTypes_EntityGroupUserRequest":{"type":"object","properties":{"foreignId":{"type":"string","description":"The ID used to identify this user in your system. This is a required field and needs to be unique for all users in the group."},"email":{"type":"string"},"name":{"type":"string"},"roles":{"type":"array","items":{"type":"string"},"description":"List of roles to assign to the user. A role can be any string. For example: \"payer\", \"approver\", \"viewer\"\nIf not provided, the user will have no roles. Per entity roles will override these global roles."},"entities":{"type":"array","items":{"$ref":"#/components/schemas/entityGroupTypes_EntityGroupUserEntityRequest"},"description":"List of roles per entity. Useful for assigning roles to specific entities."}},"required":["foreignId"],"title":"EntityGroupUserRequest"},"entityGroupTypes_EntityGroupUserSyncRequest":{"type":"object","properties":{"copyUsersFrom":{"$ref":"#/components/schemas/entityTypes_EntityId","description":"Entity ID / foreign ID of an entity currently in the group to copy users and roles from. \nIf not provided, users will be synced from the entity with the most users that has been updated most recently."},"filterRoles":{"type":"array","items":{"type":"string"},"description":"List of roles to filter users by. If not provided, all users will be copied. If provided, only users with the provided roles will be copied."},"addUsers":{"type":"boolean","description":"If true, users will be added to entities if they are not found in the copyUsersFrom entity. Default is true."},"removeUsers":{"type":"boolean","description":"If true, users will be removed from entities if they are not found in the copyUsersFrom entity. Default is false."}},"title":"EntityGroupUserSyncRequest"},"invoiceTypes_InvoiceDateFilter":{"type":"string","enum":["INVOICE_DATE","DEDUCTION_DATE","DUE_DATE","SETTLEMENT_DATE","CREATED_AT","UPDATED_AT"],"title":"InvoiceDateFilter"},"invoiceTypes_InvoiceOrderByField":{"type":"string","enum":["AMOUNT","DUE_DATE","CREATED_AT","UPDATED_AT","DEDUCTION_DATE","INVOICE_DATE","SETTLEMENT_DATE","INVOICE_NUMBER","VENDOR_NAME","PAYER_NAME"],"title":"InvoiceOrderByField"},"commons_OrderDirection":{"type":"string","enum":["ASC","DESC"],"title":"OrderDirection"},"invoiceTypes_InvoiceId":{"type":"string","title":"InvoiceId"},"commons_StringOrStringArray":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"title":"StringOrStringArray"},"invoiceTypes_MetadataFilter":{"type":"object","properties":{"key":{"type":"string"},"value":{"$ref":"#/components/schemas/commons_StringOrStringArray","description":"If multiple values are provided, the filter will match if any of the values match (OR filter). To filter for the absence of a key, use the value 'NULL'. To filter for the presence of a key, use the value 'NOT NULL'."}},"required":["key","value"],"title":"MetadataFilter"},"invoiceTypes_ApproverAction":{"type":"string","enum":["NONE","APPROVE","REJECT"],"title":"ApproverAction"},"invoiceTypes_PaymentType":{"type":"string","enum":["oneTime","recurring"],"title":"PaymentType"},"paymentMethodTypes_CurrencyCode":{"type":"string","enum":["AED","AFN","ALL","AMD","ANG","AOA","ARS","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","BMD","BND","BOB","BOV","BRL","BSD","BTN","BWP","BYN","BZD","CAD","CDF","CHE","CHF","CHW","CLF","CLP","COP","COU","CRC","CUC","CUP","CVE","CZK","DJF","DKK","DOP","DZD","EGP","ERN","ETB","EUR","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MAD","MDL","MGA","MKD","MMK","MNT","MOP","MRU","MUR","MVR","MWK","MXN","MXV","MYR","MZN","NAD","NGN","NIO","NOK","NPR","NZD","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","CNY","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLE","SLL","SOS","SRD","SSP","STN","SVC","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","USD","USN","UYI","UYU","UYW","UZS","VED","VES","VND","VUV","WST","XAF","XAG","XAU","XBA","XBB","XBC","XBD","XCD","XDR","XOF","XPD","XPF","XPT","XSU","XTS","XUA","XXX","YER","ZAR","ZMW","ZWL"],"title":"CurrencyCode"},"paymentMethodTypes_PaymentMethodId":{"type":"string","title":"PaymentMethodId"},"paymentMethodTypes_BankType":{"type":"string","enum":["CHECKING","SAVINGS","UNKNOWN"],"title":"BankType"},"paymentMethodTypes_BankStatus":{"type":"string","enum":["NEW","VERIFIED","VERIFICATION_FAILED","PENDING","ERRORED"],"title":"BankStatus"},"paymentMethodTypes_BankAccountCheckOptions":{"type":"object","properties":{"enabled":{"type":"boolean","description":"If true, will allow the user to print checks from this bank account"},"initialCheckNumber":{"type":"integer","description":"If provided, will start the check number sequence at the provided number. If not provided, will start at 5000."},"routingNumberOverride":{"type":"string","description":"If provided, will print a check with the provided routing number instead of the one from the bank account"},"accountNumberOverride":{"type":"string","description":"If provided, will print a check with the provided account number instead of the one from the bank account"},"accountHolderNameOverride":{"type":"string","description":"If provided, will print a check with the provided account holder name instead of the payer name from the invoice"},"accountHolderAddressOverride":{"$ref":"#/components/schemas/commons_Address","description":"If provided, will print a check with the provided account holder address instead of the payer address from the invoice"},"signatoryName":{"type":"string","description":"Name of the person who's signature will be printed on the check."},"signatureImage":{"type":"string","description":"Base64 encoded image of the signature. If not provided, will use the signatoryName to generate a signature. Mercoa will automatically grayscale, resize, and convert the image to a PNG the image to fit on the check."},"useSignatureImage":{"type":"boolean","description":"If true, will print checks with the provided signatureImage. If false, will print checks with a generated signature from the signatoryName. If this parameter is not set the default behavior is to use the signatureImage if provided."}},"required":["signatoryName"],"title":"BankAccountCheckOptions"},"paymentMethodTypes_CardType":{"type":"string","enum":["credit","debit","prepaid","unknown"],"title":"CardType"},"paymentMethodTypes_CardBrand":{"type":"string","enum":["AmericanExpress","Discover","Mastercard","Visa"],"title":"CardBrand"},"paymentMethodTypes_CustomPaymentMethodSchemaId":{"type":"string","title":"CustomPaymentMethodSchemaId"},"paymentMethodTypes_CustomPaymentMethodSchemaFieldType":{"type":"string","enum":["text","number","select","date","phone","email","url","dynamicUrl","embeddedUrl","address","usBankRoutingNumber","usBankAccountNumber"],"title":"CustomPaymentMethodSchemaFieldType"},"paymentMethodTypes_CustomPaymentMethodSchemaField":{"type":"object","properties":{"name":{"type":"string"},"displayName":{"type":"string"},"type":{"$ref":"#/components/schemas/paymentMethodTypes_CustomPaymentMethodSchemaFieldType"},"optional":{"type":"boolean","description":"Indicates whether this field is optional"},"useAsAccountName":{"type":"boolean","description":"Indicates whether this field should be used as the name of the payment method. Only one field can be used as the name. Will set the accountName field of the payment method to the value of this field."},"useAsAccountNumber":{"type":"boolean","description":"Indicates whether this field should be used as the account number of the payment method. Only one field can be used as the account number. Will set the accountNumber field of the payment method to the value of this field."},"options":{"type":"array","items":{"type":"string"},"description":"When type is 'select', provide options that can be selected"}},"required":["name","type","optional"],"title":"CustomPaymentMethodSchemaField"},"paymentMethodTypes_CustomPaymentMethodSchemaResponse":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/paymentMethodTypes_CustomPaymentMethodSchemaId"},"name":{"type":"string"},"isSource":{"type":"boolean","description":"This payment method can be used as a payment source for an invoice"},"isDestination":{"type":"boolean","description":"This payment method can be used as a payment destination for an invoice"},"supportedCurrencies":{"type":"array","items":{"$ref":"#/components/schemas/paymentMethodTypes_CurrencyCode"},"description":"List of currencies that this payment method supports."},"fields":{"type":"array","items":{"$ref":"#/components/schemas/paymentMethodTypes_CustomPaymentMethodSchemaField"}},"estimatedProcessingTime":{"type":"integer","description":"Estimated time in days for this payment method to process a payments. 0 is an same-day payment methods, -1 is unknown processing time."},"maxAmount":{"type":"number","format":"double","description":"The maximum amount that can be transferred from this payment method in a single transaction."},"minAmount":{"type":"number","format":"double","description":"The minimum amount that can be transferred from this payment method in a single transaction. Default is 1."},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","name","isSource","isDestination","supportedCurrencies","fields","estimatedProcessingTime","createdAt","updatedAt"],"title":"CustomPaymentMethodSchemaResponse"},"paymentMethodTypes_WalletBalance":{"type":"object","properties":{"amount":{"type":"number","format":"double","description":"The amount in major units of the currency."},"currency":{"$ref":"#/components/schemas/paymentMethodTypes_CurrencyCode"}},"required":["amount","currency"],"title":"WalletBalance"},"paymentMethodTypes_PaymentMethodResponse":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["bankAccount"],"description":"Discriminator value: bankAccount"},"id":{"$ref":"#/components/schemas/paymentMethodTypes_PaymentMethodId"},"isDefaultSource":{"type":"boolean","description":"Indicates whether this payment method is the default source for the entity"},"isDefaultDestination":{"type":"boolean","description":"Indicates whether this payment method is the default destination for the entity"},"supportedCurrencies":{"type":"array","items":{"$ref":"#/components/schemas/paymentMethodTypes_CurrencyCode"}},"externalAccountingSystemId":{"type":"string","description":"ID for this payment method in the external accounting system (e.g Rutter or Codat)"},"frozen":{"type":"boolean","description":"Frozen payment methods cannot be used for payments, but will still be returned in API responses."},"metadata":{"type":"object","additionalProperties":{"type":"string"},"description":"Metadata associated with this payment method."},"confirmedByEntity":{"type":"boolean","description":"(ALPHA, MAY BE REMOVED) Indicates whether the payment method has been verified by the entity. This is useful if another entity has added this payment method to this entity, and you want the owner of the payment method to verify it is correct."},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"accountName":{"type":"string"},"bankName":{"type":"string"},"routingNumber":{"type":"string"},"accountNumber":{"type":"string"},"accountType":{"$ref":"#/components/schemas/paymentMethodTypes_BankType"},"status":{"$ref":"#/components/schemas/paymentMethodTypes_BankStatus"},"checkOptions":{"$ref":"#/components/schemas/paymentMethodTypes_BankAccountCheckOptions","description":"If check printing is enabled for the account, will return the check options for this bank account"}},"required":["type","id","isDefaultSource","isDefaultDestination","supportedCurrencies","frozen","metadata","createdAt","updatedAt","accountName","bankName","routingNumber","accountNumber","accountType","status"]},{"type":"object","properties":{"type":{"type":"string","enum":["card"],"description":"Discriminator value: card"},"id":{"$ref":"#/components/schemas/paymentMethodTypes_PaymentMethodId"},"isDefaultSource":{"type":"boolean","description":"Indicates whether this payment method is the default source for the entity"},"isDefaultDestination":{"type":"boolean","description":"Indicates whether this payment method is the default destination for the entity"},"supportedCurrencies":{"type":"array","items":{"$ref":"#/components/schemas/paymentMethodTypes_CurrencyCode"}},"externalAccountingSystemId":{"type":"string","description":"ID for this payment method in the external accounting system (e.g Rutter or Codat)"},"frozen":{"type":"boolean","description":"Frozen payment methods cannot be used for payments, but will still be returned in API responses."},"metadata":{"type":"object","additionalProperties":{"type":"string"},"description":"Metadata associated with this payment method."},"confirmedByEntity":{"type":"boolean","description":"(ALPHA, MAY BE REMOVED) Indicates whether the payment method has been verified by the entity. This is useful if another entity has added this payment method to this entity, and you want the owner of the payment method to verify it is correct."},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"cardType":{"$ref":"#/components/schemas/paymentMethodTypes_CardType"},"cardBrand":{"$ref":"#/components/schemas/paymentMethodTypes_CardBrand"},"lastFour":{"type":"string"},"expMonth":{"type":"string"},"expYear":{"type":"string"}},"required":["type","id","isDefaultSource","isDefaultDestination","supportedCurrencies","frozen","metadata","createdAt","updatedAt","cardType","cardBrand","lastFour","expMonth","expYear"]},{"type":"object","properties":{"type":{"type":"string","enum":["check"],"description":"Discriminator value: check"},"id":{"$ref":"#/components/schemas/paymentMethodTypes_PaymentMethodId"},"isDefaultSource":{"type":"boolean","description":"Indicates whether this payment method is the default source for the entity"},"isDefaultDestination":{"type":"boolean","description":"Indicates whether this payment method is the default destination for the entity"},"supportedCurrencies":{"type":"array","items":{"$ref":"#/components/schemas/paymentMethodTypes_CurrencyCode"}},"externalAccountingSystemId":{"type":"string","description":"ID for this payment method in the external accounting system (e.g Rutter or Codat)"},"frozen":{"type":"boolean","description":"Frozen payment methods cannot be used for payments, but will still be returned in API responses."},"metadata":{"type":"object","additionalProperties":{"type":"string"},"description":"Metadata associated with this payment method."},"confirmedByEntity":{"type":"boolean","description":"(ALPHA, MAY BE REMOVED) Indicates whether the payment method has been verified by the entity. This is useful if another entity has added this payment method to this entity, and you want the owner of the payment method to verify it is correct."},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"payToTheOrderOf":{"type":"string"},"addressLine1":{"type":"string"},"addressLine2":{"type":"string"},"city":{"type":"string"},"stateOrProvince":{"type":"string"},"postalCode":{"type":"string"},"country":{"type":"string"}},"required":["type","id","isDefaultSource","isDefaultDestination","supportedCurrencies","frozen","metadata","createdAt","updatedAt","payToTheOrderOf","addressLine1","city","stateOrProvince","postalCode","country"]},{"type":"object","properties":{"type":{"type":"string","enum":["custom"],"description":"Discriminator value: custom"},"id":{"$ref":"#/components/schemas/paymentMethodTypes_PaymentMethodId"},"isDefaultSource":{"type":"boolean","description":"Indicates whether this payment method is the default source for the entity"},"isDefaultDestination":{"type":"boolean","description":"Indicates whether this payment method is the default destination for the entity"},"supportedCurrencies":{"type":"array","items":{"$ref":"#/components/schemas/paymentMethodTypes_CurrencyCode"}},"externalAccountingSystemId":{"type":"string","description":"ID for this payment method in the external accounting system (e.g Rutter or Codat)"},"frozen":{"type":"boolean","description":"Frozen payment methods cannot be used for payments, but will still be returned in API responses."},"metadata":{"type":"object","additionalProperties":{"type":"string"},"description":"Metadata associated with this payment method."},"confirmedByEntity":{"type":"boolean","description":"(ALPHA, MAY BE REMOVED) Indicates whether the payment method has been verified by the entity. This is useful if another entity has added this payment method to this entity, and you want the owner of the payment method to verify it is correct."},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"foreignId":{"type":"string","description":"ID for this payment method in your system"},"accountName":{"type":"string"},"accountNumber":{"type":"string"},"availableBalance":{"type":"number","format":"double","description":"The available balance for this payment method."},"schemaId":{"$ref":"#/components/schemas/paymentMethodTypes_CustomPaymentMethodSchemaId","description":"Payment method schema used for this payment method. Defines the fields that this payment method contains."},"schema":{"$ref":"#/components/schemas/paymentMethodTypes_CustomPaymentMethodSchemaResponse"},"data":{"type":"object","additionalProperties":{"type":"string"},"description":"Object of key/value pairs that matches the keys in the linked payment method schema."}},"required":["type","id","isDefaultSource","isDefaultDestination","supportedCurrencies","frozen","metadata","createdAt","updatedAt","schemaId","schema","data"]},{"type":"object","properties":{"type":{"type":"string","enum":["offPlatform"],"description":"Discriminator value: offPlatform"},"id":{"$ref":"#/components/schemas/paymentMethodTypes_PaymentMethodId"},"isDefaultSource":{"type":"boolean","description":"Indicates whether this payment method is the default source for the entity"},"isDefaultDestination":{"type":"boolean","description":"Indicates whether this payment method is the default destination for the entity"},"supportedCurrencies":{"type":"array","items":{"$ref":"#/components/schemas/paymentMethodTypes_CurrencyCode"}},"externalAccountingSystemId":{"type":"string","description":"ID for this payment method in the external accounting system (e.g Rutter or Codat)"},"frozen":{"type":"boolean","description":"Frozen payment methods cannot be used for payments, but will still be returned in API responses."},"metadata":{"type":"object","additionalProperties":{"type":"string"},"description":"Metadata associated with this payment method."},"confirmedByEntity":{"type":"boolean","description":"(ALPHA, MAY BE REMOVED) Indicates whether the payment method has been verified by the entity. This is useful if another entity has added this payment method to this entity, and you want the owner of the payment method to verify it is correct."},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["type","id","isDefaultSource","isDefaultDestination","supportedCurrencies","frozen","metadata","createdAt","updatedAt"]},{"type":"object","properties":{"type":{"type":"string","enum":["utility"],"description":"Discriminator value: utility"},"id":{"$ref":"#/components/schemas/paymentMethodTypes_PaymentMethodId"},"isDefaultSource":{"type":"boolean","description":"Indicates whether this payment method is the default source for the entity"},"isDefaultDestination":{"type":"boolean","description":"Indicates whether this payment method is the default destination for the entity"},"supportedCurrencies":{"type":"array","items":{"$ref":"#/components/schemas/paymentMethodTypes_CurrencyCode"}},"externalAccountingSystemId":{"type":"string","description":"ID for this payment method in the external accounting system (e.g Rutter or Codat)"},"frozen":{"type":"boolean","description":"Frozen payment methods cannot be used for payments, but will still be returned in API responses."},"metadata":{"type":"object","additionalProperties":{"type":"string"},"description":"Metadata associated with this payment method."},"confirmedByEntity":{"type":"boolean","description":"(ALPHA, MAY BE REMOVED) Indicates whether the payment method has been verified by the entity. This is useful if another entity has added this payment method to this entity, and you want the owner of the payment method to verify it is correct."},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"utilityId":{"type":"string","description":"The ID of the utility that this payment method is linked to."}},"required":["type","id","isDefaultSource","isDefaultDestination","supportedCurrencies","frozen","metadata","createdAt","updatedAt","utilityId"]},{"type":"object","properties":{"type":{"type":"string","enum":["wallet"],"description":"Discriminator value: wallet"},"id":{"$ref":"#/components/schemas/paymentMethodTypes_PaymentMethodId"},"isDefaultSource":{"type":"boolean","description":"Indicates whether this payment method is the default source for the entity"},"isDefaultDestination":{"type":"boolean","description":"Indicates whether this payment method is the default destination for the entity"},"supportedCurrencies":{"type":"array","items":{"$ref":"#/components/schemas/paymentMethodTypes_CurrencyCode"}},"externalAccountingSystemId":{"type":"string","description":"ID for this payment method in the external accounting system (e.g Rutter or Codat)"},"frozen":{"type":"boolean","description":"Frozen payment methods cannot be used for payments, but will still be returned in API responses."},"metadata":{"type":"object","additionalProperties":{"type":"string"},"description":"Metadata associated with this payment method."},"confirmedByEntity":{"type":"boolean","description":"(ALPHA, MAY BE REMOVED) Indicates whether the payment method has been verified by the entity. This is useful if another entity has added this payment method to this entity, and you want the owner of the payment method to verify it is correct."},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"availableBalance":{"$ref":"#/components/schemas/paymentMethodTypes_WalletBalance","description":"The balance available for use in this wallet."},"pendingBalance":{"$ref":"#/components/schemas/paymentMethodTypes_WalletBalance","description":"The in-flight balance into/out of this wallet."}},"required":["type","id","isDefaultSource","isDefaultDestination","supportedCurrencies","frozen","metadata","createdAt","updatedAt","availableBalance","pendingBalance"]}],"discriminator":{"propertyName":"type"},"title":"PaymentMethodResponse"},"entityTypes_CounterpartyNetworkType":{"type":"string","enum":["ENTITY","NETWORK"],"title":"CounterpartyNetworkType"},"entityTypes_CounterpartyInvoiceMetricsStatusResponse":{"type":"object","properties":{"status":{"$ref":"#/components/schemas/invoiceTypes_InvoiceStatus"},"totalCount":{"type":"integer"},"totalAmount":{"type":"number","format":"double"}},"required":["status","totalCount","totalAmount"],"title":"CounterpartyInvoiceMetricsStatusResponse"},"entityTypes_CounterpartyInvoiceMetricsResponse":{"type":"object","properties":{"totalCount":{"type":"integer"},"totalAmount":{"type":"number","format":"double"},"statuses":{"type":"array","items":{"$ref":"#/components/schemas/entityTypes_CounterpartyInvoiceMetricsStatusResponse"}}},"required":["totalCount","totalAmount","statuses"],"title":"CounterpartyInvoiceMetricsResponse"},"entityTypes_CounterpartyResponse":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/entityTypes_EntityId"},"name":{"type":"string"},"email":{"type":"string"},"foreignId":{"type":"string","description":"The ID used to identify this entity in your system"},"emailTo":{"type":"string","description":"Local-part/username of the email address to which to send invoices to be added to the Invoice Inbox."},"emailToAlias":{"type":"array","items":{"type":"string"},"description":"Email inbox alias addresses. Used when forwarding emails to the emailTo address from an alias."},"isCustomer":{"type":"boolean","description":"True if this entity has a direct relationship with your organization."},"accountType":{"$ref":"#/components/schemas/entityTypes_AccountType"},"profile":{"$ref":"#/components/schemas/entityTypes_ProfileResponse"},"logo":{"type":"string","description":"URL for the entity logo"},"status":{"$ref":"#/components/schemas/entityTypes_EntityStatus"},"oatfiStatus":{"type":"string","description":"The OatFi status of this entity"},"oatfiUnderwritingResponse":{"type":"object","additionalProperties":{"type":"string"},"description":"The OatFi underwriting response of this entity"},"acceptedTos":{"type":"boolean","description":"True if this entity has accepted the terms of service."},"isPayor":{"type":"boolean","description":"True if this entity can pay invoices."},"isPayee":{"type":"boolean","description":"True if this entity can receive payments."},"isNetworkPayor":{"type":"boolean","description":"True if this entity is available as a payor to any entity on your platform. Otherwise this entity will only be available as a payor to entities that have a direct relationship with this entity."},"isNetworkPayee":{"type":"boolean","description":"True if this entity is available as a payee to any entity on your platform. Otherwise this entity will only be available as a payee to entities that have a direct relationship with this entity."},"metadata":{"type":"object","additionalProperties":{"type":"string"},"description":"Simple key/value metadata associated with this entity. For more complex metadata, use the Metadata API."},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"accounts":{"type":"array","items":{"$ref":"#/components/schemas/entityTypes_CounterpartyCustomizationAccount"},"description":"If the entity searching for counterparties has any accounts configured in the Payee/Payor relationship, they will be returned"},"paymentMethods":{"type":"array","items":{"$ref":"#/components/schemas/paymentMethodTypes_PaymentMethodResponse"}},"counterpartyType":{"type":"array","items":{"$ref":"#/components/schemas/entityTypes_CounterpartyNetworkType"}},"invoiceMetrics":{"$ref":"#/components/schemas/entityTypes_CounterpartyInvoiceMetricsResponse"}},"required":["id","name","email","isCustomer","accountType","profile","status","acceptedTos","isPayor","isPayee","isNetworkPayor","isNetworkPayee","createdAt","updatedAt"],"title":"CounterpartyResponse"},"invoiceTypes_PaymentSourceOptions":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["bnpl"],"description":"Discriminator value: bnpl"},"installmentsStartDate":{"type":"string","description":"The start date for installments in YYYY-MM-DD format"},"defermentWeeks":{"type":"integer","description":"The number of weeks to defer repayment"},"acceptedTerms":{"type":"boolean","description":"Whether the user has agreed to the BNPL terms"},"loanId":{"type":"string","description":"The ID of the loan to use for the BNPL payment."},"downpaymentId":{"type":"string","description":"The ID of the downpayment to use for the BNPL payment."}},"required":["type","installmentsStartDate","defermentWeeks","acceptedTerms"]}],"discriminator":{"propertyName":"type"},"title":"PaymentSourceOptions"},"invoiceTypes_CheckDeliveryMethod":{"type":"string","enum":["PRINT","MAIL","MAIL_PRIORITY","MAIL_UPS_NEXT_DAY"],"title":"CheckDeliveryMethod"},"invoiceTypes_BankDeliveryMethod":{"type":"string","enum":["ACH_STANDARD","ACH_SAME_DAY","ACH_ACCELERATED"],"title":"BankDeliveryMethod"},"invoiceTypes_PaymentDestinationOptions":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["check"],"description":"Discriminator value: check"},"delivery":{"$ref":"#/components/schemas/invoiceTypes_CheckDeliveryMethod","description":"Delivery method for check disbursements. Defaults to MAIL."},"printDescription":{"type":"boolean","description":"If true, prints the invoice description (noteToSelf) on the check note. Defaults to false."}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["bankAccount"],"description":"Discriminator value: bankAccount"},"delivery":{"$ref":"#/components/schemas/invoiceTypes_BankDeliveryMethod","description":"Delivery method for ACH payments. Defaults to ACH_SAME_DAY."},"description":{"type":"string","description":"ACH Statement Description.\nBy default, this will be 'AP' followed by the first 8 characters of the invoice ID (for a single invoice) or the first 8 characters of the transaction ID (for a batch payment).\nMust be at least 4 characters and no more than 10 characters, and follow this regex pattern `^[a-zA-Z0-9\\-#.$&* ]{4,10}$`"}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["utility"],"description":"Discriminator value: utility"},"accountId":{"type":"string","description":"The ID for the utility account to pay with. Links to accounts listed on payor/payee relationship."}},"required":["type","accountId"]},{"type":"object","properties":{"type":{"type":"string","enum":["custom"],"description":"Discriminator value: custom"},"dynamicUrls":{"type":"object","additionalProperties":{"type":"string"},"description":"Map of field names to dynamic URL values that will be used for dynamicUrl fields in custom payment method schemas"}},"required":["type"]}],"discriminator":{"propertyName":"type"},"title":"PaymentDestinationOptions"},"calculate_CalculatePaymentTimingResponse":{"type":"object","properties":{"estimatedProcessingDate":{"type":"string","format":"date-time","description":"Estimated date the payment will be or was processed."},"businessDays":{"type":"integer","description":"Number of business days between the estimated processing date and the estimated settlement date. This does not take into account bank holidays or weekends."},"estimatedProcessingTime":{"type":"integer","description":"Estimated payment time in days. This time takes into account bank holidays and weekends."},"estimatedSettlementDate":{"type":"string","format":"date-time","description":"Estimated date the payment will be or was settled. This is the same as the request's deductionDate plus the paymentTiming."}},"required":["estimatedProcessingDate","businessDays","estimatedProcessingTime","estimatedSettlementDate"],"title":"CalculatePaymentTimingResponse"},"invoiceTypes_InvoiceLineItemId":{"type":"string","title":"InvoiceLineItemId"},"invoiceTypes_InvoiceLineItemResponse":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/invoiceTypes_InvoiceLineItemId"},"amount":{"type":"number","format":"double","description":"Total amount of line item in major units."},"currency":{"$ref":"#/components/schemas/paymentMethodTypes_CurrencyCode"},"description":{"type":"string"},"name":{"type":"string"},"quantity":{"type":"number","format":"double"},"unitPrice":{"type":"number","format":"double","description":"Unit price of line item in major units."},"category":{"type":"string","description":"Category of the line item. Defaults to 'EXPENSE'."},"serviceStartDate":{"type":"string","format":"date-time"},"serviceEndDate":{"type":"string","format":"date-time"},"metadata":{"type":"object","additionalProperties":{"type":"string"}},"glAccountId":{"type":"string","description":"ID of general ledger account associated with this line item."},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","currency","category","createdAt","updatedAt"],"title":"InvoiceLineItemResponse"},"entityTypes_ApprovalPolicyId":{"type":"string","title":"ApprovalPolicyId"},"invoiceTypes_ApprovalSlotId":{"type":"string","title":"ApprovalSlotId"},"invoiceTypes_ApprovalSlot":{"type":"object","properties":{"upstreamPolicyId":{"$ref":"#/components/schemas/entityTypes_ApprovalPolicyId","description":"The identifier for the upstream policy this slot is associated with."},"upstreamPoliciesApproved":{"type":"boolean","description":"Whether all upstream policies are approved."},"approvalPolicyId":{"$ref":"#/components/schemas/entityTypes_ApprovalPolicyId","description":"The identifier for the approval policy this slot is associated with."},"approvalSlotId":{"$ref":"#/components/schemas/invoiceTypes_ApprovalSlotId","description":"The identifier for this approval slot"},"assignedUserId":{"$ref":"#/components/schemas/entityTypes_EntityUserId","description":"The ID of the user who is assigned to the approval slot. If undefined, the approval slot is assigned to all eligible approvers."},"action":{"$ref":"#/components/schemas/invoiceTypes_ApproverAction"},"eligibleRoles":{"type":"array","items":{"type":"string"}},"eligibleUserIds":{"type":"array","items":{"$ref":"#/components/schemas/entityTypes_EntityUserId"}},"date":{"type":"string","format":"date-time","description":"Either the date the invoice was created, date the approver was assigned, or date of last action by approver, whichever is latest."}},"required":["approvalPolicyId","approvalSlotId","action","eligibleRoles","eligibleUserIds","date"],"title":"ApprovalSlot"},"entityTypes_Comparison":{"type":"string","enum":["eq","gt","gte","lt","lte"],"title":"Comparison"},"entityTypes_Trigger":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["amount"],"description":"Discriminator value: amount"},"amount":{"type":"number","format":"double"},"currency":{"$ref":"#/components/schemas/paymentMethodTypes_CurrencyCode"},"comparison":{"$ref":"#/components/schemas/entityTypes_Comparison","description":"The comparison operator to use when comparing the amount to the trigger amount. Defaults to gte."}},"required":["type","amount","currency"]},{"type":"object","properties":{"type":{"type":"string","enum":["vendor"],"description":"Discriminator value: vendor"},"vendorIds":{"type":"array","items":{"$ref":"#/components/schemas/entityTypes_EntityId"}}},"required":["type","vendorIds"]},{"type":"object","properties":{"type":{"type":"string","enum":["metadata"],"description":"Discriminator value: metadata"},"key":{"type":"string","description":"The metadata key to match"},"value":{"type":"array","items":{"type":"string"},"description":"The metadata value the invoice must have to trigger this policy"}},"required":["type","key","value"]},{"type":"object","properties":{"type":{"type":"string","enum":["catchall"],"description":"Discriminator value: catchall"}},"required":["type"],"description":"A catchall trigger will trigger if no other triggers match."}],"discriminator":{"propertyName":"type"},"title":"Trigger"},"entityTypes_IdentifierList":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["rolesList"],"description":"Discriminator value: rolesList"},"value":{"type":"array","items":{"type":"string"}}},"required":["type","value"],"description":"List of entity user roles that should be used to determine approvers"},{"type":"object","properties":{"type":{"type":"string","enum":["userList"],"description":"Discriminator value: userList"},"value":{"type":"array","items":{"$ref":"#/components/schemas/entityTypes_EntityUserId"}}},"required":["type","value"],"description":"List of entity user IDs that should be used to determine approvers"}],"discriminator":{"propertyName":"type"},"title":"IdentifierList"},"entityTypes_Rule":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["approver"],"description":"Discriminator value: approver"},"numApprovers":{"type":"integer","description":"Number of approvals required to approve an invoice"},"identifierList":{"$ref":"#/components/schemas/entityTypes_IdentifierList","description":"List of users or roles that should be used to determine eligible approvers"},"autoAssign":{"type":"boolean","description":"If true, the policy will automatically assign approvers to the invoice. If more than one approver is eligible, the policy will assign all eligible approvers to the invoice."}},"required":["type","numApprovers","identifierList"],"description":"A rule that will assign approvers to an invoice."},{"type":"object","properties":{"type":{"type":"string","enum":["automatic"],"description":"Discriminator value: automatic"}},"required":["type"],"description":"A rule that will automatically approve an invoice, regardless of any other rules that were triggered."}],"discriminator":{"propertyName":"type"},"title":"Rule"},"entityTypes_ApprovalPolicyResponse":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/entityTypes_ApprovalPolicyId"},"trigger":{"type":"array","items":{"$ref":"#/components/schemas/entityTypes_Trigger"}},"rule":{"$ref":"#/components/schemas/entityTypes_Rule"},"upstreamPolicyId":{"$ref":"#/components/schemas/entityTypes_ApprovalPolicyId"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","trigger","rule","upstreamPolicyId","createdAt","updatedAt"],"title":"ApprovalPolicyResponse"},"entityTypes_EntityUserResponse":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/entityTypes_EntityUserId"},"foreignId":{"type":"string","description":"The ID used to identify this user in your system."},"email":{"type":"string"},"name":{"type":"string"},"roles":{"type":"array","items":{"type":"string"}},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","roles","createdAt","updatedAt"],"title":"EntityUserResponse"},"invoiceTypes_AssociatedApprovalAction":{"type":"object","properties":{"userId":{"$ref":"#/components/schemas/entityTypes_EntityUserId"},"action":{"$ref":"#/components/schemas/invoiceTypes_ApproverAction"}},"required":["userId","action"],"title":"AssociatedApprovalAction"},"invoiceTypes_CommentResponse":{"type":"object","properties":{"id":{"type":"string"},"text":{"type":"string"},"user":{"$ref":"#/components/schemas/entityTypes_EntityUserResponse"},"associatedApprovalAction":{"$ref":"#/components/schemas/invoiceTypes_AssociatedApprovalAction","description":"If an approval action has triggered the generation of this comment, returns the associated approval action and actor"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","text","createdAt","updatedAt"],"title":"CommentResponse"},"invoiceTypes_InvoiceFeesResponse":{"type":"object","properties":{"sourcePaymentMethodFee":{"type":"number","format":"double","description":"Fee charged to the platform (C1) for processing the source payment method. For example, credit card interchange and acquiring fees."},"sourcePlatformMarkupFee":{"type":"number","format":"double","description":"Fee charged to the payer (C2)."},"destinationPaymentMethodFee":{"type":"number","format":"double","description":"Fee charged to the platform (C1) for processing the destination payment method. For example, postage for a check payment."},"destinationPlatformMarkupFee":{"type":"number","format":"double","description":"Fee charged to the payee (C3)."}},"required":["sourcePaymentMethodFee","sourcePlatformMarkupFee","destinationPaymentMethodFee","destinationPlatformMarkupFee"],"title":"InvoiceFeesResponse"},"invoiceTypes_PaymentScheduleEndCondition":{"oneOf":[{"type":"integer"},{"type":"string","format":"date-time"}],"title":"PaymentScheduleEndCondition"},"invoiceTypes_DayOfWeek":{"type":"string","enum":["0","1","2","3","4","5","6"],"title":"DayOfWeek"},"invoiceTypes_PaymentSchedule":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["oneTime"],"description":"Discriminator value: oneTime"},"repeatEvery":{"type":"integer","description":"How often to repeat the payments. Defaults to 1. Must be greater than 0. For example, if repeatEvery is set to 2 and this is a daily payment, the payment will be made every other day. If repeatEvery is set to 3 and this is a weekly payment, the payment will be made every third week."},"ends":{"$ref":"#/components/schemas/invoiceTypes_PaymentScheduleEndCondition","description":"When to end the payments, either a number of occurrences or a date. Defaults to never ending if not specified"}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["daily"],"description":"Discriminator value: daily"},"repeatEvery":{"type":"integer","description":"How often to repeat the payments. Defaults to 1. Must be greater than 0. For example, if repeatEvery is set to 2 and this is a daily payment, the payment will be made every other day. If repeatEvery is set to 3 and this is a weekly payment, the payment will be made every third week."},"ends":{"$ref":"#/components/schemas/invoiceTypes_PaymentScheduleEndCondition","description":"When to end the payments, either a number of occurrences or a date. Defaults to never ending if not specified"}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["weekly"],"description":"Discriminator value: weekly"},"repeatEvery":{"type":"integer","description":"How often to repeat the payments. Defaults to 1. Must be greater than 0. For example, if repeatEvery is set to 2 and this is a daily payment, the payment will be made every other day. If repeatEvery is set to 3 and this is a weekly payment, the payment will be made every third week."},"ends":{"$ref":"#/components/schemas/invoiceTypes_PaymentScheduleEndCondition","description":"When to end the payments, either a number of occurrences or a date. Defaults to never ending if not specified"},"repeatOn":{"type":"array","items":{"$ref":"#/components/schemas/invoiceTypes_DayOfWeek"}}},"required":["type","repeatOn"]},{"type":"object","properties":{"type":{"type":"string","enum":["monthly"],"description":"Discriminator value: monthly"},"repeatEvery":{"type":"integer","description":"How often to repeat the payments. Defaults to 1. Must be greater than 0. For example, if repeatEvery is set to 2 and this is a daily payment, the payment will be made every other day. If repeatEvery is set to 3 and this is a weekly payment, the payment will be made every third week."},"ends":{"$ref":"#/components/schemas/invoiceTypes_PaymentScheduleEndCondition","description":"When to end the payments, either a number of occurrences or a date. Defaults to never ending if not specified"},"dayOffset":{"type":"integer","description":"deprecated. will be removed in the future and will always be 0.","deprecated":true},"repeatOnDay":{"type":"integer","description":"Day of the month to repeat on. Positive values (1-31): Represent the day of the month counting from the start (e.g., 10 is the 10th day of the month). Negative values (-1 to -31): Represent the day of the month counting backward from the end (e.g., -1 is the last day of the month, -2 is the second-to-last day)."}},"required":["type","repeatOnDay"]},{"type":"object","properties":{"type":{"type":"string","enum":["yearly"],"description":"Discriminator value: yearly"},"repeatEvery":{"type":"integer","description":"How often to repeat the payments. Defaults to 1. Must be greater than 0. For example, if repeatEvery is set to 2 and this is a daily payment, the payment will be made every other day. If repeatEvery is set to 3 and this is a weekly payment, the payment will be made every third week."},"ends":{"$ref":"#/components/schemas/invoiceTypes_PaymentScheduleEndCondition","description":"When to end the payments, either a number of occurrences or a date. Defaults to never ending if not specified"},"repeatOnDay":{"type":"integer","description":"Day of the month to repeat on. Positive values (1-31): Represent the day of the month counting from the start (e.g., 10 is the 10th day of the month). Negative values (-1 to -31): Represent the day of the month counting backward from the end (e.g., -1 is the last day of the month, -2 is the second-to-last day)."},"repeatOnMonth":{"type":"integer","description":"Month to repeat on (1-12)."}},"required":["type","repeatOnDay","repeatOnMonth"]}],"discriminator":{"propertyName":"type"},"title":"PaymentSchedule"},"ocr_OCRJobId":{"type":"string","title":"OCRJobId"},"invoiceTypes_InvoiceTemplateId":{"type":"string","title":"InvoiceTemplateId"},"invoiceTypes_InvoiceFailureType":{"type":"string","enum":["SOURCE_PAYMENT_ERROR","DESTINATION_PAYMENT_ERROR","REJECTED_HIGH_RISK","INSUFFICIENT_FUNDS","PROCESSING_ERROR"],"title":"InvoiceFailureType"},"transaction_TransactionId":{"type":"string","title":"TransactionId"},"transaction_TransactionStatus":{"type":"string","enum":["CREATED","PENDING","COMPLETED","FAILED","REVERSED","QUEUED","CANCELED","RETURNED"],"title":"TransactionStatus"},"transaction_TransactionFailureReason":{"type":"object","properties":{"code":{"type":"string","description":"The failure reason code."},"description":{"type":"string","description":"The failure reason description."}},"title":"TransactionFailureReason"},"transaction_TransactionResponseWithoutInvoices":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["bankAccountToBankAccount"],"description":"Discriminator value: bankAccountToBankAccount"},"id":{"$ref":"#/components/schemas/transaction_TransactionId"},"status":{"$ref":"#/components/schemas/transaction_TransactionStatus"},"amount":{"type":"number","format":"double"},"currency":{"type":"string"},"payerId":{"$ref":"#/components/schemas/entityTypes_EntityId"},"payer":{"$ref":"#/components/schemas/entityTypes_CounterpartyResponse"},"paymentSource":{"$ref":"#/components/schemas/paymentMethodTypes_PaymentMethodResponse"},"paymentSourceId":{"$ref":"#/components/schemas/paymentMethodTypes_PaymentMethodId"},"vendorId":{"$ref":"#/components/schemas/entityTypes_EntityId"},"vendor":{"$ref":"#/components/schemas/entityTypes_CounterpartyResponse"},"paymentDestination":{"$ref":"#/components/schemas/paymentMethodTypes_PaymentMethodResponse"},"paymentDestinationId":{"$ref":"#/components/schemas/paymentMethodTypes_PaymentMethodId"},"paymentDestinationOptions":{"$ref":"#/components/schemas/invoiceTypes_PaymentDestinationOptions"},"fees":{"$ref":"#/components/schemas/invoiceTypes_InvoiceFeesResponse"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"failureReason":{"$ref":"#/components/schemas/transaction_TransactionFailureReason","description":"If the invoice failed to be paid, this field will be populated with the reason of failure."}},"required":["type","id","status","amount","currency","payerId","payer","paymentSource","paymentSourceId","vendorId","vendor","paymentDestination","paymentDestinationId","createdAt","updatedAt"]},{"type":"object","properties":{"type":{"type":"string","enum":["bankAccountToMailedCheck"],"description":"Discriminator value: bankAccountToMailedCheck"},"id":{"$ref":"#/components/schemas/transaction_TransactionId"},"status":{"$ref":"#/components/schemas/transaction_TransactionStatus"},"amount":{"type":"number","format":"double"},"currency":{"type":"string"},"payerId":{"$ref":"#/components/schemas/entityTypes_EntityId"},"payer":{"$ref":"#/components/schemas/entityTypes_CounterpartyResponse"},"paymentSource":{"$ref":"#/components/schemas/paymentMethodTypes_PaymentMethodResponse"},"paymentSourceId":{"$ref":"#/components/schemas/paymentMethodTypes_PaymentMethodId"},"vendorId":{"$ref":"#/components/schemas/entityTypes_EntityId"},"vendor":{"$ref":"#/components/schemas/entityTypes_CounterpartyResponse"},"paymentDestination":{"$ref":"#/components/schemas/paymentMethodTypes_PaymentMethodResponse"},"paymentDestinationId":{"$ref":"#/components/schemas/paymentMethodTypes_PaymentMethodId"},"paymentDestinationOptions":{"$ref":"#/components/schemas/invoiceTypes_PaymentDestinationOptions"},"fees":{"$ref":"#/components/schemas/invoiceTypes_InvoiceFeesResponse"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"checkNumber":{"type":"integer","description":"The number of the check"},"mailedOnDate":{"type":"string","format":"date-time","description":"The date the check was mailed. If the check was not mailed, this field will be null."}},"required":["type","id","status","amount","currency","payerId","payer","paymentSource","paymentSourceId","vendorId","vendor","paymentDestination","paymentDestinationId","createdAt","updatedAt","checkNumber"]},{"type":"object","properties":{"type":{"type":"string","enum":["bankAccountToPrintedCheck"],"description":"Discriminator value: bankAccountToPrintedCheck"},"id":{"$ref":"#/components/schemas/transaction_TransactionId"},"status":{"$ref":"#/components/schemas/transaction_TransactionStatus"},"amount":{"type":"number","format":"double"},"currency":{"type":"string"},"payerId":{"$ref":"#/components/schemas/entityTypes_EntityId"},"payer":{"$ref":"#/components/schemas/entityTypes_CounterpartyResponse"},"paymentSource":{"$ref":"#/components/schemas/paymentMethodTypes_PaymentMethodResponse"},"paymentSourceId":{"$ref":"#/components/schemas/paymentMethodTypes_PaymentMethodId"},"vendorId":{"$ref":"#/components/schemas/entityTypes_EntityId"},"vendor":{"$ref":"#/components/schemas/entityTypes_CounterpartyResponse"},"paymentDestination":{"$ref":"#/components/schemas/paymentMethodTypes_PaymentMethodResponse"},"paymentDestinationId":{"$ref":"#/components/schemas/paymentMethodTypes_PaymentMethodId"},"paymentDestinationOptions":{"$ref":"#/components/schemas/invoiceTypes_PaymentDestinationOptions"},"fees":{"$ref":"#/components/schemas/invoiceTypes_InvoiceFeesResponse"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"checkNumber":{"type":"integer","description":"The number of the check"}},"required":["type","id","status","amount","currency","payerId","payer","paymentSource","paymentSourceId","vendorId","vendor","paymentDestination","paymentDestinationId","createdAt","updatedAt","checkNumber"]},{"type":"object","properties":{"type":{"type":"string","enum":["bankAccountToWallet"],"description":"Discriminator value: bankAccountToWallet"},"id":{"$ref":"#/components/schemas/transaction_TransactionId"},"status":{"$ref":"#/components/schemas/transaction_TransactionStatus"},"amount":{"type":"number","format":"double"},"currency":{"type":"string"},"payerId":{"$ref":"#/components/schemas/entityTypes_EntityId"},"payer":{"$ref":"#/components/schemas/entityTypes_CounterpartyResponse"},"paymentSource":{"$ref":"#/components/schemas/paymentMethodTypes_PaymentMethodResponse"},"paymentSourceId":{"$ref":"#/components/schemas/paymentMethodTypes_PaymentMethodId"},"vendorId":{"$ref":"#/components/schemas/entityTypes_EntityId"},"vendor":{"$ref":"#/components/schemas/entityTypes_CounterpartyResponse"},"paymentDestination":{"$ref":"#/components/schemas/paymentMethodTypes_PaymentMethodResponse"},"paymentDestinationId":{"$ref":"#/components/schemas/paymentMethodTypes_PaymentMethodId"},"paymentDestinationOptions":{"$ref":"#/components/schemas/invoiceTypes_PaymentDestinationOptions"},"fees":{"$ref":"#/components/schemas/invoiceTypes_InvoiceFeesResponse"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"failureReason":{"$ref":"#/components/schemas/transaction_TransactionFailureReason","description":"If the invoice failed to be paid, this field will be populated with the reason of failure."}},"required":["type","id","status","amount","currency","payerId","payer","paymentSource","paymentSourceId","vendorId","vendor","paymentDestination","paymentDestinationId","createdAt","updatedAt"]},{"type":"object","properties":{"type":{"type":"string","enum":["cardToBankAccount"],"description":"Discriminator value: cardToBankAccount"},"id":{"$ref":"#/components/schemas/transaction_TransactionId"},"status":{"$ref":"#/components/schemas/transaction_TransactionStatus"},"amount":{"type":"number","format":"double"},"currency":{"type":"string"},"payerId":{"$ref":"#/components/schemas/entityTypes_EntityId"},"payer":{"$ref":"#/components/schemas/entityTypes_CounterpartyResponse"},"paymentSource":{"$ref":"#/components/schemas/paymentMethodTypes_PaymentMethodResponse"},"paymentSourceId":{"$ref":"#/components/schemas/paymentMethodTypes_PaymentMethodId"},"vendorId":{"$ref":"#/components/schemas/entityTypes_EntityId"},"vendor":{"$ref":"#/components/schemas/entityTypes_CounterpartyResponse"},"paymentDestination":{"$ref":"#/components/schemas/paymentMethodTypes_PaymentMethodResponse"},"paymentDestinationId":{"$ref":"#/components/schemas/paymentMethodTypes_PaymentMethodId"},"paymentDestinationOptions":{"$ref":"#/components/schemas/invoiceTypes_PaymentDestinationOptions"},"fees":{"$ref":"#/components/schemas/invoiceTypes_InvoiceFeesResponse"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"failureReason":{"$ref":"#/components/schemas/transaction_TransactionFailureReason","description":"If the invoice failed to be paid, this field will be populated with the reason of failure."}},"required":["type","id","status","amount","currency","payerId","payer","paymentSource","paymentSourceId","vendorId","vendor","paymentDestination","paymentDestinationId","createdAt","updatedAt"]},{"type":"object","properties":{"type":{"type":"string","enum":["cardToWallet"],"description":"Discriminator value: cardToWallet"},"id":{"$ref":"#/components/schemas/transaction_TransactionId"},"status":{"$ref":"#/components/schemas/transaction_TransactionStatus"},"amount":{"type":"number","format":"double"},"currency":{"type":"string"},"payerId":{"$ref":"#/components/schemas/entityTypes_EntityId"},"payer":{"$ref":"#/components/schemas/entityTypes_CounterpartyResponse"},"paymentSource":{"$ref":"#/components/schemas/paymentMethodTypes_PaymentMethodResponse"},"paymentSourceId":{"$ref":"#/components/schemas/paymentMethodTypes_PaymentMethodId"},"vendorId":{"$ref":"#/components/schemas/entityTypes_EntityId"},"vendor":{"$ref":"#/components/schemas/entityTypes_CounterpartyResponse"},"paymentDestination":{"$ref":"#/components/schemas/paymentMethodTypes_PaymentMethodResponse"},"paymentDestinationId":{"$ref":"#/components/schemas/paymentMethodTypes_PaymentMethodId"},"paymentDestinationOptions":{"$ref":"#/components/schemas/invoiceTypes_PaymentDestinationOptions"},"fees":{"$ref":"#/components/schemas/invoiceTypes_InvoiceFeesResponse"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["type","id","status","amount","currency","payerId","payer","paymentSource","paymentSourceId","vendorId","vendor","paymentDestination","paymentDestinationId","createdAt","updatedAt"]},{"type":"object","properties":{"type":{"type":"string","enum":["walletToBankAccount"],"description":"Discriminator value: walletToBankAccount"},"id":{"$ref":"#/components/schemas/transaction_TransactionId"},"status":{"$ref":"#/components/schemas/transaction_TransactionStatus"},"amount":{"type":"number","format":"double"},"currency":{"type":"string"},"payerId":{"$ref":"#/components/schemas/entityTypes_EntityId"},"payer":{"$ref":"#/components/schemas/entityTypes_CounterpartyResponse"},"paymentSource":{"$ref":"#/components/schemas/paymentMethodTypes_PaymentMethodResponse"},"paymentSourceId":{"$ref":"#/components/schemas/paymentMethodTypes_PaymentMethodId"},"vendorId":{"$ref":"#/components/schemas/entityTypes_EntityId"},"vendor":{"$ref":"#/components/schemas/entityTypes_CounterpartyResponse"},"paymentDestination":{"$ref":"#/components/schemas/paymentMethodTypes_PaymentMethodResponse"},"paymentDestinationId":{"$ref":"#/components/schemas/paymentMethodTypes_PaymentMethodId"},"paymentDestinationOptions":{"$ref":"#/components/schemas/invoiceTypes_PaymentDestinationOptions"},"fees":{"$ref":"#/components/schemas/invoiceTypes_InvoiceFeesResponse"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"failureReason":{"$ref":"#/components/schemas/transaction_TransactionFailureReason","description":"If the invoice failed to be paid, this field will be populated with the reason of failure."}},"required":["type","id","status","amount","currency","payerId","payer","paymentSource","paymentSourceId","vendorId","vendor","paymentDestination","paymentDestinationId","createdAt","updatedAt"]},{"type":"object","properties":{"type":{"type":"string","enum":["walletToWallet"],"description":"Discriminator value: walletToWallet"},"id":{"$ref":"#/components/schemas/transaction_TransactionId"},"status":{"$ref":"#/components/schemas/transaction_TransactionStatus"},"amount":{"type":"number","format":"double"},"currency":{"type":"string"},"payerId":{"$ref":"#/components/schemas/entityTypes_EntityId"},"payer":{"$ref":"#/components/schemas/entityTypes_CounterpartyResponse"},"paymentSource":{"$ref":"#/components/schemas/paymentMethodTypes_PaymentMethodResponse"},"paymentSourceId":{"$ref":"#/components/schemas/paymentMethodTypes_PaymentMethodId"},"vendorId":{"$ref":"#/components/schemas/entityTypes_EntityId"},"vendor":{"$ref":"#/components/schemas/entityTypes_CounterpartyResponse"},"paymentDestination":{"$ref":"#/components/schemas/paymentMethodTypes_PaymentMethodResponse"},"paymentDestinationId":{"$ref":"#/components/schemas/paymentMethodTypes_PaymentMethodId"},"paymentDestinationOptions":{"$ref":"#/components/schemas/invoiceTypes_PaymentDestinationOptions"},"fees":{"$ref":"#/components/schemas/invoiceTypes_InvoiceFeesResponse"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["type","id","status","amount","currency","payerId","payer","paymentSource","paymentSourceId","vendorId","vendor","paymentDestination","paymentDestinationId","createdAt","updatedAt"]},{"type":"object","properties":{"type":{"type":"string","enum":["custom"],"description":"Discriminator value: custom"},"id":{"$ref":"#/components/schemas/transaction_TransactionId"},"status":{"$ref":"#/components/schemas/transaction_TransactionStatus"},"amount":{"type":"number","format":"double"},"currency":{"type":"string"},"payerId":{"$ref":"#/components/schemas/entityTypes_EntityId"},"payer":{"$ref":"#/components/schemas/entityTypes_CounterpartyResponse"},"paymentSource":{"$ref":"#/components/schemas/paymentMethodTypes_PaymentMethodResponse"},"paymentSourceId":{"$ref":"#/components/schemas/paymentMethodTypes_PaymentMethodId"},"vendorId":{"$ref":"#/components/schemas/entityTypes_EntityId"},"vendor":{"$ref":"#/components/schemas/entityTypes_CounterpartyResponse"},"paymentDestination":{"$ref":"#/components/schemas/paymentMethodTypes_PaymentMethodResponse"},"paymentDestinationId":{"$ref":"#/components/schemas/paymentMethodTypes_PaymentMethodId"},"paymentDestinationOptions":{"$ref":"#/components/schemas/invoiceTypes_PaymentDestinationOptions"},"fees":{"$ref":"#/components/schemas/invoiceTypes_InvoiceFeesResponse"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["type","id","status","amount","currency","payerId","payer","paymentSource","paymentSourceId","vendorId","vendor","paymentDestination","paymentDestinationId","createdAt","updatedAt"]},{"type":"object","properties":{"type":{"type":"string","enum":["offPlatform"],"description":"Discriminator value: offPlatform"},"id":{"$ref":"#/components/schemas/transaction_TransactionId"},"status":{"$ref":"#/components/schemas/transaction_TransactionStatus"},"amount":{"type":"number","format":"double"},"currency":{"type":"string"},"payerId":{"$ref":"#/components/schemas/entityTypes_EntityId"},"payer":{"$ref":"#/components/schemas/entityTypes_CounterpartyResponse"},"paymentSource":{"$ref":"#/components/schemas/paymentMethodTypes_PaymentMethodResponse"},"paymentSourceId":{"$ref":"#/components/schemas/paymentMethodTypes_PaymentMethodId"},"vendorId":{"$ref":"#/components/schemas/entityTypes_EntityId"},"vendor":{"$ref":"#/components/schemas/entityTypes_CounterpartyResponse"},"paymentDestination":{"$ref":"#/components/schemas/paymentMethodTypes_PaymentMethodResponse"},"paymentDestinationId":{"$ref":"#/components/schemas/paymentMethodTypes_PaymentMethodId"},"paymentDestinationOptions":{"$ref":"#/components/schemas/invoiceTypes_PaymentDestinationOptions"},"fees":{"$ref":"#/components/schemas/invoiceTypes_InvoiceFeesResponse"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["type","id","status","amount","currency","payerId","payer","paymentSource","paymentSourceId","vendorId","vendor","paymentDestination","paymentDestinationId","createdAt","updatedAt"]}],"discriminator":{"propertyName":"type"},"title":"TransactionResponseWithoutInvoices"},"vendorCreditTypes_VendorCreditId":{"type":"string","title":"VendorCreditId"},"invoiceTypes_InvoiceResponse":{"type":"object","properties":{"status":{"$ref":"#/components/schemas/invoiceTypes_InvoiceStatus"},"amount":{"type":"number","format":"double","description":"Total amount of invoice in major units"},"currency":{"$ref":"#/components/schemas/paymentMethodTypes_CurrencyCode","description":"Currency code for the amount. Defaults to USD."},"invoiceDate":{"type":"string","format":"date-time","description":"Date the invoice was issued."},"deductionDate":{"type":"string","format":"date-time","description":"Initial date when funds are scheduled to be deducted from payer's account. The actual deduction date may differ from this date, and will be reflected in the processedAt field."},"nextDeductionDate":{"type":"string","format":"date-time","description":"For invoice templates, this is the date when the next recurring payment will be scheduled."},"dueDate":{"type":"string","format":"date-time","description":"Due date of invoice."},"invoiceNumber":{"type":"string"},"noteToSelf":{"type":"string"},"serviceStartDate":{"type":"string","format":"date-time"},"serviceEndDate":{"type":"string","format":"date-time"},"netTerms":{"type":"integer","description":"Net terms in days. Must be a positive number."},"payerId":{"$ref":"#/components/schemas/entityTypes_EntityId"},"payer":{"$ref":"#/components/schemas/entityTypes_CounterpartyResponse"},"paymentSource":{"$ref":"#/components/schemas/paymentMethodTypes_PaymentMethodResponse"},"paymentSourceId":{"$ref":"#/components/schemas/paymentMethodTypes_PaymentMethodId"},"paymentSourceOptions":{"$ref":"#/components/schemas/invoiceTypes_PaymentSourceOptions"},"vendorId":{"$ref":"#/components/schemas/entityTypes_EntityId"},"vendor":{"$ref":"#/components/schemas/entityTypes_CounterpartyResponse"},"paymentDestination":{"$ref":"#/components/schemas/paymentMethodTypes_PaymentMethodResponse"},"paymentDestinationId":{"$ref":"#/components/schemas/paymentMethodTypes_PaymentMethodId"},"paymentDestinationOptions":{"$ref":"#/components/schemas/invoiceTypes_PaymentDestinationOptions"},"paymentTiming":{"$ref":"#/components/schemas/calculate_CalculatePaymentTimingResponse"},"paymentDestinationConfirmed":{"type":"boolean","description":"True if the payment destination has been confirmed by the vendor. False if the payment destination has been set (for example, a check to an address) but has not been confirmed by the vendor."},"batchPayment":{"type":"boolean","description":"If true, this invoice will be paid as a batch payment. Batches are automatically determined by Mercoa based on the payment source, destination, and scheduled payment date."},"hasDocuments":{"type":"boolean","description":"True if the invoice has documents attached."},"hasSourceEmail":{"type":"boolean","description":"True if the invoice was created by an incoming email."},"lineItems":{"type":"array","items":{"$ref":"#/components/schemas/invoiceTypes_InvoiceLineItemResponse"}},"taxAmount":{"type":"number","format":"double","description":"Tax amount for this invoice."},"shippingAmount":{"type":"number","format":"double","description":"Shipping amount for this invoice."},"approvers":{"type":"array","items":{"$ref":"#/components/schemas/invoiceTypes_ApprovalSlot"}},"approvalPolicy":{"type":"array","items":{"$ref":"#/components/schemas/entityTypes_ApprovalPolicyResponse"}},"metadata":{"type":"object","additionalProperties":{"type":"string"},"description":"Metadata associated with this invoice."},"creatorEntityId":{"$ref":"#/components/schemas/entityTypes_EntityId","description":"The ID of the entity who created this invoice."},"entityGroupId":{"$ref":"#/components/schemas/entityGroupTypes_EntityGroupId","description":"The ID of the entity group that created this invoice."},"entityGroupForeignId":{"type":"string","description":"The foreign ID of the entity group that created this invoice."},"creatorUser":{"$ref":"#/components/schemas/entityTypes_EntityUserResponse","description":"Entity user who created this invoice."},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"comments":{"type":"array","items":{"$ref":"#/components/schemas/invoiceTypes_CommentResponse"}},"fees":{"$ref":"#/components/schemas/invoiceTypes_InvoiceFeesResponse","description":"Fees associated with this invoice."},"paymentSchedule":{"$ref":"#/components/schemas/invoiceTypes_PaymentSchedule","description":"If this is a recurring invoice, this will be the payment schedule for the invoice. If not provided, this will be a one-time invoice."},"ocrJobId":{"$ref":"#/components/schemas/ocr_OCRJobId","description":"ID of the OCR job that processed this invoice."},"recurringTemplateId":{"$ref":"#/components/schemas/invoiceTypes_InvoiceTemplateId","description":"ID of the invoice template that created this recurring invoice. Only present if the invoice was created from a recurring template."},"id":{"$ref":"#/components/schemas/invoiceTypes_InvoiceId"},"processedAt":{"type":"string","format":"date-time","description":"Date when the invoice payment was processed."},"settlementDate":{"type":"string","format":"date-time","description":"Date of funds settlement."},"foreignId":{"type":"string","description":"The ID used to identify this invoice in your system. This ID must be unique within each creatorEntity in your system, e.g. two invoices with the same creatorEntity may not have the same foreign ID."},"failureType":{"$ref":"#/components/schemas/invoiceTypes_InvoiceFailureType","description":"If the invoice failed to be paid, this field will be populated with the type of failure."},"transactions":{"type":"array","items":{"$ref":"#/components/schemas/transaction_TransactionResponseWithoutInvoices"},"description":"Transactions associated with this invoice."},"vendorCreditIds":{"type":"array","items":{"$ref":"#/components/schemas/vendorCreditTypes_VendorCreditId"},"description":"The IDs of the vendor credits that are currently applied to this invoice."}},"required":["status","paymentDestinationConfirmed","hasDocuments","hasSourceEmail","approvers","approvalPolicy","metadata","createdAt","updatedAt","id"],"title":"InvoiceResponse"},"invoiceTypes_FindInvoiceResponse":{"type":"object","properties":{"count":{"type":"integer","description":"Total number of notifications for the given start and end date filters. This value is not limited by the limit parameter. It is provided so that you can determine how many pages of results are available."},"hasMore":{"type":"boolean","description":"True if there are more notifications available for the given start and end date filters."},"data":{"type":"array","items":{"$ref":"#/components/schemas/invoiceTypes_InvoiceResponse"}}},"required":["count","hasMore","data"],"title":"FindInvoiceResponse"},"commons_BulkDownloadFormat":{"type":"string","enum":["CSV","JSON"],"title":"BulkDownloadFormat"},"commons_BulkDownloadResponse":{"type":"object","properties":{"url":{"type":"string"},"mimeType":{"type":"string"}},"required":["url","mimeType"],"title":"BulkDownloadResponse"},"invoiceTypes_InvoiceMetricsPerDateGroupBy":{"type":"string","enum":["CREATION_DATE","DUE_DATE","INVOICE_DATE","DEDUCTION_DATE"],"title":"InvoiceMetricsPerDateGroupBy"},"invoiceTypes_InvoiceMetricsPerDateFrequency":{"type":"string","enum":["DAILY","WEEKLY","MONTHLY","YEARLY"],"title":"InvoiceMetricsPerDateFrequency"},"invoiceTypes_InvoiceMetricsGroupBy":{"type":"string","enum":["STATUS"],"title":"InvoiceMetricsGroupBy"},"invoiceTypes_InvoiceMetricsPerDateResponse":{"type":"object","properties":{"group":{"type":"array","items":{"type":"object","additionalProperties":{"type":"string"}},"description":"If groupBy is provided, this will be the group by value."},"date":{"type":"string","format":"date-time"},"totalAmount":{"type":"number","format":"double"},"totalCount":{"type":"integer"},"averageAmount":{"type":"number","format":"double"},"currency":{"$ref":"#/components/schemas/paymentMethodTypes_CurrencyCode"}},"required":["date","totalAmount","totalCount","averageAmount","currency"],"title":"InvoiceMetricsPerDateResponse"},"invoiceTypes_InvoiceMetricsResponse":{"type":"object","properties":{"group":{"type":"array","items":{"type":"object","additionalProperties":{"type":"string"}},"description":"If groupBy is provided, this will be the group by value."},"totalAmount":{"type":"number","format":"double"},"totalCount":{"type":"integer"},"averageAmount":{"type":"number","format":"double"},"currency":{"$ref":"#/components/schemas/paymentMethodTypes_CurrencyCode"},"dates":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/invoiceTypes_InvoiceMetricsPerDateResponse"}}},"required":["totalAmount","totalCount","averageAmount","currency"],"title":"InvoiceMetricsResponse"},"entityTypes_EntityWithPaymentMethodResponse":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/entityTypes_EntityId"},"name":{"type":"string"},"email":{"type":"string"},"foreignId":{"type":"string","description":"The ID used to identify this entity in your system"},"emailTo":{"type":"string","description":"Local-part/username of the email address to which to send invoices to be added to the Invoice Inbox."},"emailToAlias":{"type":"array","items":{"type":"string"},"description":"Email inbox alias addresses. Used when forwarding emails to the emailTo address from an alias."},"isCustomer":{"type":"boolean","description":"True if this entity has a direct relationship with your organization."},"accountType":{"$ref":"#/components/schemas/entityTypes_AccountType"},"profile":{"$ref":"#/components/schemas/entityTypes_ProfileResponse"},"logo":{"type":"string","description":"URL for the entity logo"},"status":{"$ref":"#/components/schemas/entityTypes_EntityStatus"},"oatfiStatus":{"type":"string","description":"The OatFi status of this entity"},"oatfiUnderwritingResponse":{"type":"object","additionalProperties":{"type":"string"},"description":"The OatFi underwriting response of this entity"},"acceptedTos":{"type":"boolean","description":"True if this entity has accepted the terms of service."},"isPayor":{"type":"boolean","description":"True if this entity can pay invoices."},"isPayee":{"type":"boolean","description":"True if this entity can receive payments."},"isNetworkPayor":{"type":"boolean","description":"True if this entity is available as a payor to any entity on your platform. Otherwise this entity will only be available as a payor to entities that have a direct relationship with this entity."},"isNetworkPayee":{"type":"boolean","description":"True if this entity is available as a payee to any entity on your platform. Otherwise this entity will only be available as a payee to entities that have a direct relationship with this entity."},"metadata":{"type":"object","additionalProperties":{"type":"string"},"description":"Simple key/value metadata associated with this entity. For more complex metadata, use the Metadata API."},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"paymentMethods":{"type":"array","items":{"$ref":"#/components/schemas/paymentMethodTypes_PaymentMethodResponse"}}},"required":["id","name","email","isCustomer","accountType","profile","status","acceptedTos","isPayor","isPayee","isNetworkPayor","isNetworkPayee","createdAt","updatedAt"],"title":"EntityWithPaymentMethodResponse"},"entityTypes_FindEntityResponse":{"type":"object","properties":{"count":{"type":"integer","description":"Total number of entities for the given filters. This value is not limited by the limit parameter. It is provided so that you can determine how many pages of results are available."},"hasMore":{"type":"boolean","description":"True if there are more entities available for the given filters."},"data":{"type":"array","items":{"$ref":"#/components/schemas/entityTypes_EntityWithPaymentMethodResponse"}}},"required":["count","hasMore","data"],"title":"FindEntityResponse"},"entityTypes_BusinessProfileRequest":{"type":"object","properties":{"email":{"type":"string","description":"Email address for the business. Required for KYB."},"legalBusinessName":{"type":"string"},"businessType":{"$ref":"#/components/schemas/entityTypes_BusinessType"},"phone":{"$ref":"#/components/schemas/commons_PhoneNumber","description":"Phone number for the business. Required for KYB."},"doingBusinessAs":{"type":"string"},"website":{"type":"string","description":"Website URL for the business. Must be in the format http://www.example.com. Required for KYB if description is not provided."},"description":{"type":"string","description":"Description of the business. Required for KYB if website is not provided."},"address":{"$ref":"#/components/schemas/commons_Address","description":"Address for the business. Required for KYB."},"taxId":{"$ref":"#/components/schemas/entityTypes_TaxID","description":"Tax ID for the business. Currently only EIN is supported. Required for KYB."},"formationDate":{"type":"string","format":"date-time","description":"Date of business formation"},"industryCodes":{"$ref":"#/components/schemas/entityTypes_IndustryCodes","description":"Industry code for the business. Required to collect funds."},"averageMonthlyTransactionVolume":{"type":"number","format":"double","description":"Average monthly transaction volume for the business. Required to collect funds."},"averageTransactionSize":{"type":"number","format":"double","description":"Average transaction size for the business. Required to collect funds."},"maxTransactionSize":{"type":"number","format":"double","description":"Maximum transaction size for the business. Required to collect funds."}},"required":["legalBusinessName"],"title":"BusinessProfileRequest"},"commons_BirthDate":{"type":"object","properties":{"day":{"type":"string"},"month":{"type":"string"},"year":{"type":"string"}},"title":"BirthDate"},"commons_IndividualGovernmentID":{"type":"object","properties":{"ssn":{"type":"string","description":"Full Social Security Number. Must be in the format 123-45-6789."}},"required":["ssn"],"title":"IndividualGovernmentID"},"entityTypes_IndividualProfileRequest":{"type":"object","properties":{"email":{"type":"string"},"name":{"$ref":"#/components/schemas/commons_FullName"},"phone":{"$ref":"#/components/schemas/commons_PhoneNumber"},"address":{"$ref":"#/components/schemas/commons_Address"},"birthDate":{"$ref":"#/components/schemas/commons_BirthDate"},"governmentID":{"$ref":"#/components/schemas/commons_IndividualGovernmentID"}},"required":["name"],"title":"IndividualProfileRequest"},"entityTypes_ProfileRequest":{"type":"object","properties":{"business":{"$ref":"#/components/schemas/entityTypes_BusinessProfileRequest","description":"If this entity is a business, set this field"},"individual":{"$ref":"#/components/schemas/entityTypes_IndividualProfileRequest","description":"If this entity is a individual, set this field"}},"title":"ProfileRequest"},"entityTypes_EntityCreationRequest":{"type":"object","properties":{"foreignId":{"type":"string","description":"The ID used to identify this entity in your system. This ID must be unique across all entities in your system."},"emailTo":{"type":"string","description":"Sets the email address to which to send invoices to be added to the Invoice Inbox. Only provide the local-part/username of the email address, do not include the @domain.com"},"emailToAlias":{"type":"array","items":{"type":"string"},"description":"Email inbox alias addresses. Used when forwarding emails to the emailTo address from an alias. Include the full email address."},"isCustomer":{"type":"boolean","description":"If this entity has a direct relationship with your organization (e.g your direct customer or client), set this to true. Otherwise, set to false (e.g your customer's vendors)."},"accountType":{"$ref":"#/components/schemas/entityTypes_AccountType"},"profile":{"$ref":"#/components/schemas/entityTypes_ProfileRequest"},"isPayor":{"type":"boolean","description":"If this entity will be paying invoices, set this to true."},"isPayee":{"type":"boolean","description":"If this entity will be receiving payments, set this to true."},"isNetworkPayor":{"type":"boolean","description":"Control if this entity should be available as a payor to any entity on your platform. If set to false, this entity will only be available as a payor to entities that have a direct relationship with this entity. Defaults to false."},"isNetworkPayee":{"type":"boolean","description":"Control if this entity should be available as a payee to any entity on your platform. If set to false, this entity will only be available as a payee to entities that have a direct relationship with this entity. Defaults to false."},"logo":{"type":"string","description":"Base64 data URL of the entity logo. Must be in the `data:image/*;base64,XXXX` format. We recommend a PNG image under 100KB. Supported file types are `png`, `jpeg`, `gif`, `svg`."},"metadata":{"type":"object","additionalProperties":{"type":"string"},"description":"Simple key/value metadata associated with this entity. For more complex metadata, use the Metadata API."}},"required":["isCustomer","accountType","profile","isPayor","isPayee"],"title":"EntityCreationRequest"},"entityTypes_EntityCloneRequest":{"type":"object","properties":{"createFromId":{"$ref":"#/components/schemas/entityTypes_EntityId","description":"The ID or ForeignId of the entity to clone."},"foreignId":{"type":"string","description":"The ID used to identify this entity in your system. This ID must be unique across all entities in your system."},"emailTo":{"type":"string","description":"Sets the email address to which to send invoices to be added to the Invoice Inbox. Only provide the local-part/username of the email address, do not include the @domain.com"},"emailToAlias":{"type":"array","items":{"type":"string"},"description":"Email inbox alias addresses. Used when forwarding emails to the emailTo address from an alias. Include the full email address."},"logo":{"type":"string","description":"Base64 data URL of the entity logo. Must be in the `data:image/*;base64,XXXX` format. We recommend a PNG image under 100KB. Supported file types are `png`, `jpeg`, `gif`, `svg`."},"metadata":{"type":"object","additionalProperties":{"type":"string"},"description":"Simple key/value metadata associated with this entity. For more complex metadata, use the Metadata API."}},"required":["createFromId"],"title":"EntityCloneRequest"},"entityTypes_EntityRequest":{"oneOf":[{"$ref":"#/components/schemas/entityTypes_EntityCreationRequest"},{"$ref":"#/components/schemas/entityTypes_EntityCloneRequest"}],"title":"EntityRequest"},"entityTypes_EntityUpdateRequest":{"type":"object","properties":{"foreignId":{"type":"string","description":"The ID used to identify this entity in your system. This ID must be unique across all entities in your system."},"emailTo":{"type":"string","description":"Sets the email address to which to send invoices to be added to the Invoice Inbox. Only provide the local-part/username of the email address, do not include the @domain.com"},"emailToAlias":{"type":"array","items":{"type":"string"},"description":"Email inbox alias addresses. Used when forwarding emails to the emailTo address from an alias. Include the full email address."},"isCustomer":{"type":"boolean","description":"If this entity has a direct relationship with your organization (e.g your direct customer or client), set this to true. Otherwise, set to false (e.g your customer's vendors)."},"accountType":{"$ref":"#/components/schemas/entityTypes_AccountType"},"profile":{"$ref":"#/components/schemas/entityTypes_ProfileRequest"},"isPayor":{"type":"boolean","description":"If this entity will be paying invoices, set this to true."},"isPayee":{"type":"boolean","description":"If this entity will be receiving payments, set this to true."},"isNetworkPayor":{"type":"boolean","description":"Control if this entity should be available as a payor to any entity on your platform. If set to false, this entity will only be available as a payor to entities that have a direct relationship with this entity. Defaults to false."},"isNetworkPayee":{"type":"boolean","description":"Control if this entity should be available as a payee to any entity on your platform. If set to false, this entity will only be available as a payee to entities that have a direct relationship with this entity. Defaults to false."},"logo":{"type":"string","description":"Base64 data URL of the entity logo. Must be in the `data:image/*;base64,XXXX` format. We recommend a PNG image under 100KB. Supported file types are `png`, `jpeg`, `gif`, `svg`."},"metadata":{"type":"object","additionalProperties":{"type":"string"},"description":"Simple key/value metadata associated with this entity. For more complex metadata, use the Metadata API."},"connectedEntityId":{"$ref":"#/components/schemas/entityTypes_EntityId","description":"The ID of the entity that this entity is connected to. This is used to trigger notifications to the connected entity when this entity is updated."}},"title":"EntityUpdateRequest"},"entityTypes_EntityOnboardingLinkType":{"type":"string","enum":["PAYEE","PAYOR"],"title":"EntityOnboardingLinkType"},"entityTypes_VendorPortalTab":{"type":"string","enum":["HOME","PROFILE","INVOICES","PAYMENT_METHODS","VENDOR_CREDITS"],"title":"VendorPortalTab"},"entityTypes_VendorPortalOptions":{"type":"object","properties":{"tabs":{"type":"array","items":{"$ref":"#/components/schemas/entityTypes_VendorPortalTab"},"description":"The tabs to display in the vendor portal. If not provided, all tabs will be displayed."},"defaultTab":{"$ref":"#/components/schemas/entityTypes_VendorPortalTab","description":"The default tab to display in the vendor portal. If not provided, the HOME tab will be displayed."},"welcomeMessage":{"type":"string","description":"The welcome message to display in the vendor portal. If not provided, no welcome message will be displayed."}},"title":"VendorPortalOptions"},"entityTypes_EntityEventId":{"type":"string","title":"EntityEventId"},"entityTypes_EntityEvent":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/entityTypes_EntityEventId","description":"The ID of the event"},"data":{"$ref":"#/components/schemas/entityTypes_EntityResponse","description":"The payment method data at the time of the event"},"webhookIds":{"type":"array","items":{"type":"string"},"description":"The list of webhook IDs associated with this event"},"userId":{"$ref":"#/components/schemas/entityTypes_EntityUserId","description":"The ID of the user who triggered the event"},"updatedByEntityId":{"$ref":"#/components/schemas/entityTypes_EntityId","description":"The ID of the entity that updated the payment method"},"createdAt":{"type":"string","format":"date-time","description":"The timestamp when the event was created"}},"required":["id","data","webhookIds","createdAt"],"title":"EntityEvent"},"entityTypes_EntityEventsResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/entityTypes_EntityEvent"}},"count":{"type":"integer"},"hasMore":{"type":"boolean"}},"required":["data","count","hasMore"],"title":"EntityEventsResponse"},"entityTypes_FindCounterpartiesResponse":{"type":"object","properties":{"count":{"type":"integer","description":"Total number of counterparties for the given filters. This value is not limited by the limit parameter. It is provided so that you can determine how many pages of results are available."},"hasMore":{"type":"boolean","description":"True if there are more counterparties available for the given filters."},"data":{"type":"array","items":{"$ref":"#/components/schemas/entityTypes_CounterpartyResponse"}}},"required":["count","hasMore","data"],"title":"FindCounterpartiesResponse"},"vendorCreditTypes_VendorCreditResponse":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/vendorCreditTypes_VendorCreditId"},"memoNumber":{"type":"string","description":"Memo number for the vendor credit"},"totalAmount":{"type":"number","format":"double","description":"Total issued amount of the vendor credit in major units"},"remainingAmount":{"type":"number","format":"double","description":"Remaining usable amount in the vendor credit in major units"},"currency":{"$ref":"#/components/schemas/paymentMethodTypes_CurrencyCode","description":"Currency code for the amount. Defaults to USD."},"vendorId":{"$ref":"#/components/schemas/entityTypes_EntityId","description":"ID of the vendor the vendor credit may be used for"},"payerId":{"$ref":"#/components/schemas/entityTypes_EntityId","description":"ID of the payer who may use the vendor credit"},"creatorEntityId":{"$ref":"#/components/schemas/entityTypes_EntityId","description":"ID of the entity that created this vendor credit"},"note":{"type":"string","description":"An optional note to attach to the vendor credit"},"invoiceIds":{"type":"array","items":{"$ref":"#/components/schemas/invoiceTypes_InvoiceId"},"description":"The IDs of the invoices that this vendor credit has been applied to"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","vendorId","payerId","createdAt","updatedAt"],"title":"VendorCreditResponse"},"vendorCreditTypes_FindVendorCreditResponse":{"type":"object","properties":{"count":{"type":"integer","description":"Total number of vendor credits for the given filters. This value is not limited by the limit parameter. It is provided so that you can determine how many pages of results are available."},"hasMore":{"type":"boolean","description":"True if there are more vendor credits available for the given filters."},"data":{"type":"array","items":{"$ref":"#/components/schemas/vendorCreditTypes_VendorCreditResponse"}}},"required":["count","hasMore","data"],"title":"FindVendorCreditResponse"},"vendorCreditTypes_VendorCreditRequest":{"type":"object","properties":{"memoNumber":{"type":"string","description":"Memo number for the vendor credit"},"totalAmount":{"type":"number","format":"double","description":"Total amount of the vendor credit in major units"},"currency":{"$ref":"#/components/schemas/paymentMethodTypes_CurrencyCode","description":"Currency code for the amount. Defaults to USD."},"note":{"type":"string","description":"An optional note to attach to the vendor credit"}},"required":["totalAmount","currency"],"title":"VendorCreditRequest"},"vendorCreditTypes_CalculateVendorCreditUsageResponse":{"type":"object","properties":{"remainingAmount":{"type":"number","format":"double","description":"Remaining amount on the invoice after vendor credits are applied in major units."},"currency":{"$ref":"#/components/schemas/paymentMethodTypes_CurrencyCode","description":"Currency code for the amount. Defaults to USD."},"vendorCredits":{"type":"array","items":{"$ref":"#/components/schemas/vendorCreditTypes_VendorCreditResponse"},"description":"Vendor credits that will be applied to the invoice. The objects returned represent the states each vendor credit will be in AFTER they are applied to the invoice, not their current states."}},"required":["remainingAmount","currency","vendorCredits"],"title":"CalculateVendorCreditUsageResponse"},"emailLogTypes_EmailLogId":{"type":"string","title":"EmailLogId"},"emailLogTypes_IncomingEmailLogStatus":{"type":"string","enum":["PENDING","PROCESSED","FAILED"],"title":"IncomingEmailLogStatus"},"emailLogTypes_EmailLogAttachment":{"type":"object","properties":{"filename":{"type":"string"},"contentType":{"type":"string"}},"required":["filename","contentType"],"title":"EmailLogAttachment"},"emailLogTypes_EmailLog":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/emailLogTypes_EmailLogId"},"status":{"$ref":"#/components/schemas/emailLogTypes_IncomingEmailLogStatus","description":"The status of the email log. If the status is PENDING, the email has not been processed yet. If the status is PROCESSED, the email has been processed and the invoice has been created. If the status is FAILED, the email was not processed due to an error."},"subject":{"type":"string"},"from":{"type":"string"},"to":{"type":"string"},"htmlBody":{"type":"string"},"textBody":{"type":"string"},"attachment":{"$ref":"#/components/schemas/emailLogTypes_EmailLogAttachment"},"createdAt":{"type":"string","format":"date-time"},"invoiceId":{"$ref":"#/components/schemas/invoiceTypes_InvoiceId"}},"required":["id","status","subject","from","to","htmlBody","textBody","createdAt"],"title":"EmailLog"},"emailLogTypes_EmailLogResponse":{"type":"object","properties":{"count":{"type":"integer","description":"Total number of logs for the given filters. This value is not limited by the limit parameter. It is provided so that you can determine how many pages of results are available."},"hasMore":{"type":"boolean","description":"True if there are more logs available for the given filters."},"data":{"type":"array","items":{"$ref":"#/components/schemas/emailLogTypes_EmailLog"}}},"required":["count","hasMore","data"],"title":"EmailLogResponse"},"paymentMethodTypes_PaymentMethodType":{"type":"string","enum":["custom","check","bankAccount","na","card","bnpl","virtualCard","offPlatform","utility","wallet"],"title":"PaymentMethodType"},"paymentMethodTypes_PlaidProcessorTokenRequest":{"type":"object","properties":{"processorToken":{"type":"string","description":"Plaid processor token for the account. If you already have a processor token for the account (for example, you have linked the account to your app already), use this instead of publicToken."}},"required":["processorToken"],"title":"PlaidProcessorTokenRequest"},"paymentMethodTypes_PlaidPublicTokenRequest":{"type":"object","properties":{"accountId":{"type":"string","description":"Plaid account ID. If not provided, will try to match the provided routing number and account number."},"publicToken":{"type":"string","description":"Public token received from Plaid Link. Use this if linking the account using the Plaid Link frontend component."}},"required":["publicToken"],"title":"PlaidPublicTokenRequest"},"paymentMethodTypes_PlaidAccessTokenRequest":{"type":"object","properties":{"accountId":{"type":"string","description":"Plaid account ID. If not provided, will try to match the provided routing number and account number."},"accessToken":{"type":"string","description":"Plaid access token for the account. If you already have an access token for the account (for example, you have linked the account to your app already), use this instead of publicToken."}},"required":["accessToken"],"title":"PlaidAccessTokenRequest"},"paymentMethodTypes_PlaidLinkRequest":{"oneOf":[{"$ref":"#/components/schemas/paymentMethodTypes_PlaidProcessorTokenRequest"},{"$ref":"#/components/schemas/paymentMethodTypes_PlaidPublicTokenRequest"},{"$ref":"#/components/schemas/paymentMethodTypes_PlaidAccessTokenRequest"}],"title":"PlaidLinkRequest"},"paymentMethodTypes_PaymentMethodRequest":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["bankAccount"],"description":"Discriminator value: bankAccount"},"defaultSource":{"type":"boolean","description":"If true, this payment method will be set as the default source. Only one payment method can be set as the default source. If another payment method is already set as the default source, it will be unset."},"defaultDestination":{"type":"boolean","description":"If true, this payment method will be set as the default destination. Only one payment method can be set as the default destination. If another payment method is already set as the default destination, it will be unset."},"externalAccountingSystemId":{"type":"string","description":"ID for this payment method in the external accounting system (e.g Rutter or Codat)"},"frozen":{"type":"boolean","description":"If true, this payment method will be frozen. Frozen payment methods cannot be used for payments, but will still be returned in API responses."},"metadata":{"type":"object","additionalProperties":{"type":"string"},"description":"Metadata associated with this payment method."},"confirmedByEntity":{"type":"boolean","description":"(ALPHA, MAY BE REMOVED) Indicate whether the payment method has been verified by the entity. This is useful if another entity has added this payment method to this entity, and you want the owner of the payment method to verify it is correct."},"accountName":{"type":"string","description":"The name of the account. For example \"My Checking Account\" or \"Property XYZ Checking\""},"bankName":{"type":"string","description":"The name of the bank. This is now automatically set when the bank account is linked.","deprecated":true},"routingNumber":{"type":"string"},"accountNumber":{"type":"string"},"accountType":{"$ref":"#/components/schemas/paymentMethodTypes_BankType"},"plaid":{"$ref":"#/components/schemas/paymentMethodTypes_PlaidLinkRequest","description":"If provided, will link a bank account using Plaid Link"},"checkOptions":{"$ref":"#/components/schemas/paymentMethodTypes_BankAccountCheckOptions","description":"If this bank account supports check printing, use this to enable check printing and set the check options. Checks will be printed directly from the bank account."}},"required":["type","routingNumber","accountNumber","accountType"]},{"type":"object","properties":{"type":{"type":"string","enum":["card"],"description":"Discriminator value: card"},"defaultSource":{"type":"boolean","description":"If true, this payment method will be set as the default source. Only one payment method can be set as the default source. If another payment method is already set as the default source, it will be unset."},"defaultDestination":{"type":"boolean","description":"If true, this payment method will be set as the default destination. Only one payment method can be set as the default destination. If another payment method is already set as the default destination, it will be unset."},"externalAccountingSystemId":{"type":"string","description":"ID for this payment method in the external accounting system (e.g Rutter or Codat)"},"frozen":{"type":"boolean","description":"If true, this payment method will be frozen. Frozen payment methods cannot be used for payments, but will still be returned in API responses."},"metadata":{"type":"object","additionalProperties":{"type":"string"},"description":"Metadata associated with this payment method."},"confirmedByEntity":{"type":"boolean","description":"(ALPHA, MAY BE REMOVED) Indicate whether the payment method has been verified by the entity. This is useful if another entity has added this payment method to this entity, and you want the owner of the payment method to verify it is correct."},"cardType":{"$ref":"#/components/schemas/paymentMethodTypes_CardType"},"cardBrand":{"$ref":"#/components/schemas/paymentMethodTypes_CardBrand"},"lastFour":{"type":"string"},"expMonth":{"type":"string"},"expYear":{"type":"string"},"token":{"type":"string"}},"required":["type","cardType","cardBrand","lastFour","expMonth","expYear","token"]},{"type":"object","properties":{"type":{"type":"string","enum":["check"],"description":"Discriminator value: check"},"defaultSource":{"type":"boolean","description":"If true, this payment method will be set as the default source. Only one payment method can be set as the default source. If another payment method is already set as the default source, it will be unset."},"defaultDestination":{"type":"boolean","description":"If true, this payment method will be set as the default destination. Only one payment method can be set as the default destination. If another payment method is already set as the default destination, it will be unset."},"externalAccountingSystemId":{"type":"string","description":"ID for this payment method in the external accounting system (e.g Rutter or Codat)"},"frozen":{"type":"boolean","description":"If true, this payment method will be frozen. Frozen payment methods cannot be used for payments, but will still be returned in API responses."},"metadata":{"type":"object","additionalProperties":{"type":"string"},"description":"Metadata associated with this payment method."},"confirmedByEntity":{"type":"boolean","description":"(ALPHA, MAY BE REMOVED) Indicate whether the payment method has been verified by the entity. This is useful if another entity has added this payment method to this entity, and you want the owner of the payment method to verify it is correct."},"payToTheOrderOf":{"type":"string"},"addressLine1":{"type":"string"},"addressLine2":{"type":"string"},"city":{"type":"string"},"stateOrProvince":{"type":"string"},"postalCode":{"type":"string"},"country":{"type":"string"}},"required":["type","payToTheOrderOf","addressLine1","city","stateOrProvince","postalCode","country"]},{"type":"object","properties":{"type":{"type":"string","enum":["custom"],"description":"Discriminator value: custom"},"defaultSource":{"type":"boolean","description":"If true, this payment method will be set as the default source. Only one payment method can be set as the default source. If another payment method is already set as the default source, it will be unset."},"defaultDestination":{"type":"boolean","description":"If true, this payment method will be set as the default destination. Only one payment method can be set as the default destination. If another payment method is already set as the default destination, it will be unset."},"externalAccountingSystemId":{"type":"string","description":"ID for this payment method in the external accounting system (e.g Rutter or Codat)"},"frozen":{"type":"boolean","description":"If true, this payment method will be frozen. Frozen payment methods cannot be used for payments, but will still be returned in API responses."},"metadata":{"type":"object","additionalProperties":{"type":"string"},"description":"Metadata associated with this payment method."},"confirmedByEntity":{"type":"boolean","description":"(ALPHA, MAY BE REMOVED) Indicate whether the payment method has been verified by the entity. This is useful if another entity has added this payment method to this entity, and you want the owner of the payment method to verify it is correct."},"foreignId":{"type":"string","description":"ID for this payment method in your system"},"accountName":{"type":"string"},"accountNumber":{"type":"string"},"availableBalance":{"type":"number","format":"double","description":"The available balance for this payment method."},"schemaId":{"$ref":"#/components/schemas/paymentMethodTypes_CustomPaymentMethodSchemaId","description":"Payment method schema used for this payment method. Defines the fields that this payment method contains."},"data":{"type":"object","additionalProperties":{"type":"string"},"description":"Object of key/value pairs that matches the keys in the linked payment method schema."}},"required":["type","schemaId","data"]},{"type":"object","properties":{"type":{"type":"string","enum":["offPlatform"],"description":"Discriminator value: offPlatform"},"defaultSource":{"type":"boolean","description":"If true, this payment method will be set as the default source. Only one payment method can be set as the default source. If another payment method is already set as the default source, it will be unset."},"defaultDestination":{"type":"boolean","description":"If true, this payment method will be set as the default destination. Only one payment method can be set as the default destination. If another payment method is already set as the default destination, it will be unset."},"externalAccountingSystemId":{"type":"string","description":"ID for this payment method in the external accounting system (e.g Rutter or Codat)"},"frozen":{"type":"boolean","description":"If true, this payment method will be frozen. Frozen payment methods cannot be used for payments, but will still be returned in API responses."},"metadata":{"type":"object","additionalProperties":{"type":"string"},"description":"Metadata associated with this payment method."},"confirmedByEntity":{"type":"boolean","description":"(ALPHA, MAY BE REMOVED) Indicate whether the payment method has been verified by the entity. This is useful if another entity has added this payment method to this entity, and you want the owner of the payment method to verify it is correct."}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["utility"],"description":"Discriminator value: utility"},"defaultSource":{"type":"boolean","description":"If true, this payment method will be set as the default source. Only one payment method can be set as the default source. If another payment method is already set as the default source, it will be unset."},"defaultDestination":{"type":"boolean","description":"If true, this payment method will be set as the default destination. Only one payment method can be set as the default destination. If another payment method is already set as the default destination, it will be unset."},"externalAccountingSystemId":{"type":"string","description":"ID for this payment method in the external accounting system (e.g Rutter or Codat)"},"frozen":{"type":"boolean","description":"If true, this payment method will be frozen. Frozen payment methods cannot be used for payments, but will still be returned in API responses."},"metadata":{"type":"object","additionalProperties":{"type":"string"},"description":"Metadata associated with this payment method."},"confirmedByEntity":{"type":"boolean","description":"(ALPHA, MAY BE REMOVED) Indicate whether the payment method has been verified by the entity. This is useful if another entity has added this payment method to this entity, and you want the owner of the payment method to verify it is correct."},"utilityId":{"type":"string","description":"The ID of the utility that this payment method is linked to."}},"required":["type","utilityId"]},{"type":"object","properties":{"type":{"type":"string","enum":["wallet"],"description":"Discriminator value: wallet"},"defaultSource":{"type":"boolean","description":"If true, this payment method will be set as the default source. Only one payment method can be set as the default source. If another payment method is already set as the default source, it will be unset."},"defaultDestination":{"type":"boolean","description":"If true, this payment method will be set as the default destination. Only one payment method can be set as the default destination. If another payment method is already set as the default destination, it will be unset."},"externalAccountingSystemId":{"type":"string","description":"ID for this payment method in the external accounting system (e.g Rutter or Codat)"},"frozen":{"type":"boolean","description":"If true, this payment method will be frozen. Frozen payment methods cannot be used for payments, but will still be returned in API responses."},"metadata":{"type":"object","additionalProperties":{"type":"string"},"description":"Metadata associated with this payment method."},"confirmedByEntity":{"type":"boolean","description":"(ALPHA, MAY BE REMOVED) Indicate whether the payment method has been verified by the entity. This is useful if another entity has added this payment method to this entity, and you want the owner of the payment method to verify it is correct."}},"required":["type"]}],"discriminator":{"propertyName":"type"},"title":"PaymentMethodRequest"},"paymentMethodTypes_PaymentMethodUpdateRequest":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["custom"],"description":"Discriminator value: custom"},"defaultSource":{"type":"boolean","description":"If true, this payment method will be set as the default source. Only one payment method can be set as the default source. If another payment method is already set as the default source, it will be unset."},"defaultDestination":{"type":"boolean","description":"If true, this payment method will be set as the default destination. Only one payment method can be set as the default destination. If another payment method is already set as the default destination, it will be unset."},"externalAccountingSystemId":{"type":"string","description":"ID for this payment method in the external accounting system (e.g Rutter or Codat)"},"frozen":{"type":"boolean","description":"If true, this payment method will be frozen. Frozen payment methods cannot be used for payments, but will still be returned in API responses."},"metadata":{"type":"object","additionalProperties":{"type":"string"},"description":"Metadata associated with this payment method."},"confirmedByEntity":{"type":"boolean","description":"(ALPHA, MAY BE REMOVED) Indicate whether the payment method has been verified by the entity. This is useful if another entity has added this payment method to this entity, and you want the owner of the payment method to verify it is correct."},"foreignId":{"type":"string","description":"ID for this payment method in your system"},"accountName":{"type":"string"},"accountNumber":{"type":"string"},"availableBalance":{"type":"number","format":"double","description":"The available balance for this payment method."},"schemaId":{"$ref":"#/components/schemas/paymentMethodTypes_CustomPaymentMethodSchemaId","description":"Payment method schema used for this payment method. Defines the fields that this payment method contains."},"data":{"type":"object","additionalProperties":{"type":"string"},"description":"Object of key/value pairs that matches the keys in the linked payment method schema."}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["bankAccount"],"description":"Discriminator value: bankAccount"},"defaultSource":{"type":"boolean","description":"If true, this payment method will be set as the default source. Only one payment method can be set as the default source. If another payment method is already set as the default source, it will be unset."},"defaultDestination":{"type":"boolean","description":"If true, this payment method will be set as the default destination. Only one payment method can be set as the default destination. If another payment method is already set as the default destination, it will be unset."},"externalAccountingSystemId":{"type":"string","description":"ID for this payment method in the external accounting system (e.g Rutter or Codat)"},"frozen":{"type":"boolean","description":"If true, this payment method will be frozen. Frozen payment methods cannot be used for payments, but will still be returned in API responses."},"metadata":{"type":"object","additionalProperties":{"type":"string"},"description":"Metadata associated with this payment method."},"confirmedByEntity":{"type":"boolean","description":"(ALPHA, MAY BE REMOVED) Indicate whether the payment method has been verified by the entity. This is useful if another entity has added this payment method to this entity, and you want the owner of the payment method to verify it is correct."},"accountName":{"type":"string"},"plaid":{"$ref":"#/components/schemas/paymentMethodTypes_PlaidLinkRequest","description":"If provided, will update a bank account using Plaid Link"},"checkOptions":{"$ref":"#/components/schemas/paymentMethodTypes_BankAccountCheckOptions","description":"If this bank account supports check printing, use this to enable check printing and set the check options. Checks will be printed directly from the bank account."}},"required":["type"],"description":"Only defaultSource, defaultDestination, accountName, and checkOptions can be updated."},{"type":"object","properties":{"type":{"type":"string","enum":["card"],"description":"Discriminator value: card"},"defaultSource":{"type":"boolean","description":"If true, this payment method will be set as the default source. Only one payment method can be set as the default source. If another payment method is already set as the default source, it will be unset."},"defaultDestination":{"type":"boolean","description":"If true, this payment method will be set as the default destination. Only one payment method can be set as the default destination. If another payment method is already set as the default destination, it will be unset."},"externalAccountingSystemId":{"type":"string","description":"ID for this payment method in the external accounting system (e.g Rutter or Codat)"},"frozen":{"type":"boolean","description":"If true, this payment method will be frozen. Frozen payment methods cannot be used for payments, but will still be returned in API responses."},"metadata":{"type":"object","additionalProperties":{"type":"string"},"description":"Metadata associated with this payment method."},"confirmedByEntity":{"type":"boolean","description":"(ALPHA, MAY BE REMOVED) Indicate whether the payment method has been verified by the entity. This is useful if another entity has added this payment method to this entity, and you want the owner of the payment method to verify it is correct."}},"required":["type"],"description":"Only defaultSource and defaultDestination can be updated."},{"type":"object","properties":{"type":{"type":"string","enum":["check"],"description":"Discriminator value: check"},"defaultSource":{"type":"boolean","description":"If true, this payment method will be set as the default source. Only one payment method can be set as the default source. If another payment method is already set as the default source, it will be unset."},"defaultDestination":{"type":"boolean","description":"If true, this payment method will be set as the default destination. Only one payment method can be set as the default destination. If another payment method is already set as the default destination, it will be unset."},"externalAccountingSystemId":{"type":"string","description":"ID for this payment method in the external accounting system (e.g Rutter or Codat)"},"frozen":{"type":"boolean","description":"If true, this payment method will be frozen. Frozen payment methods cannot be used for payments, but will still be returned in API responses."},"metadata":{"type":"object","additionalProperties":{"type":"string"},"description":"Metadata associated with this payment method."},"confirmedByEntity":{"type":"boolean","description":"(ALPHA, MAY BE REMOVED) Indicate whether the payment method has been verified by the entity. This is useful if another entity has added this payment method to this entity, and you want the owner of the payment method to verify it is correct."}},"required":["type"],"description":"Only defaultSource and defaultDestination can be updated."},{"type":"object","properties":{"type":{"type":"string","enum":["offPlatform"],"description":"Discriminator value: offPlatform"},"defaultSource":{"type":"boolean","description":"If true, this payment method will be set as the default source. Only one payment method can be set as the default source. If another payment method is already set as the default source, it will be unset."},"defaultDestination":{"type":"boolean","description":"If true, this payment method will be set as the default destination. Only one payment method can be set as the default destination. If another payment method is already set as the default destination, it will be unset."},"externalAccountingSystemId":{"type":"string","description":"ID for this payment method in the external accounting system (e.g Rutter or Codat)"},"frozen":{"type":"boolean","description":"If true, this payment method will be frozen. Frozen payment methods cannot be used for payments, but will still be returned in API responses."},"metadata":{"type":"object","additionalProperties":{"type":"string"},"description":"Metadata associated with this payment method."},"confirmedByEntity":{"type":"boolean","description":"(ALPHA, MAY BE REMOVED) Indicate whether the payment method has been verified by the entity. This is useful if another entity has added this payment method to this entity, and you want the owner of the payment method to verify it is correct."}},"required":["type"],"description":"Only defaultSource and defaultDestination can be updated."},{"type":"object","properties":{"type":{"type":"string","enum":["utility"],"description":"Discriminator value: utility"},"defaultSource":{"type":"boolean","description":"If true, this payment method will be set as the default source. Only one payment method can be set as the default source. If another payment method is already set as the default source, it will be unset."},"defaultDestination":{"type":"boolean","description":"If true, this payment method will be set as the default destination. Only one payment method can be set as the default destination. If another payment method is already set as the default destination, it will be unset."},"externalAccountingSystemId":{"type":"string","description":"ID for this payment method in the external accounting system (e.g Rutter or Codat)"},"frozen":{"type":"boolean","description":"If true, this payment method will be frozen. Frozen payment methods cannot be used for payments, but will still be returned in API responses."},"metadata":{"type":"object","additionalProperties":{"type":"string"},"description":"Metadata associated with this payment method."},"confirmedByEntity":{"type":"boolean","description":"(ALPHA, MAY BE REMOVED) Indicate whether the payment method has been verified by the entity. This is useful if another entity has added this payment method to this entity, and you want the owner of the payment method to verify it is correct."}},"required":["type"],"description":"Only defaultSource and defaultDestination can be updated."},{"type":"object","properties":{"type":{"type":"string","enum":["wallet"],"description":"Discriminator value: wallet"},"defaultSource":{"type":"boolean","description":"If true, this payment method will be set as the default source. Only one payment method can be set as the default source. If another payment method is already set as the default source, it will be unset."},"defaultDestination":{"type":"boolean","description":"If true, this payment method will be set as the default destination. Only one payment method can be set as the default destination. If another payment method is already set as the default destination, it will be unset."},"externalAccountingSystemId":{"type":"string","description":"ID for this payment method in the external accounting system (e.g Rutter or Codat)"},"frozen":{"type":"boolean","description":"If true, this payment method will be frozen. Frozen payment methods cannot be used for payments, but will still be returned in API responses."},"metadata":{"type":"object","additionalProperties":{"type":"string"},"description":"Metadata associated with this payment method."},"confirmedByEntity":{"type":"boolean","description":"(ALPHA, MAY BE REMOVED) Indicate whether the payment method has been verified by the entity. This is useful if another entity has added this payment method to this entity, and you want the owner of the payment method to verify it is correct."}},"required":["type"],"description":"Only defaultSource and defaultDestination can be updated."}],"discriminator":{"propertyName":"type"},"description":"Update a payment method. for non custom payment methods.","title":"PaymentMethodUpdateRequest"},"entityTypes_CardLinkTokenResponse":{"type":"object","properties":{"token":{"type":"string"},"accountId":{"type":"string"}},"required":["token","accountId"],"title":"CardLinkTokenResponse"},"paymentMethodTypes_PaymentMethodEventId":{"type":"string","title":"PaymentMethodEventId"},"paymentMethodTypes_PaymentMethodEvent":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/paymentMethodTypes_PaymentMethodEventId","description":"The ID of the event"},"data":{"$ref":"#/components/schemas/paymentMethodTypes_PaymentMethodResponse","description":"The payment method data at the time of the event"},"webhookIds":{"type":"array","items":{"type":"string"},"description":"The list of webhook IDs associated with this event"},"userId":{"$ref":"#/components/schemas/entityTypes_EntityUserId","description":"The ID of the user who triggered the event"},"updatedByEntityId":{"$ref":"#/components/schemas/entityTypes_EntityId","description":"The ID of the entity that updated the payment method"},"createdAt":{"type":"string","format":"date-time","description":"The timestamp when the event was created"}},"required":["id","data","webhookIds","createdAt"],"title":"PaymentMethodEvent"},"paymentMethodTypes_PaymentMethodEventsResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/paymentMethodTypes_PaymentMethodEvent"},"description":"The list of events"},"count":{"type":"integer","description":"The total number of events"},"hasMore":{"type":"boolean","description":"Whether there are more events to fetch"}},"required":["data","count","hasMore"],"title":"PaymentMethodEventsResponse"},"paymentMethodTypes_WalletBalanceResponse":{"type":"object","properties":{"paymentMethodId":{"$ref":"#/components/schemas/paymentMethodTypes_PaymentMethodId","description":"The ID of the wallet payment method."},"entityId":{"$ref":"#/components/schemas/entityTypes_EntityId","description":"The ID of the entity that this wallet belongs to."},"availableBalance":{"$ref":"#/components/schemas/paymentMethodTypes_WalletBalance","description":"The available balance in this wallet."},"pendingBalance":{"$ref":"#/components/schemas/paymentMethodTypes_WalletBalance","description":"The pending balance in this wallet."}},"required":["paymentMethodId","entityId","availableBalance","pendingBalance"],"title":"WalletBalanceResponse"},"entityTypes_FindEntityUserResponse":{"type":"object","properties":{"count":{"type":"integer","description":"Total number of users for the given filters. This value is not limited by the limit parameter. It is provided so that you can determine how many pages of results are available."},"hasMore":{"type":"boolean","description":"True if there are more users available for the given filters."},"data":{"type":"array","items":{"$ref":"#/components/schemas/entityTypes_EntityUserResponse"}}},"required":["count","hasMore","data"],"title":"FindEntityUserResponse"},"entityTypes_EntityUserRequest":{"type":"object","properties":{"foreignId":{"type":"string","description":"The ID used to identify this user in your system."},"email":{"type":"string"},"name":{"type":"string"},"roles":{"type":"array","items":{"type":"string"},"description":"List of roles. A role can be any string. For example: \"payer\", \"approver\", \"viewer\""}},"title":"EntityUserRequest"},"entityTypes_NotificationType":{"type":"string","enum":["INVOICE_APPROVAL_NEEDED","INVOICE_APPROVED","INVOICE_REJECTED","INVOICE_SCHEDULED","INVOICE_PENDING","INVOICE_PAID","INVOICE_CANCELED","INVOICE_CREATED","INVOICE_EMAILED","INVOICE_FAILED","COUNTERPARTY_ONBOARDING_COMPLETED"],"title":"NotificationType"},"entityTypes_UserNotificationPolicyResponse":{"type":"object","properties":{"disabled":{"type":"boolean","description":"True if the selected notification type is disabled for this user"},"digest":{"type":"boolean","description":"True if the selected notification type is sent as a digest."},"immediate":{"type":"boolean","description":"True if the selected notification type is sent immediately."},"type":{"$ref":"#/components/schemas/entityTypes_NotificationType"}},"required":["disabled","digest","immediate","type"],"title":"UserNotificationPolicyResponse"},"entityTypes_UserNotificationPolicyRequest":{"type":"object","properties":{"disabled":{"type":"boolean","description":"Set to true if the selected notification type should be disabled for this user"},"digest":{"type":"boolean","description":"Set to true if the selected notification type should be sent as a digest. Default is false."},"immediate":{"type":"boolean","description":"Set to true if the selected notification type should be sent immediately. Default is true."}},"title":"UserNotificationPolicyRequest"},"entityTypes_NotificationId":{"type":"string","title":"NotificationId"},"entityTypes_NotificationStatus":{"type":"string","enum":["PENDING","SENT","READ","FAILED"],"title":"NotificationStatus"},"entityTypes_NotificationResponse":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/entityTypes_NotificationId"},"invoiceId":{"$ref":"#/components/schemas/invoiceTypes_InvoiceId","description":"The invoice ID that this notification is related to. This field is only present for notifications related to invoices."},"type":{"$ref":"#/components/schemas/entityTypes_NotificationType"},"status":{"$ref":"#/components/schemas/entityTypes_NotificationStatus"},"createdAt":{"type":"string","format":"date-time"}},"required":["id","type","status","createdAt"],"title":"NotificationResponse"},"entityTypes_FindNotificationResponse":{"type":"object","properties":{"count":{"type":"integer","description":"Total number of notifications for the given start and end date filters. This value is not limited by the limit parameter. It is provided so that you can determine how many pages of results are available."},"hasMore":{"type":"boolean","description":"True if there are more notifications available for the given start and end date filters."},"data":{"type":"array","items":{"$ref":"#/components/schemas/entityTypes_NotificationResponse"}}},"required":["count","hasMore","data"],"title":"FindNotificationResponse"},"entityTypes_NotificationUpdateRequest":{"type":"object","properties":{"status":{"$ref":"#/components/schemas/entityTypes_NotificationStatus"}},"title":"NotificationUpdateRequest"},"entityTypes_ApprovalPolicyRequest":{"type":"object","properties":{"trigger":{"type":"array","items":{"$ref":"#/components/schemas/entityTypes_Trigger"},"description":"List of triggers that will cause this policy to be evaluated. If no triggers are provided, the policy will be evaluated for all invoices."},"rule":{"$ref":"#/components/schemas/entityTypes_Rule"},"upstreamPolicyId":{"$ref":"#/components/schemas/entityTypes_ApprovalPolicyId","description":"The policy ID of the previous approval policy in the chain of policies. Use 'root' if no upstreamPolicyId is intended to be set."}},"required":["trigger","rule","upstreamPolicyId"],"title":"ApprovalPolicyRequest"},"entityTypes_ApprovalPolicyUpdateRequest":{"type":"object","properties":{"trigger":{"type":"array","items":{"$ref":"#/components/schemas/entityTypes_Trigger"}},"rule":{"$ref":"#/components/schemas/entityTypes_Rule"},"upstreamPolicyId":{"$ref":"#/components/schemas/entityTypes_ApprovalPolicyId"}},"title":"ApprovalPolicyUpdateRequest"},"entityTypes_ApprovalPolicyHistoryResponse":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the approval policy history"},"policies":{"type":"array","items":{"$ref":"#/components/schemas/entityTypes_ApprovalPolicyResponse"}},"userId":{"$ref":"#/components/schemas/entityTypes_EntityUserId","description":"The user ID of the user who edited the approval policy"},"createdAt":{"type":"string","format":"date-time"}},"required":["id","policies","userId","createdAt"],"title":"ApprovalPolicyHistoryResponse"},"invoiceTypes_BnplLoanStatus":{"type":"string","enum":["PENDING","ACTIVE","PAID_OFF","DELINQUENT"],"title":"BnplLoanStatus"},"invoiceTypes_BnplOutstandingBalance":{"type":"object","properties":{"principalBalance":{"type":"integer","description":"Outstanding principal balance in cents"},"feeBalance":{"type":"integer","description":"Outstanding fee balance in cents"},"totalBalance":{"type":"integer","description":"Total outstanding balance in cents"},"lateFeeBalance":{"type":"integer","description":"Outstanding late fee balance in cents"}},"required":["principalBalance","feeBalance","totalBalance","lateFeeBalance"],"title":"BnplOutstandingBalance"},"invoiceTypes_BnplInstallmentType":{"type":"string","enum":["DOWN_PAYMENT","REGULAR"],"title":"BnplInstallmentType"},"invoiceTypes_BnplInstallmentTotalPaid":{"type":"object","properties":{"principalBalance":{"type":"integer","description":"Total principal paid in cents"},"dueInterest":{"type":"integer","description":"Total interest paid in cents"},"totalLateFees":{"type":"integer","description":"Total late fees paid in cents"},"feeAmount":{"type":"integer","description":"Total fees paid in cents"}},"required":["principalBalance","dueInterest","totalLateFees","feeAmount"],"title":"BnplInstallmentTotalPaid"},"invoiceTypes_BnplLoanInstallment":{"type":"object","properties":{"number":{"type":"integer","description":"Installment number (0 for down payment)"},"startDate":{"type":"integer","description":"Start date as timestamp in milliseconds"},"dueDate":{"type":"integer","description":"Due date as timestamp in milliseconds"},"maturityDate":{"type":"integer","description":"Maturity date as timestamp in milliseconds"},"outstandingBalance":{"type":"integer","description":"Outstanding balance for this installment in cents"},"amount":{"type":"integer","description":"Total amount for this installment in cents"},"status":{"$ref":"#/components/schemas/invoiceTypes_BnplLoanStatus","description":"Status of this installment"},"type":{"$ref":"#/components/schemas/invoiceTypes_BnplInstallmentType","description":"Type of installment"},"totalPaid":{"$ref":"#/components/schemas/invoiceTypes_BnplInstallmentTotalPaid","description":"Total amounts paid for this installment"}},"required":["number","startDate","dueDate","maturityDate","outstandingBalance","amount","status","type","totalPaid"],"title":"BnplLoanInstallment"},"invoiceTypes_BnplCadence":{"type":"string","enum":["WEEKLY","BIWEEKLY","MONTHLY"],"title":"BnplCadence"},"invoiceTypes_BnplLoanResponse":{"type":"object","properties":{"loanId":{"type":"string","description":"The unique identifier for the loan"},"businessExternalId":{"type":"string","description":"The external ID of the business entity"},"dueDate":{"type":"integer","description":"The final due date as timestamp in milliseconds"},"originalPrincipalBalance":{"type":"integer","description":"The original principal balance in cents"},"drawDate":{"type":"integer","description":"The date the loan was drawn as timestamp in milliseconds"},"repaidAmount":{"type":"integer","description":"The total amount repaid in cents"},"paymentMethodId":{"type":"string","description":"The ID of the payment method used"},"repaymentMethodId":{"type":"string","description":"The ID of the repayment method"},"status":{"$ref":"#/components/schemas/invoiceTypes_BnplLoanStatus","description":"The current status of the loan"},"outstandingBalance":{"$ref":"#/components/schemas/invoiceTypes_BnplOutstandingBalance","description":"The current outstanding balance breakdown"},"termsAgreementFile":{"type":"string","description":"URL to the terms agreement file"},"invoiceUrl":{"type":"string","description":"URL to the invoice PDF"},"invoiceAmount":{"type":"integer","description":"The original invoice amount in cents"},"invoiceExternalId":{"type":"string","description":"The external ID of the associated invoice"},"invoiceDueDate":{"type":"integer","description":"The original invoice due date as timestamp in milliseconds"},"downPaymentAmount":{"type":"integer","description":"The down payment amount in cents"},"installments":{"type":"array","items":{"$ref":"#/components/schemas/invoiceTypes_BnplLoanInstallment"},"description":"List of all installments for this loan"},"cadence":{"$ref":"#/components/schemas/invoiceTypes_BnplCadence","description":"The payment cadence for the loan"},"baseFeeRate":{"type":"number","format":"double","description":"The base fee rate as a percentage"}},"required":["loanId","businessExternalId","dueDate","originalPrincipalBalance","drawDate","repaidAmount","paymentMethodId","repaymentMethodId","status","outstandingBalance","invoiceAmount","invoiceExternalId","invoiceDueDate","downPaymentAmount","installments","cadence","baseFeeRate"],"title":"BnplLoanResponse"},"entityTypes_BulkConnectedEntity":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/entityTypes_EntityId","description":"The ID of the entity to connect to."},"linkCreatedAsPayor":{"type":"boolean","description":"If true, the created entities will be linked to the connected entity as a payor (customer)."},"linkCreatedAsPayee":{"type":"boolean","description":"If true, the created entities will be linked to the connected entity as a payee (vendor)."}},"required":["id","linkCreatedAsPayor","linkCreatedAsPayee"],"title":"BulkConnectedEntity"},"entityTypes_BulkEntityCreationFromObject":{"type":"object","properties":{"connectedEntity":{"$ref":"#/components/schemas/entityTypes_BulkConnectedEntity"},"entities":{"type":"array","items":{"$ref":"#/components/schemas/entityTypes_EntityCreationRequest"}}},"required":["entities"],"title":"BulkEntityCreationFromObject"},"entityTypes_BulkEntityCreationRequest":{"oneOf":[{"$ref":"#/components/schemas/entityTypes_BulkEntityCreationFromObject"}],"title":"BulkEntityCreationRequest"},"entityTypes_BulkEntityCreationFromObjectResponse":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the entity that was created. If the entity was not created, this will be undefined"},"foreignId":{"type":"string","description":"If provided, this is the foreign ID of the entity that was created."},"error":{"type":"string","description":"The error message if the entity was not created"}},"title":"BulkEntityCreationFromObjectResponse"},"entityTypes_BulkEntityCreationResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/entityTypes_BulkEntityCreationFromObjectResponse"}}},"required":["data"],"title":"BulkEntityCreationResponse"},"customizationTypes_MetadataCustomizationRequest":{"type":"object","properties":{"key":{"type":"string","description":"The key of the metadata field. This must be defined at the organization level, otherwise an error will be returned."},"disabled":{"type":"boolean","description":"If true, this field will not be available to the entity."}},"required":["key","disabled"],"title":"MetadataCustomizationRequest"},"customizationTypes_OriginatingCompanyNameOptions":{"type":"string","enum":["ENTITY_NAME","BANK_NAME"],"title":"OriginatingCompanyNameOptions"},"customizationTypes_PaymentMethodCustomizationRequest":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["bankAccount"],"description":"Discriminator value: bankAccount"},"disabled":{"type":"boolean","description":"If true, this method will will not be available to the entity."},"defaultDeliveryMethod":{"$ref":"#/components/schemas/invoiceTypes_BankDeliveryMethod","description":"The default delivery method for this payment method."},"availableDeliveryMethods":{"type":"array","items":{"$ref":"#/components/schemas/invoiceTypes_BankDeliveryMethod"},"description":"The delivery methods that are available for this payment method."},"originatingCompanyName":{"$ref":"#/components/schemas/customizationTypes_OriginatingCompanyNameOptions","description":"The originating company name for this payment method. If not set, the entity name will be used."}},"required":["type","disabled"]},{"type":"object","properties":{"type":{"type":"string","enum":["card"],"description":"Discriminator value: card"},"disabled":{"type":"boolean","description":"If true, this method will will not be available to the entity."}},"required":["type","disabled"]},{"type":"object","properties":{"type":{"type":"string","enum":["virtualCard"],"description":"Discriminator value: virtualCard"},"disabled":{"type":"boolean","description":"If true, this method will will not be available to the entity."}},"required":["type","disabled"]},{"type":"object","properties":{"type":{"type":"string","enum":["check"],"description":"Discriminator value: check"},"disabled":{"type":"boolean","description":"If true, this method will will not be available to the entity."},"defaultDeliveryMethod":{"$ref":"#/components/schemas/invoiceTypes_CheckDeliveryMethod","description":"The default delivery method for this payment method."},"availableDeliveryMethods":{"type":"array","items":{"$ref":"#/components/schemas/invoiceTypes_CheckDeliveryMethod"},"description":"The delivery methods that are available for this payment method."},"printDescription":{"type":"boolean","description":"If true, the check will be printed with the description."}},"required":["type","disabled"]},{"type":"object","properties":{"type":{"type":"string","enum":["custom"],"description":"Discriminator value: custom"},"disabled":{"type":"boolean","description":"If true, this method will will not be available to the entity."},"schemaId":{"type":"string","description":"The ID of the schema to use for this payment method."}},"required":["type","disabled","schemaId"]},{"type":"object","properties":{"type":{"type":"string","enum":["bnpl"],"description":"Discriminator value: bnpl"},"disabled":{"type":"boolean","description":"If true, this method will will not be available to the entity."}},"required":["type","disabled"]},{"type":"object","properties":{"type":{"type":"string","enum":["offPlatform"],"description":"Discriminator value: offPlatform"},"disabled":{"type":"boolean","description":"If true, this method will will not be available to the entity."}},"required":["type","disabled"]},{"type":"object","properties":{"type":{"type":"string","enum":["utility"],"description":"Discriminator value: utility"},"disabled":{"type":"boolean","description":"If true, this method will will not be available to the entity."}},"required":["type","disabled"]},{"type":"object","properties":{"type":{"type":"string","enum":["na"],"description":"Discriminator value: na"},"disabled":{"type":"boolean","description":"If true, this method will will not be available to the entity."}},"required":["type","disabled"]},{"type":"object","properties":{"type":{"type":"string","enum":["wallet"],"description":"Discriminator value: wallet"},"disabled":{"type":"boolean","description":"If true, this method will will not be available to the entity."}},"required":["type","disabled"]}],"discriminator":{"propertyName":"type"},"title":"PaymentMethodCustomizationRequest"},"customizationTypes_OcrCustomizationResponse":{"type":"object","properties":{"lineItems":{"type":"boolean","description":"Extract line items from the invoice. Defaults to true."},"collapseLineItems":{"type":"boolean","description":"If true, the line items will be collapsed into a single line item. Defaults to false."},"invoiceMetadata":{"type":"boolean","description":"Pull custom metadata at the invoice level. Defaults to true."},"lineItemMetadata":{"type":"boolean","description":"Pull custom metadata at the line item level. Defaults to true."},"lineItemGlAccountId":{"type":"boolean","description":"Pull GL Account ID at the line item level. Defaults to true."},"predictMetadata":{"type":"boolean","description":"Use AI to predict metadata from historical data. Defaults to true."},"taxAndShippingAsLineItems":{"type":"boolean","description":"Pull tax and shipping information as line items. Defaults to true. If false, tax and shipping will extracted as invoice level fields."},"splitDocuments":{"type":"boolean","description":"Use AI to intelligently split documents into multiple subdocuments. Defaults to false."}},"required":["lineItems","collapseLineItems","invoiceMetadata","lineItemMetadata","lineItemGlAccountId","predictMetadata","taxAndShippingAsLineItems","splitDocuments"],"title":"OcrCustomizationResponse"},"customizationTypes_NotificationCustomizationRequest":{"type":"object","properties":{"assumeRole":{"type":"string","description":"If set, notifications to this role will be sent to the email address of the entity. Set as empty string to disable."}},"title":"NotificationCustomizationRequest"},"customizationTypes_WorkflowCustomizationRequest":{"type":"object","properties":{"autoAdvanceInvoiceStatus":{"type":"boolean","description":"If true, the invoice will be automatically advanced to the furthest stage in the payment workflow. For example, if the invoice is APPROVED, but has all necessary data to move to SCHEDULED, it will be advanced to SCHEDULED."}},"title":"WorkflowCustomizationRequest"},"customizationTypes_InvoiceCustomizationResponse":{"type":"object","properties":{"hideAddress":{"type":"boolean","description":"If true, the address information will be hidden from generated invoice PDFs. Defaults to false."},"hideQrCode":{"type":"boolean","description":"If true, the QR code will be hidden from generated invoice PDFs. Defaults to false."},"hideBankDetails":{"type":"boolean","description":"If true, the bank account details will be hidden from generated invoice PDFs. Defaults to false."},"hidePaymentLink":{"type":"boolean","description":"If true, the payment link will be hidden from generated invoice PDFs. Defaults to false."}},"required":["hideAddress","hideQrCode","hideBankDetails","hidePaymentLink"],"title":"InvoiceCustomizationResponse"},"customizationTypes_PaymentMethodFee":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["percentage"],"description":"Discriminator value: percentage"},"amount":{"type":"number","format":"double","description":"The percentage of the payment amount that will be charged as a fee. For example, if the fee is 2.5%, set this to 2.5."}},"required":["type","amount"]},{"type":"object","properties":{"type":{"type":"string","enum":["flat"],"description":"Discriminator value: flat"},"amount":{"type":"number","format":"double","description":"The flat amount that will be charged as a fee. For example, if the fee is $2.50, set this to 2.5."}},"required":["type","amount"]},{"type":"object","properties":{"type":{"type":"string","enum":["default"],"description":"Discriminator value: default"}},"required":["type"],"description":"The default fee for the payment method based on your organization's default fee."}],"discriminator":{"propertyName":"type"},"title":"PaymentMethodFee"},"customizationTypes_FeeCustomizationRailRequest":{"type":"object","properties":{"ACH_STANDARD":{"$ref":"#/components/schemas/customizationTypes_PaymentMethodFee","description":"The fee for the ACH standard rail."},"ACH_SAME_DAY":{"$ref":"#/components/schemas/customizationTypes_PaymentMethodFee","description":"The fee for the ACH same day rail."},"CHECK_PRINT":{"$ref":"#/components/schemas/customizationTypes_PaymentMethodFee","description":"The fee for the check print rail."},"CHECK_MAIL":{"$ref":"#/components/schemas/customizationTypes_PaymentMethodFee","description":"The fee for the check mail rail."},"CHECK_MAIL_PRIORITY":{"$ref":"#/components/schemas/customizationTypes_PaymentMethodFee","description":"The fee for the check mail priority rail."},"CHECK_MAIL_UPS_NEXT_DAY":{"$ref":"#/components/schemas/customizationTypes_PaymentMethodFee","description":"The fee for the check mail UPS next day rail."}},"title":"FeeCustomizationRailRequest"},"customizationTypes_FeeCustomizationDetailRequest":{"type":"object","properties":{"source":{"$ref":"#/components/schemas/customizationTypes_FeeCustomizationRailRequest","description":"Fees to be applied to the source of the transaction."},"destination":{"$ref":"#/components/schemas/customizationTypes_FeeCustomizationRailRequest","description":"Fees to be applied to the destination of the transaction."}},"title":"FeeCustomizationDetailRequest"},"customizationTypes_FeeCustomizationRequest":{"type":"object","properties":{"payable":{"$ref":"#/components/schemas/customizationTypes_FeeCustomizationDetailRequest","description":"When the entity creating the invoice is the payer, these fees will be applied to the transaction."},"receivable":{"$ref":"#/components/schemas/customizationTypes_FeeCustomizationDetailRequest","description":"When the entity creating the invoice is the payee, these fees will be applied to the transaction."}},"title":"FeeCustomizationRequest"},"organizationTypes_Permission":{"type":"string","enum":["invoice.all","invoice.view.all","invoice.view.draft","invoice.view.new","invoice.view.approved","invoice.view.scheduled","invoice.view.pending","invoice.view.paid","invoice.view.archived","invoice.view.refused","invoice.view.canceled","invoice.view.failed","invoice.create.all","invoice.create.draft","invoice.create.new","invoice.create.approved","invoice.create.scheduled","invoice.create.archived","invoice.create.cancel","invoice.update.all","invoice.update.draft","invoice.update.new","invoice.update.approved","invoice.update.scheduled","invoice.update.archived","invoice.update.cancel","invoice.delete","invoice.comment.view","invoice.comment.create","invoice.approver.override","invoice.check.print","paymentMethod.all","paymentMethod.view","paymentMethod.create","paymentMethod.update","paymentMethod.delete"],"title":"Permission"},"organizationTypes_RolePermissionRequest":{"type":"object","additionalProperties":{"type":"array","items":{"$ref":"#/components/schemas/organizationTypes_Permission"}},"title":"RolePermissionRequest"},"entityTypes_EntityCustomizationResponse":{"type":"object","properties":{"metadata":{"type":"array","items":{"$ref":"#/components/schemas/customizationTypes_MetadataCustomizationRequest"}},"paymentSource":{"type":"array","items":{"$ref":"#/components/schemas/customizationTypes_PaymentMethodCustomizationRequest"}},"backupDisbursement":{"type":"array","items":{"$ref":"#/components/schemas/customizationTypes_PaymentMethodCustomizationRequest"}},"paymentDestination":{"type":"array","items":{"$ref":"#/components/schemas/customizationTypes_PaymentMethodCustomizationRequest"}},"ocr":{"$ref":"#/components/schemas/customizationTypes_OcrCustomizationResponse"},"notifications":{"$ref":"#/components/schemas/customizationTypes_NotificationCustomizationRequest"},"workflow":{"$ref":"#/components/schemas/customizationTypes_WorkflowCustomizationRequest"},"invoice":{"$ref":"#/components/schemas/customizationTypes_InvoiceCustomizationResponse"},"fees":{"$ref":"#/components/schemas/customizationTypes_FeeCustomizationRequest"},"rolePermissions":{"$ref":"#/components/schemas/organizationTypes_RolePermissionRequest"}},"required":["metadata","paymentSource","backupDisbursement","paymentDestination","ocr","notifications","workflow","invoice","fees","rolePermissions"],"title":"EntityCustomizationResponse"},"customizationTypes_OcrCustomizationRequest":{"type":"object","properties":{"lineItems":{"type":"boolean","description":"Extract line items from the invoice. Defaults to true."},"collapseLineItems":{"type":"boolean","description":"If true, the line items will be collapsed into a single line item. Defaults to false."},"invoiceMetadata":{"type":"boolean","description":"Pull custom metadata at the invoice level. Defaults to true."},"lineItemMetadata":{"type":"boolean","description":"Pull custom metadata at the line item level. Defaults to true."},"lineItemGlAccountId":{"type":"boolean","description":"Pull GL Account ID at the line item level. Defaults to true."},"predictMetadata":{"type":"boolean","description":"Use AI to predict metadata from historical data. Defaults to true."},"taxAndShippingAsLineItems":{"type":"boolean","description":"Pull tax and shipping information as line items. Defaults to true. If false, tax and shipping will extracted as invoice level fields."},"splitDocuments":{"type":"boolean","description":"Use AI to intelligently split documents into multiple subdocuments. Defaults to false."}},"title":"OcrCustomizationRequest"},"customizationTypes_InvoiceCustomizationRequest":{"type":"object","properties":{"hideAddress":{"type":"boolean","description":"If true, the address information will be hidden from generated invoice PDFs. Defaults to false."},"hideQrCode":{"type":"boolean","description":"If true, the QR code will be hidden from generated invoice PDFs. Defaults to false."},"hideBankDetails":{"type":"boolean","description":"If true, the bank account details will be hidden from generated invoice PDFs. Defaults to false."},"hidePaymentLink":{"type":"boolean","description":"If true, the payment link will be hidden from generated invoice PDFs. Defaults to false."}},"title":"InvoiceCustomizationRequest"},"entityTypes_EntityCustomizationRequest":{"type":"object","properties":{"metadata":{"type":"array","items":{"$ref":"#/components/schemas/customizationTypes_MetadataCustomizationRequest"}},"paymentSource":{"type":"array","items":{"$ref":"#/components/schemas/customizationTypes_PaymentMethodCustomizationRequest"}},"backupDisbursement":{"type":"array","items":{"$ref":"#/components/schemas/customizationTypes_PaymentMethodCustomizationRequest"}},"paymentDestination":{"type":"array","items":{"$ref":"#/components/schemas/customizationTypes_PaymentMethodCustomizationRequest"}},"ocr":{"$ref":"#/components/schemas/customizationTypes_OcrCustomizationRequest"},"notifications":{"$ref":"#/components/schemas/customizationTypes_NotificationCustomizationRequest"},"workflow":{"$ref":"#/components/schemas/customizationTypes_WorkflowCustomizationRequest"},"invoice":{"$ref":"#/components/schemas/customizationTypes_InvoiceCustomizationRequest"},"fees":{"$ref":"#/components/schemas/customizationTypes_FeeCustomizationRequest"},"rolePermissions":{"$ref":"#/components/schemas/organizationTypes_RolePermissionRequest"}},"title":"EntityCustomizationRequest"},"commons_DocumentType":{"type":"string","enum":["INVOICE","PAYMENT_CONFIRMATION","TEN_NINETY_NINE","W9","CHECK","BANK_STATEMENT","CONTRACT","OTHER"],"title":"DocumentType"},"commons_DocumentResponse":{"type":"object","properties":{"id":{"type":"string","description":"ID of the document. If not provided, this is a dynamic document that is generated on the fly."},"mimeType":{"type":"string"},"type":{"$ref":"#/components/schemas/commons_DocumentType"},"uri":{"type":"string"}},"required":["mimeType","type","uri"],"title":"DocumentResponse"},"entityTypes_EmailTemplateId":{"type":"string","title":"EmailTemplateId"},"entityTypes_EmailTemplateType":{"type":"string","enum":["PAYMENT","DISBURSEMENT"],"title":"EmailTemplateType"},"entityTypes_EmailTemplateResponse":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/entityTypes_EmailTemplateId"},"entityId":{"$ref":"#/components/schemas/entityTypes_EntityId","description":"The ID of the entity that this email template is associated with."},"templateType":{"$ref":"#/components/schemas/entityTypes_EmailTemplateType"},"name":{"type":"string","description":"The name of the email template."},"subject":{"type":"string","description":"The subject of the email template."},"content":{"type":"string","description":"The HTML content of the email template."},"isDefault":{"type":"boolean","description":"True if this email template is the default template for new invoices."}},"required":["id","entityId","templateType","name","subject","content","isDefault"],"title":"EmailTemplateResponse"},"entityTypes_EmailTemplateRequest":{"type":"object","properties":{"templateType":{"$ref":"#/components/schemas/entityTypes_EmailTemplateType"},"name":{"type":"string","description":"The name of the email template."},"subject":{"type":"string","description":"The subject of the email template."},"content":{"type":"string","description":"The HTML content of the email template."},"isDefault":{"type":"boolean","description":"If true, this email template will be used as the default template for new invoices."}},"required":["templateType","name","subject","content"],"title":"EmailTemplateRequest"},"entity_externalAccountingSystem_externalAccountingSystemCompanyResponse":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["codat"],"description":"Discriminator value: codat"},"companyId":{"type":"string"}},"required":["type","companyId"]},{"type":"object","properties":{"type":{"type":"string","enum":["rutter"],"description":"Discriminator value: rutter"},"accessToken":{"type":"string"}},"required":["type","accessToken"]},{"type":"object","properties":{"type":{"type":"string","enum":["none"],"description":"Discriminator value: none"},"companyId":{"type":"string"}},"required":["type","companyId"]}],"discriminator":{"propertyName":"type"},"title":"externalAccountingSystemCompanyResponse"},"entity_externalAccountingSystem_externalAccountingSystemCompanyCreationRequest":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["codat"],"description":"Discriminator value: codat"},"companyId":{"type":"string","description":"If the company already exists in Codat, provide the company ID to link the company to the entity. If the company does not exist, leave this field blank and Codat will create a new company."}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["rutter"],"description":"Discriminator value: rutter"},"accessToken":{"type":"string","description":"The access token for the existing Rutter connection. If the connection does not exist, leave this field blank and Rutter will create a new connection."}},"required":["type"]}],"discriminator":{"propertyName":"type"},"title":"externalAccountingSystemCompanyCreationRequest"},"entity_externalAccountingSystem_syncType":{"type":"string","enum":["none","push","pull","both"],"title":"syncType"},"entityTypes_EntityMetadataResponse":{"type":"object","properties":{"key":{"type":"string"},"value":{"type":"array","items":{"type":"string"}}},"required":["key","value"],"title":"EntityMetadataResponse"},"entityTypes_NotificationPolicyResponse":{"type":"object","properties":{"disabled":{"type":"boolean","description":"True if the selected notification type is disabled for this entity"},"additionalRoles":{"type":"array","items":{"type":"string"},"description":"List of user roles that should receive notifications in addition to the default users for this notification type"},"additionalUsers":{"type":"array","items":{"$ref":"#/components/schemas/entityTypes_EntityUserId"},"description":"List of user IDs that should receive notifications in addition to the default users for this notification type"},"notifyPayeeCounterparty":{"type":"boolean","description":"True if the selected notification type should be sent to the counterparty if this is a payable invoice."},"notifyPayorCounterparty":{"type":"boolean","description":"True if the selected notification type should be sent to the counterparty if this is a receivable invoice."},"type":{"$ref":"#/components/schemas/entityTypes_NotificationType"}},"required":["disabled","additionalRoles","additionalUsers","notifyPayeeCounterparty","notifyPayorCounterparty","type"],"title":"NotificationPolicyResponse"},"entityTypes_NotificationPolicyRequest":{"type":"object","properties":{"disabled":{"type":"boolean","description":"Set to true if the selected notification type should be disabled for this entity"},"additionalRoles":{"type":"array","items":{"type":"string"},"description":"List of user roles that should receive notifications in addition to the default users for this notification type"},"additionalUsers":{"type":"array","items":{"$ref":"#/components/schemas/entityTypes_EntityUserId"},"description":"List of user IDs that should receive notifications in addition to the default users for this notification type"},"notifyPayeeCounterparty":{"type":"boolean","description":"Set to true if the selected notification type should be sent to the counterparty if this is a payable invoice."},"notifyPayorCounterparty":{"type":"boolean","description":"Set to true if the selected notification type should be sent to the counterparty if this is a receivable invoice."}},"title":"NotificationPolicyRequest"},"entityTypes_RepresentativeId":{"type":"string","title":"RepresentativeId"},"entityTypes_Responsibilities":{"type":"object","properties":{"jobTitle":{"type":"string"},"isController":{"type":"boolean","description":"Indicates whether this individual has significant management responsibilities within the business"},"isOwner":{"type":"boolean","description":"Indicates whether this individual has an ownership stake of at least 25% in the business"},"ownershipPercentage":{"type":"integer","description":"Percentage of ownership in the business. Must be between 0 and 100."}},"title":"Responsibilities"},"entityTypes_RepresentativeResponse":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/entityTypes_RepresentativeId"},"name":{"$ref":"#/components/schemas/commons_FullName"},"phone":{"$ref":"#/components/schemas/commons_PhoneNumber"},"email":{"type":"string"},"address":{"$ref":"#/components/schemas/commons_Address"},"birthDateProvided":{"type":"boolean"},"governmentIDProvided":{"type":"boolean"},"responsibilities":{"$ref":"#/components/schemas/entityTypes_Responsibilities"},"createdOn":{"type":"string","format":"date-time"},"updatedOn":{"type":"string","format":"date-time"},"disabledOn":{"type":"string","format":"date-time"}},"required":["id","name","address","birthDateProvided","governmentIDProvided","responsibilities","createdOn","updatedOn"],"title":"RepresentativeResponse"},"entityTypes_RepresentativeRequest":{"type":"object","properties":{"name":{"$ref":"#/components/schemas/commons_FullName"},"phone":{"$ref":"#/components/schemas/commons_PhoneNumber","description":"Either phone or email is required."},"email":{"type":"string","description":"Either phone or email is required."},"address":{"$ref":"#/components/schemas/commons_Address"},"birthDate":{"$ref":"#/components/schemas/commons_BirthDate"},"governmentID":{"$ref":"#/components/schemas/commons_IndividualGovernmentID"},"responsibilities":{"$ref":"#/components/schemas/entityTypes_Responsibilities"}},"required":["name","address","birthDate","governmentID","responsibilities"],"title":"RepresentativeRequest"},"entityTypes_RepresentativeUpdateRequest":{"type":"object","properties":{"name":{"$ref":"#/components/schemas/commons_FullName"},"phone":{"$ref":"#/components/schemas/commons_PhoneNumber"},"email":{"type":"string"},"address":{"$ref":"#/components/schemas/commons_Address"},"birthDate":{"$ref":"#/components/schemas/commons_BirthDate"},"governmentID":{"$ref":"#/components/schemas/commons_IndividualGovernmentID"},"responsibilities":{"$ref":"#/components/schemas/entityTypes_Responsibilities"}},"title":"RepresentativeUpdateRequest"},"invoiceTypes_InvoiceTemplateResponse":{"type":"object","properties":{"status":{"$ref":"#/components/schemas/invoiceTypes_InvoiceStatus"},"amount":{"type":"number","format":"double","description":"Total amount of invoice in major units"},"currency":{"$ref":"#/components/schemas/paymentMethodTypes_CurrencyCode","description":"Currency code for the amount. Defaults to USD."},"invoiceDate":{"type":"string","format":"date-time","description":"Date the invoice was issued."},"deductionDate":{"type":"string","format":"date-time","description":"Initial date when funds are scheduled to be deducted from payer's account. The actual deduction date may differ from this date, and will be reflected in the processedAt field."},"nextDeductionDate":{"type":"string","format":"date-time","description":"For invoice templates, this is the date when the next recurring payment will be scheduled."},"dueDate":{"type":"string","format":"date-time","description":"Due date of invoice."},"invoiceNumber":{"type":"string"},"noteToSelf":{"type":"string"},"serviceStartDate":{"type":"string","format":"date-time"},"serviceEndDate":{"type":"string","format":"date-time"},"netTerms":{"type":"integer","description":"Net terms in days. Must be a positive number."},"payerId":{"$ref":"#/components/schemas/entityTypes_EntityId"},"payer":{"$ref":"#/components/schemas/entityTypes_CounterpartyResponse"},"paymentSource":{"$ref":"#/components/schemas/paymentMethodTypes_PaymentMethodResponse"},"paymentSourceId":{"$ref":"#/components/schemas/paymentMethodTypes_PaymentMethodId"},"paymentSourceOptions":{"$ref":"#/components/schemas/invoiceTypes_PaymentSourceOptions"},"vendorId":{"$ref":"#/components/schemas/entityTypes_EntityId"},"vendor":{"$ref":"#/components/schemas/entityTypes_CounterpartyResponse"},"paymentDestination":{"$ref":"#/components/schemas/paymentMethodTypes_PaymentMethodResponse"},"paymentDestinationId":{"$ref":"#/components/schemas/paymentMethodTypes_PaymentMethodId"},"paymentDestinationOptions":{"$ref":"#/components/schemas/invoiceTypes_PaymentDestinationOptions"},"paymentTiming":{"$ref":"#/components/schemas/calculate_CalculatePaymentTimingResponse"},"paymentDestinationConfirmed":{"type":"boolean","description":"True if the payment destination has been confirmed by the vendor. False if the payment destination has been set (for example, a check to an address) but has not been confirmed by the vendor."},"batchPayment":{"type":"boolean","description":"If true, this invoice will be paid as a batch payment. Batches are automatically determined by Mercoa based on the payment source, destination, and scheduled payment date."},"hasDocuments":{"type":"boolean","description":"True if the invoice has documents attached."},"hasSourceEmail":{"type":"boolean","description":"True if the invoice was created by an incoming email."},"lineItems":{"type":"array","items":{"$ref":"#/components/schemas/invoiceTypes_InvoiceLineItemResponse"}},"taxAmount":{"type":"number","format":"double","description":"Tax amount for this invoice."},"shippingAmount":{"type":"number","format":"double","description":"Shipping amount for this invoice."},"approvers":{"type":"array","items":{"$ref":"#/components/schemas/invoiceTypes_ApprovalSlot"}},"approvalPolicy":{"type":"array","items":{"$ref":"#/components/schemas/entityTypes_ApprovalPolicyResponse"}},"metadata":{"type":"object","additionalProperties":{"type":"string"},"description":"Metadata associated with this invoice."},"creatorEntityId":{"$ref":"#/components/schemas/entityTypes_EntityId","description":"The ID of the entity who created this invoice."},"entityGroupId":{"$ref":"#/components/schemas/entityGroupTypes_EntityGroupId","description":"The ID of the entity group that created this invoice."},"entityGroupForeignId":{"type":"string","description":"The foreign ID of the entity group that created this invoice."},"creatorUser":{"$ref":"#/components/schemas/entityTypes_EntityUserResponse","description":"Entity user who created this invoice."},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"comments":{"type":"array","items":{"$ref":"#/components/schemas/invoiceTypes_CommentResponse"}},"fees":{"$ref":"#/components/schemas/invoiceTypes_InvoiceFeesResponse","description":"Fees associated with this invoice."},"paymentSchedule":{"$ref":"#/components/schemas/invoiceTypes_PaymentSchedule","description":"If this is a recurring invoice, this will be the payment schedule for the invoice. If not provided, this will be a one-time invoice."},"ocrJobId":{"$ref":"#/components/schemas/ocr_OCRJobId","description":"ID of the OCR job that processed this invoice."},"recurringTemplateId":{"$ref":"#/components/schemas/invoiceTypes_InvoiceTemplateId","description":"ID of the invoice template that created this recurring invoice. Only present if the invoice was created from a recurring template."},"id":{"$ref":"#/components/schemas/invoiceTypes_InvoiceTemplateId"}},"required":["status","paymentDestinationConfirmed","hasDocuments","hasSourceEmail","approvers","approvalPolicy","metadata","createdAt","updatedAt","id"],"title":"InvoiceTemplateResponse"},"invoiceTypes_FindInvoiceTemplateResponse":{"type":"object","properties":{"count":{"type":"integer","description":"Total number of invoice templates for the given filters. This value is not limited by the limit parameter. It is provided so that you can determine how many pages of results are available."},"hasMore":{"type":"boolean","description":"True if there are more invoice templates available for the given filters."},"data":{"type":"array","items":{"$ref":"#/components/schemas/invoiceTypes_InvoiceTemplateResponse"}}},"required":["count","hasMore","data"],"title":"FindInvoiceTemplateResponse"},"invoiceTypes_ApprovalSlotAssignment":{"type":"object","properties":{"approvalSlotId":{"$ref":"#/components/schemas/invoiceTypes_ApprovalSlotId","description":"The identifier for the approval slot this user is assigned to."},"assignedUserId":{"$ref":"#/components/schemas/entityTypes_EntityUserId","description":"The ID of the user who is assigned to the approval slot. To assign all eligible users to an approval slot, use \"ANY\"."}},"required":["approvalSlotId","assignedUserId"],"title":"ApprovalSlotAssignment"},"invoiceTypes_InvoiceFeesRequest":{"type":"object","properties":{"sourcePlatformMarkupFee":{"type":"number","format":"double","description":"Fee charged to the payer (C2)."},"destinationPlatformMarkupFee":{"type":"number","format":"double","description":"Fee charged to the payee (C3)."}},"required":["sourcePlatformMarkupFee","destinationPlatformMarkupFee"],"title":"InvoiceFeesRequest"},"invoiceTypes_InvoiceLineItemCreationRequest":{"type":"object","properties":{"currency":{"$ref":"#/components/schemas/paymentMethodTypes_CurrencyCode","description":"Currency code for the amount. Defaults to USD."},"name":{"type":"string"},"quantity":{"type":"number","format":"double"},"unitPrice":{"type":"number","format":"double","description":"Unit price of the line item in major units. If the entered amount has more decimal places than the currency supports, trailing decimals will be truncated."},"category":{"type":"string","description":"Category of the line item."},"serviceStartDate":{"type":"string","format":"date-time"},"serviceEndDate":{"type":"string","format":"date-time"},"metadata":{"type":"object","additionalProperties":{"type":"string"}},"glAccountId":{"type":"string","description":"ID of general ledger account associated with this line item."},"amount":{"type":"number","format":"double","description":"Total amount of line item in major units. If the entered amount has more decimal places than the currency supports, trailing decimals will be truncated."},"description":{"type":"string"}},"title":"InvoiceLineItemCreationRequest"},"invoiceTypes_InvoiceTemplateCreationRequest":{"type":"object","properties":{"status":{"$ref":"#/components/schemas/invoiceTypes_InvoiceStatus"},"amount":{"type":"number","format":"double","description":"Total amount of invoice in major units. If the entered amount has more decimal places than the currency supports, trailing decimals will be truncated."},"currency":{"$ref":"#/components/schemas/paymentMethodTypes_CurrencyCode","description":"Currency code for the amount. Defaults to USD."},"invoiceDate":{"type":"string","format":"date-time","description":"Date the invoice was issued."},"deductionDate":{"type":"string","format":"date-time","description":"Initial date when funds are scheduled to be deducted from payer's account."},"dueDate":{"type":"string","format":"date-time","description":"Due date of invoice."},"invoiceNumber":{"type":"string"},"noteToSelf":{"type":"string","description":"Note to self or memo on invoice."},"serviceStartDate":{"type":"string","format":"date-time"},"serviceEndDate":{"type":"string","format":"date-time"},"payerId":{"$ref":"#/components/schemas/entityTypes_EntityId","description":"ID or foreign ID of the payer of this invoice."},"paymentSourceId":{"$ref":"#/components/schemas/paymentMethodTypes_PaymentMethodId","description":"ID of payment source for this invoice. If not provided, will attempt to use the default payment source for the payer when creating an invoice if a default payment source exists for the payer."},"vendorId":{"$ref":"#/components/schemas/entityTypes_EntityId","description":"ID or foreign ID of the vendor of this invoice."},"paymentDestinationId":{"$ref":"#/components/schemas/paymentMethodTypes_PaymentMethodId","description":"ID of payment destination for this invoice. If not provided, will attempt to use the default payment destination for the vendor when creating an invoice if a default payment destination exists for the vendor."},"paymentDestinationOptions":{"$ref":"#/components/schemas/invoiceTypes_PaymentDestinationOptions","description":"Options for the payment destination. Depending on the payment destination, this may include things such as check delivery method."},"approvers":{"type":"array","items":{"$ref":"#/components/schemas/invoiceTypes_ApprovalSlotAssignment"},"description":"Set approvers for this invoice."},"metadata":{"type":"object","additionalProperties":{"type":"string"},"description":"Metadata associated with this invoice."},"document":{"type":"string","description":"Base64-encoded string. Supported file types include PNG, JPG, WEBP, PDF, and all Microsoft Office formats (automatically converted to PDF). Max file size 10MB."},"creatorUserId":{"$ref":"#/components/schemas/entityTypes_EntityUserId","description":"User ID or Foreign ID of entity user who created this invoice."},"fees":{"$ref":"#/components/schemas/invoiceTypes_InvoiceFeesRequest","description":"If using a custom payment method, you can override the default fees for this invoice. If not provided, the default fees for the custom payment method will be used."},"batchPayment":{"type":"boolean","description":"If true, this invoice will be paid as a batch payment. Batches are automatically determined by Mercoa based on the payment source, destination, and scheduled payment date."},"paymentSchedule":{"$ref":"#/components/schemas/invoiceTypes_PaymentSchedule","description":"If this is a recurring invoice, this will be the payment schedule for the invoice. If not provided, this will be a one-time invoice."},"taxAmount":{"type":"number","format":"double","description":"Tax amount for this invoice."},"shippingAmount":{"type":"number","format":"double","description":"Shipping amount for this invoice."},"lineItems":{"type":"array","items":{"$ref":"#/components/schemas/invoiceTypes_InvoiceLineItemCreationRequest"}},"creatorEntityId":{"$ref":"#/components/schemas/entityTypes_EntityId","description":"ID of the entity who created this invoice template."}},"title":"InvoiceTemplateCreationRequest"},"invoiceTypes_InvoiceLineItemUpdateRequest":{"type":"object","properties":{"currency":{"$ref":"#/components/schemas/paymentMethodTypes_CurrencyCode","description":"Currency code for the amount. Defaults to USD."},"name":{"type":"string"},"quantity":{"type":"number","format":"double"},"unitPrice":{"type":"number","format":"double","description":"Unit price of the line item in major units. If the entered amount has more decimal places than the currency supports, trailing decimals will be truncated."},"category":{"type":"string","description":"Category of the line item."},"serviceStartDate":{"type":"string","format":"date-time"},"serviceEndDate":{"type":"string","format":"date-time"},"metadata":{"type":"object","additionalProperties":{"type":"string"}},"glAccountId":{"type":"string","description":"ID of general ledger account associated with this line item."},"id":{"type":"string","description":"If provided, will overwrite line item on the invoice with this ID. If not provided, will create a new line item."},"amount":{"type":"number","format":"double","description":"Total amount of line item in major units. If the entered amount has more decimal places than the currency supports, trailing decimals will be truncated."},"description":{"type":"string"}},"title":"InvoiceLineItemUpdateRequest"},"invoiceTypes_InvoiceTemplateUpdateRequest":{"type":"object","properties":{"status":{"$ref":"#/components/schemas/invoiceTypes_InvoiceStatus"},"amount":{"type":"number","format":"double","description":"Total amount of invoice in major units. If the entered amount has more decimal places than the currency supports, trailing decimals will be truncated."},"currency":{"$ref":"#/components/schemas/paymentMethodTypes_CurrencyCode","description":"Currency code for the amount. Defaults to USD."},"invoiceDate":{"type":"string","format":"date-time","description":"Date the invoice was issued."},"deductionDate":{"type":"string","format":"date-time","description":"Initial date when funds are scheduled to be deducted from payer's account."},"dueDate":{"type":"string","format":"date-time","description":"Due date of invoice."},"invoiceNumber":{"type":"string"},"noteToSelf":{"type":"string","description":"Note to self or memo on invoice."},"serviceStartDate":{"type":"string","format":"date-time"},"serviceEndDate":{"type":"string","format":"date-time"},"payerId":{"$ref":"#/components/schemas/entityTypes_EntityId","description":"ID or foreign ID of the payer of this invoice."},"paymentSourceId":{"$ref":"#/components/schemas/paymentMethodTypes_PaymentMethodId","description":"ID of payment source for this invoice. If not provided, will attempt to use the default payment source for the payer when creating an invoice if a default payment source exists for the payer."},"vendorId":{"$ref":"#/components/schemas/entityTypes_EntityId","description":"ID or foreign ID of the vendor of this invoice."},"paymentDestinationId":{"$ref":"#/components/schemas/paymentMethodTypes_PaymentMethodId","description":"ID of payment destination for this invoice. If not provided, will attempt to use the default payment destination for the vendor when creating an invoice if a default payment destination exists for the vendor."},"paymentDestinationOptions":{"$ref":"#/components/schemas/invoiceTypes_PaymentDestinationOptions","description":"Options for the payment destination. Depending on the payment destination, this may include things such as check delivery method."},"approvers":{"type":"array","items":{"$ref":"#/components/schemas/invoiceTypes_ApprovalSlotAssignment"},"description":"Set approvers for this invoice."},"metadata":{"type":"object","additionalProperties":{"type":"string"},"description":"Metadata associated with this invoice."},"document":{"type":"string","description":"Base64-encoded string. Supported file types include PNG, JPG, WEBP, PDF, and all Microsoft Office formats (automatically converted to PDF). Max file size 10MB."},"creatorUserId":{"$ref":"#/components/schemas/entityTypes_EntityUserId","description":"User ID or Foreign ID of entity user who created this invoice."},"fees":{"$ref":"#/components/schemas/invoiceTypes_InvoiceFeesRequest","description":"If using a custom payment method, you can override the default fees for this invoice. If not provided, the default fees for the custom payment method will be used."},"batchPayment":{"type":"boolean","description":"If true, this invoice will be paid as a batch payment. Batches are automatically determined by Mercoa based on the payment source, destination, and scheduled payment date."},"paymentSchedule":{"$ref":"#/components/schemas/invoiceTypes_PaymentSchedule","description":"If this is a recurring invoice, this will be the payment schedule for the invoice. If not provided, this will be a one-time invoice."},"taxAmount":{"type":"number","format":"double","description":"Tax amount for this invoice."},"shippingAmount":{"type":"number","format":"double","description":"Shipping amount for this invoice."},"lineItems":{"type":"array","items":{"$ref":"#/components/schemas/invoiceTypes_InvoiceLineItemUpdateRequest"}},"creatorEntityId":{"$ref":"#/components/schemas/entityTypes_EntityId","description":"ID or foreign ID of entity who created this invoice."}},"title":"InvoiceTemplateUpdateRequest"},"invoiceTypes_InvoiceLineItemIndividualUpdateRequest":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"category":{"type":"string","description":"Category of the line item."},"serviceStartDate":{"type":"string","format":"date-time"},"serviceEndDate":{"type":"string","format":"date-time"},"metadata":{"type":"object","additionalProperties":{"type":"string"}},"glAccountId":{"type":"string","description":"ID of general ledger account associated with this line item."}},"title":"InvoiceLineItemIndividualUpdateRequest"},"invoiceTypes_AddApproverRequest":{"type":"object","properties":{"approvalSlotId":{"$ref":"#/components/schemas/invoiceTypes_ApprovalSlotId","description":"The identifier for the approval slot this user is assigned to."},"userId":{"$ref":"#/components/schemas/entityTypes_EntityUserId","description":"The ID or the Foreign ID of the user to add to the approval slot."}},"required":["userId"],"title":"AddApproverRequest"},"invoiceTypes_ApprovalRequest":{"type":"object","properties":{"text":{"type":"string","description":"Comment associated with this approval action."},"userId":{"$ref":"#/components/schemas/entityTypes_EntityUserId","description":"The ID or the Foreign ID of the user"}},"required":["userId"],"title":"ApprovalRequest"},"invoiceTypes_InvoiceCreationWithEntityRequest":{"type":"object","properties":{"status":{"$ref":"#/components/schemas/invoiceTypes_InvoiceStatus"},"amount":{"type":"number","format":"double","description":"Total amount of invoice in major units. If the entered amount has more decimal places than the currency supports, trailing decimals will be truncated."},"currency":{"$ref":"#/components/schemas/paymentMethodTypes_CurrencyCode","description":"Currency code for the amount. Defaults to USD."},"invoiceDate":{"type":"string","format":"date-time","description":"Date the invoice was issued."},"deductionDate":{"type":"string","format":"date-time","description":"Initial date when funds are scheduled to be deducted from payer's account."},"settlementDate":{"type":"string","format":"date-time","description":"Date of funds settlement."},"dueDate":{"type":"string","format":"date-time","description":"Due date of invoice."},"invoiceNumber":{"type":"string"},"noteToSelf":{"type":"string","description":"Note to self or memo on invoice."},"serviceStartDate":{"type":"string","format":"date-time"},"serviceEndDate":{"type":"string","format":"date-time"},"netTerms":{"type":"integer","description":"Net terms in days. Must be a positive number."},"payerId":{"$ref":"#/components/schemas/entityTypes_EntityId","description":"ID or foreign ID of the payer of this invoice."},"paymentSourceId":{"$ref":"#/components/schemas/paymentMethodTypes_PaymentMethodId","description":"ID of payment source for this invoice. If not provided, will attempt to use the default payment source for the payer when creating an invoice if a default payment source exists for the payer."},"paymentSourceOptions":{"$ref":"#/components/schemas/invoiceTypes_PaymentSourceOptions","description":"Options for the payment source. Depending on the payment source, this may include things such as BNPL configuration."},"vendorId":{"$ref":"#/components/schemas/entityTypes_EntityId","description":"ID or foreign ID of the vendor of this invoice."},"paymentDestinationId":{"$ref":"#/components/schemas/paymentMethodTypes_PaymentMethodId","description":"ID of payment destination for this invoice. If not provided, will attempt to use the default payment destination for the vendor when creating an invoice if a default payment destination exists for the vendor."},"paymentDestinationOptions":{"$ref":"#/components/schemas/invoiceTypes_PaymentDestinationOptions","description":"Options for the payment destination. Depending on the payment destination, this may include things such as check delivery method."},"approvers":{"type":"array","items":{"$ref":"#/components/schemas/invoiceTypes_ApprovalSlotAssignment"},"description":"Set approvers for this invoice."},"metadata":{"type":"object","additionalProperties":{"type":"string"},"description":"Metadata associated with this invoice."},"foreignId":{"type":"string","description":"The ID used to identify this invoice in your system. This ID must be unique within each creatorEntity in your system, e.g. two invoices with the same creatorEntity may not have the same foreign ID."},"document":{"type":"string","description":"Base64-encoded string. Supported file types include PNG, JPG, WEBP, PDF, and all Microsoft Office formats (automatically converted to PDF). Max file size 10MB. If the invoice already has a document, this will add a new document to the invoice."},"uploadedImage":{"type":"string","description":"DEPRECATED. Use document field instead.","deprecated":true},"creatorUserId":{"$ref":"#/components/schemas/entityTypes_EntityUserId","description":"User ID or Foreign ID of entity user who created this invoice."},"failureType":{"$ref":"#/components/schemas/invoiceTypes_InvoiceFailureType","description":"If the invoice failed to be paid, indicate the failure reason. Only applicable for invoices with custom payment methods."},"fees":{"$ref":"#/components/schemas/invoiceTypes_InvoiceFeesRequest","description":"If using a custom payment method, you can override the default fees for this invoice. If not provided, the default fees for the custom payment method will be used."},"batchPayment":{"type":"boolean","description":"If true, this invoice will be paid as a batch payment. Batches are automatically determined by Mercoa based on the payment source, destination, and scheduled payment date."},"paymentSchedule":{"$ref":"#/components/schemas/invoiceTypes_PaymentSchedule","description":"If this is a recurring invoice, this will be the payment schedule for the invoice. If not provided, this will be a one-time invoice."},"vendorCreditIds":{"type":"array","items":{"$ref":"#/components/schemas/vendorCreditTypes_VendorCreditId"},"description":"The IDs of the vendor credits to be applied to this invoice. Passing this field will un-apply any previously applied vendor credits."},"taxAmount":{"type":"number","format":"double","description":"Tax amount for this invoice."},"shippingAmount":{"type":"number","format":"double","description":"Shipping amount for this invoice."},"ocrJobId":{"$ref":"#/components/schemas/ocr_OCRJobId","description":"ID of the OCR job that processed this invoice."},"paymentDestinationConfirmed":{"type":"boolean","description":"Set to true if the payment destination has been confirmed by the vendor or if the payment destination should default to the selected payment destination on the vendor portal."},"lineItems":{"type":"array","items":{"$ref":"#/components/schemas/invoiceTypes_InvoiceLineItemCreationRequest"}},"creatorEntityId":{"$ref":"#/components/schemas/entityTypes_EntityId","description":"ID of the entity who created this invoice."}},"required":["creatorEntityId"],"title":"InvoiceCreationWithEntityRequest"},"invoiceTypes_InvoiceCreationWithEntityGroupRequest":{"type":"object","properties":{"status":{"$ref":"#/components/schemas/invoiceTypes_InvoiceStatus"},"amount":{"type":"number","format":"double","description":"Total amount of invoice in major units. If the entered amount has more decimal places than the currency supports, trailing decimals will be truncated."},"currency":{"$ref":"#/components/schemas/paymentMethodTypes_CurrencyCode","description":"Currency code for the amount. Defaults to USD."},"invoiceDate":{"type":"string","format":"date-time","description":"Date the invoice was issued."},"deductionDate":{"type":"string","format":"date-time","description":"Initial date when funds are scheduled to be deducted from payer's account."},"settlementDate":{"type":"string","format":"date-time","description":"Date of funds settlement."},"dueDate":{"type":"string","format":"date-time","description":"Due date of invoice."},"invoiceNumber":{"type":"string"},"noteToSelf":{"type":"string","description":"Note to self or memo on invoice."},"serviceStartDate":{"type":"string","format":"date-time"},"serviceEndDate":{"type":"string","format":"date-time"},"netTerms":{"type":"integer","description":"Net terms in days. Must be a positive number."},"payerId":{"$ref":"#/components/schemas/entityTypes_EntityId","description":"ID or foreign ID of the payer of this invoice."},"paymentSourceId":{"$ref":"#/components/schemas/paymentMethodTypes_PaymentMethodId","description":"ID of payment source for this invoice. If not provided, will attempt to use the default payment source for the payer when creating an invoice if a default payment source exists for the payer."},"paymentSourceOptions":{"$ref":"#/components/schemas/invoiceTypes_PaymentSourceOptions","description":"Options for the payment source. Depending on the payment source, this may include things such as BNPL configuration."},"vendorId":{"$ref":"#/components/schemas/entityTypes_EntityId","description":"ID or foreign ID of the vendor of this invoice."},"paymentDestinationId":{"$ref":"#/components/schemas/paymentMethodTypes_PaymentMethodId","description":"ID of payment destination for this invoice. If not provided, will attempt to use the default payment destination for the vendor when creating an invoice if a default payment destination exists for the vendor."},"paymentDestinationOptions":{"$ref":"#/components/schemas/invoiceTypes_PaymentDestinationOptions","description":"Options for the payment destination. Depending on the payment destination, this may include things such as check delivery method."},"approvers":{"type":"array","items":{"$ref":"#/components/schemas/invoiceTypes_ApprovalSlotAssignment"},"description":"Set approvers for this invoice."},"metadata":{"type":"object","additionalProperties":{"type":"string"},"description":"Metadata associated with this invoice."},"foreignId":{"type":"string","description":"The ID used to identify this invoice in your system. This ID must be unique within each creatorEntity in your system, e.g. two invoices with the same creatorEntity may not have the same foreign ID."},"document":{"type":"string","description":"Base64-encoded string. Supported file types include PNG, JPG, WEBP, PDF, and all Microsoft Office formats (automatically converted to PDF). Max file size 10MB. If the invoice already has a document, this will add a new document to the invoice."},"uploadedImage":{"type":"string","description":"DEPRECATED. Use document field instead.","deprecated":true},"creatorUserId":{"$ref":"#/components/schemas/entityTypes_EntityUserId","description":"User ID or Foreign ID of entity user who created this invoice."},"failureType":{"$ref":"#/components/schemas/invoiceTypes_InvoiceFailureType","description":"If the invoice failed to be paid, indicate the failure reason. Only applicable for invoices with custom payment methods."},"fees":{"$ref":"#/components/schemas/invoiceTypes_InvoiceFeesRequest","description":"If using a custom payment method, you can override the default fees for this invoice. If not provided, the default fees for the custom payment method will be used."},"batchPayment":{"type":"boolean","description":"If true, this invoice will be paid as a batch payment. Batches are automatically determined by Mercoa based on the payment source, destination, and scheduled payment date."},"paymentSchedule":{"$ref":"#/components/schemas/invoiceTypes_PaymentSchedule","description":"If this is a recurring invoice, this will be the payment schedule for the invoice. If not provided, this will be a one-time invoice."},"vendorCreditIds":{"type":"array","items":{"$ref":"#/components/schemas/vendorCreditTypes_VendorCreditId"},"description":"The IDs of the vendor credits to be applied to this invoice. Passing this field will un-apply any previously applied vendor credits."},"taxAmount":{"type":"number","format":"double","description":"Tax amount for this invoice."},"shippingAmount":{"type":"number","format":"double","description":"Shipping amount for this invoice."},"ocrJobId":{"$ref":"#/components/schemas/ocr_OCRJobId","description":"ID of the OCR job that processed this invoice."},"paymentDestinationConfirmed":{"type":"boolean","description":"Set to true if the payment destination has been confirmed by the vendor or if the payment destination should default to the selected payment destination on the vendor portal."},"lineItems":{"type":"array","items":{"$ref":"#/components/schemas/invoiceTypes_InvoiceLineItemCreationRequest"}},"creatorEntityGroupId":{"$ref":"#/components/schemas/entityGroupTypes_EntityGroupId","description":"ID of the entity group who created this invoice."}},"required":["creatorEntityGroupId"],"title":"InvoiceCreationWithEntityGroupRequest"},"invoiceTypes_InvoiceCreationRequest":{"oneOf":[{"$ref":"#/components/schemas/invoiceTypes_InvoiceCreationWithEntityRequest"},{"$ref":"#/components/schemas/invoiceTypes_InvoiceCreationWithEntityGroupRequest"}],"title":"InvoiceCreationRequest"},"invoiceTypes_InvoiceUpdateRequest":{"type":"object","properties":{"status":{"$ref":"#/components/schemas/invoiceTypes_InvoiceStatus"},"amount":{"type":"number","format":"double","description":"Total amount of invoice in major units. If the entered amount has more decimal places than the currency supports, trailing decimals will be truncated."},"currency":{"$ref":"#/components/schemas/paymentMethodTypes_CurrencyCode","description":"Currency code for the amount. Defaults to USD."},"invoiceDate":{"type":"string","format":"date-time","description":"Date the invoice was issued."},"deductionDate":{"type":"string","format":"date-time","description":"Initial date when funds are scheduled to be deducted from payer's account."},"settlementDate":{"type":"string","format":"date-time","description":"Date of funds settlement."},"dueDate":{"type":"string","format":"date-time","description":"Due date of invoice."},"invoiceNumber":{"type":"string"},"noteToSelf":{"type":"string","description":"Note to self or memo on invoice."},"serviceStartDate":{"type":"string","format":"date-time"},"serviceEndDate":{"type":"string","format":"date-time"},"netTerms":{"type":"integer","description":"Net terms in days. Must be a positive number."},"payerId":{"$ref":"#/components/schemas/entityTypes_EntityId","description":"ID or foreign ID of the payer of this invoice."},"paymentSourceId":{"$ref":"#/components/schemas/paymentMethodTypes_PaymentMethodId","description":"ID of payment source for this invoice. If not provided, will attempt to use the default payment source for the payer when creating an invoice if a default payment source exists for the payer."},"paymentSourceOptions":{"$ref":"#/components/schemas/invoiceTypes_PaymentSourceOptions","description":"Options for the payment source. Depending on the payment source, this may include things such as BNPL configuration."},"vendorId":{"$ref":"#/components/schemas/entityTypes_EntityId","description":"ID or foreign ID of the vendor of this invoice."},"paymentDestinationId":{"$ref":"#/components/schemas/paymentMethodTypes_PaymentMethodId","description":"ID of payment destination for this invoice. If not provided, will attempt to use the default payment destination for the vendor when creating an invoice if a default payment destination exists for the vendor."},"paymentDestinationOptions":{"$ref":"#/components/schemas/invoiceTypes_PaymentDestinationOptions","description":"Options for the payment destination. Depending on the payment destination, this may include things such as check delivery method."},"approvers":{"type":"array","items":{"$ref":"#/components/schemas/invoiceTypes_ApprovalSlotAssignment"},"description":"Set approvers for this invoice."},"metadata":{"type":"object","additionalProperties":{"type":"string"},"description":"Metadata associated with this invoice."},"foreignId":{"type":"string","description":"The ID used to identify this invoice in your system. This ID must be unique within each creatorEntity in your system, e.g. two invoices with the same creatorEntity may not have the same foreign ID."},"document":{"type":"string","description":"Base64-encoded string. Supported file types include PNG, JPG, WEBP, PDF, and all Microsoft Office formats (automatically converted to PDF). Max file size 10MB. If the invoice already has a document, this will add a new document to the invoice."},"uploadedImage":{"type":"string","description":"DEPRECATED. Use document field instead.","deprecated":true},"creatorUserId":{"$ref":"#/components/schemas/entityTypes_EntityUserId","description":"User ID or Foreign ID of entity user who created this invoice."},"failureType":{"$ref":"#/components/schemas/invoiceTypes_InvoiceFailureType","description":"If the invoice failed to be paid, indicate the failure reason. Only applicable for invoices with custom payment methods."},"fees":{"$ref":"#/components/schemas/invoiceTypes_InvoiceFeesRequest","description":"If using a custom payment method, you can override the default fees for this invoice. If not provided, the default fees for the custom payment method will be used."},"batchPayment":{"type":"boolean","description":"If true, this invoice will be paid as a batch payment. Batches are automatically determined by Mercoa based on the payment source, destination, and scheduled payment date."},"paymentSchedule":{"$ref":"#/components/schemas/invoiceTypes_PaymentSchedule","description":"If this is a recurring invoice, this will be the payment schedule for the invoice. If not provided, this will be a one-time invoice."},"vendorCreditIds":{"type":"array","items":{"$ref":"#/components/schemas/vendorCreditTypes_VendorCreditId"},"description":"The IDs of the vendor credits to be applied to this invoice. Passing this field will un-apply any previously applied vendor credits."},"taxAmount":{"type":"number","format":"double","description":"Tax amount for this invoice."},"shippingAmount":{"type":"number","format":"double","description":"Shipping amount for this invoice."},"ocrJobId":{"$ref":"#/components/schemas/ocr_OCRJobId","description":"ID of the OCR job that processed this invoice."},"paymentDestinationConfirmed":{"type":"boolean","description":"Set to true if the payment destination has been confirmed by the vendor or if the payment destination should default to the selected payment destination on the vendor portal."},"lineItems":{"type":"array","items":{"$ref":"#/components/schemas/invoiceTypes_InvoiceLineItemUpdateRequest"}},"creatorEntityId":{"$ref":"#/components/schemas/entityTypes_EntityId","description":"ID or foreign ID of entity who created this invoice. If creating a payable invoice (AP), this must be the same as the payerId. If creating a receivable invoice (AR), this must be the same as the vendorId."}},"title":"InvoiceUpdateRequest"},"invoiceTypes_InvoiceEventId":{"type":"string","title":"InvoiceEventId"},"invoiceTypes_InvoiceEvent":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/invoiceTypes_InvoiceEventId","description":"The ID of the event"},"data":{"$ref":"#/components/schemas/invoiceTypes_InvoiceUpdateRequest","description":"The data related to the invoice update"},"webhookIds":{"type":"array","items":{"type":"string"},"description":"The list of webhook IDs associated with this event"},"status":{"$ref":"#/components/schemas/invoiceTypes_InvoiceStatus","description":"The current status of the invoice event"},"userId":{"$ref":"#/components/schemas/entityTypes_EntityUserId","description":"The ID of the user who triggered this event"},"ipAddress":{"type":"string","description":"The IP address of the user who triggered the event"},"createdAt":{"type":"string","format":"date-time","description":"The timestamp when the event was created"}},"required":["id","data","webhookIds","createdAt"],"title":"InvoiceEvent"},"invoiceTypes_InvoiceEventsResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/invoiceTypes_InvoiceEvent"}},"count":{"type":"integer"},"hasMore":{"type":"boolean"}},"required":["data","count","hasMore"],"title":"InvoiceEventsResponse"},"invoiceTypes_BnplDayOfWeek":{"type":"string","enum":["MONDAY","TUESDAY","WEDNESDAY","THURSDAY","FRIDAY","SATURDAY","SUNDAY"],"title":"BnplDayOfWeek"},"invoiceTypes_BnplOfferRequest":{"type":"object","properties":{"cadence":{"$ref":"#/components/schemas/invoiceTypes_BnplCadence","description":"The payment cadence for the BNPL offer"},"installmentsStartDate":{"type":"string","description":"The start date for installments in YYYY-MM-DD format"},"numberOfInstallments":{"type":"integer","description":"The number of installments"},"paymentDayOfWeek":{"$ref":"#/components/schemas/invoiceTypes_BnplDayOfWeek","description":"The day of the week for payments"},"downPaymentDueDate":{"type":"string","description":"The due date for the down payment in YYYY-MM-DD format"}},"required":["cadence","installmentsStartDate","numberOfInstallments","paymentDayOfWeek","downPaymentDueDate"],"title":"BnplOfferRequest"},"invoiceTypes_BnplFees":{"type":"object","properties":{"baseFeeAmount":{"type":"integer","description":"Total fees in cents"},"baseFeePercentage":{"type":"number","format":"double","description":"Fee percentage as a decimal (e.g., 1.4 for 1.4%)"}},"required":["baseFeeAmount","baseFeePercentage"],"title":"BnplFees"},"invoiceTypes_BnplInstallment":{"type":"object","properties":{"number":{"type":"integer"},"dueDate":{"type":"string"},"amount":{"type":"integer"},"type":{"$ref":"#/components/schemas/invoiceTypes_BnplInstallmentType"}},"required":["number","dueDate","amount","type"],"title":"BnplInstallment"},"invoiceTypes_BnplOfferResponse":{"type":"object","properties":{"invoiceAmount":{"type":"integer","description":"The total amount of the invoice in cents."},"totalRepaymentAmount":{"type":"integer","description":"Total amount to be repaid, including fees. In cents."},"currency":{"type":"string","description":"The currency code for the amount"},"downPaymentAmount":{"type":"integer","description":"The down payment amount in cents"},"numberOfPayments":{"type":"integer","description":"The number of payments/installments"},"firstPaymentDate":{"type":"string","description":"The date of the first payment in YYYY-MM-DD format"},"finalPaymentDate":{"type":"string","description":"The date of the final payment in YYYY-MM-DD format"},"fees":{"$ref":"#/components/schemas/invoiceTypes_BnplFees","description":"The fees associated with the offer"},"termsLink":{"type":"string","description":"A link to the terms and conditions for the offer"},"installments":{"type":"array","items":{"$ref":"#/components/schemas/invoiceTypes_BnplInstallment"},"description":"A list of all installments, including down payment."},"paymentDayOfWeek":{"$ref":"#/components/schemas/invoiceTypes_BnplDayOfWeek","description":"The day of the week for payments, e.g. \"Wednesday\""},"installmentAmount":{"type":"integer","description":"The amount for each regular installment. The last installment may have a different amount. In cents."},"financeFeeRate":{"type":"string","description":"e.g. \"1.5% per 28 days\""}},"required":["invoiceAmount","totalRepaymentAmount","currency","downPaymentAmount","numberOfPayments","firstPaymentDate","finalPaymentDate","fees","installments","paymentDayOfWeek","installmentAmount","financeFeeRate"],"title":"BnplOfferResponse"},"invoiceTypes_BulkInvoiceCreationRequest":{"type":"object","properties":{"invoices":{"type":"array","items":{"$ref":"#/components/schemas/invoiceTypes_InvoiceCreationRequest"}}},"required":["invoices"],"title":"BulkInvoiceCreationRequest"},"invoiceTypes_BulkInvoiceCreationFromObjectResponse":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the invoice that was created. If the invoice was not created, this will be undefined"},"foreignId":{"type":"string","description":"If provided, this is the foreign ID of the invoice that was created."},"error":{"type":"string","description":"The error message if the invoice was not created"}},"title":"BulkInvoiceCreationFromObjectResponse"},"invoiceTypes_BulkInvoiceCreationResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/invoiceTypes_BulkInvoiceCreationFromObjectResponse"}}},"required":["data"],"title":"BulkInvoiceCreationResponse"},"invoiceTypes_InvoiceUpdateRequestWithId":{"type":"object","properties":{"status":{"$ref":"#/components/schemas/invoiceTypes_InvoiceStatus"},"amount":{"type":"number","format":"double","description":"Total amount of invoice in major units. If the entered amount has more decimal places than the currency supports, trailing decimals will be truncated."},"currency":{"$ref":"#/components/schemas/paymentMethodTypes_CurrencyCode","description":"Currency code for the amount. Defaults to USD."},"invoiceDate":{"type":"string","format":"date-time","description":"Date the invoice was issued."},"deductionDate":{"type":"string","format":"date-time","description":"Initial date when funds are scheduled to be deducted from payer's account."},"settlementDate":{"type":"string","format":"date-time","description":"Date of funds settlement."},"dueDate":{"type":"string","format":"date-time","description":"Due date of invoice."},"invoiceNumber":{"type":"string"},"noteToSelf":{"type":"string","description":"Note to self or memo on invoice."},"serviceStartDate":{"type":"string","format":"date-time"},"serviceEndDate":{"type":"string","format":"date-time"},"netTerms":{"type":"integer","description":"Net terms in days. Must be a positive number."},"payerId":{"$ref":"#/components/schemas/entityTypes_EntityId","description":"ID or foreign ID of the payer of this invoice."},"paymentSourceId":{"$ref":"#/components/schemas/paymentMethodTypes_PaymentMethodId","description":"ID of payment source for this invoice. If not provided, will attempt to use the default payment source for the payer when creating an invoice if a default payment source exists for the payer."},"paymentSourceOptions":{"$ref":"#/components/schemas/invoiceTypes_PaymentSourceOptions","description":"Options for the payment source. Depending on the payment source, this may include things such as BNPL configuration."},"vendorId":{"$ref":"#/components/schemas/entityTypes_EntityId","description":"ID or foreign ID of the vendor of this invoice."},"paymentDestinationId":{"$ref":"#/components/schemas/paymentMethodTypes_PaymentMethodId","description":"ID of payment destination for this invoice. If not provided, will attempt to use the default payment destination for the vendor when creating an invoice if a default payment destination exists for the vendor."},"paymentDestinationOptions":{"$ref":"#/components/schemas/invoiceTypes_PaymentDestinationOptions","description":"Options for the payment destination. Depending on the payment destination, this may include things such as check delivery method."},"approvers":{"type":"array","items":{"$ref":"#/components/schemas/invoiceTypes_ApprovalSlotAssignment"},"description":"Set approvers for this invoice."},"metadata":{"type":"object","additionalProperties":{"type":"string"},"description":"Metadata associated with this invoice."},"foreignId":{"type":"string","description":"The ID used to identify this invoice in your system. This ID must be unique within each creatorEntity in your system, e.g. two invoices with the same creatorEntity may not have the same foreign ID."},"document":{"type":"string","description":"Base64-encoded string. Supported file types include PNG, JPG, WEBP, PDF, and all Microsoft Office formats (automatically converted to PDF). Max file size 10MB. If the invoice already has a document, this will add a new document to the invoice."},"uploadedImage":{"type":"string","description":"DEPRECATED. Use document field instead.","deprecated":true},"creatorUserId":{"$ref":"#/components/schemas/entityTypes_EntityUserId","description":"User ID or Foreign ID of entity user who created this invoice."},"failureType":{"$ref":"#/components/schemas/invoiceTypes_InvoiceFailureType","description":"If the invoice failed to be paid, indicate the failure reason. Only applicable for invoices with custom payment methods."},"fees":{"$ref":"#/components/schemas/invoiceTypes_InvoiceFeesRequest","description":"If using a custom payment method, you can override the default fees for this invoice. If not provided, the default fees for the custom payment method will be used."},"batchPayment":{"type":"boolean","description":"If true, this invoice will be paid as a batch payment. Batches are automatically determined by Mercoa based on the payment source, destination, and scheduled payment date."},"paymentSchedule":{"$ref":"#/components/schemas/invoiceTypes_PaymentSchedule","description":"If this is a recurring invoice, this will be the payment schedule for the invoice. If not provided, this will be a one-time invoice."},"vendorCreditIds":{"type":"array","items":{"$ref":"#/components/schemas/vendorCreditTypes_VendorCreditId"},"description":"The IDs of the vendor credits to be applied to this invoice. Passing this field will un-apply any previously applied vendor credits."},"taxAmount":{"type":"number","format":"double","description":"Tax amount for this invoice."},"shippingAmount":{"type":"number","format":"double","description":"Shipping amount for this invoice."},"ocrJobId":{"$ref":"#/components/schemas/ocr_OCRJobId","description":"ID of the OCR job that processed this invoice."},"paymentDestinationConfirmed":{"type":"boolean","description":"Set to true if the payment destination has been confirmed by the vendor or if the payment destination should default to the selected payment destination on the vendor portal."},"lineItems":{"type":"array","items":{"$ref":"#/components/schemas/invoiceTypes_InvoiceLineItemUpdateRequest"}},"creatorEntityId":{"$ref":"#/components/schemas/entityTypes_EntityId","description":"ID or foreign ID of entity who created this invoice. If creating a payable invoice (AP), this must be the same as the payerId. If creating a receivable invoice (AR), this must be the same as the vendorId."},"invoiceId":{"$ref":"#/components/schemas/invoiceTypes_InvoiceId","description":"The ID or foreign ID of the invoice to update"}},"required":["invoiceId"],"title":"InvoiceUpdateRequestWithId"},"invoiceTypes_BulkInvoiceUpdateRequest":{"type":"object","properties":{"invoices":{"type":"array","items":{"$ref":"#/components/schemas/invoiceTypes_InvoiceUpdateRequestWithId"}}},"required":["invoices"],"title":"BulkInvoiceUpdateRequest"},"invoiceTypes_BulkInvoiceUpdateFromObjectResponse":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/invoiceTypes_InvoiceId","description":"The ID of the invoice that was updated. If the invoice was not updated, this will be undefined"},"foreignId":{"type":"string","description":"If provided, this is the foreign ID of the invoice that was updated."},"error":{"type":"string","description":"The error message if the invoice was not updated"}},"title":"BulkInvoiceUpdateFromObjectResponse"},"invoiceTypes_BulkInvoiceUpdateResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/invoiceTypes_BulkInvoiceUpdateFromObjectResponse"}}},"required":["data"],"title":"BulkInvoiceUpdateResponse"},"invoiceTypes_ApprovalRequestWithId":{"type":"object","properties":{"text":{"type":"string","description":"Comment associated with this approval action."},"userId":{"$ref":"#/components/schemas/entityTypes_EntityUserId","description":"The ID or the Foreign ID of the user"},"invoiceId":{"$ref":"#/components/schemas/invoiceTypes_InvoiceId","description":"The ID or foreign ID of the invoice to approve"}},"required":["userId","invoiceId"],"title":"ApprovalRequestWithId"},"invoiceTypes_BulkInvoiceApprovalRequest":{"type":"object","properties":{"invoices":{"type":"array","items":{"$ref":"#/components/schemas/invoiceTypes_ApprovalRequestWithId"}}},"required":["invoices"],"title":"BulkInvoiceApprovalRequest"},"invoiceTypes_BulkInvoiceApprovalFromObjectResponse":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/invoiceTypes_InvoiceId","description":"The ID of the invoice that was approved. If the invoice was not approved, this will be undefined"},"foreignId":{"type":"string","description":"If provided, this is the foreign ID of the invoice that was approved."},"error":{"type":"string","description":"The error message if the invoice was not approved"}},"title":"BulkInvoiceApprovalFromObjectResponse"},"invoiceTypes_BulkInvoiceApprovalResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/invoiceTypes_BulkInvoiceApprovalFromObjectResponse"}}},"required":["data"],"title":"BulkInvoiceApprovalResponse"},"collectionTypes_ActionId":{"type":"string","title":"ActionId"},"collectionTypes_ActionStatus":{"type":"string","enum":["SUGGESTED","APPROVED","COMPLETED"],"title":"ActionStatus"},"collectionTypes_ActionResponse":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["email"],"description":"Discriminator value: email"},"id":{"$ref":"#/components/schemas/collectionTypes_ActionId"},"scheduledExecutionTime":{"type":"string","format":"date-time","description":"The UTC timestamp for when this action is scheduled for execution. Actual execution may be delayed by a few minutes due to processing time."},"status":{"$ref":"#/components/schemas/collectionTypes_ActionStatus","description":"The current lifecycle state of the action. SUGGESTED actions are pending approval, APPROVED actions will be executed, and COMPLETED actions have been executed."},"subject":{"type":"string","description":"The subject of the email"},"body":{"type":"string","description":"The body of the email in plaintext"}},"required":["type","id","scheduledExecutionTime","status","subject","body"]}],"discriminator":{"propertyName":"type"},"title":"ActionResponse"},"collectionTypes_UpdateNextActionRequest":{"type":"object","properties":{"feedback":{"type":"string","description":"Natural language feedback to update the collection agent's next action"}},"required":["feedback"],"title":"UpdateNextActionRequest"},"invoiceTypes_CommentRequest":{"type":"object","properties":{"text":{"type":"string"},"userId":{"$ref":"#/components/schemas/entityTypes_EntityUserId","description":"The ID or the Foreign ID of the user who created the comment."}},"required":["text"],"title":"CommentRequest"},"invoiceTypes_CommentId":{"type":"string","title":"CommentId"},"organizationTypes_OrganizationId":{"type":"string","title":"OrganizationId"},"organizationTypes_PaymentRailResponse":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["bankAccount"],"description":"Discriminator value: bankAccount"},"name":{"type":"string","description":"unused","deprecated":true},"active":{"type":"boolean"},"availableDeliveryMethods":{"type":"array","items":{"$ref":"#/components/schemas/invoiceTypes_BankDeliveryMethod"}},"defaultDeliveryMethod":{"$ref":"#/components/schemas/invoiceTypes_BankDeliveryMethod"}},"required":["type","name","active","availableDeliveryMethods","defaultDeliveryMethod"]},{"type":"object","properties":{"type":{"type":"string","enum":["card"],"description":"Discriminator value: card"},"name":{"type":"string","description":"unused","deprecated":true},"active":{"type":"boolean"}},"required":["type","name","active"]},{"type":"object","properties":{"type":{"type":"string","enum":["virtualCard"],"description":"Discriminator value: virtualCard"},"name":{"type":"string","description":"unused","deprecated":true},"active":{"type":"boolean"}},"required":["type","name","active"]},{"type":"object","properties":{"type":{"type":"string","enum":["check"],"description":"Discriminator value: check"},"name":{"type":"string","description":"unused","deprecated":true},"active":{"type":"boolean"},"availableDeliveryMethods":{"type":"array","items":{"$ref":"#/components/schemas/invoiceTypes_CheckDeliveryMethod"}},"defaultDeliveryMethod":{"$ref":"#/components/schemas/invoiceTypes_CheckDeliveryMethod"},"printDescription":{"type":"boolean"}},"required":["type","name","active","availableDeliveryMethods","defaultDeliveryMethod","printDescription"]},{"type":"object","properties":{"type":{"type":"string","enum":["custom"],"description":"Discriminator value: custom"},"name":{"type":"string","description":"unused","deprecated":true},"active":{"type":"boolean"},"schemaId":{"type":"string"}},"required":["type","name","active","schemaId"]},{"type":"object","properties":{"type":{"type":"string","enum":["bnpl"],"description":"Discriminator value: bnpl"},"name":{"type":"string","description":"unused","deprecated":true},"active":{"type":"boolean"}},"required":["type","name","active"]},{"type":"object","properties":{"type":{"type":"string","enum":["offPlatform"],"description":"Discriminator value: offPlatform"},"name":{"type":"string","description":"unused","deprecated":true},"active":{"type":"boolean"}},"required":["type","name","active"]},{"type":"object","properties":{"type":{"type":"string","enum":["utility"],"description":"Discriminator value: utility"},"name":{"type":"string","description":"unused","deprecated":true},"active":{"type":"boolean"}},"required":["type","name","active"]},{"type":"object","properties":{"type":{"type":"string","enum":["na"],"description":"Discriminator value: na"},"name":{"type":"string","description":"unused","deprecated":true},"active":{"type":"boolean"}},"required":["type","name","active"]},{"type":"object","properties":{"type":{"type":"string","enum":["wallet"],"description":"Discriminator value: wallet"},"name":{"type":"string","description":"unused","deprecated":true},"active":{"type":"boolean"}},"required":["type","name","active"]}],"discriminator":{"propertyName":"type"},"title":"PaymentRailResponse"},"organizationTypes_PaymentMethodsResponse":{"type":"object","properties":{"payerPayments":{"type":"array","items":{"$ref":"#/components/schemas/organizationTypes_PaymentRailResponse"},"description":"List of payment methods that can be used to pay invoices."},"backupDisbursements":{"type":"array","items":{"$ref":"#/components/schemas/organizationTypes_PaymentRailResponse"},"description":"List of payment methods that can be created by a payor to send disbursements."},"vendorDisbursements":{"type":"array","items":{"$ref":"#/components/schemas/organizationTypes_PaymentRailResponse"},"description":"List of payment methods that can be created by a payee to receive disbursements."}},"required":["payerPayments","backupDisbursements","vendorDisbursements"],"title":"PaymentMethodsResponse"},"organizationTypes_EmailSenderProvider":{"type":"string","enum":["none","sendgrid","ses","resend","cloudmailin"],"title":"EmailSenderProvider"},"organizationTypes_EmailSenderResponse":{"type":"object","properties":{"provider":{"$ref":"#/components/schemas/organizationTypes_EmailSenderProvider"},"fromEmail":{"type":"string"},"fromName":{"type":"string"},"hasApiKey":{"type":"boolean"},"useSmartReplyTo":{"type":"boolean"}},"required":["provider","fromEmail","fromName","hasApiKey"],"title":"EmailSenderResponse"},"organizationTypes_EmailProviderResponse":{"type":"object","properties":{"sender":{"$ref":"#/components/schemas/organizationTypes_EmailSenderResponse"},"inboxDomain":{"type":"string"},"alternativeInboxDomains":{"type":"array","items":{"type":"string"}}},"required":["sender","inboxDomain","alternativeInboxDomains"],"title":"EmailProviderResponse"},"organizationTypes_ExternalAccountingSystemProviderResponse":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["none"],"description":"Discriminator value: none"},"hasApiKey":{"type":"boolean"}},"required":["type","hasApiKey"]},{"type":"object","properties":{"type":{"type":"string","enum":["codat"],"description":"Discriminator value: codat"},"hasApiKey":{"type":"boolean"}},"required":["type","hasApiKey"]},{"type":"object","properties":{"type":{"type":"string","enum":["rutter"],"description":"Discriminator value: rutter"},"hasClientId":{"type":"boolean"},"hasClientSecret":{"type":"boolean"}},"required":["type","hasClientId","hasClientSecret"]}],"discriminator":{"propertyName":"type"},"title":"ExternalAccountingSystemProviderResponse"},"organizationTypes_ColorSchemeResponse":{"type":"object","properties":{"primaryColor":{"type":"string"},"secondaryColor":{"type":"string"},"logoBackgroundColor":{"type":"string"},"roundedCorners":{"type":"integer"},"fontFamily":{"type":"string"},"fontSize":{"type":"string"}},"title":"ColorSchemeResponse"},"organizationTypes_OnboardingOptionResponse":{"type":"object","properties":{"show":{"type":"boolean"},"edit":{"type":"boolean"},"required":{"type":"boolean"}},"required":["show","edit","required"],"description":"How this field will be shown on the onboarding page. Note that `required` implies `edit`, and `edit` implies `show`.","title":"OnboardingOptionResponse"},"organizationTypes_BusinessOnboardingOptionsResponse":{"type":"object","properties":{"termsOfService":{"$ref":"#/components/schemas/organizationTypes_OnboardingOptionResponse"},"email":{"$ref":"#/components/schemas/organizationTypes_OnboardingOptionResponse"},"name":{"$ref":"#/components/schemas/organizationTypes_OnboardingOptionResponse"},"address":{"$ref":"#/components/schemas/organizationTypes_OnboardingOptionResponse"},"phone":{"$ref":"#/components/schemas/organizationTypes_OnboardingOptionResponse"},"tenNinetyNine":{"$ref":"#/components/schemas/organizationTypes_OnboardingOptionResponse"},"w9":{"$ref":"#/components/schemas/organizationTypes_OnboardingOptionResponse"},"bankStatement":{"$ref":"#/components/schemas/organizationTypes_OnboardingOptionResponse"},"type":{"$ref":"#/components/schemas/organizationTypes_OnboardingOptionResponse"},"doingBusinessAs":{"$ref":"#/components/schemas/organizationTypes_OnboardingOptionResponse"},"ein":{"$ref":"#/components/schemas/organizationTypes_OnboardingOptionResponse"},"mcc":{"$ref":"#/components/schemas/organizationTypes_OnboardingOptionResponse"},"formationDate":{"$ref":"#/components/schemas/organizationTypes_OnboardingOptionResponse"},"website":{"$ref":"#/components/schemas/organizationTypes_OnboardingOptionResponse"},"description":{"$ref":"#/components/schemas/organizationTypes_OnboardingOptionResponse"},"representatives":{"$ref":"#/components/schemas/organizationTypes_OnboardingOptionResponse"},"logo":{"$ref":"#/components/schemas/organizationTypes_OnboardingOptionResponse"},"averageTransactionSize":{"$ref":"#/components/schemas/organizationTypes_OnboardingOptionResponse"},"averageMonthlyTransactionVolume":{"$ref":"#/components/schemas/organizationTypes_OnboardingOptionResponse"},"maxTransactionSize":{"$ref":"#/components/schemas/organizationTypes_OnboardingOptionResponse"}},"required":["termsOfService","email","name","address","phone","tenNinetyNine","w9","bankStatement","type","doingBusinessAs","ein","mcc","formationDate","website","description","representatives","logo","averageTransactionSize","averageMonthlyTransactionVolume","maxTransactionSize"],"title":"BusinessOnboardingOptionsResponse"},"organizationTypes_IndividualOnboardingOptionsResponse":{"type":"object","properties":{"termsOfService":{"$ref":"#/components/schemas/organizationTypes_OnboardingOptionResponse"},"email":{"$ref":"#/components/schemas/organizationTypes_OnboardingOptionResponse"},"name":{"$ref":"#/components/schemas/organizationTypes_OnboardingOptionResponse"},"address":{"$ref":"#/components/schemas/organizationTypes_OnboardingOptionResponse"},"phone":{"$ref":"#/components/schemas/organizationTypes_OnboardingOptionResponse"},"tenNinetyNine":{"$ref":"#/components/schemas/organizationTypes_OnboardingOptionResponse"},"w9":{"$ref":"#/components/schemas/organizationTypes_OnboardingOptionResponse"},"bankStatement":{"$ref":"#/components/schemas/organizationTypes_OnboardingOptionResponse"},"dateOfBirth":{"$ref":"#/components/schemas/organizationTypes_OnboardingOptionResponse"},"ssn":{"$ref":"#/components/schemas/organizationTypes_OnboardingOptionResponse"}},"required":["termsOfService","email","name","address","phone","tenNinetyNine","w9","bankStatement","dateOfBirth","ssn"],"title":"IndividualOnboardingOptionsResponse"},"organizationTypes_OnboardingOptionsResponse":{"type":"object","properties":{"enableBusiness":{"type":"boolean"},"enableIndividual":{"type":"boolean"},"paymentMethod":{"type":"boolean"},"business":{"$ref":"#/components/schemas/organizationTypes_BusinessOnboardingOptionsResponse"},"individual":{"$ref":"#/components/schemas/organizationTypes_IndividualOnboardingOptionsResponse"}},"required":["enableBusiness","enableIndividual","paymentMethod","business","individual"],"title":"OnboardingOptionsResponse"},"organizationTypes_MetadataType":{"type":"string","enum":["STRING","NUMBER","DATE","BOOLEAN","KEY_VALUE"],"title":"MetadataType"},"organizationTypes_MetadataValidationRule":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["regex"],"description":"Discriminator value: regex"},"regex":{"type":"string","description":"A regular expression that the value must match."},"errorMessage":{"type":"string","description":"The error message to display if the value does not match the regular expression."}},"required":["type","regex","errorMessage"]}],"discriminator":{"propertyName":"type"},"title":"MetadataValidationRule"},"organizationTypes_MetadataShowConditions":{"type":"object","properties":{"alwaysHide":{"type":"boolean","description":"Always hide this field. Useful for getting data from OCR and AI predictions that you don't want to show in the UI."},"hasOptions":{"type":"boolean","description":"Show this field only if the entity has values set for the metadata key."},"hasDocument":{"type":"boolean","description":"Show this field only if a document has been attached."},"hasNoLineItems":{"type":"boolean","description":"Show this field only if the invoice has no line items. Useful for showing a field that applies to the entire invoice but overridden by line items if present."},"paymentSourceTypes":{"type":"array","items":{"$ref":"#/components/schemas/paymentMethodTypes_PaymentMethodType"},"description":"Show this field only if the payment source type is in this list."},"paymentSourceCustomSchemaIds":{"type":"array","items":{"type":"string"},"description":"Show this field only if the payment source schema ID is in this list of payment source schema IDs. This is only applicable if paymentSourceTypes contains CUSTOM."},"paymentDestinationTypes":{"type":"array","items":{"$ref":"#/components/schemas/paymentMethodTypes_PaymentMethodType"},"description":"Show this field only if the payment destination type is in this list."},"paymentDestinationCustomSchemaIds":{"type":"array","items":{"type":"string"},"description":"Show this field only if the payment destination schema ID is in this list of payment destination schema IDs. This is only applicable if paymentDestinationTypes contains CUSTOM."}},"title":"MetadataShowConditions"},"organizationTypes_MetadataOcrRules":{"type":"object","properties":{"extractFromDocument":{"type":"boolean","description":"Attempt to extract this field from reading the document. Only applicable to line item metadata fields. Defaults to false."},"predictFromHistory":{"type":"boolean","description":"Attempt to predict this field from historical invoice metadata. Only applicable to line item metadata fields. Defaults to true."}},"title":"MetadataOcrRules"},"organizationTypes_MetadataSchema":{"type":"object","properties":{"key":{"type":"string"},"displayName":{"type":"string"},"description":{"type":"string"},"lineItem":{"type":"boolean","description":"Whether or not this field should be shown on line items. If true, this field will be shown on each line item. If false, the field will be shown on the invoice level. Defaults to false."},"type":{"$ref":"#/components/schemas/organizationTypes_MetadataType"},"allowMultiple":{"type":"boolean","description":"Whether or not multiple values are allowed for this field. Defaults to false. If true, the value will be a list of the specified type."},"validationRules":{"$ref":"#/components/schemas/organizationTypes_MetadataValidationRule","description":"Validation rules are currently only supported for STRING types."},"showConditions":{"$ref":"#/components/schemas/organizationTypes_MetadataShowConditions","description":"A list of conditional rules that determine whether or not this field should be shown. The field will only be shown if all of the conditions are met. If no conditions are specified, the field will always be shown."},"ocrRules":{"$ref":"#/components/schemas/organizationTypes_MetadataOcrRules","description":"A collection of rules that determine how this field is populated during OCR."}},"required":["key","displayName","type"],"title":"MetadataSchema"},"organizationTypes_NotificationEmailTemplateResponse":{"type":"object","properties":{"backgroundStyle":{"type":"string"},"header":{"type":"string"},"body":{"type":"string"},"signature":{"type":"string"},"footer":{"type":"string"},"button":{"type":"string"}},"title":"NotificationEmailTemplateResponse"},"organizationTypes_RolePermissionResponse":{"type":"object","additionalProperties":{"type":"array","items":{"$ref":"#/components/schemas/organizationTypes_Permission"}},"title":"RolePermissionResponse"},"organizationTypes_OrganizationResponse":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/organizationTypes_OrganizationId"},"sandbox":{"type":"boolean"},"name":{"type":"string"},"logoUrl":{"type":"string"},"faviconUrl":{"type":"string"},"websiteUrl":{"type":"string"},"supportEmail":{"type":"string"},"paymentMethods":{"$ref":"#/components/schemas/organizationTypes_PaymentMethodsResponse"},"emailProvider":{"$ref":"#/components/schemas/organizationTypes_EmailProviderResponse"},"externalAccountingSystemProvider":{"$ref":"#/components/schemas/organizationTypes_ExternalAccountingSystemProviderResponse"},"colorScheme":{"$ref":"#/components/schemas/organizationTypes_ColorSchemeResponse"},"payeeOnboardingOptions":{"$ref":"#/components/schemas/organizationTypes_OnboardingOptionsResponse"},"payorOnboardingOptions":{"$ref":"#/components/schemas/organizationTypes_OnboardingOptionsResponse"},"metadataSchema":{"type":"array","items":{"$ref":"#/components/schemas/organizationTypes_MetadataSchema"}},"notificationEmailTemplate":{"$ref":"#/components/schemas/organizationTypes_NotificationEmailTemplateResponse"},"customDomains":{"type":"array","items":{"type":"string"}},"organizationEntityId":{"$ref":"#/components/schemas/entityTypes_EntityId"},"rolePermissions":{"$ref":"#/components/schemas/organizationTypes_RolePermissionResponse"},"notificationsDisabled":{"type":"boolean"}},"required":["id","sandbox","name"],"title":"OrganizationResponse"},"organizationTypes_PaymentRailRequest":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["bankAccount"],"description":"Discriminator value: bankAccount"},"name":{"type":"string","deprecated":true},"active":{"type":"boolean"},"availableDeliveryMethods":{"type":"array","items":{"$ref":"#/components/schemas/invoiceTypes_BankDeliveryMethod"}},"defaultDeliveryMethod":{"$ref":"#/components/schemas/invoiceTypes_BankDeliveryMethod"}},"required":["type","active"]},{"type":"object","properties":{"type":{"type":"string","enum":["card"],"description":"Discriminator value: card"},"name":{"type":"string","deprecated":true},"active":{"type":"boolean"}},"required":["type","active"]},{"type":"object","properties":{"type":{"type":"string","enum":["virtualCard"],"description":"Discriminator value: virtualCard"},"name":{"type":"string","deprecated":true},"active":{"type":"boolean"}},"required":["type","active"]},{"type":"object","properties":{"type":{"type":"string","enum":["check"],"description":"Discriminator value: check"},"name":{"type":"string","deprecated":true},"active":{"type":"boolean"},"availableDeliveryMethods":{"type":"array","items":{"$ref":"#/components/schemas/invoiceTypes_CheckDeliveryMethod"}},"defaultDeliveryMethod":{"$ref":"#/components/schemas/invoiceTypes_CheckDeliveryMethod"},"printDescription":{"type":"boolean","description":"If true, invoices default to printing the invoice description (noteToSelf) on the check note."}},"required":["type","active"]},{"type":"object","properties":{"type":{"type":"string","enum":["custom"],"description":"Discriminator value: custom"},"name":{"type":"string","deprecated":true},"active":{"type":"boolean"},"schemaId":{"type":"string"}},"required":["type","active","schemaId"]},{"type":"object","properties":{"type":{"type":"string","enum":["bnpl"],"description":"Discriminator value: bnpl"},"name":{"type":"string","deprecated":true},"active":{"type":"boolean"}},"required":["type","active"]},{"type":"object","properties":{"type":{"type":"string","enum":["offPlatform"],"description":"Discriminator value: offPlatform"},"name":{"type":"string","deprecated":true},"active":{"type":"boolean"}},"required":["type","active"]},{"type":"object","properties":{"type":{"type":"string","enum":["utility"],"description":"Discriminator value: utility"},"name":{"type":"string","deprecated":true},"active":{"type":"boolean"}},"required":["type","active"]},{"type":"object","properties":{"type":{"type":"string","enum":["na"],"description":"Discriminator value: na"},"name":{"type":"string","deprecated":true},"active":{"type":"boolean"}},"required":["type","active"]},{"type":"object","properties":{"type":{"type":"string","enum":["wallet"],"description":"Discriminator value: wallet"},"name":{"type":"string","deprecated":true},"active":{"type":"boolean"}},"required":["type","active"]}],"discriminator":{"propertyName":"type"},"title":"PaymentRailRequest"},"organizationTypes_PaymentMethodsRequest":{"type":"object","properties":{"payerPayments":{"type":"array","items":{"$ref":"#/components/schemas/organizationTypes_PaymentRailRequest"},"description":"List of payment methods that can be used to pay invoices."},"backupDisbursements":{"type":"array","items":{"$ref":"#/components/schemas/organizationTypes_PaymentRailRequest"},"description":"List of payment methods that can be created by a payor to send disbursements."},"vendorDisbursements":{"type":"array","items":{"$ref":"#/components/schemas/organizationTypes_PaymentRailRequest"},"description":"List of payment methods that can be created by a payee to receive disbursements."}},"required":["payerPayments","backupDisbursements","vendorDisbursements"],"title":"PaymentMethodsRequest"},"organizationTypes_EmailSenderRequest":{"type":"object","properties":{"provider":{"$ref":"#/components/schemas/organizationTypes_EmailSenderProvider"},"fromEmail":{"type":"string"},"fromName":{"type":"string"},"apiKey":{"type":"string"},"useSmartReplyTo":{"type":"boolean"}},"required":["provider","fromEmail","fromName"],"title":"EmailSenderRequest"},"organizationTypes_EmailProviderRequest":{"type":"object","properties":{"sender":{"$ref":"#/components/schemas/organizationTypes_EmailSenderRequest"},"inboxDomain":{"type":"string"},"alternativeInboxDomains":{"type":"array","items":{"type":"string"}}},"required":["sender","inboxDomain"],"title":"EmailProviderRequest"},"organizationTypes_ExternalAccountingSystemProviderRequest":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["none"],"description":"Discriminator value: none"},"apiKey":{"type":"string"}},"required":["type","apiKey"]},{"type":"object","properties":{"type":{"type":"string","enum":["codat"],"description":"Discriminator value: codat"},"apiKey":{"type":"string"}},"required":["type","apiKey"]},{"type":"object","properties":{"type":{"type":"string","enum":["rutter"],"description":"Discriminator value: rutter"},"clientId":{"type":"string"},"clientSecret":{"type":"string"}},"required":["type","clientId","clientSecret"]}],"discriminator":{"propertyName":"type"},"title":"ExternalAccountingSystemProviderRequest"},"organizationTypes_ColorSchemeRequest":{"type":"object","properties":{"primaryColor":{"type":"string"},"secondaryColor":{"type":"string"},"logoBackgroundColor":{"type":"string"},"roundedCorners":{"type":"integer"},"fontFamily":{"type":"string"},"fontSize":{"type":"string"}},"title":"ColorSchemeRequest"},"organizationTypes_OnboardingOptionRequest":{"type":"object","properties":{"show":{"type":"boolean"},"edit":{"type":"boolean"},"required":{"type":"boolean"}},"description":"How this field will be shown on the onboarding page.  If `show`, `edit`, or `required` are not specified, they will default to `false`. Note that `required` implies `edit`, and `edit` implies `show`.","title":"OnboardingOptionRequest"},"organizationTypes_BusinessOnboardingOptionsRequest":{"type":"object","properties":{"termsOfService":{"$ref":"#/components/schemas/organizationTypes_OnboardingOptionRequest"},"email":{"$ref":"#/components/schemas/organizationTypes_OnboardingOptionRequest"},"name":{"$ref":"#/components/schemas/organizationTypes_OnboardingOptionRequest"},"address":{"$ref":"#/components/schemas/organizationTypes_OnboardingOptionRequest"},"phone":{"$ref":"#/components/schemas/organizationTypes_OnboardingOptionRequest"},"tenNinetyNine":{"$ref":"#/components/schemas/organizationTypes_OnboardingOptionRequest"},"w9":{"$ref":"#/components/schemas/organizationTypes_OnboardingOptionRequest"},"bankStatement":{"$ref":"#/components/schemas/organizationTypes_OnboardingOptionRequest"},"type":{"$ref":"#/components/schemas/organizationTypes_OnboardingOptionRequest"},"doingBusinessAs":{"$ref":"#/components/schemas/organizationTypes_OnboardingOptionRequest"},"ein":{"$ref":"#/components/schemas/organizationTypes_OnboardingOptionRequest"},"mcc":{"$ref":"#/components/schemas/organizationTypes_OnboardingOptionRequest"},"formationDate":{"$ref":"#/components/schemas/organizationTypes_OnboardingOptionRequest"},"website":{"$ref":"#/components/schemas/organizationTypes_OnboardingOptionRequest"},"description":{"$ref":"#/components/schemas/organizationTypes_OnboardingOptionRequest"},"representatives":{"$ref":"#/components/schemas/organizationTypes_OnboardingOptionRequest"},"logo":{"$ref":"#/components/schemas/organizationTypes_OnboardingOptionRequest"},"averageTransactionSize":{"$ref":"#/components/schemas/organizationTypes_OnboardingOptionRequest"},"averageMonthlyTransactionVolume":{"$ref":"#/components/schemas/organizationTypes_OnboardingOptionRequest"},"maxTransactionSize":{"$ref":"#/components/schemas/organizationTypes_OnboardingOptionRequest"}},"title":"BusinessOnboardingOptionsRequest"},"organizationTypes_IndividualOnboardingOptionsRequest":{"type":"object","properties":{"termsOfService":{"$ref":"#/components/schemas/organizationTypes_OnboardingOptionRequest"},"email":{"$ref":"#/components/schemas/organizationTypes_OnboardingOptionRequest"},"name":{"$ref":"#/components/schemas/organizationTypes_OnboardingOptionRequest"},"address":{"$ref":"#/components/schemas/organizationTypes_OnboardingOptionRequest"},"phone":{"$ref":"#/components/schemas/organizationTypes_OnboardingOptionRequest"},"tenNinetyNine":{"$ref":"#/components/schemas/organizationTypes_OnboardingOptionRequest"},"w9":{"$ref":"#/components/schemas/organizationTypes_OnboardingOptionRequest"},"bankStatement":{"$ref":"#/components/schemas/organizationTypes_OnboardingOptionRequest"},"dateOfBirth":{"$ref":"#/components/schemas/organizationTypes_OnboardingOptionRequest"},"ssn":{"$ref":"#/components/schemas/organizationTypes_OnboardingOptionRequest"}},"title":"IndividualOnboardingOptionsRequest"},"organizationTypes_OnboardingOptionsRequest":{"type":"object","properties":{"enableBusiness":{"type":"boolean"},"enableIndividual":{"type":"boolean"},"paymentMethod":{"type":"boolean"},"business":{"$ref":"#/components/schemas/organizationTypes_BusinessOnboardingOptionsRequest"},"individual":{"$ref":"#/components/schemas/organizationTypes_IndividualOnboardingOptionsRequest"}},"title":"OnboardingOptionsRequest"},"organizationTypes_NotificationEmailTemplateRequest":{"type":"object","properties":{"backgroundStyle":{"type":"string"},"header":{"type":"string"},"body":{"type":"string"},"signature":{"type":"string"},"footer":{"type":"string"},"button":{"type":"string"}},"title":"NotificationEmailTemplateRequest"},"organizationTypes_OrganizationRequest":{"type":"object","properties":{"name":{"type":"string"},"logo":{"type":"string","description":"Base64 encoded logo image."},"favicon":{"type":"string","description":"Base64 encoded favicon image."},"websiteUrl":{"type":"string"},"supportEmail":{"type":"string"},"paymentMethods":{"$ref":"#/components/schemas/organizationTypes_PaymentMethodsRequest"},"emailProvider":{"$ref":"#/components/schemas/organizationTypes_EmailProviderRequest"},"externalAccountingSystemProvider":{"$ref":"#/components/schemas/organizationTypes_ExternalAccountingSystemProviderRequest"},"colorScheme":{"$ref":"#/components/schemas/organizationTypes_ColorSchemeRequest"},"payeeOnboardingOptions":{"$ref":"#/components/schemas/organizationTypes_OnboardingOptionsRequest"},"payorOnboardingOptions":{"$ref":"#/components/schemas/organizationTypes_OnboardingOptionsRequest"},"metadataSchema":{"type":"array","items":{"$ref":"#/components/schemas/organizationTypes_MetadataSchema"}},"notificationEmailTemplate":{"$ref":"#/components/schemas/organizationTypes_NotificationEmailTemplateRequest"},"customDomains":{"type":"array","items":{"type":"string"}},"rolePermissions":{"$ref":"#/components/schemas/organizationTypes_RolePermissionRequest"},"notificationsDisabled":{"type":"boolean","description":"If true, all notifications for this organization will be disabled."}},"title":"OrganizationRequest"},"organizationTypes_NotificationConfigurationResponse":{"oneOf":[{"type":"object","properties":{"notificationType":{"type":"string","enum":["invoice"],"description":"Discriminator value: invoice"},"url":{"type":"string","description":"The URL that the email will link to."},"subject":{"type":"string","description":"The subject of the email. If not provided, the default subject will be used."},"type":{"$ref":"#/components/schemas/entityTypes_NotificationType"}},"required":["notificationType","url","type"]}],"discriminator":{"propertyName":"notificationType"},"title":"NotificationConfigurationResponse"},"organizationTypes_NotificationConfigurationRequest":{"oneOf":[{"type":"object","properties":{"notificationType":{"type":"string","enum":["invoice"],"description":"Discriminator value: invoice"},"url":{"type":"string","description":"The URL that the email will link to."},"subject":{"type":"string","description":"The subject of the email. If not provided, the default subject will be used."}},"required":["notificationType","url"]}],"discriminator":{"propertyName":"notificationType"},"title":"NotificationConfigurationRequest"},"bankLookup_BankAddress":{"type":"object","properties":{"address":{"type":"string"},"city":{"type":"string"},"state":{"type":"string"},"postalCode":{"type":"string"},"postalCodeExtension":{"type":"string"}},"required":["address","city","state","postalCode","postalCodeExtension"],"title":"BankAddress"},"bankLookup_BankLookupResponse":{"type":"object","properties":{"bankName":{"type":"string"},"bankAddress":{"$ref":"#/components/schemas/bankLookup_BankAddress"}},"required":["bankName","bankAddress"],"title":"BankLookupResponse"},"calculate_FeeCalculationType":{"type":"string","enum":["PAYABLE","RECEIVABLE"],"description":"Type of payment to calculate fees for.","title":"FeeCalculationType"},"calculate_CalculateFeesRequest":{"type":"object","properties":{"amount":{"type":"number","format":"double","description":"Total amount in major units. If the entered amount has more decimal places than the currency supports, trailing decimals will be truncated."},"currency":{"$ref":"#/components/schemas/paymentMethodTypes_CurrencyCode","description":"Currency code for the amount. Defaults to USD."},"creatorEntityId":{"$ref":"#/components/schemas/entityTypes_EntityId","description":"ID of the entity creating the invoice. If not provided, the fees will be calculated with the default pricing for the organization."},"paymentSourceId":{"$ref":"#/components/schemas/paymentMethodTypes_PaymentMethodId","description":"ID of payment source."},"paymentDestinationId":{"$ref":"#/components/schemas/paymentMethodTypes_PaymentMethodId","description":"ID of payment destination."},"paymentDestinationOptions":{"$ref":"#/components/schemas/invoiceTypes_PaymentDestinationOptions","description":"Options for the payment destination. Depending on the payment destination, this may include things such as check delivery method."},"type":{"$ref":"#/components/schemas/calculate_FeeCalculationType","description":"Type of payment to calculate fees for. Defaults to PAYABLE (Accounts Payable)."}},"required":["amount","paymentSourceId","paymentDestinationId"],"title":"CalculateFeesRequest"},"calculate_EstimatedTiming":{"type":"object","properties":{"estimatedDeductionDate":{"type":"string","format":"date-time","description":"Date the payment is scheduled to be deducted from the payer's account. Use this field if the payment has not yet been deducted."},"processedAt":{"type":"string","format":"date-time","description":"Date the payment was processed. Use this field if the payment has already been deducted."},"paymentSourceId":{"$ref":"#/components/schemas/paymentMethodTypes_PaymentMethodId","description":"ID of payment source."},"paymentDestinationId":{"$ref":"#/components/schemas/paymentMethodTypes_PaymentMethodId","description":"ID of payment destination."},"paymentDestinationOptions":{"$ref":"#/components/schemas/invoiceTypes_PaymentDestinationOptions","description":"Options for the payment destination. Depending on the payment destination, this may include things such as check delivery method."}},"required":["paymentSourceId","paymentDestinationId"],"title":"EstimatedTiming"},"calculate_InvoiceTiming":{"type":"object","properties":{"invoiceId":{"$ref":"#/components/schemas/invoiceTypes_InvoiceId"}},"required":["invoiceId"],"title":"InvoiceTiming"},"calculate_CalculatePaymentTimingRequest":{"oneOf":[{"$ref":"#/components/schemas/calculate_EstimatedTiming"},{"$ref":"#/components/schemas/calculate_InvoiceTiming"}],"title":"CalculatePaymentTimingRequest"},"paymentMethodTypes_CustomPaymentMethodSchemaRequest":{"type":"object","properties":{"name":{"type":"string"},"isSource":{"type":"boolean","description":"This payment method can be used as a payment source for an invoice"},"isDestination":{"type":"boolean","description":"This payment method can be used as a payment destination for an invoice"},"supportedCurrencies":{"type":"array","items":{"$ref":"#/components/schemas/paymentMethodTypes_CurrencyCode"},"description":"List of currencies that this payment method supports. If not provided, the payment method will support only USD."},"fields":{"type":"array","items":{"$ref":"#/components/schemas/paymentMethodTypes_CustomPaymentMethodSchemaField"}},"estimatedProcessingTime":{"type":"integer","description":"Estimated time in days for this payment method to process a payments. Set as 0 for same-day payment methods, -1 for unknown processing time."},"maxAmount":{"type":"number","format":"double","description":"The maximum amount that can be transferred from this payment method in a single transaction."},"minAmount":{"type":"number","format":"double","description":"The minimum amount that can be transferred from this payment method in a single transaction. Default is 1."}},"required":["name","isSource","isDestination","fields"],"title":"CustomPaymentMethodSchemaRequest"},"ocr_OCRRequest":{"type":"object","properties":{"mimeType":{"type":"string","description":"MIME type of the image. Supported types are image/png, image/jpeg, and application/pdf."},"image":{"type":"string","description":"Base64 encoded image or PDF. PNG, JPG, WEBP, and PDF are supported. 10MB max."},"vendorNetwork":{"$ref":"#/components/schemas/entityTypes_VendorNetwork","description":"Limit OCR vendor search to a specific network"},"entityId":{"$ref":"#/components/schemas/entityTypes_EntityId","description":"When using the Entity vendor network, specify the entity to use. EntityId on an auth token will take precedence over this parameter."},"splitDocument":{"type":"boolean","description":"If true, attempt to split the document into subdocuments before processing. Default is false. If a document is split into subdocuments, the linked OCR jobs will be accessible via the linkedJobIds field on each OCR job response."}},"required":["mimeType","image"],"title":"OCRRequest"},"paymentMethodTypes_CheckResponse":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/paymentMethodTypes_PaymentMethodId"},"isDefaultSource":{"type":"boolean","description":"Indicates whether this payment method is the default source for the entity"},"isDefaultDestination":{"type":"boolean","description":"Indicates whether this payment method is the default destination for the entity"},"supportedCurrencies":{"type":"array","items":{"$ref":"#/components/schemas/paymentMethodTypes_CurrencyCode"}},"externalAccountingSystemId":{"type":"string","description":"ID for this payment method in the external accounting system (e.g Rutter or Codat)"},"frozen":{"type":"boolean","description":"Frozen payment methods cannot be used for payments, but will still be returned in API responses."},"metadata":{"type":"object","additionalProperties":{"type":"string"},"description":"Metadata associated with this payment method."},"confirmedByEntity":{"type":"boolean","description":"(ALPHA, MAY BE REMOVED) Indicates whether the payment method has been verified by the entity. This is useful if another entity has added this payment method to this entity, and you want the owner of the payment method to verify it is correct."},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"payToTheOrderOf":{"type":"string"},"addressLine1":{"type":"string"},"addressLine2":{"type":"string"},"city":{"type":"string"},"stateOrProvince":{"type":"string"},"postalCode":{"type":"string"},"country":{"type":"string"}},"required":["id","isDefaultSource","isDefaultDestination","supportedCurrencies","frozen","metadata","createdAt","updatedAt","payToTheOrderOf","addressLine1","city","stateOrProvince","postalCode","country"],"title":"CheckResponse"},"paymentMethodTypes_BankAccountResponse":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/paymentMethodTypes_PaymentMethodId"},"isDefaultSource":{"type":"boolean","description":"Indicates whether this payment method is the default source for the entity"},"isDefaultDestination":{"type":"boolean","description":"Indicates whether this payment method is the default destination for the entity"},"supportedCurrencies":{"type":"array","items":{"$ref":"#/components/schemas/paymentMethodTypes_CurrencyCode"}},"externalAccountingSystemId":{"type":"string","description":"ID for this payment method in the external accounting system (e.g Rutter or Codat)"},"frozen":{"type":"boolean","description":"Frozen payment methods cannot be used for payments, but will still be returned in API responses."},"metadata":{"type":"object","additionalProperties":{"type":"string"},"description":"Metadata associated with this payment method."},"confirmedByEntity":{"type":"boolean","description":"(ALPHA, MAY BE REMOVED) Indicates whether the payment method has been verified by the entity. This is useful if another entity has added this payment method to this entity, and you want the owner of the payment method to verify it is correct."},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"accountName":{"type":"string"},"bankName":{"type":"string"},"routingNumber":{"type":"string"},"accountNumber":{"type":"string"},"accountType":{"$ref":"#/components/schemas/paymentMethodTypes_BankType"},"status":{"$ref":"#/components/schemas/paymentMethodTypes_BankStatus"},"checkOptions":{"$ref":"#/components/schemas/paymentMethodTypes_BankAccountCheckOptions","description":"If check printing is enabled for the account, will return the check options for this bank account"}},"required":["id","isDefaultSource","isDefaultDestination","supportedCurrencies","frozen","metadata","createdAt","updatedAt","accountName","bankName","routingNumber","accountNumber","accountType","status"],"title":"BankAccountResponse"},"ocr_OCRResponse":{"type":"object","properties":{"jobId":{"$ref":"#/components/schemas/ocr_OCRJobId"},"invoice":{"$ref":"#/components/schemas/invoiceTypes_InvoiceResponse"},"vendor":{"$ref":"#/components/schemas/entityTypes_CounterpartyResponse"},"check":{"$ref":"#/components/schemas/paymentMethodTypes_CheckResponse"},"bankAccount":{"$ref":"#/components/schemas/paymentMethodTypes_BankAccountResponse"},"payer":{"$ref":"#/components/schemas/entityTypes_EntityResponse"}},"required":["jobId","invoice","vendor"],"title":"OCRResponse"},"ocr_OCRAsyncResponse":{"type":"object","properties":{"jobId":{"$ref":"#/components/schemas/ocr_OCRJobId"}},"required":["jobId"],"title":"OCRAsyncResponse"},"ocr_OCRJobStatus":{"type":"string","enum":["pending","success","failed"],"title":"OCRJobStatus"},"ocr_OCRPageRange":{"type":"object","properties":{"start":{"type":"integer"},"end":{"type":"integer"}},"required":["start","end"],"title":"OCRPageRange"},"ocr_OCRJobResponse":{"type":"object","properties":{"jobId":{"$ref":"#/components/schemas/ocr_OCRJobId"},"linkedJobIds":{"type":"array","items":{"$ref":"#/components/schemas/ocr_OCRJobId"},"description":"The IDs of any OCR jobs that are processing other subdocuments of the same document."},"status":{"$ref":"#/components/schemas/ocr_OCRJobStatus","description":"The status of the OCR job."},"pageRange":{"$ref":"#/components/schemas/ocr_OCRPageRange","description":"The start and end page numbers of the corresponding subdocument (zero-indexed, inclusive). If not provided, the document was not split during OCR."},"data":{"$ref":"#/components/schemas/ocr_OCRResponse"}},"required":["jobId","status"],"title":"OCRJobResponse"},"paymentGatewayTypes_PaymentGatewayJobStatus":{"type":"string","enum":["PENDING","COMPLETED","FAILED"],"title":"PaymentGatewayJobStatus"},"paymentGatewayTypes_PaymentGatewayJobOrderByField":{"type":"string","enum":["CREATED_AT","UPDATED_AT","STATUS"],"title":"PaymentGatewayJobOrderByField"},"paymentGatewayTypes_ValidatePaymentGatewayRequiredData":{"type":"object","properties":{"needsAccountNumber":{"type":"boolean","description":"Whether the payment gateway requires an account number to proceed"},"needsPostalCode":{"type":"boolean","description":"Whether the payment gateway requires a postal code to proceed"},"needsEmail":{"type":"boolean","description":"Whether the payment gateway requires an email address to proceed"},"needsAccountHolderFirstName":{"type":"boolean","description":"Whether the payment gateway requires the account holder's first name to proceed"},"needsAccountHolderLastName":{"type":"boolean","description":"Whether the payment gateway requires the account holder's last name to proceed"},"needsFullServiceAddress":{"type":"boolean","description":"Whether the payment gateway requires a full service address to proceed"},"needsPhoneNumber":{"type":"boolean","description":"Whether the payment gateway requires a phone number to proceed"}},"title":"ValidatePaymentGatewayRequiredData"},"paymentGatewayTypes_PaymentGatewayAttempt":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the payment gateway attempt"},"status":{"$ref":"#/components/schemas/paymentGatewayTypes_PaymentGatewayJobStatus","description":"The status of the attempt"},"amount":{"type":"number","format":"double","description":"The amount processed in this attempt"},"receiptUrl":{"type":"string","description":"The URL of the receipt for this attempt"},"createdAt":{"type":"string","format":"date-time","description":"The timestamp when the attempt was created"}},"required":["id","status","createdAt"],"title":"PaymentGatewayAttempt"},"paymentGatewayTypes_PaymentGatewayError":{"type":"string","enum":["NO_VALID_PAYMENT_GATEWAY_FOUND","PAYMENT_GATEWAY_UNSUPPORTED","CARD_DETAILS_INVALID","CARD_DECLINED","INVOICE_AMOUNT_MISMATCH"],"title":"PaymentGatewayError"},"paymentGatewayTypes_ProcessPaymentGatewayResponse":{"oneOf":[{"type":"object","properties":{"jobStatus":{"type":"string","enum":["pending"],"description":"Discriminator value: pending"},"jobId":{"type":"string","description":"The job ID of the payment gateway processing job"},"createdAt":{"type":"string","format":"date-time","description":"The timestamp when the job was created"},"updatedAt":{"type":"string","format":"date-time","description":"The timestamp when the job was last updated"}},"required":["jobStatus","jobId","createdAt","updatedAt"]},{"type":"object","properties":{"jobStatus":{"type":"string","enum":["success"],"description":"Discriminator value: success"},"jobId":{"type":"string","description":"The job ID of the payment gateway processing job"},"receiptUrl":{"type":"string","description":"The URL of the receipt that was downloaded from the payment gateway"},"invoiceAmount":{"type":"number","format":"double","description":"The invoice amount detected from the payment gateway"},"gatewayAmount":{"type":"number","format":"double","description":"The amount displayed on the payment gateway (may include fees)"},"vendorName":{"type":"string","description":"The vendor name detected from the payment gateway"},"requiredData":{"$ref":"#/components/schemas/paymentGatewayTypes_ValidatePaymentGatewayRequiredData","description":"Information about what data is required to proceed with payment"},"attempts":{"type":"array","items":{"$ref":"#/components/schemas/paymentGatewayTypes_PaymentGatewayAttempt"},"description":"List of payment gateway attempts for this job"},"createdAt":{"type":"string","format":"date-time","description":"The timestamp when the job was created"},"updatedAt":{"type":"string","format":"date-time","description":"The timestamp when the job was last updated"}},"required":["jobStatus","jobId","attempts","createdAt","updatedAt"]},{"type":"object","properties":{"jobStatus":{"type":"string","enum":["failed"],"description":"Discriminator value: failed"},"jobId":{"type":"string","description":"The job ID of the payment gateway processing job"},"errorType":{"$ref":"#/components/schemas/paymentGatewayTypes_PaymentGatewayError","description":"The error that occurred during the payment gateway processing job"},"errorMessage":{"type":"string","description":"The error message that occurred during the payment gateway processing job"},"createdAt":{"type":"string","format":"date-time","description":"The timestamp when the job was created"},"updatedAt":{"type":"string","format":"date-time","description":"The timestamp when the job was last updated"}},"required":["jobStatus","jobId","errorType","createdAt","updatedAt"]}],"discriminator":{"propertyName":"jobStatus"},"title":"ProcessPaymentGatewayResponse"},"paymentGatewayTypes_SearchPaymentGatewayProcessJobsResponse":{"type":"object","properties":{"jobs":{"type":"array","items":{"$ref":"#/components/schemas/paymentGatewayTypes_ProcessPaymentGatewayResponse"},"description":"List of payment gateway process jobs matching the search criteria"},"hasMore":{"type":"boolean","description":"Whether there are more jobs available beyond the current page"}},"required":["jobs","hasMore"],"title":"SearchPaymentGatewayProcessJobsResponse"},"commons_CountryCode":{"type":"string","enum":["AF","AL","DZ","AS","AD","AO","AI","AQ","AG","AR","AM","AW","AU","AT","AZ","BS","BH","BD","BB","BY","BE","BZ","BJ","BM","BT","BO","BQ","BA","BW","BV","BR","IO","BN","BG","BF","BI","KH","CM","CA","CV","KY","CF","TD","CL","CN","CX","CC","CO","KM","CG","CD","CK","CR","HR","CU","CW","CY","CZ","CI","DK","DJ","DM","DO","EC","EG","SV","GQ","ER","EE","SZ","ET","FK","FO","FJ","FI","FR","GF","PF","TF","GA","GM","GE","DE","GH","GI","GR","GL","GD","GP","GU","GT","GG","GN","GW","GY","HT","HM","VA","HN","HK","HU","IS","IN","ID","IR","IQ","IE","IM","IL","IT","JM","JP","JE","JO","KZ","KE","KI","KP","KR","KW","KG","LA","LV","LB","LS","LR","LY","LI","LT","LU","MO","MK","MG","MW","MY","MV","ML","MT","MH","MQ","MR","MU","YT","MX","FM","MD","MC","MN","ME","MS","MA","MZ","MM","NA","NR","NP","NL","NC","NZ","NI","NE","NG","NU","NF","MP","NO","OM","PK","PW","PS","PA","PG","PY","PE","PH","PN","PL","PT","PR","QA","RO","RU","RW","RE","BL","SH","KN","LC","MF","PM","VC","WS","SM","ST","SA","SN","RS","SC","SL","SG","SX","SK","SI","SB","SO","ZA","GS","SS","ES","LK","SD","SR","SJ","SE","CH","SY","TW","TJ","TZ","TH","TL","TG","TK","TO","TT","TN","TR","TM","TC","TV","UG","UA","AE","GB","US","UM","UY","UZ","VU","VE","VN","VG","VI","WF","EH","YE","ZM","ZW","AX"],"title":"CountryCode"},"paymentGatewayTypes_ProcessPaymentGatewayCardType":{"type":"string","enum":["credit","debit"],"title":"ProcessPaymentGatewayCardType"},"paymentGatewayTypes_ProcessPaymentGatewayAchDetails":{"type":"object","properties":{"routingNumber":{"type":"string","description":"The routing number of the ACH account"},"accountNumber":{"type":"string","description":"The account number of the ACH account"},"accountName":{"type":"string","description":"The name on the ACH account"},"accountType":{"$ref":"#/components/schemas/paymentMethodTypes_BankType","description":"The type of bank account (checking or savings)"}},"required":["routingNumber","accountNumber"],"title":"ProcessPaymentGatewayAchDetails"},"paymentGatewayTypes_EphemeralKeyEndpoint":{"type":"object","properties":{"url":{"type":"string","description":"The URL endpoint to call for generating ephemeral keys"},"method":{"type":"string","default":"POST","description":"The HTTP method to use for the request"},"headers":{"type":"object","additionalProperties":{"type":"string"},"description":"The headers to include in the request. Supports variables {{cardId}}, {{nonce}}, and {{accountId}} that will be replaced with actual values."},"postBody":{"type":"string","description":"The body to include in the POST request. Supports variables {{cardId}}, {{nonce}}, and {{accountId}} that will be replaced with actual values."}},"required":["url","method","headers"],"title":"EphemeralKeyEndpoint"},"paymentGatewayTypes_ProcessPaymentGatewayCardDetails":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["direct"],"description":"Discriminator value: direct"},"firstName":{"type":"string","description":"The first name of the card user"},"lastName":{"type":"string","description":"The last name of the card user"},"postalCode":{"type":"string","description":"The postal code of the address of the card"},"country":{"$ref":"#/components/schemas/commons_CountryCode","description":"The country of the address of the card"},"cardType":{"$ref":"#/components/schemas/paymentGatewayTypes_ProcessPaymentGatewayCardType","description":"The type of card (credit or debit). Defaults to debit."},"phoneNumber":{"type":"string","description":"The phone number of the card user"},"email":{"type":"string","description":"The email of the card user"},"fullAddress":{"type":"string","description":"The full address of the card user"},"achDetails":{"$ref":"#/components/schemas/paymentGatewayTypes_ProcessPaymentGatewayAchDetails","description":"The details of the fallback ACH account to use for the payment. This will be used if a fee is charged for card processing."},"cardNumber":{"type":"string","description":"The number of the card to use for the payment"},"expirationMonth":{"type":"integer","description":"The month of the expiration date of the card to use for the payment. This must be a number between 1 and 12."},"expirationYear":{"type":"integer","description":"The year of the expiration date of the card to use for the payment. This must be the full year, not the last two digits."},"cvv":{"type":"string","description":"The CVV of the card to use for the payment"}},"required":["type","firstName","lastName","postalCode","country","cardNumber","expirationMonth","expirationYear","cvv"]},{"type":"object","properties":{"type":{"type":"string","enum":["iframe"],"description":"Discriminator value: iframe"},"firstName":{"type":"string","description":"The first name of the card user"},"lastName":{"type":"string","description":"The last name of the card user"},"postalCode":{"type":"string","description":"The postal code of the address of the card"},"country":{"$ref":"#/components/schemas/commons_CountryCode","description":"The country of the address of the card"},"cardType":{"$ref":"#/components/schemas/paymentGatewayTypes_ProcessPaymentGatewayCardType","description":"The type of card (credit or debit). Defaults to debit."},"phoneNumber":{"type":"string","description":"The phone number of the card user"},"email":{"type":"string","description":"The email of the card user"},"fullAddress":{"type":"string","description":"The full address of the card user"},"achDetails":{"$ref":"#/components/schemas/paymentGatewayTypes_ProcessPaymentGatewayAchDetails","description":"The details of the fallback ACH account to use for the payment. This will be used if a fee is charged for card processing."},"iframeUrl":{"type":"string","description":"The URL of the iframe that render the virtual card details"}},"required":["type","firstName","lastName","postalCode","country","iframeUrl"]},{"type":"object","properties":{"type":{"type":"string","enum":["stripeIssuing"],"description":"Discriminator value: stripeIssuing"},"firstName":{"type":"string","description":"The first name of the card user"},"lastName":{"type":"string","description":"The last name of the card user"},"postalCode":{"type":"string","description":"The postal code of the address of the card"},"country":{"$ref":"#/components/schemas/commons_CountryCode","description":"The country of the address of the card"},"cardType":{"$ref":"#/components/schemas/paymentGatewayTypes_ProcessPaymentGatewayCardType","description":"The type of card (credit or debit). Defaults to debit."},"phoneNumber":{"type":"string","description":"The phone number of the card user"},"email":{"type":"string","description":"The email of the card user"},"fullAddress":{"type":"string","description":"The full address of the card user"},"achDetails":{"$ref":"#/components/schemas/paymentGatewayTypes_ProcessPaymentGatewayAchDetails","description":"The details of the fallback ACH account to use for the payment. This will be used if a fee is charged for card processing."},"stripeCardId":{"type":"string","description":"The Stripe Issuing card ID"},"stripePublishableKey":{"type":"string","description":"The Stripe publishable key for the Issuing Elements"},"stripeAccountId":{"type":"string","description":"The Stripe account ID (optional, used for connected accounts)"},"ephemeralKeyEndpoint":{"$ref":"#/components/schemas/paymentGatewayTypes_EphemeralKeyEndpoint","description":"The endpoint configuration for generating ephemeral keys. Expects a JSON response with a `ephemeralKeySecret` field."}},"required":["type","firstName","lastName","postalCode","country","stripeCardId","stripePublishableKey","ephemeralKeyEndpoint"]},{"type":"object","properties":{"type":{"type":"string","enum":["lithic"],"description":"Discriminator value: lithic"},"firstName":{"type":"string","description":"The first name of the card user"},"lastName":{"type":"string","description":"The last name of the card user"},"postalCode":{"type":"string","description":"The postal code of the address of the card"},"country":{"$ref":"#/components/schemas/commons_CountryCode","description":"The country of the address of the card"},"cardType":{"$ref":"#/components/schemas/paymentGatewayTypes_ProcessPaymentGatewayCardType","description":"The type of card (credit or debit). Defaults to debit."},"phoneNumber":{"type":"string","description":"The phone number of the card user"},"email":{"type":"string","description":"The email of the card user"},"fullAddress":{"type":"string","description":"The full address of the card user"},"achDetails":{"$ref":"#/components/schemas/paymentGatewayTypes_ProcessPaymentGatewayAchDetails","description":"The details of the fallback ACH account to use for the payment. This will be used if a fee is charged for card processing."},"embedRequest":{"type":"string","description":"The base64-encoded embed request for the Lithic virtual card"},"hmac":{"type":"string","description":"The HMAC signature for the embed request"}},"required":["type","firstName","lastName","postalCode","country","embedRequest","hmac"]},{"type":"object","properties":{"type":{"type":"string","enum":["marqetaJs"],"description":"Discriminator value: marqetaJs"},"firstName":{"type":"string","description":"The first name of the card user"},"lastName":{"type":"string","description":"The last name of the card user"},"postalCode":{"type":"string","description":"The postal code of the address of the card"},"country":{"$ref":"#/components/schemas/commons_CountryCode","description":"The country of the address of the card"},"cardType":{"$ref":"#/components/schemas/paymentGatewayTypes_ProcessPaymentGatewayCardType","description":"The type of card (credit or debit). Defaults to debit."},"phoneNumber":{"type":"string","description":"The phone number of the card user"},"email":{"type":"string","description":"The email of the card user"},"fullAddress":{"type":"string","description":"The full address of the card user"},"achDetails":{"$ref":"#/components/schemas/paymentGatewayTypes_ProcessPaymentGatewayAchDetails","description":"The details of the fallback ACH account to use for the payment. This will be used if a fee is charged for card processing."},"cardToken":{"type":"string","description":"The Marqeta card token for the virtual card"},"clientAccessToken":{"type":"string","description":"The Marqeta client access token for Marqeta.js authentication"}},"required":["type","firstName","lastName","postalCode","country","cardToken","clientAccessToken"]}],"discriminator":{"propertyName":"type"},"title":"ProcessPaymentGatewayCardDetails"},"paymentGatewayTypes_ProcessPaymentGatewayRequest":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["document"],"description":"Discriminator value: document"},"document":{"type":"string","description":"The invoice document PDF to extract the payment gateway from. Must be in base64 format or a publicly accessible URL."},"cardDetails":{"$ref":"#/components/schemas/paymentGatewayTypes_ProcessPaymentGatewayCardDetails","description":"The details of the card to use for the payment"}},"required":["type","document","cardDetails"]},{"type":"object","properties":{"type":{"type":"string","enum":["html"],"description":"Discriminator value: html"},"html":{"type":"string","description":"The HTML from an email to extract the payment gateway from"},"cardDetails":{"$ref":"#/components/schemas/paymentGatewayTypes_ProcessPaymentGatewayCardDetails","description":"The details of the card to use for the payment"}},"required":["type","html","cardDetails"]}],"discriminator":{"propertyName":"type"},"title":"ProcessPaymentGatewayRequest"},"paymentGatewayTypes_ValidatePaymentGatewayCardAcceptance":{"type":"string","enum":["ACCEPTED","NOT_ACCEPTED","UNKNOWN"],"title":"ValidatePaymentGatewayCardAcceptance"},"paymentGatewayTypes_ValidatePaymentGatewayCardFee":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["percentage"],"description":"Discriminator value: percentage"},"value":{"type":"number","format":"double","description":"The fee percentage in bps. For example, if the fee is 2.5% and the payment amount is $100, set this to 250."}},"required":["type","value"]},{"type":"object","properties":{"type":{"type":"string","enum":["flat"],"description":"Discriminator value: flat"},"value":{"type":"number","format":"double","description":"The fee amount in major units of the invoice currency. For example, if the fee is a flat $2.50, set this to 2.5."}},"required":["type","value"]},{"type":"object","properties":{"type":{"type":"string","enum":["none"],"description":"Discriminator value: none"}},"required":["type"]}],"discriminator":{"propertyName":"type"},"title":"ValidatePaymentGatewayCardFee"},"paymentGatewayTypes_ValidatePaymentGatewayCardResponse":{"type":"object","properties":{"eligibility":{"$ref":"#/components/schemas/paymentGatewayTypes_ValidatePaymentGatewayCardAcceptance","description":"Whether the payment gateway accepts card payments"},"fee":{"$ref":"#/components/schemas/paymentGatewayTypes_ValidatePaymentGatewayCardFee","description":"The fee that was extracted from the gateway"}},"required":["eligibility","fee"],"title":"ValidatePaymentGatewayCardResponse"},"paymentGatewayTypes_ValidatePaymentGatewayResponse":{"oneOf":[{"type":"object","properties":{"jobStatus":{"type":"string","enum":["pending"],"description":"Discriminator value: pending"},"jobId":{"type":"string","description":"The job ID of the payment gateway validation job"},"createdAt":{"type":"string","format":"date-time","description":"The timestamp when the job was created"},"updatedAt":{"type":"string","format":"date-time","description":"The timestamp when the job was last updated"}},"required":["jobStatus","jobId","createdAt","updatedAt"]},{"type":"object","properties":{"jobStatus":{"type":"string","enum":["success"],"description":"Discriminator value: success"},"jobId":{"type":"string","description":"The job ID of the payment gateway validation job"},"paymentGatewayUrl":{"type":"string","description":"The payment gateway URL that was found in the document"},"card":{"$ref":"#/components/schemas/paymentGatewayTypes_ValidatePaymentGatewayCardResponse","description":"Data on the card payments that were extracted from the gateway"},"invoiceAmount":{"type":"number","format":"double","description":"The invoice amount detected from the invoice"},"gatewayAmount":{"type":"number","format":"double","description":"The amount displayed on the payment gateway (may include fees)"},"vendorName":{"type":"string","description":"The vendor name"},"requiredData":{"$ref":"#/components/schemas/paymentGatewayTypes_ValidatePaymentGatewayRequiredData","description":"Information about what data is required to proceed with payment"},"createdAt":{"type":"string","format":"date-time","description":"The timestamp when the job was created"},"updatedAt":{"type":"string","format":"date-time","description":"The timestamp when the job was last updated"}},"required":["jobStatus","jobId","createdAt","updatedAt"]},{"type":"object","properties":{"jobStatus":{"type":"string","enum":["failed"],"description":"Discriminator value: failed"},"jobId":{"type":"string","description":"The job ID of the payment gateway validation job"},"errorType":{"$ref":"#/components/schemas/paymentGatewayTypes_PaymentGatewayError","description":"The error that occurred during the payment gateway validation job"},"errorMessage":{"type":"string","description":"The error message that occurred during the payment gateway validation job"},"createdAt":{"type":"string","format":"date-time","description":"The timestamp when the job was created"},"updatedAt":{"type":"string","format":"date-time","description":"The timestamp when the job was last updated"}},"required":["jobStatus","jobId","errorType","createdAt","updatedAt"]}],"discriminator":{"propertyName":"jobStatus"},"title":"ValidatePaymentGatewayResponse"},"paymentGatewayTypes_SearchPaymentGatewayValidationJobsResponse":{"type":"object","properties":{"jobs":{"type":"array","items":{"$ref":"#/components/schemas/paymentGatewayTypes_ValidatePaymentGatewayResponse"},"description":"List of payment gateway validation jobs matching the search criteria"},"hasMore":{"type":"boolean","description":"Whether there are more jobs available beyond the current page"}},"required":["jobs","hasMore"],"title":"SearchPaymentGatewayValidationJobsResponse"},"paymentGatewayTypes_ValidatePaymentGatewayRequest":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["document"],"description":"Discriminator value: document"},"document":{"type":"string","description":"The invoice document PDF to extract the payment gateway from. Must be in base64 format or a publicly accessible URL."}},"required":["type","document"]},{"type":"object","properties":{"type":{"type":"string","enum":["html"],"description":"Discriminator value: html"},"html":{"type":"string","description":"The HTML from an email to extract the payment gateway from"}},"required":["type","html"]}],"discriminator":{"propertyName":"type"},"title":"ValidatePaymentGatewayRequest"},"paymentMethodTypes_PaymentMethodWithEntityResponse":{"type":"object","properties":{"paymentMethod":{"$ref":"#/components/schemas/paymentMethodTypes_PaymentMethodResponse"},"entity":{"$ref":"#/components/schemas/entityTypes_EntityResponse"}},"required":["paymentMethod","entity"],"title":"PaymentMethodWithEntityResponse"},"paymentMethodTypes_PaymentMethodWithEntityFindResponse":{"type":"object","properties":{"count":{"type":"integer"},"hasMore":{"type":"boolean"},"data":{"type":"array","items":{"$ref":"#/components/schemas/paymentMethodTypes_PaymentMethodWithEntityResponse"}}},"required":["count","hasMore","data"],"title":"PaymentMethodWithEntityFindResponse"},"transaction_TransactionType":{"type":"string","enum":["bankAccountToBankAccount","bankAccountToMailedCheck","bankAccountToPrintedCheck","bankAccountToWallet","cardToBankAccount","cardToWallet","walletToBankAccount","walletToWallet","custom","offPlatform"],"title":"TransactionType"},"transaction_TransactionResponse":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["bankAccountToBankAccount"],"description":"Discriminator value: bankAccountToBankAccount"},"id":{"$ref":"#/components/schemas/transaction_TransactionId"},"status":{"$ref":"#/components/schemas/transaction_TransactionStatus"},"amount":{"type":"number","format":"double"},"currency":{"type":"string"},"payerId":{"$ref":"#/components/schemas/entityTypes_EntityId"},"payer":{"$ref":"#/components/schemas/entityTypes_CounterpartyResponse"},"paymentSource":{"$ref":"#/components/schemas/paymentMethodTypes_PaymentMethodResponse"},"paymentSourceId":{"$ref":"#/components/schemas/paymentMethodTypes_PaymentMethodId"},"vendorId":{"$ref":"#/components/schemas/entityTypes_EntityId"},"vendor":{"$ref":"#/components/schemas/entityTypes_CounterpartyResponse"},"paymentDestination":{"$ref":"#/components/schemas/paymentMethodTypes_PaymentMethodResponse"},"paymentDestinationId":{"$ref":"#/components/schemas/paymentMethodTypes_PaymentMethodId"},"paymentDestinationOptions":{"$ref":"#/components/schemas/invoiceTypes_PaymentDestinationOptions"},"fees":{"$ref":"#/components/schemas/invoiceTypes_InvoiceFeesResponse"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"failureReason":{"$ref":"#/components/schemas/transaction_TransactionFailureReason","description":"If the invoice failed to be paid, this field will be populated with the reason of failure."},"invoices":{"type":"array","items":{"$ref":"#/components/schemas/invoiceTypes_InvoiceResponse"},"description":"Invoices associated with this transaction"}},"required":["type","id","status","amount","currency","payerId","payer","paymentSource","paymentSourceId","vendorId","vendor","paymentDestination","paymentDestinationId","createdAt","updatedAt","invoices"]},{"type":"object","properties":{"type":{"type":"string","enum":["bankAccountToMailedCheck"],"description":"Discriminator value: bankAccountToMailedCheck"},"id":{"$ref":"#/components/schemas/transaction_TransactionId"},"status":{"$ref":"#/components/schemas/transaction_TransactionStatus"},"amount":{"type":"number","format":"double"},"currency":{"type":"string"},"payerId":{"$ref":"#/components/schemas/entityTypes_EntityId"},"payer":{"$ref":"#/components/schemas/entityTypes_CounterpartyResponse"},"paymentSource":{"$ref":"#/components/schemas/paymentMethodTypes_PaymentMethodResponse"},"paymentSourceId":{"$ref":"#/components/schemas/paymentMethodTypes_PaymentMethodId"},"vendorId":{"$ref":"#/components/schemas/entityTypes_EntityId"},"vendor":{"$ref":"#/components/schemas/entityTypes_CounterpartyResponse"},"paymentDestination":{"$ref":"#/components/schemas/paymentMethodTypes_PaymentMethodResponse"},"paymentDestinationId":{"$ref":"#/components/schemas/paymentMethodTypes_PaymentMethodId"},"paymentDestinationOptions":{"$ref":"#/components/schemas/invoiceTypes_PaymentDestinationOptions"},"fees":{"$ref":"#/components/schemas/invoiceTypes_InvoiceFeesResponse"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"checkNumber":{"type":"integer","description":"The number of the check"},"mailedOnDate":{"type":"string","format":"date-time","description":"The date the check was mailed. If the check was not mailed, this field will be null."},"invoices":{"type":"array","items":{"$ref":"#/components/schemas/invoiceTypes_InvoiceResponse"},"description":"Invoices associated with this transaction"}},"required":["type","id","status","amount","currency","payerId","payer","paymentSource","paymentSourceId","vendorId","vendor","paymentDestination","paymentDestinationId","createdAt","updatedAt","checkNumber","invoices"]},{"type":"object","properties":{"type":{"type":"string","enum":["bankAccountToPrintedCheck"],"description":"Discriminator value: bankAccountToPrintedCheck"},"id":{"$ref":"#/components/schemas/transaction_TransactionId"},"status":{"$ref":"#/components/schemas/transaction_TransactionStatus"},"amount":{"type":"number","format":"double"},"currency":{"type":"string"},"payerId":{"$ref":"#/components/schemas/entityTypes_EntityId"},"payer":{"$ref":"#/components/schemas/entityTypes_CounterpartyResponse"},"paymentSource":{"$ref":"#/components/schemas/paymentMethodTypes_PaymentMethodResponse"},"paymentSourceId":{"$ref":"#/components/schemas/paymentMethodTypes_PaymentMethodId"},"vendorId":{"$ref":"#/components/schemas/entityTypes_EntityId"},"vendor":{"$ref":"#/components/schemas/entityTypes_CounterpartyResponse"},"paymentDestination":{"$ref":"#/components/schemas/paymentMethodTypes_PaymentMethodResponse"},"paymentDestinationId":{"$ref":"#/components/schemas/paymentMethodTypes_PaymentMethodId"},"paymentDestinationOptions":{"$ref":"#/components/schemas/invoiceTypes_PaymentDestinationOptions"},"fees":{"$ref":"#/components/schemas/invoiceTypes_InvoiceFeesResponse"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"checkNumber":{"type":"integer","description":"The number of the check"},"invoices":{"type":"array","items":{"$ref":"#/components/schemas/invoiceTypes_InvoiceResponse"},"description":"Invoices associated with this transaction"}},"required":["type","id","status","amount","currency","payerId","payer","paymentSource","paymentSourceId","vendorId","vendor","paymentDestination","paymentDestinationId","createdAt","updatedAt","checkNumber","invoices"]},{"type":"object","properties":{"type":{"type":"string","enum":["bankAccountToWallet"],"description":"Discriminator value: bankAccountToWallet"},"id":{"$ref":"#/components/schemas/transaction_TransactionId"},"status":{"$ref":"#/components/schemas/transaction_TransactionStatus"},"amount":{"type":"number","format":"double"},"currency":{"type":"string"},"payerId":{"$ref":"#/components/schemas/entityTypes_EntityId"},"payer":{"$ref":"#/components/schemas/entityTypes_CounterpartyResponse"},"paymentSource":{"$ref":"#/components/schemas/paymentMethodTypes_PaymentMethodResponse"},"paymentSourceId":{"$ref":"#/components/schemas/paymentMethodTypes_PaymentMethodId"},"vendorId":{"$ref":"#/components/schemas/entityTypes_EntityId"},"vendor":{"$ref":"#/components/schemas/entityTypes_CounterpartyResponse"},"paymentDestination":{"$ref":"#/components/schemas/paymentMethodTypes_PaymentMethodResponse"},"paymentDestinationId":{"$ref":"#/components/schemas/paymentMethodTypes_PaymentMethodId"},"paymentDestinationOptions":{"$ref":"#/components/schemas/invoiceTypes_PaymentDestinationOptions"},"fees":{"$ref":"#/components/schemas/invoiceTypes_InvoiceFeesResponse"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"failureReason":{"$ref":"#/components/schemas/transaction_TransactionFailureReason","description":"If the invoice failed to be paid, this field will be populated with the reason of failure."},"invoices":{"type":"array","items":{"$ref":"#/components/schemas/invoiceTypes_InvoiceResponse"},"description":"Invoices associated with this transaction"}},"required":["type","id","status","amount","currency","payerId","payer","paymentSource","paymentSourceId","vendorId","vendor","paymentDestination","paymentDestinationId","createdAt","updatedAt","invoices"]},{"type":"object","properties":{"type":{"type":"string","enum":["cardToBankAccount"],"description":"Discriminator value: cardToBankAccount"},"id":{"$ref":"#/components/schemas/transaction_TransactionId"},"status":{"$ref":"#/components/schemas/transaction_TransactionStatus"},"amount":{"type":"number","format":"double"},"currency":{"type":"string"},"payerId":{"$ref":"#/components/schemas/entityTypes_EntityId"},"payer":{"$ref":"#/components/schemas/entityTypes_CounterpartyResponse"},"paymentSource":{"$ref":"#/components/schemas/paymentMethodTypes_PaymentMethodResponse"},"paymentSourceId":{"$ref":"#/components/schemas/paymentMethodTypes_PaymentMethodId"},"vendorId":{"$ref":"#/components/schemas/entityTypes_EntityId"},"vendor":{"$ref":"#/components/schemas/entityTypes_CounterpartyResponse"},"paymentDestination":{"$ref":"#/components/schemas/paymentMethodTypes_PaymentMethodResponse"},"paymentDestinationId":{"$ref":"#/components/schemas/paymentMethodTypes_PaymentMethodId"},"paymentDestinationOptions":{"$ref":"#/components/schemas/invoiceTypes_PaymentDestinationOptions"},"fees":{"$ref":"#/components/schemas/invoiceTypes_InvoiceFeesResponse"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"failureReason":{"$ref":"#/components/schemas/transaction_TransactionFailureReason","description":"If the invoice failed to be paid, this field will be populated with the reason of failure."},"invoices":{"type":"array","items":{"$ref":"#/components/schemas/invoiceTypes_InvoiceResponse"},"description":"Invoices associated with this transaction"}},"required":["type","id","status","amount","currency","payerId","payer","paymentSource","paymentSourceId","vendorId","vendor","paymentDestination","paymentDestinationId","createdAt","updatedAt","invoices"]},{"type":"object","properties":{"type":{"type":"string","enum":["cardToWallet"],"description":"Discriminator value: cardToWallet"},"id":{"$ref":"#/components/schemas/transaction_TransactionId"},"status":{"$ref":"#/components/schemas/transaction_TransactionStatus"},"amount":{"type":"number","format":"double"},"currency":{"type":"string"},"payerId":{"$ref":"#/components/schemas/entityTypes_EntityId"},"payer":{"$ref":"#/components/schemas/entityTypes_CounterpartyResponse"},"paymentSource":{"$ref":"#/components/schemas/paymentMethodTypes_PaymentMethodResponse"},"paymentSourceId":{"$ref":"#/components/schemas/paymentMethodTypes_PaymentMethodId"},"vendorId":{"$ref":"#/components/schemas/entityTypes_EntityId"},"vendor":{"$ref":"#/components/schemas/entityTypes_CounterpartyResponse"},"paymentDestination":{"$ref":"#/components/schemas/paymentMethodTypes_PaymentMethodResponse"},"paymentDestinationId":{"$ref":"#/components/schemas/paymentMethodTypes_PaymentMethodId"},"paymentDestinationOptions":{"$ref":"#/components/schemas/invoiceTypes_PaymentDestinationOptions"},"fees":{"$ref":"#/components/schemas/invoiceTypes_InvoiceFeesResponse"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"invoices":{"type":"array","items":{"$ref":"#/components/schemas/invoiceTypes_InvoiceResponse"},"description":"Invoices associated with this transaction"}},"required":["type","id","status","amount","currency","payerId","payer","paymentSource","paymentSourceId","vendorId","vendor","paymentDestination","paymentDestinationId","createdAt","updatedAt","invoices"]},{"type":"object","properties":{"type":{"type":"string","enum":["walletToBankAccount"],"description":"Discriminator value: walletToBankAccount"},"id":{"$ref":"#/components/schemas/transaction_TransactionId"},"status":{"$ref":"#/components/schemas/transaction_TransactionStatus"},"amount":{"type":"number","format":"double"},"currency":{"type":"string"},"payerId":{"$ref":"#/components/schemas/entityTypes_EntityId"},"payer":{"$ref":"#/components/schemas/entityTypes_CounterpartyResponse"},"paymentSource":{"$ref":"#/components/schemas/paymentMethodTypes_PaymentMethodResponse"},"paymentSourceId":{"$ref":"#/components/schemas/paymentMethodTypes_PaymentMethodId"},"vendorId":{"$ref":"#/components/schemas/entityTypes_EntityId"},"vendor":{"$ref":"#/components/schemas/entityTypes_CounterpartyResponse"},"paymentDestination":{"$ref":"#/components/schemas/paymentMethodTypes_PaymentMethodResponse"},"paymentDestinationId":{"$ref":"#/components/schemas/paymentMethodTypes_PaymentMethodId"},"paymentDestinationOptions":{"$ref":"#/components/schemas/invoiceTypes_PaymentDestinationOptions"},"fees":{"$ref":"#/components/schemas/invoiceTypes_InvoiceFeesResponse"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"failureReason":{"$ref":"#/components/schemas/transaction_TransactionFailureReason","description":"If the invoice failed to be paid, this field will be populated with the reason of failure."},"invoices":{"type":"array","items":{"$ref":"#/components/schemas/invoiceTypes_InvoiceResponse"},"description":"Invoices associated with this transaction"}},"required":["type","id","status","amount","currency","payerId","payer","paymentSource","paymentSourceId","vendorId","vendor","paymentDestination","paymentDestinationId","createdAt","updatedAt","invoices"]},{"type":"object","properties":{"type":{"type":"string","enum":["walletToWallet"],"description":"Discriminator value: walletToWallet"},"id":{"$ref":"#/components/schemas/transaction_TransactionId"},"status":{"$ref":"#/components/schemas/transaction_TransactionStatus"},"amount":{"type":"number","format":"double"},"currency":{"type":"string"},"payerId":{"$ref":"#/components/schemas/entityTypes_EntityId"},"payer":{"$ref":"#/components/schemas/entityTypes_CounterpartyResponse"},"paymentSource":{"$ref":"#/components/schemas/paymentMethodTypes_PaymentMethodResponse"},"paymentSourceId":{"$ref":"#/components/schemas/paymentMethodTypes_PaymentMethodId"},"vendorId":{"$ref":"#/components/schemas/entityTypes_EntityId"},"vendor":{"$ref":"#/components/schemas/entityTypes_CounterpartyResponse"},"paymentDestination":{"$ref":"#/components/schemas/paymentMethodTypes_PaymentMethodResponse"},"paymentDestinationId":{"$ref":"#/components/schemas/paymentMethodTypes_PaymentMethodId"},"paymentDestinationOptions":{"$ref":"#/components/schemas/invoiceTypes_PaymentDestinationOptions"},"fees":{"$ref":"#/components/schemas/invoiceTypes_InvoiceFeesResponse"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"invoices":{"type":"array","items":{"$ref":"#/components/schemas/invoiceTypes_InvoiceResponse"},"description":"Invoices associated with this transaction"}},"required":["type","id","status","amount","currency","payerId","payer","paymentSource","paymentSourceId","vendorId","vendor","paymentDestination","paymentDestinationId","createdAt","updatedAt","invoices"]},{"type":"object","properties":{"type":{"type":"string","enum":["custom"],"description":"Discriminator value: custom"},"id":{"$ref":"#/components/schemas/transaction_TransactionId"},"status":{"$ref":"#/components/schemas/transaction_TransactionStatus"},"amount":{"type":"number","format":"double"},"currency":{"type":"string"},"payerId":{"$ref":"#/components/schemas/entityTypes_EntityId"},"payer":{"$ref":"#/components/schemas/entityTypes_CounterpartyResponse"},"paymentSource":{"$ref":"#/components/schemas/paymentMethodTypes_PaymentMethodResponse"},"paymentSourceId":{"$ref":"#/components/schemas/paymentMethodTypes_PaymentMethodId"},"vendorId":{"$ref":"#/components/schemas/entityTypes_EntityId"},"vendor":{"$ref":"#/components/schemas/entityTypes_CounterpartyResponse"},"paymentDestination":{"$ref":"#/components/schemas/paymentMethodTypes_PaymentMethodResponse"},"paymentDestinationId":{"$ref":"#/components/schemas/paymentMethodTypes_PaymentMethodId"},"paymentDestinationOptions":{"$ref":"#/components/schemas/invoiceTypes_PaymentDestinationOptions"},"fees":{"$ref":"#/components/schemas/invoiceTypes_InvoiceFeesResponse"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"invoices":{"type":"array","items":{"$ref":"#/components/schemas/invoiceTypes_InvoiceResponse"},"description":"Invoices associated with this transaction"}},"required":["type","id","status","amount","currency","payerId","payer","paymentSource","paymentSourceId","vendorId","vendor","paymentDestination","paymentDestinationId","createdAt","updatedAt","invoices"]},{"type":"object","properties":{"type":{"type":"string","enum":["offPlatform"],"description":"Discriminator value: offPlatform"},"id":{"$ref":"#/components/schemas/transaction_TransactionId"},"status":{"$ref":"#/components/schemas/transaction_TransactionStatus"},"amount":{"type":"number","format":"double"},"currency":{"type":"string"},"payerId":{"$ref":"#/components/schemas/entityTypes_EntityId"},"payer":{"$ref":"#/components/schemas/entityTypes_CounterpartyResponse"},"paymentSource":{"$ref":"#/components/schemas/paymentMethodTypes_PaymentMethodResponse"},"paymentSourceId":{"$ref":"#/components/schemas/paymentMethodTypes_PaymentMethodId"},"vendorId":{"$ref":"#/components/schemas/entityTypes_EntityId"},"vendor":{"$ref":"#/components/schemas/entityTypes_CounterpartyResponse"},"paymentDestination":{"$ref":"#/components/schemas/paymentMethodTypes_PaymentMethodResponse"},"paymentDestinationId":{"$ref":"#/components/schemas/paymentMethodTypes_PaymentMethodId"},"paymentDestinationOptions":{"$ref":"#/components/schemas/invoiceTypes_PaymentDestinationOptions"},"fees":{"$ref":"#/components/schemas/invoiceTypes_InvoiceFeesResponse"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"invoices":{"type":"array","items":{"$ref":"#/components/schemas/invoiceTypes_InvoiceResponse"},"description":"Invoices associated with this transaction"}},"required":["type","id","status","amount","currency","payerId","payer","paymentSource","paymentSourceId","vendorId","vendor","paymentDestination","paymentDestinationId","createdAt","updatedAt","invoices"]}],"discriminator":{"propertyName":"type"},"title":"TransactionResponse"},"transaction_FindTransactionsResponse":{"type":"object","properties":{"count":{"type":"integer"},"hasMore":{"type":"boolean"},"data":{"type":"array","items":{"$ref":"#/components/schemas/transaction_TransactionResponse"}}},"required":["count","hasMore","data"],"title":"FindTransactionsResponse"},"webhooks_CounterpartyWebhook":{"type":"object","properties":{"eventType":{"type":"string","description":"The type of the event."},"payeeId":{"type":"array","items":{"$ref":"#/components/schemas/entityTypes_EntityId"},"description":"A list of IDs for the payees involved."},"payorId":{"type":"array","items":{"$ref":"#/components/schemas/entityTypes_EntityId"},"description":"A list of IDs for the payors involved."},"user":{"$ref":"#/components/schemas/entityTypes_EntityUserResponse","description":"User who initiated the change."}},"required":["eventType","payeeId","payorId"],"title":"CounterpartyWebhook"},"webhooks_CounterpartyEventWebhook":{"type":"object","properties":{"eventType":{"type":"string","description":"The type of the event."},"entityId":{"$ref":"#/components/schemas/entityTypes_EntityId","description":"The ID of the entity that owns the counterparty relationship"},"counterpartyId":{"$ref":"#/components/schemas/entityTypes_EntityId","description":"The ID of the counterparty"}},"required":["eventType","entityId","counterpartyId"],"title":"CounterpartyEventWebhook"},"webhooks_EntityWebhook":{"type":"object","properties":{"eventType":{"type":"string","description":"The type of the event."},"entity":{"$ref":"#/components/schemas/entityTypes_EntityResponse","description":"The entity involved in the event."},"updatedByEntityId":{"$ref":"#/components/schemas/entityTypes_EntityId","description":"The ID of the entity that updated the entity. This will be different from the entityId if the entity was updated by a different entity (e.g. a C2 updating a C3).\nIf the entity was created or updated by an admin, this will be 'admin'."},"user":{"$ref":"#/components/schemas/entityTypes_EntityUserResponse","description":"User who initiated the change."}},"required":["eventType","entity","updatedByEntityId"],"title":"EntityWebhook"},"webhooks_EntityStatusChangedWebhook":{"type":"object","properties":{"eventType":{"type":"string","description":"The type of the event."},"entity":{"$ref":"#/components/schemas/entityTypes_EntityResponse","description":"The entity involved in the event."},"updatedByEntityId":{"$ref":"#/components/schemas/entityTypes_EntityId","description":"The ID of the entity that updated the entity. This will be different from the entityId if the entity was updated by a different entity (e.g. a C2 updating a C3).\nIf the entity was created or updated by an admin, this will be 'admin'."},"newStatus":{"type":"string","description":"The new status of the entity."},"previousStatus":{"type":"string","description":"The previous status of the entity."},"user":{"$ref":"#/components/schemas/entityTypes_EntityUserResponse","description":"User who initiated the change."}},"required":["eventType","entity","updatedByEntityId","newStatus","previousStatus"],"title":"EntityStatusChangedWebhook"},"webhooks_EntityMetadataUpdatedWebhook":{"type":"object","properties":{"eventType":{"type":"string","description":"The type of the event."},"entityId":{"$ref":"#/components/schemas/entityTypes_EntityId","description":"The ID of the entity that was updated."},"foreignId":{"type":"string","description":"Foreign ID associated with the entity."},"key":{"type":"string","description":"The key of the metadata that was updated."},"value":{"type":"array","items":{"type":"string"},"description":"A list of new values for the metadata."}},"required":["eventType","entityId","key","value"],"title":"EntityMetadataUpdatedWebhook"},"webhooks_PaymentMethodWebhook":{"type":"object","properties":{"eventType":{"type":"string","description":"The type of the event."},"entityId":{"$ref":"#/components/schemas/entityTypes_EntityId","description":"ID of the entity that the payment method belongs to."},"updatedByEntityId":{"$ref":"#/components/schemas/entityTypes_EntityId","description":"ID of the entity that created or updated the payment method.\nThis will be different from the entityId if the payment method was added by a different entity (e.g. a C2 creating a payment method for a C3).\nIf the payment method was created or updated by an admin, this will be 'admin'."},"paymentMethod":{"$ref":"#/components/schemas/paymentMethodTypes_PaymentMethodResponse","description":"The payment method details."},"entity":{"$ref":"#/components/schemas/entityTypes_EntityResponse","description":"Entity that the payment method belongs to."},"user":{"$ref":"#/components/schemas/entityTypes_EntityUserResponse","description":"User who initiated the change."}},"required":["eventType","entityId","updatedByEntityId","paymentMethod","entity"],"title":"PaymentMethodWebhook"},"webhooks_InvoiceWebhook":{"type":"object","properties":{"eventType":{"type":"string","description":"The type of the event."},"invoice":{"$ref":"#/components/schemas/invoiceTypes_InvoiceResponse","description":"The invoice involved in the event."},"user":{"$ref":"#/components/schemas/entityTypes_EntityUserResponse","description":"User who initiated the change."}},"required":["eventType","invoice"],"title":"InvoiceWebhook"},"webhooks_InvoiceCommentWebhook":{"type":"object","properties":{"eventType":{"type":"string","description":"The type of the event."},"invoiceId":{"$ref":"#/components/schemas/invoiceTypes_InvoiceId","description":"The ID of the invoice the comment belongs to."},"comment":{"$ref":"#/components/schemas/invoiceTypes_CommentResponse","description":"The comment that was created or deleted."},"user":{"$ref":"#/components/schemas/entityTypes_EntityUserResponse","description":"User who created or deleted the comment."}},"required":["eventType","invoiceId","comment"],"title":"InvoiceCommentWebhook"},"webhooks_InvoiceStatusChangedWebhook":{"type":"object","properties":{"eventType":{"type":"string","description":"The type of the event."},"invoice":{"$ref":"#/components/schemas/invoiceTypes_InvoiceResponse","description":"The invoice involved in the event."},"user":{"$ref":"#/components/schemas/entityTypes_EntityUserResponse","description":"User who initiated the change."},"newStatus":{"type":"string","description":"The new status of the invoice."},"previousStatus":{"type":"string","description":"The previous status of the invoice."}},"required":["eventType","invoice","newStatus","previousStatus"],"title":"InvoiceStatusChangedWebhook"},"webhooks_InvoiceEmailWebhook":{"type":"object","properties":{"eventType":{"type":"string","description":"The type of the event."},"invoice":{"$ref":"#/components/schemas/invoiceTypes_InvoiceResponse","description":"If an invoice was created from the email, this will be present."},"existingInvoiceId":{"$ref":"#/components/schemas/invoiceTypes_InvoiceId","description":"If an existing invoice already exists for the email, this will be present."}},"required":["eventType"],"title":"InvoiceEmailWebhook"},"webhooks_TransactionWebhook":{"type":"object","properties":{"eventType":{"type":"string","description":"The type of the event."},"transaction":{"$ref":"#/components/schemas/transaction_TransactionResponse","description":"The transaction details."}},"required":["eventType","transaction"],"description":"A transaction was created, completed, or failed","title":"TransactionWebhook"},"webhooks_BulkInvoiceCreationWebhook":{"type":"object","properties":{"eventType":{"type":"string","description":"The type of the event."},"data":{"type":"array","items":{"$ref":"#/components/schemas/invoiceTypes_BulkInvoiceCreationFromObjectResponse"},"description":"A list of bulk invoice creation responses."}},"required":["eventType","data"],"title":"BulkInvoiceCreationWebhook"},"webhooks_BulkInvoiceUpdateWebhook":{"type":"object","properties":{"eventType":{"type":"string","description":"The type of the event."},"data":{"type":"array","items":{"$ref":"#/components/schemas/invoiceTypes_BulkInvoiceUpdateFromObjectResponse"},"description":"A list of bulk invoice update responses."}},"required":["eventType","data"],"title":"BulkInvoiceUpdateWebhook"},"webhooks_BulkInvoiceApprovalWebhook":{"type":"object","properties":{"eventType":{"type":"string","description":"The type of the event."},"data":{"type":"array","items":{"$ref":"#/components/schemas/invoiceTypes_BulkInvoiceApprovalFromObjectResponse"},"description":"A list of bulk invoice approval responses."}},"required":["eventType","data"],"title":"BulkInvoiceApprovalWebhook"},"webhooks_BulkEntityCreationWebhook":{"type":"object","properties":{"eventType":{"type":"string","description":"The type of the event."},"data":{"type":"array","items":{"$ref":"#/components/schemas/entityTypes_BulkEntityCreationFromObjectResponse"},"description":"A list of bulk entity creation responses."}},"required":["eventType","data"],"title":"BulkEntityCreationWebhook"},"collectionTypes_EmailMessageResponse":{"type":"object","properties":{"subject":{"type":"string","description":"The subject of the email"},"body":{"type":"string","description":"The body of the email in plaintext"}},"required":["subject","body"],"title":"EmailMessageResponse"},"webhooks_InvoiceCollectionEventWebhook":{"type":"object","properties":{"eventType":{"type":"string","description":"The type of the event."},"invoice":{"$ref":"#/components/schemas/invoiceTypes_InvoiceResponse","description":"The invoice involved in the event."},"email":{"$ref":"#/components/schemas/collectionTypes_EmailMessageResponse","description":"Email message related to the invoice collection."}},"required":["eventType","invoice"],"title":"InvoiceCollectionEventWebhook"},"webhooks_OCRJobCompletedWebhook":{"type":"object","properties":{"eventType":{"type":"string","description":"The type of the event."},"jobId":{"$ref":"#/components/schemas/ocr_OCRJobId","description":"The ID of the OCR job that completed."},"status":{"$ref":"#/components/schemas/ocr_OCRJobStatus","description":"The final status of the OCR job."},"data":{"$ref":"#/components/schemas/ocr_OCRResponse","description":"The OCR job results. Only present if the job was successful."},"linkedJobIds":{"type":"array","items":{"$ref":"#/components/schemas/ocr_OCRJobId"},"description":"The IDs of any linked OCR jobs that are processing other subdocuments of the same document."},"pageRange":{"$ref":"#/components/schemas/ocr_OCRPageRange","description":"The start and end page numbers of the corresponding subdocument (zero-indexed, inclusive). If not provided, the document was not split during OCR."}},"required":["eventType","jobId","status"],"title":"OCRJobCompletedWebhook"},"webhooks_PaymentGatewayValidationJobCompletedWebhook":{"type":"object","properties":{"eventType":{"type":"string","description":"The type of the event."},"jobId":{"type":"string","description":"The ID of the payment gateway validation job that completed."},"data":{"$ref":"#/components/schemas/paymentGatewayTypes_ValidatePaymentGatewayResponse"}},"required":["eventType","jobId","data"],"title":"PaymentGatewayValidationJobCompletedWebhook"},"webhooks_PaymentGatewayProcessJobCompletedWebhook":{"type":"object","properties":{"eventType":{"type":"string","description":"The type of the event."},"jobId":{"type":"string","description":"The ID of the payment gateway process job that completed."},"data":{"$ref":"#/components/schemas/paymentGatewayTypes_ProcessPaymentGatewayResponse"}},"required":["eventType","jobId","data"],"title":"PaymentGatewayProcessJobCompletedWebhook"}},"securitySchemes":{"default":{"type":"http","scheme":"bearer"}}}}