{"openapi":"3.0.3","info":{"title":"Chaser API","description":"<details open>\n\n<summary>Documentation</summary>\n\n# Postman collection\n\nTo make your integration process even easier, you can import the OpenAPI specs to Postman: `File > Import > https://openapi.chaserhq.com/docs/json`\n\n# Authorization\n\nThe word \"Basic\" followed by a space and your `$API_KEY:$API_SECRET`, base64 encoded, which can be found in Chaser under **Organisation Settings > Integrations > Get API keys**.\n\n```\nAuthorization: Basic base64($API_KEY:$API_SECRET)\n```\n\n# Rate limit\n\nCurrent rate limit is **200 requests / minute**. Exceeding a rate limit will result in an _HTTP 429_ (too many requests) response.\nTo simplify the initial sync process, rate limiting restrictions are waived for the first 24 hours after the organization is created.\n\n# Errors\n\n- [403 Forbidden Error](#errors/forbidden)\n- [404 Not Found Error](#errors/not_found)\n- [400 Validation Error](#errors/validation)\n- [429 Rate Limit Error](#errors/rate_limit)\n- [500 Internal Server Error](#errors/internal_server_error)\n\n<h2 id=\"errors/forbidden\">Forbidden Error</h2>\n\nThe client does not have access rights to the resource. Your `API_KEY` and/or `API_SECRET` is invalid.\n\n```json\n{\n  \"message\": \"requested resource is forbidden\",\n  \"type\": \"forbidden_error\",\n  \"url\": \"https://openapi.chaserhq.com/docs/#errors/forbidden\"\n}\n```\n\n<h2 id=\"errors/not_found\">Not Found Error</h2>\n\nThe server cannot find the requested resource. Either the URL is not recognized or the endpoint is valid but the resource itself does not exist.\n\n```json\n{\n  \"message\": \"entity not found\",\n  \"type\": \"not_found_error\",\n  \"url\": \"https://openapi.chaserhq.com/docs/#errors/not_found\"\n}\n```\n\n<h2 id=\"errors/validation\">Validation Error</h2>\n\nThe server cannot process the request due to something that is perceived to be a client error (e.g., malformed request syntax, semantic errors).\n\n```json\n{\n  \"message\": \"request body is invalid\",\n  \"type\": \"validation_error\",\n  \"url\": \"https://openapi.chaserhq.com/docs/#errors/validation\"\n}\n```\n\n<h2 id=\"errors/rate_limit\">Rate Limit Error</h2>\n\nThe user has sent too many requests in a given amount of time\n\n```json\n{\n  \"message\": \"Rate limit exceeded, retry in 1 minute\",\n  \"type\": \"rate_limit_error\",\n  \"url\": \"https://openapi.chaserhq.com/docs/#errors/rate_limit\"\n}\n```\n\n<h2 id=\"errors/internal_server_error\">Internal Server Error</h2>\n\nThe server has encountered a situation it does not know how to handle.\n\n```json\n{\n  \"message\": \"Internal Server Error\",\n  \"type\": \"internal_server_error\",\n  \"url\": \"https://openapi.chaserhq.com/docs/#errors/internal_server_error\"\n}\n```\n\n# Filtering\n\nThe API supports several operators for flexible querying.\n\n## Supported Operators\n\n- **`in`**: Matches any value in the provided list.\n  **Usage**: `field[in]=value1,value2,...`\n  **Example**: `invoice_id[in]=1,2,3` (Matches records where `invoice_id` is 1, 2, or 3).\n\n- **`nin`**: Excludes records matching any value in the provided list.\n  **Usage**: `field[nin]=value1,value2,...`\n  **Example**: `invoice_id[nin]=4,5,6` (Excludes records where `invoice_id` is 4, 5, or 6).\n\n- **`eq`**: Matches records with a value equal to the provided value.\n  **Usage**: `field[eq]=value` or `field=value`\n  **Example**: `status[eq]=PAID` (Matches records where `status` is \"PAID\").\n\n- **`ne`**: Matches records with a value not equal to the provided value.\n  **Usage**: `field[ne]=value`\n  **Example**: `status[ne]=AUTHORISED` (Matches records where `status` is not \"AUTHORISED\").\n\n- **`gt`**: Matches records with a value greater than the provided value.\n  **Usage**: `field[gt]=value`\n  **Example**: `amount_due[gt]=1000` (Matches records where `amount_due` is greater than 1000).\n\n- **`lt`**: Matches records with a value less than the provided value.\n  **Usage**: `field[lt]=value`\n  **Example**: `amount_due[lt]=500` (Matches records where `amount_due` is less than 500).\n\n- **`gte`**: Matches records with a value greater than or equal to the provided value.\n  **Usage**: `field[gte]=value`\n  **Example**: `amount_due[gte]=1000` (Matches records where `amount_due` is at least 1000).\n\n- **`lte`**: Matches records with a value less than or equal to the provided value.\n  **Usage**: `field[lte]=value`\n  **Example**: `amount_due[lte]=500` (Matches records where `amount_due` is at most 500).\n\n## Combining Filters\n\nYou can combine multiple filters using the `&` symbol. All filters are applied as logical AND conditions.\n\n**Example**:\n\n```\ninvoice_id[in]=1,2,3&amount_due[gte]=1000&status[ne]=PAID\n```\n\nNote: Filters are specific to each entity. Check the supported fields and operators for the entity you are querying in the documentation below.\n\n# Bulk upserts\n\nWith the bulk upsert API, you can insert or update large batches of entities (up to 100 items per request). It updates records if an internal or external ID matches, making it a practical solution for initial data sync.\n\n# Resource IDs\n\nThe API supports two types of identifiers for resources:\n\n### Internal IDs\n\n- `id` field all supported resources\n- Generated internally by the system and cannot be changed by the user\n\n### External IDs\n\n- `external_id` for customer and contact persons, `invoice_id` for invoices, `credit_note_id` for credit notes, `overpayment_id` for overpayments\n- Identifiers from external systems (e.g., accounting software IDs)\n- Used to link Chaser resources with their counterparts in external systems\n- Eliminates the need to store and manage internal IDs for the integration developer\n\n### Using IDs in API Requests\n\n- You can reference resources using either ID type in API paths\n- For internal IDs, use the standard path: `/v1/{resource}/{id}`\n- For external IDs, prepend `ext_` to the ID: `/v1/{resource}/ext_{external_id}`\n- Example: `/v1/customers/ext_1234` (using external_id) or `/v1/customers/cust_1234` (using internal id)\n\n</details>\n","version":"1.10.0","contact":{"name":"Support","email":"api@chaserhq.com"}},"components":{"securitySchemes":{"Basic Authorization":{"type":"http","scheme":"basic","description":"Get your API keys under [Organisation settings > Integrations > Get API Keys](https://my.chaserhq.com/settings/integrations)"}},"schemas":{}},"paths":{"/":{"get":{"responses":{"200":{"description":"Default Response"}}}},"/status/":{"get":{"responses":{"200":{"description":"Default Response"}}}},"/v1/customers/{customer_id}/contact_persons":{"get":{"summary":"Get contact persons","tags":["Contact Persons"],"description":"Get contact persons","parameters":[{"schema":{"type":"string"},"in":"path","name":"customer_id","required":true,"description":"Customer unique identifier. Both \"id\" and \"external_id\" can be used. In case of \"external_id\" please prepend \"ext_\" prefix (e.g. /v1/customers/ext_1234)"}],"security":[{"Basic Authorization":[]}],"responses":{"2XX":{"description":"Success","content":{"application/json":{"schema":{"description":"Success","type":"object","properties":{"object":{"type":"string"},"url":{"type":"string"},"page_number":{"type":"number"},"page_size":{"type":"number"},"total_count":{"type":"number"},"data":{"type":"array","items":{"type":"object","properties":{"external_id":{"type":"string"},"contact_first_name":{"type":"string","minLength":1,"nullable":true},"contact_last_name":{"type":"string","minLength":1,"nullable":true},"contact_email_address":{"type":"string","format":"email","nullable":true},"phone_number":{"type":"string","nullable":true},"mobile_number":{"type":"string","nullable":true},"status":{"type":"string","enum":["ACTIVE","ARCHIVED"],"default":"ACTIVE"}}}}}}}}},"4XX":{"description":"Client Error","content":{"application/json":{"schema":{"type":"object","description":"Client Error","properties":{"type":{"type":"string"},"message":{"type":"string"},"url":{"type":"string"}}}}}},"5XX":{"description":"Server Error","content":{"application/json":{"schema":{"description":"Server Error","type":"object","properties":{"type":{"type":"string"},"message":{"type":"string"},"url":{"type":"string"}}}}}}}},"post":{"summary":"Create contact person","tags":["Contact Persons"],"description":"Create contact person","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["external_id"],"properties":{"external_id":{"type":"string"},"contact_first_name":{"type":"string","minLength":1,"nullable":true},"contact_last_name":{"type":"string","minLength":1,"nullable":true},"contact_email_address":{"type":"string","format":"email","nullable":true},"phone_number":{"type":"string","nullable":true},"mobile_number":{"type":"string","nullable":true},"status":{"type":"string","enum":["ACTIVE","ARCHIVED"],"default":"ACTIVE"}}}}},"required":true},"parameters":[{"schema":{"type":"string"},"in":"path","name":"customer_id","required":true,"description":"Customer unique identifier. Both \"id\" and \"external_id\" can be used. In case of \"external_id\" please prepend \"ext_\" prefix (e.g. /v1/customers/ext_1234)"}],"security":[{"Basic Authorization":[]}],"responses":{"2XX":{"description":"Success","content":{"application/json":{"schema":{"description":"Success","type":"object","properties":{"object":{"type":"string"},"url":{"type":"string"},"data":{"type":"object","properties":{"external_id":{"type":"string"},"contact_first_name":{"type":"string","minLength":1,"nullable":true},"contact_last_name":{"type":"string","minLength":1,"nullable":true},"contact_email_address":{"type":"string","format":"email","nullable":true},"phone_number":{"type":"string","nullable":true},"mobile_number":{"type":"string","nullable":true},"status":{"type":"string","enum":["ACTIVE","ARCHIVED"],"default":"ACTIVE"}}}}}}}},"4XX":{"description":"Client Error","content":{"application/json":{"schema":{"type":"object","description":"Client Error","properties":{"type":{"type":"string"},"message":{"type":"string"},"url":{"type":"string"}}}}}},"5XX":{"description":"Server Error","content":{"application/json":{"schema":{"description":"Server Error","type":"object","properties":{"type":{"type":"string"},"message":{"type":"string"},"url":{"type":"string"}}}}}}}}},"/v1/customers/{customer_id}/contact_persons/{contact_person_id}":{"get":{"summary":"Get contact person by id","tags":["Contact Persons"],"description":"Get contact person by id.","parameters":[{"schema":{"type":"string"},"in":"path","name":"customer_id","required":true,"description":"Customer unique identifier. Both \"id\" and \"external_id\" can be used. In case of \"external_id\" please prepend \"ext_\" prefix (e.g. /v1/customers/ext_1234)"},{"schema":{"type":"string"},"in":"path","name":"contact_person_id","required":true,"description":"Contact person unique identifier (external_id)"}],"security":[{"Basic Authorization":[]}],"responses":{"2XX":{"description":"Success","content":{"application/json":{"schema":{"description":"Success","type":"object","properties":{"object":{"type":"string"},"url":{"type":"string"},"data":{"type":"object","properties":{"external_id":{"type":"string"},"contact_first_name":{"type":"string","minLength":1,"nullable":true},"contact_last_name":{"type":"string","minLength":1,"nullable":true},"contact_email_address":{"type":"string","format":"email","nullable":true},"phone_number":{"type":"string","nullable":true},"mobile_number":{"type":"string","nullable":true},"status":{"type":"string","enum":["ACTIVE","ARCHIVED"],"default":"ACTIVE"}}}}}}}},"4XX":{"description":"Client Error","content":{"application/json":{"schema":{"type":"object","description":"Client Error","properties":{"type":{"type":"string"},"message":{"type":"string"},"url":{"type":"string"}}}}}},"5XX":{"description":"Server Error","content":{"application/json":{"schema":{"description":"Server Error","type":"object","properties":{"type":{"type":"string"},"message":{"type":"string"},"url":{"type":"string"}}}}}}}},"put":{"summary":"Update contact person","tags":["Contact Persons"],"description":"Update contact person.","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{"external_id":{"type":"string"},"contact_first_name":{"type":"string","minLength":1,"nullable":true},"contact_last_name":{"type":"string","minLength":1,"nullable":true},"contact_email_address":{"type":"string","format":"email","nullable":true},"phone_number":{"type":"string","nullable":true},"mobile_number":{"type":"string","nullable":true},"status":{"type":"string","enum":["ACTIVE","ARCHIVED"],"default":"ACTIVE"}}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"customer_id","required":true,"description":"Customer unique identifier. Both \"id\" and \"external_id\" can be used. In case of \"external_id\" please prepend \"ext_\" prefix (e.g. /v1/customers/ext_1234)"},{"schema":{"type":"string"},"in":"path","name":"contact_person_id","required":true,"description":"Contact person unique identifier (external_id)"}],"security":[{"Basic Authorization":[]}],"responses":{"2XX":{"description":"Success","content":{"application/json":{"schema":{"description":"Success","type":"object","properties":{"object":{"type":"string"},"url":{"type":"string"},"data":{"type":"object","properties":{"external_id":{"type":"string"},"contact_first_name":{"type":"string","minLength":1,"nullable":true},"contact_last_name":{"type":"string","minLength":1,"nullable":true},"contact_email_address":{"type":"string","format":"email","nullable":true},"phone_number":{"type":"string","nullable":true},"mobile_number":{"type":"string","nullable":true},"status":{"type":"string","enum":["ACTIVE","ARCHIVED"],"default":"ACTIVE"}}}}}}}},"4XX":{"description":"Client Error","content":{"application/json":{"schema":{"type":"object","description":"Client Error","properties":{"type":{"type":"string"},"message":{"type":"string"},"url":{"type":"string"}}}}}},"5XX":{"description":"Server Error","content":{"application/json":{"schema":{"description":"Server Error","type":"object","properties":{"type":{"type":"string"},"message":{"type":"string"},"url":{"type":"string"}}}}}}}},"delete":{"summary":"Delete contact person","tags":["Contact Persons"],"description":"Delete contact person.","parameters":[{"schema":{"type":"string"},"in":"path","name":"customer_id","required":true,"description":"Customer unique identifier. Both \"id\" and \"external_id\" can be used. In case of \"external_id\" please prepend \"ext_\" prefix (e.g. /v1/customers/ext_1234)"},{"schema":{"type":"string"},"in":"path","name":"contact_person_id","required":true,"description":"Contact person unique identifier (external_id)"}],"security":[{"Basic Authorization":[]}],"responses":{"2XX":{"description":"Success","content":{"application/json":{"schema":{"description":"Success","type":"object","properties":{"object":{"type":"string"},"url":{"type":"string"},"data":{"type":"object","properties":{"external_id":{"type":"string"},"contact_first_name":{"type":"string","minLength":1,"nullable":true},"contact_last_name":{"type":"string","minLength":1,"nullable":true},"contact_email_address":{"type":"string","format":"email","nullable":true},"phone_number":{"type":"string","nullable":true},"mobile_number":{"type":"string","nullable":true},"status":{"type":"string","enum":["ACTIVE","ARCHIVED"],"default":"ACTIVE"}}}}}}}},"4XX":{"description":"Client Error","content":{"application/json":{"schema":{"type":"object","description":"Client Error","properties":{"type":{"type":"string"},"message":{"type":"string"},"url":{"type":"string"}}}}}},"5XX":{"description":"Server Error","content":{"application/json":{"schema":{"description":"Server Error","type":"object","properties":{"type":{"type":"string"},"message":{"type":"string"},"url":{"type":"string"}}}}}}}}},"/v1/bulk/customers/{customer_id}/contact_persons":{"put":{"summary":"Bulk Upsert contact persons.","tags":["Contact Persons"],"description":"Bulk Upsert contact persons, matching by external_id.","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["entries"],"properties":{"entries":{"type":"array","items":{"type":"object","required":["external_id"],"properties":{"external_id":{"type":"string"},"contact_first_name":{"type":"string","minLength":1,"nullable":true},"contact_last_name":{"type":"string","minLength":1,"nullable":true},"contact_email_address":{"type":"string","format":"email","nullable":true},"phone_number":{"type":"string","nullable":true},"mobile_number":{"type":"string","nullable":true},"status":{"type":"string","enum":["ACTIVE","ARCHIVED"],"default":"ACTIVE"}}},"maxItems":100}}}}},"required":true},"parameters":[{"schema":{"type":"string"},"in":"path","name":"customer_id","required":true,"description":"Customer unique identifier. Both \"id\" and \"external_id\" can be used. In case of \"external_id\" please prepend \"ext_\" prefix (e.g. /v1/customers/ext_1234)"}],"security":[{"Basic Authorization":[]}],"responses":{"2XX":{"description":"Success","content":{"application/json":{"schema":{"description":"Success","type":"object","properties":{"object":{"type":"string"},"url":{"type":"string"},"data":{"type":"object","properties":{"modified_count":{"type":"number"},"inserted_count":{"type":"number"},"omitted_count":{"type":"number"},"inserted_ids":{"type":"array","items":{"type":"object","properties":{"index":{"type":"number"},"id":{"type":"string"}}}},"omitted_entries":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"index":{"type":"number"},"reason":{"type":"string"}}}}}}}}}}},"4XX":{"description":"Client Error","content":{"application/json":{"schema":{"type":"object","description":"Client Error","properties":{"type":{"type":"string"},"message":{"type":"string"},"url":{"type":"string"}}}}}},"5XX":{"description":"Server Error","content":{"application/json":{"schema":{"description":"Server Error","type":"object","properties":{"type":{"type":"string"},"message":{"type":"string"},"url":{"type":"string"}}}}}}}}},"/v1/credit_notes":{"get":{"summary":"Get credit notes","tags":["Credit Notes"],"description":"Get credit notes","parameters":[{"schema":{"type":"number","format":"int32","minimum":1,"maximum":100,"default":100},"in":"query","name":"limit","required":false,"description":"items per page - max=100"},{"schema":{"type":"number","format":"int32","minimum":0,"default":0},"in":"query","name":"page","required":false,"description":"starts from 0"},{"schema":{"oneOf":[{"type":"string"},{"type":"object","properties":{"in":{"type":"array","items":{"type":"string"}},"nin":{"type":"array","items":{"type":"string"}},"eq":{"type":"string"},"ne":{"type":"string"}}}]},"in":"query","name":"credit_note_id","required":false,"description":"Supported operators: in, nin, eq, ne"},{"schema":{"oneOf":[{"type":"string"},{"type":"object","properties":{"in":{"type":"array","items":{"type":"string"}},"nin":{"type":"array","items":{"type":"string"}},"eq":{"type":"string"},"ne":{"type":"string"}}}]},"in":"query","name":"credit_note_number","required":false,"description":"Supported operators: in, nin, eq, ne"},{"schema":{"oneOf":[{"type":"number"},{"type":"object","properties":{"gt":{"type":"number"},"lt":{"type":"number"},"gte":{"type":"number"},"lte":{"type":"number"},"eq":{"type":"number"},"ne":{"type":"number"}}}]},"in":"query","name":"remaining_credit","required":false,"description":"Supported operators: gt, lt, gte, lte, eq, ne"},{"schema":{"oneOf":[{"type":"number"},{"type":"object","properties":{"gt":{"type":"number"},"lt":{"type":"number"},"gte":{"type":"number"},"lte":{"type":"number"},"eq":{"type":"number"},"ne":{"type":"number"}}}]},"in":"query","name":"total","required":false,"description":"Supported operators: gt, lt, gte, lte, eq, ne"},{"schema":{"oneOf":[{"type":"string"},{"type":"object","properties":{"in":{"type":"array","items":{"type":"string"}},"nin":{"type":"array","items":{"type":"string"}},"eq":{"type":"string"},"ne":{"type":"string"}}}]},"in":"query","name":"status","required":false,"description":"Supported operators: in, nin, eq, ne"},{"schema":{"oneOf":[{"type":"string"},{"type":"object","properties":{"in":{"type":"array","items":{"type":"string"}},"nin":{"type":"array","items":{"type":"string"}},"eq":{"type":"string"},"ne":{"type":"string"}}}]},"in":"query","name":"currency_code","required":false,"description":"Supported operators: in, nin, eq, ne"},{"schema":{"oneOf":[{"type":"string"},{"type":"object","properties":{"in":{"type":"array","items":{"type":"string"}},"nin":{"type":"array","items":{"type":"string"}},"eq":{"type":"string"},"ne":{"type":"string"}}}]},"in":"query","name":"customer_external_id","required":false,"description":"Supported operators: in, nin, eq, ne"},{"schema":{"oneOf":[{"type":"string","format":"date-time"},{"type":"object","properties":{"gt":{"type":"string","format":"date-time"},"lt":{"type":"string","format":"date-time"},"gte":{"type":"string","format":"date-time"},"lte":{"type":"string","format":"date-time"},"eq":{"type":"string","format":"date-time"},"ne":{"type":"string","format":"date-time"}}}]},"in":"query","name":"date","required":false,"description":"Supported operators: gt, lt, gte, lte, eq, ne"}],"security":[{"Basic Authorization":[]}],"responses":{"2XX":{"description":"Success","content":{"application/json":{"schema":{"description":"Success","type":"object","properties":{"object":{"type":"string"},"url":{"type":"string"},"page_number":{"type":"number"},"page_size":{"type":"number"},"total_count":{"type":"number"},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"credit_note_id":{"type":"string"},"credit_note_number":{"type":"string"},"remaining_credit":{"type":"number","minimum":0},"date":{"type":"string","format":"date-time"},"status":{"type":"string","enum":["DRAFT","SUBMITTED","AUTHORISED","PAID","VOIDED","DELETED"]},"total":{"type":"number","minimum":0},"currency_code":{"type":"string","pattern":"^[A-Z]{3}$","example":"AUD"},"customer_external_id":{"type":"string"},"customer_name":{"type":"string","nullable":true}}}}}}}}},"4XX":{"description":"Client Error","content":{"application/json":{"schema":{"type":"object","description":"Client Error","properties":{"type":{"type":"string"},"message":{"type":"string"},"url":{"type":"string"}}}}}},"5XX":{"description":"Server Error","content":{"application/json":{"schema":{"description":"Server Error","type":"object","properties":{"type":{"type":"string"},"message":{"type":"string"},"url":{"type":"string"}}}}}}}},"post":{"summary":"Create credit note","tags":["Credit Notes"],"description":"Create credit note","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["credit_note_id","credit_note_number","remaining_credit","date","status","total","currency_code","customer_external_id"],"properties":{"credit_note_id":{"type":"string"},"credit_note_number":{"type":"string"},"remaining_credit":{"type":"number","minimum":0},"date":{"type":"string","format":"date-time"},"status":{"type":"string","enum":["DRAFT","SUBMITTED","AUTHORISED","PAID","VOIDED","DELETED"]},"total":{"type":"number","minimum":0},"currency_code":{"type":"string","pattern":"^[A-Z]{3}$","example":"AUD"},"customer_external_id":{"type":"string"}}}}},"required":true},"security":[{"Basic Authorization":[]}],"responses":{"2XX":{"description":"Success","content":{"application/json":{"schema":{"description":"Success","type":"object","properties":{"object":{"type":"string"},"url":{"type":"string"},"data":{"type":"object","properties":{"id":{"type":"string"},"credit_note_id":{"type":"string"},"credit_note_number":{"type":"string"},"remaining_credit":{"type":"number","minimum":0},"date":{"type":"string","format":"date-time"},"status":{"type":"string","enum":["DRAFT","SUBMITTED","AUTHORISED","PAID","VOIDED","DELETED"]},"total":{"type":"number","minimum":0},"currency_code":{"type":"string","pattern":"^[A-Z]{3}$","example":"AUD"},"customer_external_id":{"type":"string"},"customer_name":{"type":"string","nullable":true}}}}}}}},"4XX":{"description":"Client Error","content":{"application/json":{"schema":{"type":"object","description":"Client Error","properties":{"type":{"type":"string"},"message":{"type":"string"},"url":{"type":"string"}}}}}},"5XX":{"description":"Server Error","content":{"application/json":{"schema":{"description":"Server Error","type":"object","properties":{"type":{"type":"string"},"message":{"type":"string"},"url":{"type":"string"}}}}}}}}},"/v1/credit_notes/{credit_note_id}":{"get":{"summary":"Get credit note by id","tags":["Credit Notes"],"description":"Get credit note by id","parameters":[{"schema":{"type":"string"},"in":"path","name":"credit_note_id","required":true,"description":"Credit Note unique identifier. Both \"id\" and \"credit_note_id\" can be used. In case of \"credit_note_id\" please prepend \"ext_\" prefix (e.g. /v1/credit_notes/ext_1234)"}],"security":[{"Basic Authorization":[]}],"responses":{"2XX":{"description":"Success","content":{"application/json":{"schema":{"description":"Success","type":"object","properties":{"object":{"type":"string"},"url":{"type":"string"},"data":{"type":"object","properties":{"id":{"type":"string"},"credit_note_id":{"type":"string"},"credit_note_number":{"type":"string"},"remaining_credit":{"type":"number","minimum":0},"date":{"type":"string","format":"date-time"},"status":{"type":"string","enum":["DRAFT","SUBMITTED","AUTHORISED","PAID","VOIDED","DELETED"]},"total":{"type":"number","minimum":0},"currency_code":{"type":"string","pattern":"^[A-Z]{3}$","example":"AUD"},"customer_external_id":{"type":"string"},"customer_name":{"type":"string","nullable":true}}}}}}}},"4XX":{"description":"Client Error","content":{"application/json":{"schema":{"type":"object","description":"Client Error","properties":{"type":{"type":"string"},"message":{"type":"string"},"url":{"type":"string"}}}}}},"5XX":{"description":"Server Error","content":{"application/json":{"schema":{"description":"Server Error","type":"object","properties":{"type":{"type":"string"},"message":{"type":"string"},"url":{"type":"string"}}}}}}}},"put":{"summary":"Update credit note","tags":["Credit Notes"],"description":"Update credit note","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{"credit_note_id":{"type":"string"},"credit_note_number":{"type":"string"},"remaining_credit":{"type":"number","minimum":0},"date":{"type":"string","format":"date-time"},"status":{"type":"string","enum":["DRAFT","SUBMITTED","AUTHORISED","PAID","VOIDED","DELETED"]},"total":{"type":"number","minimum":0},"currency_code":{"type":"string","pattern":"^[A-Z]{3}$","example":"AUD"},"customer_external_id":{"type":"string"}}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"credit_note_id","required":true,"description":"Credit Note unique identifier. Both \"id\" and \"credit_note_id\" can be used. In case of \"credit_note_id\" please prepend \"ext_\" prefix (e.g. /v1/credit_notes/ext_1234)"}],"security":[{"Basic Authorization":[]}],"responses":{"2XX":{"description":"Success","content":{"application/json":{"schema":{"description":"Success","type":"object","properties":{"object":{"type":"string"},"url":{"type":"string"},"data":{"type":"object","properties":{"id":{"type":"string"},"credit_note_id":{"type":"string"},"credit_note_number":{"type":"string"},"remaining_credit":{"type":"number","minimum":0},"date":{"type":"string","format":"date-time"},"status":{"type":"string","enum":["DRAFT","SUBMITTED","AUTHORISED","PAID","VOIDED","DELETED"]},"total":{"type":"number","minimum":0},"currency_code":{"type":"string","pattern":"^[A-Z]{3}$","example":"AUD"},"customer_external_id":{"type":"string"},"customer_name":{"type":"string","nullable":true}}}}}}}},"4XX":{"description":"Client Error","content":{"application/json":{"schema":{"type":"object","description":"Client Error","properties":{"type":{"type":"string"},"message":{"type":"string"},"url":{"type":"string"}}}}}},"5XX":{"description":"Server Error","content":{"application/json":{"schema":{"description":"Server Error","type":"object","properties":{"type":{"type":"string"},"message":{"type":"string"},"url":{"type":"string"}}}}}}}}},"/v1/bulk/credit_notes":{"put":{"summary":"Bulk Upsert credit notes.","tags":["Credit Notes"],"description":"Bulk Upsert up to 100 credit notes, matching by credit_notes_id (or id).","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["entries"],"properties":{"entries":{"type":"array","items":{"type":"object","required":["credit_note_id","credit_note_number","remaining_credit","date","status","total","currency_code","customer_external_id"],"properties":{"credit_note_id":{"type":"string"},"credit_note_number":{"type":"string"},"remaining_credit":{"type":"number","minimum":0},"date":{"type":"string","format":"date-time"},"status":{"type":"string","enum":["DRAFT","SUBMITTED","AUTHORISED","PAID","VOIDED","DELETED"]},"total":{"type":"number","minimum":0},"currency_code":{"type":"string","pattern":"^[A-Z]{3}$","example":"AUD"},"customer_external_id":{"type":"string"}}},"maxItems":100}}}}},"required":true},"security":[{"Basic Authorization":[]}],"responses":{"2XX":{"description":"Success","content":{"application/json":{"schema":{"description":"Success","type":"object","properties":{"object":{"type":"string"},"url":{"type":"string"},"data":{"type":"object","properties":{"modified_count":{"type":"number"},"inserted_count":{"type":"number"},"omitted_count":{"type":"number"},"inserted_ids":{"type":"array","items":{"type":"object","properties":{"index":{"type":"number"},"id":{"type":"string"}}}},"omitted_entries":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"index":{"type":"number"},"reason":{"type":"string"}}}}}}}}}}},"4XX":{"description":"Client Error","content":{"application/json":{"schema":{"type":"object","description":"Client Error","properties":{"type":{"type":"string"},"message":{"type":"string"},"url":{"type":"string"}}}}}},"5XX":{"description":"Server Error","content":{"application/json":{"schema":{"description":"Server Error","type":"object","properties":{"type":{"type":"string"},"message":{"type":"string"},"url":{"type":"string"}}}}}}}}},"/v1/customers":{"get":{"summary":"Get customers","tags":["Customers"],"description":"Get customers","parameters":[{"schema":{"type":"number","format":"int32","minimum":1,"maximum":100,"default":100},"in":"query","name":"limit","required":false,"description":"items per page - max=100"},{"schema":{"type":"number","format":"int32","minimum":0,"default":0},"in":"query","name":"page","required":false,"description":"starts from 0"},{"schema":{"oneOf":[{"type":"string"},{"type":"object","properties":{"in":{"type":"array","items":{"type":"string"}},"nin":{"type":"array","items":{"type":"string"}},"eq":{"type":"string"},"ne":{"type":"string"}}}]},"in":"query","name":"external_id","required":false,"description":"Supported operators: in, nin, eq, ne"},{"schema":{"oneOf":[{"type":"string"},{"type":"object","properties":{"in":{"type":"array","items":{"type":"string"}},"nin":{"type":"array","items":{"type":"string"}},"eq":{"type":"string"},"ne":{"type":"string"}}}]},"in":"query","name":"company_name","required":false,"description":"Supported operators: in, nin, eq, ne"},{"schema":{"oneOf":[{"type":"string"},{"type":"object","properties":{"in":{"type":"array","items":{"type":"string"}},"nin":{"type":"array","items":{"type":"string"}},"eq":{"type":"string"},"ne":{"type":"string"}}}]},"in":"query","name":"contact_first_name","required":false,"description":"Supported operators: in, nin, eq, ne"},{"schema":{"oneOf":[{"type":"string"},{"type":"object","properties":{"in":{"type":"array","items":{"type":"string"}},"nin":{"type":"array","items":{"type":"string"}},"eq":{"type":"string"},"ne":{"type":"string"}}}]},"in":"query","name":"contact_last_name","required":false,"description":"Supported operators: in, nin, eq, ne"},{"schema":{"oneOf":[{"type":"string"},{"type":"object","properties":{"in":{"type":"array","items":{"type":"string"}},"nin":{"type":"array","items":{"type":"string"}},"eq":{"type":"string"},"ne":{"type":"string"}}}]},"in":"query","name":"contact_email_address","required":false,"description":"Supported operators: in, nin, eq, ne"},{"schema":{"oneOf":[{"type":"string"},{"type":"object","properties":{"in":{"type":"array","items":{"type":"string"}},"nin":{"type":"array","items":{"type":"string"}},"eq":{"type":"string"},"ne":{"type":"string"}}}]},"in":"query","name":"status","required":false,"description":"Supported operators: in, nin, eq, ne"},{"schema":{"type":"array","items":{"type":"string","enum":["payment_portal_link","payer_rating","average_days_to_pay"]}},"in":"query","name":"additional_fields","required":false,"description":"Optional fields to include in the response"}],"security":[{"Basic Authorization":[]}],"responses":{"2XX":{"description":"Success","content":{"application/json":{"schema":{"description":"Success","type":"object","properties":{"object":{"type":"string"},"url":{"type":"string"},"page_number":{"type":"number"},"page_size":{"type":"number"},"total_count":{"type":"number"},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"external_id":{"type":"string"},"company_name":{"type":"string","minLength":1},"contact_first_name":{"type":"string","minLength":1,"nullable":true},"contact_last_name":{"type":"string","minLength":1,"nullable":true},"contact_email_address":{"type":"string","format":"email","nullable":true},"phone_number":{"type":"string","nullable":true},"mobile_number":{"type":"string","nullable":true},"status":{"type":"string","enum":["ACTIVE","ARCHIVED"],"default":"ACTIVE"},"groups":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1},"id":{"type":"string","nullable":true},"status":{"type":"string","enum":["ACTIVE","ARCHIVED"],"default":"ACTIVE"}}}},"addresses":{"type":"array","items":{"type":"object","properties":{"address_type":{"type":"string","enum":["POBOX","Unknown","Delivery","Billing"],"default":"POBOX"},"country":{"type":"string","nullable":true},"region":{"type":"string","nullable":true},"city":{"type":"string","nullable":true},"postal_code":{"type":"string","nullable":true},"address_line1":{"type":"string","nullable":true},"address_line2":{"type":"string","nullable":true},"address_line3":{"type":"string","nullable":true},"address_line4":{"type":"string","nullable":true}}}},"payment_portal_link":{"type":"string","nullable":true},"payer_rating":{"type":"number","nullable":true},"payer_rating_updated_at":{"type":"string","format":"date-time","nullable":true},"payer_rating_number_invoices_considered":{"type":"number","nullable":true},"average_days_to_pay":{"type":"number","nullable":true}}}}}}}}},"4XX":{"description":"Client Error","content":{"application/json":{"schema":{"type":"object","description":"Client Error","properties":{"type":{"type":"string"},"message":{"type":"string"},"url":{"type":"string"}}}}}},"5XX":{"description":"Server Error","content":{"application/json":{"schema":{"description":"Server Error","type":"object","properties":{"type":{"type":"string"},"message":{"type":"string"},"url":{"type":"string"}}}}}}}},"post":{"summary":"Create customer","tags":["Customers"],"description":"Create customer","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["external_id","company_name"],"properties":{"external_id":{"type":"string"},"company_name":{"type":"string","minLength":1},"contact_first_name":{"type":"string","minLength":1,"nullable":true},"contact_last_name":{"type":"string","minLength":1,"nullable":true},"contact_email_address":{"type":"string","format":"email","nullable":true},"phone_number":{"type":"string","nullable":true},"mobile_number":{"type":"string","nullable":true},"status":{"type":"string","enum":["ACTIVE","ARCHIVED"],"default":"ACTIVE"},"groups":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1},"id":{"type":"string","nullable":true},"status":{"type":"string","enum":["ACTIVE","ARCHIVED"],"default":"ACTIVE"}}}},"addresses":{"type":"array","items":{"type":"object","properties":{"address_type":{"type":"string","enum":["POBOX","Unknown","Delivery","Billing"],"default":"POBOX"},"country":{"type":"string","nullable":true},"region":{"type":"string","nullable":true},"city":{"type":"string","nullable":true},"postal_code":{"type":"string","nullable":true},"address_line1":{"type":"string","nullable":true},"address_line2":{"type":"string","nullable":true},"address_line3":{"type":"string","nullable":true},"address_line4":{"type":"string","nullable":true}}}}}}}},"required":true},"security":[{"Basic Authorization":[]}],"responses":{"2XX":{"description":"Success","content":{"application/json":{"schema":{"description":"Success","type":"object","properties":{"object":{"type":"string"},"url":{"type":"string"},"data":{"type":"object","properties":{"id":{"type":"string"},"external_id":{"type":"string"},"company_name":{"type":"string","minLength":1},"contact_first_name":{"type":"string","minLength":1,"nullable":true},"contact_last_name":{"type":"string","minLength":1,"nullable":true},"contact_email_address":{"type":"string","format":"email","nullable":true},"phone_number":{"type":"string","nullable":true},"mobile_number":{"type":"string","nullable":true},"status":{"type":"string","enum":["ACTIVE","ARCHIVED"],"default":"ACTIVE"},"groups":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1},"id":{"type":"string","nullable":true},"status":{"type":"string","enum":["ACTIVE","ARCHIVED"],"default":"ACTIVE"}}}},"addresses":{"type":"array","items":{"type":"object","properties":{"address_type":{"type":"string","enum":["POBOX","Unknown","Delivery","Billing"],"default":"POBOX"},"country":{"type":"string","nullable":true},"region":{"type":"string","nullable":true},"city":{"type":"string","nullable":true},"postal_code":{"type":"string","nullable":true},"address_line1":{"type":"string","nullable":true},"address_line2":{"type":"string","nullable":true},"address_line3":{"type":"string","nullable":true},"address_line4":{"type":"string","nullable":true}}}}}}}}}}},"4XX":{"description":"Client Error","content":{"application/json":{"schema":{"type":"object","description":"Client Error","properties":{"type":{"type":"string"},"message":{"type":"string"},"url":{"type":"string"}}}}}},"5XX":{"description":"Server Error","content":{"application/json":{"schema":{"description":"Server Error","type":"object","properties":{"type":{"type":"string"},"message":{"type":"string"},"url":{"type":"string"}}}}}}}}},"/v1/customers/{customer_id}":{"get":{"summary":"Get customers by id","tags":["Customers"],"description":"Get customer by id.","parameters":[{"schema":{"type":"array","items":{"type":"string","enum":["payment_portal_link","payer_rating","average_days_to_pay"]}},"in":"query","name":"additional_fields","required":false,"description":"Optional fields to include in the response"},{"schema":{"type":"string"},"in":"path","name":"customer_id","required":true,"description":"Customer unique identifier. Both \"id\" and \"external_id\" can be used. In case of \"external_id\" please prepend \"ext_\" prefix (e.g. /v1/customers/ext_1234)"}],"security":[{"Basic Authorization":[]}],"responses":{"2XX":{"description":"Success","content":{"application/json":{"schema":{"description":"Success","type":"object","properties":{"object":{"type":"string"},"url":{"type":"string"},"data":{"type":"object","properties":{"id":{"type":"string"},"external_id":{"type":"string"},"company_name":{"type":"string","minLength":1},"contact_first_name":{"type":"string","minLength":1,"nullable":true},"contact_last_name":{"type":"string","minLength":1,"nullable":true},"contact_email_address":{"type":"string","format":"email","nullable":true},"phone_number":{"type":"string","nullable":true},"mobile_number":{"type":"string","nullable":true},"status":{"type":"string","enum":["ACTIVE","ARCHIVED"],"default":"ACTIVE"},"groups":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1},"id":{"type":"string","nullable":true},"status":{"type":"string","enum":["ACTIVE","ARCHIVED"],"default":"ACTIVE"}}}},"addresses":{"type":"array","items":{"type":"object","properties":{"address_type":{"type":"string","enum":["POBOX","Unknown","Delivery","Billing"],"default":"POBOX"},"country":{"type":"string","nullable":true},"region":{"type":"string","nullable":true},"city":{"type":"string","nullable":true},"postal_code":{"type":"string","nullable":true},"address_line1":{"type":"string","nullable":true},"address_line2":{"type":"string","nullable":true},"address_line3":{"type":"string","nullable":true},"address_line4":{"type":"string","nullable":true}}}},"payment_portal_link":{"type":"string","nullable":true},"payer_rating":{"type":"number","nullable":true},"payer_rating_updated_at":{"type":"string","format":"date-time","nullable":true},"payer_rating_number_invoices_considered":{"type":"number","nullable":true},"average_days_to_pay":{"type":"number","nullable":true}}}}}}}},"4XX":{"description":"Client Error","content":{"application/json":{"schema":{"type":"object","description":"Client Error","properties":{"type":{"type":"string"},"message":{"type":"string"},"url":{"type":"string"}}}}}},"5XX":{"description":"Server Error","content":{"application/json":{"schema":{"description":"Server Error","type":"object","properties":{"type":{"type":"string"},"message":{"type":"string"},"url":{"type":"string"}}}}}}}},"put":{"summary":"Update customer","tags":["Customers"],"description":"Update customer","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{"external_id":{"type":"string"},"company_name":{"type":"string","minLength":1},"contact_first_name":{"type":"string","minLength":1,"nullable":true},"contact_last_name":{"type":"string","minLength":1,"nullable":true},"contact_email_address":{"type":"string","format":"email","nullable":true},"phone_number":{"type":"string","nullable":true},"mobile_number":{"type":"string","nullable":true},"status":{"type":"string","enum":["ACTIVE","ARCHIVED"],"default":"ACTIVE"},"groups":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1},"id":{"type":"string","nullable":true},"status":{"type":"string","enum":["ACTIVE","ARCHIVED"],"default":"ACTIVE"}}}},"addresses":{"type":"array","items":{"type":"object","properties":{"address_type":{"type":"string","enum":["POBOX","Unknown","Delivery","Billing"],"default":"POBOX"},"country":{"type":"string","nullable":true},"region":{"type":"string","nullable":true},"city":{"type":"string","nullable":true},"postal_code":{"type":"string","nullable":true},"address_line1":{"type":"string","nullable":true},"address_line2":{"type":"string","nullable":true},"address_line3":{"type":"string","nullable":true},"address_line4":{"type":"string","nullable":true}}}}}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"customer_id","required":true,"description":"Customer unique identifier. Both \"id\" and \"external_id\" can be used. In case of \"external_id\" please prepend \"ext_\" prefix (e.g. /v1/customers/ext_1234)"}],"security":[{"Basic Authorization":[]}],"responses":{"2XX":{"description":"Success","content":{"application/json":{"schema":{"description":"Success","type":"object","properties":{"object":{"type":"string"},"url":{"type":"string"},"data":{"type":"object","properties":{"id":{"type":"string"},"external_id":{"type":"string"},"company_name":{"type":"string","minLength":1},"contact_first_name":{"type":"string","minLength":1,"nullable":true},"contact_last_name":{"type":"string","minLength":1,"nullable":true},"contact_email_address":{"type":"string","format":"email","nullable":true},"phone_number":{"type":"string","nullable":true},"mobile_number":{"type":"string","nullable":true},"status":{"type":"string","enum":["ACTIVE","ARCHIVED"],"default":"ACTIVE"},"groups":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1},"id":{"type":"string","nullable":true},"status":{"type":"string","enum":["ACTIVE","ARCHIVED"],"default":"ACTIVE"}}}},"addresses":{"type":"array","items":{"type":"object","properties":{"address_type":{"type":"string","enum":["POBOX","Unknown","Delivery","Billing"],"default":"POBOX"},"country":{"type":"string","nullable":true},"region":{"type":"string","nullable":true},"city":{"type":"string","nullable":true},"postal_code":{"type":"string","nullable":true},"address_line1":{"type":"string","nullable":true},"address_line2":{"type":"string","nullable":true},"address_line3":{"type":"string","nullable":true},"address_line4":{"type":"string","nullable":true}}}}}}}}}}},"4XX":{"description":"Client Error","content":{"application/json":{"schema":{"type":"object","description":"Client Error","properties":{"type":{"type":"string"},"message":{"type":"string"},"url":{"type":"string"}}}}}},"5XX":{"description":"Server Error","content":{"application/json":{"schema":{"description":"Server Error","type":"object","properties":{"type":{"type":"string"},"message":{"type":"string"},"url":{"type":"string"}}}}}}}}},"/v1/bulk/customers":{"put":{"summary":"Bulk Upsert customers.","tags":["Customers"],"description":"Bulk Upsert up to 100 customers, matching by external_id (or id).","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["entries"],"properties":{"entries":{"type":"array","items":{"type":"object","required":["external_id","company_name"],"properties":{"external_id":{"type":"string"},"company_name":{"type":"string","minLength":1},"contact_first_name":{"type":"string","minLength":1,"nullable":true},"contact_last_name":{"type":"string","minLength":1,"nullable":true},"contact_email_address":{"type":"string","format":"email","nullable":true},"phone_number":{"type":"string","nullable":true},"mobile_number":{"type":"string","nullable":true},"status":{"type":"string","enum":["ACTIVE","ARCHIVED"],"default":"ACTIVE"},"groups":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1},"id":{"type":"string","nullable":true},"status":{"type":"string","enum":["ACTIVE","ARCHIVED"],"default":"ACTIVE"}}}},"addresses":{"type":"array","items":{"type":"object","properties":{"address_type":{"type":"string","enum":["POBOX","Unknown","Delivery","Billing"],"default":"POBOX"},"country":{"type":"string","nullable":true},"region":{"type":"string","nullable":true},"city":{"type":"string","nullable":true},"postal_code":{"type":"string","nullable":true},"address_line1":{"type":"string","nullable":true},"address_line2":{"type":"string","nullable":true},"address_line3":{"type":"string","nullable":true},"address_line4":{"type":"string","nullable":true}}}}}},"maxItems":100}}}}},"required":true},"security":[{"Basic Authorization":[]}],"responses":{"2XX":{"description":"Success","content":{"application/json":{"schema":{"description":"Success","type":"object","properties":{"object":{"type":"string"},"url":{"type":"string"},"data":{"type":"object","properties":{"modified_count":{"type":"number"},"inserted_count":{"type":"number"},"omitted_count":{"type":"number"},"inserted_ids":{"type":"array","items":{"type":"object","properties":{"index":{"type":"number"},"id":{"type":"string"}}}},"omitted_entries":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"index":{"type":"number"},"reason":{"type":"string"}}}}}}}}}}},"4XX":{"description":"Client Error","content":{"application/json":{"schema":{"type":"object","description":"Client Error","properties":{"type":{"type":"string"},"message":{"type":"string"},"url":{"type":"string"}}}}}},"5XX":{"description":"Server Error","content":{"application/json":{"schema":{"description":"Server Error","type":"object","properties":{"type":{"type":"string"},"message":{"type":"string"},"url":{"type":"string"}}}}}}}}},"/v1/invoices":{"get":{"summary":"Get invoices","tags":["Invoices"],"description":"Get invoices","parameters":[{"schema":{"type":"number","format":"int32","minimum":1,"maximum":100,"default":100},"in":"query","name":"limit","required":false,"description":"items per page - max=100"},{"schema":{"type":"number","format":"int32","minimum":0,"default":0},"in":"query","name":"page","required":false,"description":"starts from 0"},{"schema":{"oneOf":[{"type":"string"},{"type":"object","properties":{"in":{"type":"array","items":{"type":"string"}},"nin":{"type":"array","items":{"type":"string"}},"eq":{"type":"string"},"ne":{"type":"string"}}}]},"in":"query","name":"invoice_id","required":false,"description":"Supported operators: in, nin, eq, ne"},{"schema":{"oneOf":[{"type":"string"},{"type":"object","properties":{"in":{"type":"array","items":{"type":"string"}},"nin":{"type":"array","items":{"type":"string"}},"eq":{"type":"string"},"ne":{"type":"string"}}}]},"in":"query","name":"invoice_number","required":false,"description":"Supported operators: in, nin, eq, ne"},{"schema":{"oneOf":[{"type":"string"},{"type":"object","properties":{"in":{"type":"array","items":{"type":"string"}},"nin":{"type":"array","items":{"type":"string"}},"eq":{"type":"string"},"ne":{"type":"string"}}}]},"in":"query","name":"status","required":false,"description":"Supported operators: in, nin, eq, ne"},{"schema":{"oneOf":[{"type":"string"},{"type":"object","properties":{"in":{"type":"array","items":{"type":"string"}},"nin":{"type":"array","items":{"type":"string"}},"eq":{"type":"string"},"ne":{"type":"string"}}}]},"in":"query","name":"currency_code","required":false,"description":"Supported operators: in, nin, eq, ne"},{"schema":{"oneOf":[{"type":"number"},{"type":"object","properties":{"gt":{"type":"number"},"lt":{"type":"number"},"gte":{"type":"number"},"lte":{"type":"number"},"eq":{"type":"number"},"ne":{"type":"number"}}}]},"in":"query","name":"amount_due","required":false,"description":"Supported operators: gt, lt, gte, lte, eq, ne"},{"schema":{"oneOf":[{"type":"number"},{"type":"object","properties":{"gt":{"type":"number"},"lt":{"type":"number"},"gte":{"type":"number"},"lte":{"type":"number"},"eq":{"type":"number"},"ne":{"type":"number"}}}]},"in":"query","name":"amount_paid","required":false,"description":"Supported operators: gt, lt, gte, lte, eq, ne"},{"schema":{"oneOf":[{"type":"number"},{"type":"object","properties":{"gt":{"type":"number"},"lt":{"type":"number"},"gte":{"type":"number"},"lte":{"type":"number"},"eq":{"type":"number"},"ne":{"type":"number"}}}]},"in":"query","name":"total","required":false,"description":"Supported operators: gt, lt, gte, lte, eq, ne"},{"schema":{"oneOf":[{"type":"number"},{"type":"object","properties":{"gt":{"type":"number"},"lt":{"type":"number"},"gte":{"type":"number"},"lte":{"type":"number"},"eq":{"type":"number"},"ne":{"type":"number"}}}]},"in":"query","name":"sub_total","required":false,"description":"Supported operators: gt, lt, gte, lte, eq, ne"},{"schema":{"oneOf":[{"type":"string","format":"date-time"},{"type":"object","properties":{"gt":{"type":"string","format":"date-time"},"lt":{"type":"string","format":"date-time"},"gte":{"type":"string","format":"date-time"},"lte":{"type":"string","format":"date-time"},"eq":{"type":"string","format":"date-time"},"ne":{"type":"string","format":"date-time"}}}]},"in":"query","name":"date","required":false,"description":"Supported operators: gt, lt, gte, lte, eq, ne"},{"schema":{"oneOf":[{"type":"string","format":"date-time"},{"type":"object","properties":{"gt":{"type":"string","format":"date-time"},"lt":{"type":"string","format":"date-time"},"gte":{"type":"string","format":"date-time"},"lte":{"type":"string","format":"date-time"},"eq":{"type":"string","format":"date-time"},"ne":{"type":"string","format":"date-time"}}}]},"in":"query","name":"due_date","required":false,"description":"Supported operators: gt, lt, gte, lte, eq, ne"},{"schema":{"oneOf":[{"type":"string","format":"date-time"},{"type":"object","properties":{"gt":{"type":"string","format":"date-time"},"lt":{"type":"string","format":"date-time"},"gte":{"type":"string","format":"date-time"},"lte":{"type":"string","format":"date-time"},"eq":{"type":"string","format":"date-time"},"ne":{"type":"string","format":"date-time"}}}]},"in":"query","name":"fully_paid_date","required":false,"description":"Supported operators: gt, lt, gte, lte, eq, ne"},{"schema":{"oneOf":[{"type":"string"},{"type":"object","properties":{"in":{"type":"array","items":{"type":"string"}},"nin":{"type":"array","items":{"type":"string"}},"eq":{"type":"string"},"ne":{"type":"string"}}}]},"in":"query","name":"customer_external_id","required":false,"description":"Supported operators: in, nin, eq, ne"}],"security":[{"Basic Authorization":[]}],"responses":{"2XX":{"description":"Success","content":{"application/json":{"schema":{"description":"Success","type":"object","properties":{"object":{"type":"string"},"url":{"type":"string"},"page_number":{"type":"number"},"page_size":{"type":"number"},"total_count":{"type":"number"},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"invoice_id":{"type":"string"},"invoice_number":{"type":"string"},"status":{"type":"string","enum":["DRAFT","SUBMITTED","AUTHORISED","PAID","VOIDED","DELETED"]},"currency_code":{"type":"string","pattern":"^[A-Z]{3}$","example":"AUD"},"amount_due":{"type":"number","minimum":0},"amount_paid":{"type":"number","minimum":0},"total":{"type":"number","minimum":0},"sub_total":{"type":"number","minimum":0,"nullable":true},"date":{"type":"string","format":"date-time"},"due_date":{"type":"string","format":"date-time"},"fully_paid_date":{"type":"string","format":"date-time","nullable":true},"customer_external_id":{"type":"string"},"payments":{"type":"array","items":{"type":"object","properties":{"amount":{"type":"number","minimum":0},"date":{"type":"string","format":"date-time"}}}},"invoice_pdf_link":{"type":"string","nullable":true},"invoice_pdf_link_updated_at":{"type":"string","format":"date-time","nullable":true},"customer_name":{"type":"string","nullable":true}}}}}}}}},"4XX":{"description":"Client Error","content":{"application/json":{"schema":{"type":"object","description":"Client Error","properties":{"type":{"type":"string"},"message":{"type":"string"},"url":{"type":"string"}}}}}},"5XX":{"description":"Server Error","content":{"application/json":{"schema":{"description":"Server Error","type":"object","properties":{"type":{"type":"string"},"message":{"type":"string"},"url":{"type":"string"}}}}}}}},"post":{"summary":"Create invoice","tags":["Invoices"],"description":"Create invoice","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["invoice_id","invoice_number","status","currency_code","amount_due","total","date","due_date","customer_external_id"],"properties":{"invoice_id":{"type":"string"},"invoice_number":{"type":"string"},"status":{"type":"string","enum":["DRAFT","SUBMITTED","AUTHORISED","PAID","VOIDED","DELETED"]},"currency_code":{"type":"string","pattern":"^[A-Z]{3}$","example":"AUD"},"amount_due":{"type":"number","minimum":0},"amount_paid":{"type":"number","minimum":0},"total":{"type":"number","minimum":0},"sub_total":{"type":"number","minimum":0,"nullable":true},"date":{"type":"string","format":"date-time"},"due_date":{"type":"string","format":"date-time"},"fully_paid_date":{"type":"string","format":"date-time","nullable":true},"customer_external_id":{"type":"string"}}}}},"required":true},"security":[{"Basic Authorization":[]}],"responses":{"2XX":{"description":"Success","content":{"application/json":{"schema":{"description":"Success","type":"object","properties":{"object":{"type":"string"},"url":{"type":"string"},"data":{"type":"object","properties":{"id":{"type":"string"},"invoice_id":{"type":"string"},"invoice_number":{"type":"string"},"status":{"type":"string","enum":["DRAFT","SUBMITTED","AUTHORISED","PAID","VOIDED","DELETED"]},"currency_code":{"type":"string","pattern":"^[A-Z]{3}$","example":"AUD"},"amount_due":{"type":"number","minimum":0},"amount_paid":{"type":"number","minimum":0},"total":{"type":"number","minimum":0},"sub_total":{"type":"number","minimum":0,"nullable":true},"date":{"type":"string","format":"date-time"},"due_date":{"type":"string","format":"date-time"},"fully_paid_date":{"type":"string","format":"date-time","nullable":true},"customer_external_id":{"type":"string"},"payments":{"type":"array","items":{"type":"object","properties":{"amount":{"type":"number","minimum":0},"date":{"type":"string","format":"date-time"}}}},"invoice_pdf_link":{"type":"string","nullable":true},"invoice_pdf_link_updated_at":{"type":"string","format":"date-time","nullable":true},"customer_name":{"type":"string","nullable":true}}}}}}}},"4XX":{"description":"Client Error","content":{"application/json":{"schema":{"type":"object","description":"Client Error","properties":{"type":{"type":"string"},"message":{"type":"string"},"url":{"type":"string"}}}}}},"5XX":{"description":"Server Error","content":{"application/json":{"schema":{"description":"Server Error","type":"object","properties":{"type":{"type":"string"},"message":{"type":"string"},"url":{"type":"string"}}}}}}}}},"/v1/invoices/history":{"get":{"summary":"Get invoice history","tags":["Invoices"],"description":"Get invoice history","parameters":[{"schema":{"type":"number","format":"int32","minimum":1,"maximum":100,"default":100},"in":"query","name":"limit","required":false,"description":"items per page - max=100"},{"schema":{"type":"number","format":"int32","minimum":0,"default":0},"in":"query","name":"page","required":false,"description":"starts from 0"},{"schema":{"oneOf":[{"type":"string"},{"type":"object","properties":{"in":{"type":"array","items":{"type":"string"}},"nin":{"type":"array","items":{"type":"string"}},"eq":{"type":"string"},"ne":{"type":"string"}}}]},"in":"query","name":"invoice_id","required":false,"description":"Supported operators: in, nin, eq, ne"},{"schema":{"oneOf":[{"type":"string"},{"type":"object","properties":{"in":{"type":"array","items":{"type":"string"}},"nin":{"type":"array","items":{"type":"string"}},"eq":{"type":"string"},"ne":{"type":"string"}}}]},"in":"query","name":"invoice_number","required":false,"description":"Supported operators: in, nin, eq, ne"},{"schema":{"oneOf":[{"type":"string"},{"type":"object","properties":{"in":{"type":"array","items":{"type":"string"}},"nin":{"type":"array","items":{"type":"string"}},"eq":{"type":"string"},"ne":{"type":"string"}}}]},"in":"query","name":"contact_id","required":false,"description":"Supported operators: in, nin, eq, ne"}],"security":[{"Basic Authorization":[]}],"responses":{"2XX":{"description":"Success","content":{"application/json":{"schema":{"description":"Success","type":"object","properties":{"object":{"type":"string"},"url":{"type":"string"},"page_number":{"type":"number"},"page_size":{"type":"number"},"total_count":{"type":"number"},"data":{"type":"array","items":{"type":"object","properties":{"invoice_id":{"type":"string"},"invoice_number":{"type":"string"},"contact_id":{"type":"string","nullable":true},"expect_payment_date":{"type":"string","format":"date-time","nullable":true},"dispute":{"type":"object","nullable":true,"properties":{"is_open":{"type":"boolean"},"note":{"type":"string","nullable":true}}},"notes":{"type":"array","items":{"type":"object","properties":{"user_email":{"type":"string","nullable":true},"message":{"type":"string"},"date":{"type":"string","format":"date-time"},"reminder_date":{"type":"string","format":"date-time","nullable":true},"type":{"type":"string","nullable":true}},"additionalProperties":true}},"status_changes":{"type":"array","items":{"type":"object","additionalProperties":true}},"chases":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"date":{"type":"string","format":"date-time","nullable":true},"template":{"type":"string","nullable":true},"type":{"type":"string","enum":["manual","automatic","scheduled","manual_with_replace"]},"from":{"type":"string","nullable":true},"cc":{"type":"array","items":{"type":"string"},"nullable":true},"to":{"type":"array","items":{"type":"string"},"nullable":true},"channel":{"type":"string","enum":["email"]},"attachments":{"type":"boolean"}}},{"type":"object","properties":{"date":{"type":"string","format":"date-time","nullable":true},"template":{"type":"string","nullable":true},"type":{"type":"string","enum":["manual","automatic","scheduled","manual_with_replace"]},"from":{"type":"string","nullable":true},"cc":{"type":"array","items":{"type":"string"},"nullable":true},"to":{"type":"array","items":{"type":"string"},"nullable":true},"channel":{"type":"string","enum":["sms","letter","phone_call"]}}}]}},"emails":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string","format":"date-time","nullable":true},"from":{"type":"string","nullable":true},"to":{"type":"array","items":{"type":"string"}},"cc":{"type":"array","items":{"type":"string"}},"bcc":{"type":"array","items":{"type":"string"}},"subject":{"type":"string","nullable":true},"text":{"type":"string","nullable":true},"attachments":{"type":"boolean"}}}}}}}}}}}},"4XX":{"description":"Client Error","content":{"application/json":{"schema":{"type":"object","description":"Client Error","properties":{"type":{"type":"string"},"message":{"type":"string"},"url":{"type":"string"}}}}}},"5XX":{"description":"Server Error","content":{"application/json":{"schema":{"description":"Server Error","type":"object","properties":{"type":{"type":"string"},"message":{"type":"string"},"url":{"type":"string"}}}}}}}}},"/v1/invoices/{invoice_id}/history":{"get":{"summary":"Get invoice history by id","tags":["Invoices"],"description":"Get invoice history by id","parameters":[{"schema":{"type":"string"},"in":"path","name":"invoice_id","required":true,"description":"Invoice unique identifier. Both \"id\" and \"invoice_id\" can be used. In case of \"invoice_id\" please prepend \"ext_\" prefix (e.g. /v1/invoices/ext_1234)"}],"security":[{"Basic Authorization":[]}],"responses":{"2XX":{"description":"Success","content":{"application/json":{"schema":{"description":"Success","type":"object","properties":{"object":{"type":"string"},"url":{"type":"string"},"data":{"type":"object","properties":{"invoice_id":{"type":"string"},"invoice_number":{"type":"string"},"contact_id":{"type":"string","nullable":true},"expect_payment_date":{"type":"string","format":"date-time","nullable":true},"dispute":{"type":"object","nullable":true,"properties":{"is_open":{"type":"boolean"},"note":{"type":"string","nullable":true}}},"notes":{"type":"array","items":{"type":"object","properties":{"user_email":{"type":"string","nullable":true},"message":{"type":"string"},"date":{"type":"string","format":"date-time"},"reminder_date":{"type":"string","format":"date-time","nullable":true},"type":{"type":"string","nullable":true}},"additionalProperties":true}},"status_changes":{"type":"array","items":{"type":"object","additionalProperties":true}},"chases":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"date":{"type":"string","format":"date-time","nullable":true},"template":{"type":"string","nullable":true},"type":{"type":"string","enum":["manual","automatic","scheduled","manual_with_replace"]},"from":{"type":"string","nullable":true},"cc":{"type":"array","items":{"type":"string"},"nullable":true},"to":{"type":"array","items":{"type":"string"},"nullable":true},"channel":{"type":"string","enum":["email"]},"attachments":{"type":"boolean"}}},{"type":"object","properties":{"date":{"type":"string","format":"date-time","nullable":true},"template":{"type":"string","nullable":true},"type":{"type":"string","enum":["manual","automatic","scheduled","manual_with_replace"]},"from":{"type":"string","nullable":true},"cc":{"type":"array","items":{"type":"string"},"nullable":true},"to":{"type":"array","items":{"type":"string"},"nullable":true},"channel":{"type":"string","enum":["sms","letter","phone_call"]}}}]}},"emails":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string","format":"date-time","nullable":true},"from":{"type":"string","nullable":true},"to":{"type":"array","items":{"type":"string"}},"cc":{"type":"array","items":{"type":"string"}},"bcc":{"type":"array","items":{"type":"string"}},"subject":{"type":"string","nullable":true},"text":{"type":"string","nullable":true},"attachments":{"type":"boolean"}}}}}}}}}}},"4XX":{"description":"Client Error","content":{"application/json":{"schema":{"type":"object","description":"Client Error","properties":{"type":{"type":"string"},"message":{"type":"string"},"url":{"type":"string"}}}}}},"5XX":{"description":"Server Error","content":{"application/json":{"schema":{"description":"Server Error","type":"object","properties":{"type":{"type":"string"},"message":{"type":"string"},"url":{"type":"string"}}}}}}}}},"/v1/invoices/{invoice_id}":{"get":{"summary":"Get invoice by id","tags":["Invoices"],"description":"Get invoice by id","parameters":[{"schema":{"type":"string"},"in":"path","name":"invoice_id","required":true,"description":"Invoice unique identifier. Both \"id\" and \"invoice_id\" can be used. In case of \"invoice_id\" please prepend \"ext_\" prefix (e.g. /v1/invoices/ext_1234)"}],"security":[{"Basic Authorization":[]}],"responses":{"2XX":{"description":"Success","content":{"application/json":{"schema":{"description":"Success","type":"object","properties":{"object":{"type":"string"},"url":{"type":"string"},"data":{"type":"object","properties":{"id":{"type":"string"},"invoice_id":{"type":"string"},"invoice_number":{"type":"string"},"status":{"type":"string","enum":["DRAFT","SUBMITTED","AUTHORISED","PAID","VOIDED","DELETED"]},"currency_code":{"type":"string","pattern":"^[A-Z]{3}$","example":"AUD"},"amount_due":{"type":"number","minimum":0},"amount_paid":{"type":"number","minimum":0},"total":{"type":"number","minimum":0},"sub_total":{"type":"number","minimum":0,"nullable":true},"date":{"type":"string","format":"date-time"},"due_date":{"type":"string","format":"date-time"},"fully_paid_date":{"type":"string","format":"date-time","nullable":true},"customer_external_id":{"type":"string"},"payments":{"type":"array","items":{"type":"object","properties":{"amount":{"type":"number","minimum":0},"date":{"type":"string","format":"date-time"}}}},"invoice_pdf_link":{"type":"string","nullable":true},"invoice_pdf_link_updated_at":{"type":"string","format":"date-time","nullable":true},"customer_name":{"type":"string","nullable":true}}}}}}}},"4XX":{"description":"Client Error","content":{"application/json":{"schema":{"type":"object","description":"Client Error","properties":{"type":{"type":"string"},"message":{"type":"string"},"url":{"type":"string"}}}}}},"5XX":{"description":"Server Error","content":{"application/json":{"schema":{"description":"Server Error","type":"object","properties":{"type":{"type":"string"},"message":{"type":"string"},"url":{"type":"string"}}}}}}}},"put":{"summary":"Update invoice","tags":["Invoices"],"description":"Update invoice","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{"invoice_id":{"type":"string"},"invoice_number":{"type":"string"},"status":{"type":"string","enum":["DRAFT","SUBMITTED","AUTHORISED","PAID","VOIDED","DELETED"]},"currency_code":{"type":"string","pattern":"^[A-Z]{3}$","example":"AUD"},"amount_due":{"type":"number","minimum":0},"amount_paid":{"type":"number","minimum":0},"total":{"type":"number","minimum":0},"sub_total":{"type":"number","minimum":0,"nullable":true},"date":{"type":"string","format":"date-time"},"due_date":{"type":"string","format":"date-time"},"fully_paid_date":{"type":"string","format":"date-time","nullable":true},"customer_external_id":{"type":"string"}}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"invoice_id","required":true,"description":"Invoice unique identifier. Both \"id\" and \"invoice_id\" can be used. In case of \"invoice_id\" please prepend \"ext_\" prefix (e.g. /v1/invoices/ext_1234)"}],"security":[{"Basic Authorization":[]}],"responses":{"2XX":{"description":"Success","content":{"application/json":{"schema":{"description":"Success","type":"object","properties":{"object":{"type":"string"},"url":{"type":"string"},"data":{"type":"object","properties":{"id":{"type":"string"},"invoice_id":{"type":"string"},"invoice_number":{"type":"string"},"status":{"type":"string","enum":["DRAFT","SUBMITTED","AUTHORISED","PAID","VOIDED","DELETED"]},"currency_code":{"type":"string","pattern":"^[A-Z]{3}$","example":"AUD"},"amount_due":{"type":"number","minimum":0},"amount_paid":{"type":"number","minimum":0},"total":{"type":"number","minimum":0},"sub_total":{"type":"number","minimum":0,"nullable":true},"date":{"type":"string","format":"date-time"},"due_date":{"type":"string","format":"date-time"},"fully_paid_date":{"type":"string","format":"date-time","nullable":true},"customer_external_id":{"type":"string"},"payments":{"type":"array","items":{"type":"object","properties":{"amount":{"type":"number","minimum":0},"date":{"type":"string","format":"date-time"}}}},"invoice_pdf_link":{"type":"string","nullable":true},"invoice_pdf_link_updated_at":{"type":"string","format":"date-time","nullable":true},"customer_name":{"type":"string","nullable":true}}}}}}}},"4XX":{"description":"Client Error","content":{"application/json":{"schema":{"type":"object","description":"Client Error","properties":{"type":{"type":"string"},"message":{"type":"string"},"url":{"type":"string"}}}}}},"5XX":{"description":"Server Error","content":{"application/json":{"schema":{"description":"Server Error","type":"object","properties":{"type":{"type":"string"},"message":{"type":"string"},"url":{"type":"string"}}}}}}}}},"/v1/bulk/invoices":{"put":{"summary":"Bulk Upsert invoices.","tags":["Invoices"],"description":"Bulk Upsert up to 100 invoices, matching by invoice_id (or id).","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["entries"],"properties":{"entries":{"type":"array","items":{"type":"object","required":["invoice_id","invoice_number","status","currency_code","amount_due","total","date","due_date","customer_external_id"],"properties":{"invoice_id":{"type":"string"},"invoice_number":{"type":"string"},"status":{"type":"string","enum":["DRAFT","SUBMITTED","AUTHORISED","PAID","VOIDED","DELETED"]},"currency_code":{"type":"string","pattern":"^[A-Z]{3}$","example":"AUD"},"amount_due":{"type":"number","minimum":0},"amount_paid":{"type":"number","minimum":0},"total":{"type":"number","minimum":0},"sub_total":{"type":"number","minimum":0,"nullable":true},"date":{"type":"string","format":"date-time"},"due_date":{"type":"string","format":"date-time"},"fully_paid_date":{"type":"string","format":"date-time","nullable":true},"customer_external_id":{"type":"string"}}},"maxItems":100}}}}},"required":true},"security":[{"Basic Authorization":[]}],"responses":{"2XX":{"description":"Success","content":{"application/json":{"schema":{"description":"Success","type":"object","properties":{"object":{"type":"string"},"url":{"type":"string"},"data":{"type":"object","properties":{"modified_count":{"type":"number"},"inserted_count":{"type":"number"},"omitted_count":{"type":"number"},"inserted_ids":{"type":"array","items":{"type":"object","properties":{"index":{"type":"number"},"id":{"type":"string"}}}},"omitted_entries":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"index":{"type":"number"},"reason":{"type":"string"}}}}}}}}}}},"4XX":{"description":"Client Error","content":{"application/json":{"schema":{"type":"object","description":"Client Error","properties":{"type":{"type":"string"},"message":{"type":"string"},"url":{"type":"string"}}}}}},"5XX":{"description":"Server Error","content":{"application/json":{"schema":{"description":"Server Error","type":"object","properties":{"type":{"type":"string"},"message":{"type":"string"},"url":{"type":"string"}}}}}}}}},"/v1/invoices/{invoice_id}/pdf":{"post":{"summary":"Upload Invoice PDF","tags":["Invoices"],"description":"Upload Invoice PDF. Send as multipart/form-data with a field named \"file\" containing the PDF binary data.","requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","required":["file"],"properties":{"file":{"description":"PDF file to upload (must be a valid PDF document)","type":"string","format":"binary"}}}}},"required":true},"parameters":[{"schema":{"type":"string"},"in":"path","name":"invoice_id","required":true,"description":"Invoice unique identifier. Both \"id\" and \"invoice_id\" can be used. In case of \"invoice_id\" please prepend \"ext_\" prefix (e.g. /v1/invoices/ext_1234)"}],"security":[{"Basic Authorization":[]}],"responses":{"2XX":{"description":"Success","content":{"application/json":{"schema":{"description":"Success","type":"object","properties":{"object":{"type":"string"},"url":{"type":"string"},"data":{"type":"object","properties":{"invoice_pdf_link":{"type":"string"},"invoice_pdf_link_updated_at":{"type":"string","format":"date-time"}}}}}}}},"4XX":{"description":"Client Error","content":{"application/json":{"schema":{"type":"object","description":"Client Error","properties":{"type":{"type":"string"},"message":{"type":"string"},"url":{"type":"string"}}}}}},"5XX":{"description":"Server Error","content":{"application/json":{"schema":{"description":"Server Error","type":"object","properties":{"type":{"type":"string"},"message":{"type":"string"},"url":{"type":"string"}}}}}}}}},"/v1/organisations":{"get":{"summary":"Get organisations","tags":["Organisations"],"description":"Get organisations","security":[{"Basic Authorization":[]}],"responses":{"2XX":{"description":"Success","content":{"application/json":{"schema":{"description":"Success","type":"object","properties":{"object":{"type":"string"},"url":{"type":"string"},"page_number":{"type":"number"},"page_size":{"type":"number"},"total_count":{"type":"number"},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"base_currency":{"type":"string"},"country_code":{"type":"string"},"name":{"type":"string"},"legal_name":{"type":"string"},"organisation_id":{"type":"string"},"timezone":{"type":"string"},"last_sync_date":{"type":"string","format":"date-time"}}}}}}}}},"4XX":{"description":"Client Error","content":{"application/json":{"schema":{"type":"object","description":"Client Error","properties":{"type":{"type":"string"},"message":{"type":"string"},"url":{"type":"string"}}}}}},"5XX":{"description":"Server Error","content":{"application/json":{"schema":{"description":"Server Error","type":"object","properties":{"type":{"type":"string"},"message":{"type":"string"},"url":{"type":"string"}}}}}}}}},"/v1/organisation":{"get":{"summary":"Get current organisation","tags":["Organisations"],"description":"Get current organisation","security":[{"Basic Authorization":[]}],"responses":{"2XX":{"description":"Success","content":{"application/json":{"schema":{"description":"Success","type":"object","properties":{"object":{"type":"string"},"url":{"type":"string"},"data":{"type":"object","properties":{"id":{"type":"string"},"base_currency":{"type":"string"},"country_code":{"type":"string"},"name":{"type":"string"},"legal_name":{"type":"string"},"organisation_id":{"type":"string"},"timezone":{"type":"string"},"last_sync_date":{"type":"string","format":"date-time"}}}}}}}},"4XX":{"description":"Client Error","content":{"application/json":{"schema":{"type":"object","description":"Client Error","properties":{"type":{"type":"string"},"message":{"type":"string"},"url":{"type":"string"}}}}}},"5XX":{"description":"Server Error","content":{"application/json":{"schema":{"description":"Server Error","type":"object","properties":{"type":{"type":"string"},"message":{"type":"string"},"url":{"type":"string"}}}}}}}}},"/v1/organisation/sync":{"post":{"summary":"Sync organisation.","tags":["Organisations"],"description":"Sync organisation. Rate-limit 5 requests per 1 hour.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"tasks":{"type":"array","description":"List of tasks to execute after sync","items":{"type":"object","properties":{"task":{"type":"string","enum":["CALCULATE_NEXT_CHASES","UPDATE_INVOICE_INSTALMENTS","CALCULATE_CONTACT_BALANCES","VERIFY_CONTACT_CREDIT_LIMIT","CALCULATE_TASK_REMINDERS","CALCULATE_TOTAL_REVENUE"]}}}}}}}}},"security":[{"Basic Authorization":[]}],"responses":{"2XX":{"description":"Success","content":{"application/json":{"schema":{"description":"Success","type":"object","properties":{"object":{"type":"string"},"url":{"type":"string"},"data":{"type":"object","properties":{"result":{"type":"boolean"}}}}}}}},"4XX":{"description":"Client Error","content":{"application/json":{"schema":{"type":"object","description":"Client Error","properties":{"type":{"type":"string"},"message":{"type":"string"},"url":{"type":"string"}}}}}},"5XX":{"description":"Server Error","content":{"application/json":{"schema":{"description":"Server Error","type":"object","properties":{"type":{"type":"string"},"message":{"type":"string"},"url":{"type":"string"}}}}}}}}},"/v1/overpayments":{"get":{"summary":"Get overpayments","tags":["Overpayments"],"description":"Get overpayments","parameters":[{"schema":{"type":"number","format":"int32","minimum":1,"maximum":100,"default":100},"in":"query","name":"limit","required":false,"description":"items per page - max=100"},{"schema":{"type":"number","format":"int32","minimum":0,"default":0},"in":"query","name":"page","required":false,"description":"starts from 0"},{"schema":{"oneOf":[{"type":"string"},{"type":"object","properties":{"in":{"type":"array","items":{"type":"string"}},"nin":{"type":"array","items":{"type":"string"}},"eq":{"type":"string"},"ne":{"type":"string"}}}]},"in":"query","name":"overpayment_id","required":false,"description":"Supported operators: in, nin, eq, ne"},{"schema":{"oneOf":[{"type":"number"},{"type":"object","properties":{"gt":{"type":"number"},"lt":{"type":"number"},"gte":{"type":"number"},"lte":{"type":"number"},"eq":{"type":"number"},"ne":{"type":"number"}}}]},"in":"query","name":"remaining_credit","required":false,"description":"Supported operators: gt, lt, gte, lte, eq, ne"},{"schema":{"oneOf":[{"type":"number"},{"type":"object","properties":{"gt":{"type":"number"},"lt":{"type":"number"},"gte":{"type":"number"},"lte":{"type":"number"},"eq":{"type":"number"},"ne":{"type":"number"}}}]},"in":"query","name":"total","required":false,"description":"Supported operators: gt, lt, gte, lte, eq, ne"},{"schema":{"oneOf":[{"type":"string"},{"type":"object","properties":{"in":{"type":"array","items":{"type":"string"}},"nin":{"type":"array","items":{"type":"string"}},"eq":{"type":"string"},"ne":{"type":"string"}}}]},"in":"query","name":"currency_code","required":false,"description":"Supported operators: in, nin, eq, ne"},{"schema":{"oneOf":[{"type":"string"},{"type":"object","properties":{"in":{"type":"array","items":{"type":"string"}},"nin":{"type":"array","items":{"type":"string"}},"eq":{"type":"string"},"ne":{"type":"string"}}}]},"in":"query","name":"customer_external_id","required":false,"description":"Supported operators: in, nin, eq, ne"},{"schema":{"oneOf":[{"type":"string","format":"date-time"},{"type":"object","properties":{"gt":{"type":"string","format":"date-time"},"lt":{"type":"string","format":"date-time"},"gte":{"type":"string","format":"date-time"},"lte":{"type":"string","format":"date-time"},"eq":{"type":"string","format":"date-time"},"ne":{"type":"string","format":"date-time"}}}]},"in":"query","name":"date","required":false,"description":"Supported operators: gt, lt, gte, lte, eq, ne"}],"security":[{"Basic Authorization":[]}],"responses":{"2XX":{"description":"Success","content":{"application/json":{"schema":{"description":"Success","type":"object","properties":{"object":{"type":"string"},"url":{"type":"string"},"page_number":{"type":"number"},"page_size":{"type":"number"},"total_count":{"type":"number"},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"overpayment_id":{"type":"string"},"remaining_credit":{"type":"number"},"date":{"type":"string","format":"date-time"},"status":{"type":"string","enum":["DRAFT","SUBMITTED","AUTHORISED","PAID","VOIDED","DELETED"]},"total":{"type":"number"},"currency_code":{"type":"string","pattern":"^[A-Z]{3}$","example":"AUD"},"customer_external_id":{"type":"string"},"customer_name":{"type":"string","nullable":true}}}}}}}}},"4XX":{"description":"Client Error","content":{"application/json":{"schema":{"type":"object","description":"Client Error","properties":{"type":{"type":"string"},"message":{"type":"string"},"url":{"type":"string"}}}}}},"5XX":{"description":"Server Error","content":{"application/json":{"schema":{"description":"Server Error","type":"object","properties":{"type":{"type":"string"},"message":{"type":"string"},"url":{"type":"string"}}}}}}}},"post":{"summary":"Create overpayment","tags":["Overpayments"],"description":"Create overpayment","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["overpayment_id","remaining_credit","date","status","total","currency_code","customer_external_id"],"properties":{"overpayment_id":{"type":"string"},"remaining_credit":{"type":"number"},"date":{"type":"string","format":"date-time"},"status":{"type":"string","enum":["DRAFT","SUBMITTED","AUTHORISED","PAID","VOIDED","DELETED"]},"total":{"type":"number"},"currency_code":{"type":"string","pattern":"^[A-Z]{3}$","example":"AUD"},"customer_external_id":{"type":"string"}}}}},"required":true},"security":[{"Basic Authorization":[]}],"responses":{"2XX":{"description":"Success","content":{"application/json":{"schema":{"description":"Success","type":"object","properties":{"object":{"type":"string"},"url":{"type":"string"},"data":{"type":"object","properties":{"id":{"type":"string"},"overpayment_id":{"type":"string"},"remaining_credit":{"type":"number"},"date":{"type":"string","format":"date-time"},"status":{"type":"string","enum":["DRAFT","SUBMITTED","AUTHORISED","PAID","VOIDED","DELETED"]},"total":{"type":"number"},"currency_code":{"type":"string","pattern":"^[A-Z]{3}$","example":"AUD"},"customer_external_id":{"type":"string"},"customer_name":{"type":"string","nullable":true}}}}}}}},"4XX":{"description":"Client Error","content":{"application/json":{"schema":{"type":"object","description":"Client Error","properties":{"type":{"type":"string"},"message":{"type":"string"},"url":{"type":"string"}}}}}},"5XX":{"description":"Server Error","content":{"application/json":{"schema":{"description":"Server Error","type":"object","properties":{"type":{"type":"string"},"message":{"type":"string"},"url":{"type":"string"}}}}}}}}},"/v1/overpayments/{overpayment_id}":{"get":{"summary":"Get overpayment by id","tags":["Overpayments"],"description":"Get overpayment by id","parameters":[{"schema":{"type":"string"},"in":"path","name":"overpayment_id","required":true,"description":"Overpayment unique identifier. Both \"id\" and \"overpayment_id\" can be used. In case of \"overpayment_id\" please prepend \"ext_\" prefix (e.g. /v1/overpayment/ext_1234)"}],"security":[{"Basic Authorization":[]}],"responses":{"2XX":{"description":"Success","content":{"application/json":{"schema":{"description":"Success","type":"object","properties":{"object":{"type":"string"},"url":{"type":"string"},"data":{"type":"object","properties":{"id":{"type":"string"},"overpayment_id":{"type":"string"},"remaining_credit":{"type":"number"},"date":{"type":"string","format":"date-time"},"status":{"type":"string","enum":["DRAFT","SUBMITTED","AUTHORISED","PAID","VOIDED","DELETED"]},"total":{"type":"number"},"currency_code":{"type":"string","pattern":"^[A-Z]{3}$","example":"AUD"},"customer_external_id":{"type":"string"},"customer_name":{"type":"string","nullable":true}}}}}}}},"4XX":{"description":"Client Error","content":{"application/json":{"schema":{"type":"object","description":"Client Error","properties":{"type":{"type":"string"},"message":{"type":"string"},"url":{"type":"string"}}}}}},"5XX":{"description":"Server Error","content":{"application/json":{"schema":{"description":"Server Error","type":"object","properties":{"type":{"type":"string"},"message":{"type":"string"},"url":{"type":"string"}}}}}}}},"put":{"summary":"Update overpayment","tags":["Overpayments"],"description":"Update overpayment","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{"overpayment_id":{"type":"string"},"remaining_credit":{"type":"number"},"date":{"type":"string","format":"date-time"},"status":{"type":"string","enum":["DRAFT","SUBMITTED","AUTHORISED","PAID","VOIDED","DELETED"]},"total":{"type":"number"},"currency_code":{"type":"string","pattern":"^[A-Z]{3}$","example":"AUD"},"customer_external_id":{"type":"string"}}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"overpayment_id","required":true,"description":"Overpayment unique identifier. Both \"id\" and \"overpayment_id\" can be used. In case of \"overpayment_id\" please prepend \"ext_\" prefix (e.g. /v1/overpayment/ext_1234)"}],"security":[{"Basic Authorization":[]}],"responses":{"2XX":{"description":"Success","content":{"application/json":{"schema":{"description":"Success","type":"object","properties":{"object":{"type":"string"},"url":{"type":"string"},"data":{"type":"object","properties":{"id":{"type":"string"},"overpayment_id":{"type":"string"},"remaining_credit":{"type":"number"},"date":{"type":"string","format":"date-time"},"status":{"type":"string","enum":["DRAFT","SUBMITTED","AUTHORISED","PAID","VOIDED","DELETED"]},"total":{"type":"number"},"currency_code":{"type":"string","pattern":"^[A-Z]{3}$","example":"AUD"},"customer_external_id":{"type":"string"},"customer_name":{"type":"string","nullable":true}}}}}}}},"4XX":{"description":"Client Error","content":{"application/json":{"schema":{"type":"object","description":"Client Error","properties":{"type":{"type":"string"},"message":{"type":"string"},"url":{"type":"string"}}}}}},"5XX":{"description":"Server Error","content":{"application/json":{"schema":{"description":"Server Error","type":"object","properties":{"type":{"type":"string"},"message":{"type":"string"},"url":{"type":"string"}}}}}}}}},"/v1/bulk/overpayments":{"put":{"summary":"Bulk Upsert overpayments.","tags":["Overpayments"],"description":"Bulk Upsert up to 100 overpayments, matching by overpayment_id (or id).","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["entries"],"properties":{"entries":{"type":"array","items":{"type":"object","required":["overpayment_id","remaining_credit","date","status","total","currency_code","customer_external_id"],"properties":{"overpayment_id":{"type":"string"},"remaining_credit":{"type":"number"},"date":{"type":"string","format":"date-time"},"status":{"type":"string","enum":["DRAFT","SUBMITTED","AUTHORISED","PAID","VOIDED","DELETED"]},"total":{"type":"number"},"currency_code":{"type":"string","pattern":"^[A-Z]{3}$","example":"AUD"},"customer_external_id":{"type":"string"}}},"maxItems":100}}}}},"required":true},"security":[{"Basic Authorization":[]}],"responses":{"2XX":{"description":"Success","content":{"application/json":{"schema":{"description":"Success","type":"object","properties":{"object":{"type":"string"},"url":{"type":"string"},"data":{"type":"object","properties":{"modified_count":{"type":"number"},"inserted_count":{"type":"number"},"omitted_count":{"type":"number"},"inserted_ids":{"type":"array","items":{"type":"object","properties":{"index":{"type":"number"},"id":{"type":"string"}}}},"omitted_entries":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"index":{"type":"number"},"reason":{"type":"string"}}}}}}}}}}},"4XX":{"description":"Client Error","content":{"application/json":{"schema":{"type":"object","description":"Client Error","properties":{"type":{"type":"string"},"message":{"type":"string"},"url":{"type":"string"}}}}}},"5XX":{"description":"Server Error","content":{"application/json":{"schema":{"description":"Server Error","type":"object","properties":{"type":{"type":"string"},"message":{"type":"string"},"url":{"type":"string"}}}}}}}}},"/v1/tasks":{"get":{"summary":"Get tasks","tags":["Tasks"],"description":"Get tasks","parameters":[{"schema":{"type":"number","format":"int32","minimum":1,"maximum":100,"default":100},"in":"query","name":"limit","required":false,"description":"items per page - max=100"},{"schema":{"type":"number","format":"int32","minimum":0,"default":0},"in":"query","name":"page","required":false,"description":"starts from 0"},{"schema":{"oneOf":[{"type":"string"},{"type":"object","properties":{"in":{"type":"array","items":{"type":"string"}},"nin":{"type":"array","items":{"type":"string"}},"eq":{"type":"string"},"ne":{"type":"string"}}}]},"in":"query","name":"type","required":false,"description":"Supported operators: in, nin, eq, ne"},{"schema":{"oneOf":[{"type":"string"},{"type":"object","properties":{"in":{"type":"array","items":{"type":"string"}},"nin":{"type":"array","items":{"type":"string"}},"eq":{"type":"string"},"ne":{"type":"string"}}}]},"in":"query","name":"status","required":false,"description":"Supported operators: in, nin, eq, ne"},{"schema":{"oneOf":[{"type":"string"},{"type":"object","properties":{"in":{"type":"array","items":{"type":"string"}},"nin":{"type":"array","items":{"type":"string"}},"eq":{"type":"string"},"ne":{"type":"string"}}}]},"in":"query","name":"source","required":false,"description":"Supported operators: in, nin, eq, ne"},{"schema":{"oneOf":[{"type":"string"},{"type":"object","properties":{"in":{"type":"array","items":{"type":"string"}},"nin":{"type":"array","items":{"type":"string"}},"eq":{"type":"string"},"ne":{"type":"string"}}}]},"in":"query","name":"category","required":false,"description":"Supported operators: in, nin, eq, ne"},{"schema":{"oneOf":[{"type":"string","format":"date-time"},{"type":"object","properties":{"gt":{"type":"string","format":"date-time"},"lt":{"type":"string","format":"date-time"},"gte":{"type":"string","format":"date-time"},"lte":{"type":"string","format":"date-time"},"eq":{"type":"string","format":"date-time"},"ne":{"type":"string","format":"date-time"}}}]},"in":"query","name":"due_date","required":false,"description":"Supported operators: gt, lt, gte, lte, eq, ne"}],"security":[{"Basic Authorization":[]}],"responses":{"2XX":{"description":"Success","content":{"application/json":{"schema":{"description":"Success","type":"object","properties":{"object":{"type":"string"},"url":{"type":"string"},"page_number":{"type":"number"},"page_size":{"type":"number"},"total_count":{"type":"number"},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","nullable":true},"status":{"type":"string","nullable":true},"created_date":{"type":"string","format":"date-time","nullable":true},"completed_date":{"type":"string","format":"date-time","nullable":true},"metadata":{"type":"object","additionalProperties":true},"source":{"type":"string","nullable":true},"category":{"type":"string","nullable":true},"due_date":{"type":"string","format":"date-time","nullable":true},"assignee":{"type":"string","nullable":true},"completed_by":{"type":"string","nullable":true}}}}}}}}},"4XX":{"description":"Client Error","content":{"application/json":{"schema":{"type":"object","description":"Client Error","properties":{"type":{"type":"string"},"message":{"type":"string"},"url":{"type":"string"}}}}}},"5XX":{"description":"Server Error","content":{"application/json":{"schema":{"description":"Server Error","type":"object","properties":{"type":{"type":"string"},"message":{"type":"string"},"url":{"type":"string"}}}}}}}}}},"servers":[{"url":"https://openapi.chaserhq.com/"}],"tags":[{"name":"Organisations"},{"name":"Customers"},{"name":"Contact Persons"},{"name":"Invoices"},{"name":"Credit Notes"},{"name":"Overpayments"},{"name":"Tasks"}]}