{"openapi":"3.0.3","info":{"title":"TnL CRM Public API","version":"3.0.0","description":"Bearer-token API for one CRM account.\n\nSend `Authorization: Bearer \u003Ctoken\u003E`. Create, copy, and rotate the token under Settings \u2192 Integrations \u2192 V3 public API. The token only works while that integration is enabled.\n\nRate limit: **5 requests per second** per token. Responses include `X-RateLimit-Limit` and `X-RateLimit-Remaining`.\n\n**Read and write** (create one, update one, read one, read a list): contacts, companies, jobs, services, products, storage, warehouse slots, notes, tasks.\n\n**Read only** (read one, read a list): invoices, expenses.\n\n`company_id` on contacts, jobs, and invoices is the customer company, not your CRM account. The account is chosen by the token.\n\nLists accept `page` (default 1), `limit` (default 25, maximum 100), and the filters shown on each list operation. Filters are combined with AND."},"servers":[{"url":"\/api\/v3","description":"This CRM"}],"tags":[{"name":"Jobs","description":"Moving jobs. Create, update, read one, and list."},{"name":"Contacts","description":"People. Create, update, read one, and list."},{"name":"Companies","description":"Customer companies. Create, update, read one, and list."},{"name":"Invoices","description":"Read only. Read one and list."},{"name":"Notes","description":"Job notes. Create, update, read one, and list."},{"name":"Tasks","description":"Job tasks. Create, update, read one, and list."},{"name":"Products","description":"Catalog products. Create, update, read one, and list."},{"name":"Services","description":"Catalog services. Create, update, read one, and list."},{"name":"Storage","description":"Warehouses. Create, update, read one, and list."},{"name":"WarehouseSlots","description":"Storage bookings linked to a job. Create, update, read one, and list. Filter the list with job_id."},{"name":"Expenses","description":"Read only. Read one and list."}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Token from Settings \u2192 Integrations \u2192 V3 public API."}},"parameters":{"page":{"name":"page","in":"query","description":"Page number, starting at 1.","schema":{"type":"integer","minimum":1,"default":1},"example":1},"limit":{"name":"limit","in":"query","description":"Page size. Maximum 100.","schema":{"type":"integer","minimum":1,"maximum":100,"default":25},"example":25},"id":{"name":"id","in":"path","required":true,"description":"Resource id.","schema":{"type":"string","format":"uuid"},"example":"3f1c2a40-6b2e-4d1a-9c3e-1a2b3c4d5e6f"}},"schemas":{"Error":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer"}},"example":{"error":"Invalid API token.","code":401}}},"responses":{"Unauthorized":{"description":"Missing or invalid bearer token.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"},"example":{"error":"Invalid API token.","code":401}}}},"Forbidden":{"description":"The token is valid but the V3 public API is disabled.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"},"example":{"error":"V3 public API is disabled for this account.","code":403}}}},"NotFound":{"description":"No record with this id belongs to the token account.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"},"example":{"error":"Record was not found.","code":404}}}},"Unprocessable":{"description":"The JSON body is invalid or a required field is missing.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"},"example":{"error":"name is required.","code":422}}}},"TooManyRequests":{"description":"More than 5 requests in the current second.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"},"example":{"error":"Rate limit exceeded. Maximum 5 requests per second.","code":429}}}}}},"paths":{"\/jobs":{"get":{"tags":["Jobs"],"operationId":"listJobs","summary":"List jobs","description":"Returns one page of jobs. Optional filters are combined with AND.","responses":{"200":{"description":"OK.","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","nullable":true,"description":"Job id.","readOnly":true},"number":{"type":"integer","readOnly":true,"description":"Account job number."},"name":{"type":"string","nullable":false,"description":"Job name."},"job_date":{"type":"string","nullable":true,"description":"Date label stored on the job, usually YYYY-MM-DD."},"source":{"type":"string","nullable":true,"description":"Lead source. Defaults to api on create."},"notes":{"type":"string","nullable":true,"description":"Internal notes."},"start_date":{"type":"string","format":"date-time","nullable":true,"description":"Planned start."},"end_date":{"type":"string","format":"date-time","nullable":true,"description":"Planned end."},"from":{"type":"object","nullable":true,"description":"Free-form address object.","properties":{"address":{"type":"string"},"city":{"type":"string"},"post_code":{"type":"string"}},"example":{"address":"221B Baker Street","city":"London","post_code":"NW1 6XE"}},"to":{"type":"object","nullable":true,"description":"Free-form address object.","properties":{"address":{"type":"string"},"city":{"type":"string"},"post_code":{"type":"string"}},"example":{"address":"221B Baker Street","city":"London","post_code":"NW1 6XE"}},"contact_id":{"type":"string","format":"uuid","nullable":true,"description":"Contact id in this account."},"company_id":{"type":"string","format":"uuid","nullable":true,"description":"Customer company id in this account."},"status":{"type":"string","nullable":true,"description":"Current status name.","readOnly":true},"created":{"type":"string","format":"date-time","nullable":true,"description":"When the job was created.","readOnly":true}}}},"page":{"type":"integer","example":1},"limit":{"type":"integer","example":25},"total":{"type":"integer","example":1}}},"example":{"data":[{"id":"3f1c2a40-6b2e-4d1a-9c3e-1a2b3c4d5e6f","number":1042,"name":"Flat move \u2014 Baker Street","job_date":"2026-12-01","source":"website","notes":"Customer asked for a morning arrival.","start_date":"2026-12-01T08:00:00+00:00","end_date":"2026-12-01T12:00:00+00:00","from":{"address":"221B Baker Street","city":"London","post_code":"NW1 6XE"},"to":{"address":"10 Downing Street","city":"London","post_code":"SW1A 2AA"},"contact_id":"8b2e1c90-1111-4222-8333-444455556666","company_id":"9c3f2d80-2222-4333-8444-555566667777","status":"New","created":"2026-11-25T08:30:00+00:00"}],"page":1,"limit":25,"total":1}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"}},"parameters":[{"$ref":"#\/components\/parameters\/page"},{"$ref":"#\/components\/parameters\/limit"},{"name":"q","in":"query","required":false,"description":"Search name, source, and notes.","schema":{"type":"string"}},{"name":"contact_id","in":"query","required":false,"description":"Only jobs for this contact.","schema":{"type":"string","format":"uuid"}},{"name":"company_id","in":"query","required":false,"description":"Only jobs for this customer company.","schema":{"type":"string","format":"uuid"}},{"name":"status","in":"query","required":false,"description":"Status name, case-insensitive.","schema":{"type":"string"}},{"name":"source","in":"query","required":false,"description":"Lead source, case-insensitive.","schema":{"type":"string"}},{"name":"job_date","in":"query","required":false,"description":"Job date label, usually YYYY-MM-DD.","schema":{"type":"string"}},{"name":"number","in":"query","required":false,"description":"Account job number.","schema":{"type":"integer"}},{"name":"created_from","in":"query","required":false,"description":"Created at or after this time.","schema":{"type":"string","format":"date-time"}},{"name":"created_to","in":"query","required":false,"description":"Created at or before this time.","schema":{"type":"string","format":"date-time"}},{"name":"start_from","in":"query","required":false,"description":"Planned start at or after this time.","schema":{"type":"string","format":"date-time"}},{"name":"start_to","in":"query","required":false,"description":"Planned start at or before this time.","schema":{"type":"string","format":"date-time"}}]},"post":{"tags":["Jobs"],"operationId":"createJobs","summary":"Create one job","description":"Creates one job. Send only the writable fields.","responses":{"201":{"description":"Created.","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","nullable":true,"description":"Job id.","readOnly":true},"number":{"type":"integer","readOnly":true,"description":"Account job number."},"name":{"type":"string","nullable":false,"description":"Job name."},"job_date":{"type":"string","nullable":true,"description":"Date label stored on the job, usually YYYY-MM-DD."},"source":{"type":"string","nullable":true,"description":"Lead source. Defaults to api on create."},"notes":{"type":"string","nullable":true,"description":"Internal notes."},"start_date":{"type":"string","format":"date-time","nullable":true,"description":"Planned start."},"end_date":{"type":"string","format":"date-time","nullable":true,"description":"Planned end."},"from":{"type":"object","nullable":true,"description":"Free-form address object.","properties":{"address":{"type":"string"},"city":{"type":"string"},"post_code":{"type":"string"}},"example":{"address":"221B Baker Street","city":"London","post_code":"NW1 6XE"}},"to":{"type":"object","nullable":true,"description":"Free-form address object.","properties":{"address":{"type":"string"},"city":{"type":"string"},"post_code":{"type":"string"}},"example":{"address":"221B Baker Street","city":"London","post_code":"NW1 6XE"}},"contact_id":{"type":"string","format":"uuid","nullable":true,"description":"Contact id in this account."},"company_id":{"type":"string","format":"uuid","nullable":true,"description":"Customer company id in this account."},"status":{"type":"string","nullable":true,"description":"Current status name.","readOnly":true},"created":{"type":"string","format":"date-time","nullable":true,"description":"When the job was created.","readOnly":true}}}}},"example":{"data":{"id":"3f1c2a40-6b2e-4d1a-9c3e-1a2b3c4d5e6f","number":1042,"name":"Flat move \u2014 Baker Street","job_date":"2026-12-01","source":"website","notes":"Customer asked for a morning arrival.","start_date":"2026-12-01T08:00:00+00:00","end_date":"2026-12-01T12:00:00+00:00","from":{"address":"221B Baker Street","city":"London","post_code":"NW1 6XE"},"to":{"address":"10 Downing Street","city":"London","post_code":"SW1A 2AA"},"contact_id":"8b2e1c90-1111-4222-8333-444455556666","company_id":"9c3f2d80-2222-4333-8444-555566667777","status":"New","created":"2026-11-25T08:30:00+00:00"}}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"},"422":{"$ref":"#\/components\/responses\/Unprocessable"}},"requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","nullable":false,"description":"Job name."},"job_date":{"type":"string","nullable":true,"description":"Date label stored on the job, usually YYYY-MM-DD."},"source":{"type":"string","nullable":true,"description":"Lead source. Defaults to api on create."},"notes":{"type":"string","nullable":true,"description":"Internal notes."},"start_date":{"type":"string","format":"date-time","nullable":true,"description":"Planned start."},"end_date":{"type":"string","format":"date-time","nullable":true,"description":"Planned end."},"from":{"type":"object","nullable":true,"description":"Free-form address object.","properties":{"address":{"type":"string"},"city":{"type":"string"},"post_code":{"type":"string"}},"example":{"address":"221B Baker Street","city":"London","post_code":"NW1 6XE"}},"to":{"type":"object","nullable":true,"description":"Free-form address object.","properties":{"address":{"type":"string"},"city":{"type":"string"},"post_code":{"type":"string"}},"example":{"address":"221B Baker Street","city":"London","post_code":"NW1 6XE"}},"contact_id":{"type":"string","format":"uuid","nullable":true,"description":"Contact id in this account."},"company_id":{"type":"string","format":"uuid","nullable":true,"description":"Customer company id in this account."}},"required":["name"]},"example":{"name":"Flat move \u2014 Baker Street","job_date":"2026-12-01","source":"website","notes":"Customer asked for a morning arrival.","start_date":"2026-12-01T08:00:00+00:00","end_date":"2026-12-01T12:00:00+00:00","from":{"address":"221B Baker Street","city":"London","post_code":"NW1 6XE"},"to":{"address":"10 Downing Street","city":"London","post_code":"SW1A 2AA"},"contact_id":"8b2e1c90-1111-4222-8333-444455556666","company_id":"9c3f2d80-2222-4333-8444-555566667777"}}}}}},"\/jobs\/{id}":{"parameters":[{"$ref":"#\/components\/parameters\/id"}],"get":{"tags":["Jobs"],"operationId":"getJobs","summary":"Read one job","description":"Returns one job when it belongs to the token account.","responses":{"200":{"description":"OK.","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","nullable":true,"description":"Job id.","readOnly":true},"number":{"type":"integer","readOnly":true,"description":"Account job number."},"name":{"type":"string","nullable":false,"description":"Job name."},"job_date":{"type":"string","nullable":true,"description":"Date label stored on the job, usually YYYY-MM-DD."},"source":{"type":"string","nullable":true,"description":"Lead source. Defaults to api on create."},"notes":{"type":"string","nullable":true,"description":"Internal notes."},"start_date":{"type":"string","format":"date-time","nullable":true,"description":"Planned start."},"end_date":{"type":"string","format":"date-time","nullable":true,"description":"Planned end."},"from":{"type":"object","nullable":true,"description":"Free-form address object.","properties":{"address":{"type":"string"},"city":{"type":"string"},"post_code":{"type":"string"}},"example":{"address":"221B Baker Street","city":"London","post_code":"NW1 6XE"}},"to":{"type":"object","nullable":true,"description":"Free-form address object.","properties":{"address":{"type":"string"},"city":{"type":"string"},"post_code":{"type":"string"}},"example":{"address":"221B Baker Street","city":"London","post_code":"NW1 6XE"}},"contact_id":{"type":"string","format":"uuid","nullable":true,"description":"Contact id in this account."},"company_id":{"type":"string","format":"uuid","nullable":true,"description":"Customer company id in this account."},"status":{"type":"string","nullable":true,"description":"Current status name.","readOnly":true},"created":{"type":"string","format":"date-time","nullable":true,"description":"When the job was created.","readOnly":true}}}}},"example":{"data":{"id":"3f1c2a40-6b2e-4d1a-9c3e-1a2b3c4d5e6f","number":1042,"name":"Flat move \u2014 Baker Street","job_date":"2026-12-01","source":"website","notes":"Customer asked for a morning arrival.","start_date":"2026-12-01T08:00:00+00:00","end_date":"2026-12-01T12:00:00+00:00","from":{"address":"221B Baker Street","city":"London","post_code":"NW1 6XE"},"to":{"address":"10 Downing Street","city":"London","post_code":"SW1A 2AA"},"contact_id":"8b2e1c90-1111-4222-8333-444455556666","company_id":"9c3f2d80-2222-4333-8444-555566667777","status":"New","created":"2026-11-25T08:30:00+00:00"}}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"},"404":{"$ref":"#\/components\/responses\/NotFound"}}},"patch":{"tags":["Jobs"],"operationId":"updateJobs","summary":"Update one job","description":"Updates one job. Send only the fields that should change.","responses":{"200":{"description":"OK.","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","nullable":true,"description":"Job id.","readOnly":true},"number":{"type":"integer","readOnly":true,"description":"Account job number."},"name":{"type":"string","nullable":false,"description":"Job name."},"job_date":{"type":"string","nullable":true,"description":"Date label stored on the job, usually YYYY-MM-DD."},"source":{"type":"string","nullable":true,"description":"Lead source. Defaults to api on create."},"notes":{"type":"string","nullable":true,"description":"Internal notes."},"start_date":{"type":"string","format":"date-time","nullable":true,"description":"Planned start."},"end_date":{"type":"string","format":"date-time","nullable":true,"description":"Planned end."},"from":{"type":"object","nullable":true,"description":"Free-form address object.","properties":{"address":{"type":"string"},"city":{"type":"string"},"post_code":{"type":"string"}},"example":{"address":"221B Baker Street","city":"London","post_code":"NW1 6XE"}},"to":{"type":"object","nullable":true,"description":"Free-form address object.","properties":{"address":{"type":"string"},"city":{"type":"string"},"post_code":{"type":"string"}},"example":{"address":"221B Baker Street","city":"London","post_code":"NW1 6XE"}},"contact_id":{"type":"string","format":"uuid","nullable":true,"description":"Contact id in this account."},"company_id":{"type":"string","format":"uuid","nullable":true,"description":"Customer company id in this account."},"status":{"type":"string","nullable":true,"description":"Current status name.","readOnly":true},"created":{"type":"string","format":"date-time","nullable":true,"description":"When the job was created.","readOnly":true}}}}},"example":{"data":{"id":"3f1c2a40-6b2e-4d1a-9c3e-1a2b3c4d5e6f","number":1042,"name":"Flat move \u2014 Baker Street","job_date":"2026-12-01","source":"website","notes":"Customer asked for a morning arrival.","start_date":"2026-12-01T08:00:00+00:00","end_date":"2026-12-01T12:00:00+00:00","from":{"address":"221B Baker Street","city":"London","post_code":"NW1 6XE"},"to":{"address":"10 Downing Street","city":"London","post_code":"SW1A 2AA"},"contact_id":"8b2e1c90-1111-4222-8333-444455556666","company_id":"9c3f2d80-2222-4333-8444-555566667777","status":"New","created":"2026-11-25T08:30:00+00:00"}}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"},"422":{"$ref":"#\/components\/responses\/Unprocessable"},"404":{"$ref":"#\/components\/responses\/NotFound"}},"requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","nullable":false,"description":"Job name."},"job_date":{"type":"string","nullable":true,"description":"Date label stored on the job, usually YYYY-MM-DD."},"source":{"type":"string","nullable":true,"description":"Lead source. Defaults to api on create."},"notes":{"type":"string","nullable":true,"description":"Internal notes."},"start_date":{"type":"string","format":"date-time","nullable":true,"description":"Planned start."},"end_date":{"type":"string","format":"date-time","nullable":true,"description":"Planned end."},"from":{"type":"object","nullable":true,"description":"Free-form address object.","properties":{"address":{"type":"string"},"city":{"type":"string"},"post_code":{"type":"string"}},"example":{"address":"221B Baker Street","city":"London","post_code":"NW1 6XE"}},"to":{"type":"object","nullable":true,"description":"Free-form address object.","properties":{"address":{"type":"string"},"city":{"type":"string"},"post_code":{"type":"string"}},"example":{"address":"221B Baker Street","city":"London","post_code":"NW1 6XE"}},"contact_id":{"type":"string","format":"uuid","nullable":true,"description":"Contact id in this account."},"company_id":{"type":"string","format":"uuid","nullable":true,"description":"Customer company id in this account."}}},"example":{"notes":"Arriving at 8:30. Side gate access.","job_date":"2026-12-02"}}}}}},"\/contacts":{"get":{"tags":["Contacts"],"operationId":"listContacts","summary":"List contacts","description":"Returns one page of contacts. Optional filters are combined with AND.","responses":{"200":{"description":"OK.","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","nullable":true,"description":"Contact id.","readOnly":true},"salutation":{"type":"string","nullable":true,"description":"Salutation."},"first_name":{"type":"string","nullable":true,"description":"Given name."},"last_name":{"type":"string","nullable":true,"description":"Family name."},"email":{"type":"string","nullable":true,"description":"Primary email."},"email_alt":{"type":"string","nullable":true,"description":"Alternate email."},"phone":{"type":"string","nullable":true,"description":"Mobile phone."},"phone_landline":{"type":"string","nullable":true,"description":"Landline."},"phone_alt":{"type":"string","nullable":true,"description":"Alternate phone."},"position":{"type":"string","nullable":true,"description":"Job title at the customer company."},"notes":{"type":"string","nullable":true,"description":"Notes about the person."},"address":{"type":"string","nullable":true,"description":"Street address."},"city":{"type":"string","nullable":true,"description":"City."},"state":{"type":"string","nullable":true,"description":"State or region."},"post_code":{"type":"string","nullable":true,"description":"Postal code."},"country":{"type":"string","nullable":true,"description":"Country."},"company_id":{"type":"string","format":"uuid","nullable":true,"description":"Customer company id."},"created":{"type":"string","format":"date-time","nullable":true,"description":"When the contact was created.","readOnly":true}}}},"page":{"type":"integer","example":1},"limit":{"type":"integer","example":25},"total":{"type":"integer","example":1}}},"example":{"data":[{"id":"8b2e1c90-1111-4222-8333-444455556666","salutation":"Ms","first_name":"Jane","last_name":"Doe","email":"jane@example.com","email_alt":null,"phone":"+447700900123","phone_landline":null,"phone_alt":null,"position":"Office manager","notes":"Prefers SMS.","address":"221B Baker Street","city":"London","state":null,"post_code":"NW1 6XE","country":"UK","company_id":"9c3f2d80-2222-4333-8444-555566667777","created":"2026-11-20T10:00:00+00:00"}],"page":1,"limit":25,"total":1}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"}},"parameters":[{"$ref":"#\/components\/parameters\/page"},{"$ref":"#\/components\/parameters\/limit"},{"name":"q","in":"query","required":false,"description":"Search first name, last name, email, and phone.","schema":{"type":"string"}},{"name":"email","in":"query","required":false,"description":"Primary email, case-insensitive.","schema":{"type":"string"}},{"name":"phone","in":"query","required":false,"description":"Primary phone, case-insensitive.","schema":{"type":"string"}},{"name":"company_id","in":"query","required":false,"description":"Only contacts at this customer company.","schema":{"type":"string","format":"uuid"}},{"name":"created_from","in":"query","required":false,"description":"Created at or after this time.","schema":{"type":"string","format":"date-time"}},{"name":"created_to","in":"query","required":false,"description":"Created at or before this time.","schema":{"type":"string","format":"date-time"}}]},"post":{"tags":["Contacts"],"operationId":"createContacts","summary":"Create one contact","description":"Creates one contact. Send only the writable fields.","responses":{"201":{"description":"Created.","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","nullable":true,"description":"Contact id.","readOnly":true},"salutation":{"type":"string","nullable":true,"description":"Salutation."},"first_name":{"type":"string","nullable":true,"description":"Given name."},"last_name":{"type":"string","nullable":true,"description":"Family name."},"email":{"type":"string","nullable":true,"description":"Primary email."},"email_alt":{"type":"string","nullable":true,"description":"Alternate email."},"phone":{"type":"string","nullable":true,"description":"Mobile phone."},"phone_landline":{"type":"string","nullable":true,"description":"Landline."},"phone_alt":{"type":"string","nullable":true,"description":"Alternate phone."},"position":{"type":"string","nullable":true,"description":"Job title at the customer company."},"notes":{"type":"string","nullable":true,"description":"Notes about the person."},"address":{"type":"string","nullable":true,"description":"Street address."},"city":{"type":"string","nullable":true,"description":"City."},"state":{"type":"string","nullable":true,"description":"State or region."},"post_code":{"type":"string","nullable":true,"description":"Postal code."},"country":{"type":"string","nullable":true,"description":"Country."},"company_id":{"type":"string","format":"uuid","nullable":true,"description":"Customer company id."},"created":{"type":"string","format":"date-time","nullable":true,"description":"When the contact was created.","readOnly":true}}}}},"example":{"data":{"id":"8b2e1c90-1111-4222-8333-444455556666","salutation":"Ms","first_name":"Jane","last_name":"Doe","email":"jane@example.com","email_alt":null,"phone":"+447700900123","phone_landline":null,"phone_alt":null,"position":"Office manager","notes":"Prefers SMS.","address":"221B Baker Street","city":"London","state":null,"post_code":"NW1 6XE","country":"UK","company_id":"9c3f2d80-2222-4333-8444-555566667777","created":"2026-11-20T10:00:00+00:00"}}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"},"422":{"$ref":"#\/components\/responses\/Unprocessable"}},"requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","properties":{"salutation":{"type":"string","nullable":true,"description":"Salutation."},"first_name":{"type":"string","nullable":true,"description":"Given name."},"last_name":{"type":"string","nullable":true,"description":"Family name."},"email":{"type":"string","nullable":true,"description":"Primary email."},"email_alt":{"type":"string","nullable":true,"description":"Alternate email."},"phone":{"type":"string","nullable":true,"description":"Mobile phone."},"phone_landline":{"type":"string","nullable":true,"description":"Landline."},"phone_alt":{"type":"string","nullable":true,"description":"Alternate phone."},"position":{"type":"string","nullable":true,"description":"Job title at the customer company."},"notes":{"type":"string","nullable":true,"description":"Notes about the person."},"address":{"type":"string","nullable":true,"description":"Street address."},"city":{"type":"string","nullable":true,"description":"City."},"state":{"type":"string","nullable":true,"description":"State or region."},"post_code":{"type":"string","nullable":true,"description":"Postal code."},"country":{"type":"string","nullable":true,"description":"Country."},"company_id":{"type":"string","format":"uuid","nullable":true,"description":"Customer company id."}}},"example":{"salutation":"Ms","first_name":"Jane","last_name":"Doe","email":"jane@example.com","email_alt":null,"phone":"+447700900123","phone_landline":null,"phone_alt":null,"position":"Office manager","notes":"Prefers SMS.","address":"221B Baker Street","city":"London","state":null,"post_code":"NW1 6XE","country":"UK","company_id":"9c3f2d80-2222-4333-8444-555566667777"}}}}}},"\/contacts\/{id}":{"parameters":[{"$ref":"#\/components\/parameters\/id"}],"get":{"tags":["Contacts"],"operationId":"getContacts","summary":"Read one contact","description":"Returns one contact when it belongs to the token account.","responses":{"200":{"description":"OK.","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","nullable":true,"description":"Contact id.","readOnly":true},"salutation":{"type":"string","nullable":true,"description":"Salutation."},"first_name":{"type":"string","nullable":true,"description":"Given name."},"last_name":{"type":"string","nullable":true,"description":"Family name."},"email":{"type":"string","nullable":true,"description":"Primary email."},"email_alt":{"type":"string","nullable":true,"description":"Alternate email."},"phone":{"type":"string","nullable":true,"description":"Mobile phone."},"phone_landline":{"type":"string","nullable":true,"description":"Landline."},"phone_alt":{"type":"string","nullable":true,"description":"Alternate phone."},"position":{"type":"string","nullable":true,"description":"Job title at the customer company."},"notes":{"type":"string","nullable":true,"description":"Notes about the person."},"address":{"type":"string","nullable":true,"description":"Street address."},"city":{"type":"string","nullable":true,"description":"City."},"state":{"type":"string","nullable":true,"description":"State or region."},"post_code":{"type":"string","nullable":true,"description":"Postal code."},"country":{"type":"string","nullable":true,"description":"Country."},"company_id":{"type":"string","format":"uuid","nullable":true,"description":"Customer company id."},"created":{"type":"string","format":"date-time","nullable":true,"description":"When the contact was created.","readOnly":true}}}}},"example":{"data":{"id":"8b2e1c90-1111-4222-8333-444455556666","salutation":"Ms","first_name":"Jane","last_name":"Doe","email":"jane@example.com","email_alt":null,"phone":"+447700900123","phone_landline":null,"phone_alt":null,"position":"Office manager","notes":"Prefers SMS.","address":"221B Baker Street","city":"London","state":null,"post_code":"NW1 6XE","country":"UK","company_id":"9c3f2d80-2222-4333-8444-555566667777","created":"2026-11-20T10:00:00+00:00"}}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"},"404":{"$ref":"#\/components\/responses\/NotFound"}}},"patch":{"tags":["Contacts"],"operationId":"updateContacts","summary":"Update one contact","description":"Updates one contact. Send only the fields that should change.","responses":{"200":{"description":"OK.","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","nullable":true,"description":"Contact id.","readOnly":true},"salutation":{"type":"string","nullable":true,"description":"Salutation."},"first_name":{"type":"string","nullable":true,"description":"Given name."},"last_name":{"type":"string","nullable":true,"description":"Family name."},"email":{"type":"string","nullable":true,"description":"Primary email."},"email_alt":{"type":"string","nullable":true,"description":"Alternate email."},"phone":{"type":"string","nullable":true,"description":"Mobile phone."},"phone_landline":{"type":"string","nullable":true,"description":"Landline."},"phone_alt":{"type":"string","nullable":true,"description":"Alternate phone."},"position":{"type":"string","nullable":true,"description":"Job title at the customer company."},"notes":{"type":"string","nullable":true,"description":"Notes about the person."},"address":{"type":"string","nullable":true,"description":"Street address."},"city":{"type":"string","nullable":true,"description":"City."},"state":{"type":"string","nullable":true,"description":"State or region."},"post_code":{"type":"string","nullable":true,"description":"Postal code."},"country":{"type":"string","nullable":true,"description":"Country."},"company_id":{"type":"string","format":"uuid","nullable":true,"description":"Customer company id."},"created":{"type":"string","format":"date-time","nullable":true,"description":"When the contact was created.","readOnly":true}}}}},"example":{"data":{"id":"8b2e1c90-1111-4222-8333-444455556666","salutation":"Ms","first_name":"Jane","last_name":"Doe","email":"jane@example.com","email_alt":null,"phone":"+447700900123","phone_landline":null,"phone_alt":null,"position":"Office manager","notes":"Prefers SMS.","address":"221B Baker Street","city":"London","state":null,"post_code":"NW1 6XE","country":"UK","company_id":"9c3f2d80-2222-4333-8444-555566667777","created":"2026-11-20T10:00:00+00:00"}}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"},"422":{"$ref":"#\/components\/responses\/Unprocessable"},"404":{"$ref":"#\/components\/responses\/NotFound"}},"requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","properties":{"salutation":{"type":"string","nullable":true,"description":"Salutation."},"first_name":{"type":"string","nullable":true,"description":"Given name."},"last_name":{"type":"string","nullable":true,"description":"Family name."},"email":{"type":"string","nullable":true,"description":"Primary email."},"email_alt":{"type":"string","nullable":true,"description":"Alternate email."},"phone":{"type":"string","nullable":true,"description":"Mobile phone."},"phone_landline":{"type":"string","nullable":true,"description":"Landline."},"phone_alt":{"type":"string","nullable":true,"description":"Alternate phone."},"position":{"type":"string","nullable":true,"description":"Job title at the customer company."},"notes":{"type":"string","nullable":true,"description":"Notes about the person."},"address":{"type":"string","nullable":true,"description":"Street address."},"city":{"type":"string","nullable":true,"description":"City."},"state":{"type":"string","nullable":true,"description":"State or region."},"post_code":{"type":"string","nullable":true,"description":"Postal code."},"country":{"type":"string","nullable":true,"description":"Country."},"company_id":{"type":"string","format":"uuid","nullable":true,"description":"Customer company id."}}},"example":{"phone":"+447700900999","notes":"Prefers a morning call."}}}}}},"\/companies":{"get":{"tags":["Companies"],"operationId":"listCompanies","summary":"List companies","description":"Returns one page of companies. Optional filters are combined with AND.","responses":{"200":{"description":"OK.","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","nullable":true,"description":"Customer company id.","readOnly":true},"name":{"type":"string","nullable":false,"description":"Company name."},"email":{"type":"string","nullable":true,"description":"Company email."},"phone":{"type":"string","nullable":true,"description":"Company phone."},"domain":{"type":"string","nullable":true,"description":"Website domain."},"type":{"type":"string","nullable":true,"description":"Company type, for example customer."},"industry":{"type":"string","nullable":true,"description":"Industry."},"address":{"type":"string","nullable":true,"description":"Street address."},"city":{"type":"string","nullable":true,"description":"City."},"state":{"type":"string","nullable":true,"description":"State or region."},"postal_code":{"type":"string","nullable":true,"description":"Postal code."},"country":{"type":"string","nullable":true,"description":"Country."},"description":{"type":"string","nullable":true,"description":"Description."},"created":{"type":"string","format":"date-time","nullable":true,"description":"When the company was created.","readOnly":true}}}},"page":{"type":"integer","example":1},"limit":{"type":"integer","example":25},"total":{"type":"integer","example":1}}},"example":{"data":[{"id":"9c3f2d80-2222-4333-8444-555566667777","name":"Acme Removals Ltd","email":"hello@acme.test","phone":"+442079460123","domain":"acme.test","type":"customer","industry":"Logistics","address":"1 Warehouse Road","city":"London","state":null,"postal_code":"E1 6AN","country":"UK","description":"Corporate account.","created":"2026-11-01T09:00:00+00:00"}],"page":1,"limit":25,"total":1}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"}},"parameters":[{"$ref":"#\/components\/parameters\/page"},{"$ref":"#\/components\/parameters\/limit"},{"name":"q","in":"query","required":false,"description":"Search name, email, domain, and phone.","schema":{"type":"string"}},{"name":"name","in":"query","required":false,"description":"Name contains this text.","schema":{"type":"string"}},{"name":"email","in":"query","required":false,"description":"Email, case-insensitive.","schema":{"type":"string"}},{"name":"type","in":"query","required":false,"description":"Company type, case-insensitive.","schema":{"type":"string"}},{"name":"created_from","in":"query","required":false,"description":"Created at or after this time.","schema":{"type":"string","format":"date-time"}},{"name":"created_to","in":"query","required":false,"description":"Created at or before this time.","schema":{"type":"string","format":"date-time"}}]},"post":{"tags":["Companies"],"operationId":"createCompanies","summary":"Create one company","description":"Creates one company. Send only the writable fields.","responses":{"201":{"description":"Created.","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","nullable":true,"description":"Customer company id.","readOnly":true},"name":{"type":"string","nullable":false,"description":"Company name."},"email":{"type":"string","nullable":true,"description":"Company email."},"phone":{"type":"string","nullable":true,"description":"Company phone."},"domain":{"type":"string","nullable":true,"description":"Website domain."},"type":{"type":"string","nullable":true,"description":"Company type, for example customer."},"industry":{"type":"string","nullable":true,"description":"Industry."},"address":{"type":"string","nullable":true,"description":"Street address."},"city":{"type":"string","nullable":true,"description":"City."},"state":{"type":"string","nullable":true,"description":"State or region."},"postal_code":{"type":"string","nullable":true,"description":"Postal code."},"country":{"type":"string","nullable":true,"description":"Country."},"description":{"type":"string","nullable":true,"description":"Description."},"created":{"type":"string","format":"date-time","nullable":true,"description":"When the company was created.","readOnly":true}}}}},"example":{"data":{"id":"9c3f2d80-2222-4333-8444-555566667777","name":"Acme Removals Ltd","email":"hello@acme.test","phone":"+442079460123","domain":"acme.test","type":"customer","industry":"Logistics","address":"1 Warehouse Road","city":"London","state":null,"postal_code":"E1 6AN","country":"UK","description":"Corporate account.","created":"2026-11-01T09:00:00+00:00"}}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"},"422":{"$ref":"#\/components\/responses\/Unprocessable"}},"requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","nullable":false,"description":"Company name."},"email":{"type":"string","nullable":true,"description":"Company email."},"phone":{"type":"string","nullable":true,"description":"Company phone."},"domain":{"type":"string","nullable":true,"description":"Website domain."},"type":{"type":"string","nullable":true,"description":"Company type, for example customer."},"industry":{"type":"string","nullable":true,"description":"Industry."},"address":{"type":"string","nullable":true,"description":"Street address."},"city":{"type":"string","nullable":true,"description":"City."},"state":{"type":"string","nullable":true,"description":"State or region."},"postal_code":{"type":"string","nullable":true,"description":"Postal code."},"country":{"type":"string","nullable":true,"description":"Country."},"description":{"type":"string","nullable":true,"description":"Description."}},"required":["name"]},"example":{"name":"Acme Removals Ltd","email":"hello@acme.test","phone":"+442079460123","domain":"acme.test","type":"customer","industry":"Logistics","address":"1 Warehouse Road","city":"London","state":null,"postal_code":"E1 6AN","country":"UK","description":"Corporate account."}}}}}},"\/companies\/{id}":{"parameters":[{"$ref":"#\/components\/parameters\/id"}],"get":{"tags":["Companies"],"operationId":"getCompanies","summary":"Read one company","description":"Returns one company when it belongs to the token account.","responses":{"200":{"description":"OK.","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","nullable":true,"description":"Customer company id.","readOnly":true},"name":{"type":"string","nullable":false,"description":"Company name."},"email":{"type":"string","nullable":true,"description":"Company email."},"phone":{"type":"string","nullable":true,"description":"Company phone."},"domain":{"type":"string","nullable":true,"description":"Website domain."},"type":{"type":"string","nullable":true,"description":"Company type, for example customer."},"industry":{"type":"string","nullable":true,"description":"Industry."},"address":{"type":"string","nullable":true,"description":"Street address."},"city":{"type":"string","nullable":true,"description":"City."},"state":{"type":"string","nullable":true,"description":"State or region."},"postal_code":{"type":"string","nullable":true,"description":"Postal code."},"country":{"type":"string","nullable":true,"description":"Country."},"description":{"type":"string","nullable":true,"description":"Description."},"created":{"type":"string","format":"date-time","nullable":true,"description":"When the company was created.","readOnly":true}}}}},"example":{"data":{"id":"9c3f2d80-2222-4333-8444-555566667777","name":"Acme Removals Ltd","email":"hello@acme.test","phone":"+442079460123","domain":"acme.test","type":"customer","industry":"Logistics","address":"1 Warehouse Road","city":"London","state":null,"postal_code":"E1 6AN","country":"UK","description":"Corporate account.","created":"2026-11-01T09:00:00+00:00"}}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"},"404":{"$ref":"#\/components\/responses\/NotFound"}}},"patch":{"tags":["Companies"],"operationId":"updateCompanies","summary":"Update one company","description":"Updates one company. Send only the fields that should change.","responses":{"200":{"description":"OK.","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","nullable":true,"description":"Customer company id.","readOnly":true},"name":{"type":"string","nullable":false,"description":"Company name."},"email":{"type":"string","nullable":true,"description":"Company email."},"phone":{"type":"string","nullable":true,"description":"Company phone."},"domain":{"type":"string","nullable":true,"description":"Website domain."},"type":{"type":"string","nullable":true,"description":"Company type, for example customer."},"industry":{"type":"string","nullable":true,"description":"Industry."},"address":{"type":"string","nullable":true,"description":"Street address."},"city":{"type":"string","nullable":true,"description":"City."},"state":{"type":"string","nullable":true,"description":"State or region."},"postal_code":{"type":"string","nullable":true,"description":"Postal code."},"country":{"type":"string","nullable":true,"description":"Country."},"description":{"type":"string","nullable":true,"description":"Description."},"created":{"type":"string","format":"date-time","nullable":true,"description":"When the company was created.","readOnly":true}}}}},"example":{"data":{"id":"9c3f2d80-2222-4333-8444-555566667777","name":"Acme Removals Ltd","email":"hello@acme.test","phone":"+442079460123","domain":"acme.test","type":"customer","industry":"Logistics","address":"1 Warehouse Road","city":"London","state":null,"postal_code":"E1 6AN","country":"UK","description":"Corporate account.","created":"2026-11-01T09:00:00+00:00"}}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"},"422":{"$ref":"#\/components\/responses\/Unprocessable"},"404":{"$ref":"#\/components\/responses\/NotFound"}},"requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","nullable":false,"description":"Company name."},"email":{"type":"string","nullable":true,"description":"Company email."},"phone":{"type":"string","nullable":true,"description":"Company phone."},"domain":{"type":"string","nullable":true,"description":"Website domain."},"type":{"type":"string","nullable":true,"description":"Company type, for example customer."},"industry":{"type":"string","nullable":true,"description":"Industry."},"address":{"type":"string","nullable":true,"description":"Street address."},"city":{"type":"string","nullable":true,"description":"City."},"state":{"type":"string","nullable":true,"description":"State or region."},"postal_code":{"type":"string","nullable":true,"description":"Postal code."},"country":{"type":"string","nullable":true,"description":"Country."},"description":{"type":"string","nullable":true,"description":"Description."}}},"example":{"phone":"+442079460124","description":"Corporate account. Net 14."}}}}}},"\/invoices":{"get":{"tags":["Invoices"],"operationId":"listInvoices","summary":"List invoices","description":"Returns one page of invoices. Optional filters are combined with AND.","responses":{"200":{"description":"OK.","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","nullable":true,"description":"Invoice id.","readOnly":true},"number":{"type":"integer","nullable":true,"readOnly":true,"description":"Invoice number."},"status":{"type":"string","nullable":true,"description":"Status, for example draft, sent, or paid.","readOnly":true},"type":{"type":"string","nullable":true,"description":"Invoice type.","readOnly":true},"sum":{"type":"number","nullable":true,"description":"Invoice total.","readOnly":true},"discount":{"type":"number","nullable":true,"description":"Discount amount.","readOnly":true},"payment_method":{"type":"string","nullable":true,"description":"Payment method.","readOnly":true},"payment_link":{"type":"string","nullable":true,"description":"Hosted payment link.","readOnly":true},"invoice_date":{"type":"string","format":"date-time","nullable":true,"description":"Invoice date.","readOnly":true},"due_date":{"type":"string","format":"date-time","nullable":true,"description":"Due date.","readOnly":true},"created":{"type":"string","format":"date-time","nullable":true,"description":"When the invoice was created.","readOnly":true},"paid_at":{"type":"string","format":"date-time","nullable":true,"description":"When the invoice was paid.","readOnly":true},"job_id":{"type":"string","format":"uuid","nullable":true,"description":"Related job id.","readOnly":true},"contact_id":{"type":"string","format":"uuid","nullable":true,"description":"Related contact id.","readOnly":true},"company_id":{"type":"string","format":"uuid","nullable":true,"description":"Related customer company id.","readOnly":true},"line_items":{"type":"array","readOnly":true,"description":"Invoice lines.","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"sku":{"type":"string","nullable":true},"quantity":{"type":"number"},"net_price":{"type":"number"},"vat":{"type":"number","description":"VAT percent."},"total_price":{"type":"number"},"position":{"type":"integer"}}}}}}},"page":{"type":"integer","example":1},"limit":{"type":"integer","example":25},"total":{"type":"integer","example":1}}},"example":{"data":[{"id":"a1b2c3d4-5555-4666-8777-888899990000","number":88,"status":"sent","type":"general","sum":240,"discount":0,"payment_method":"card","payment_link":"https:\/\/pay.example\/abc","invoice_date":"2026-12-01T00:00:00+00:00","due_date":"2026-12-15T00:00:00+00:00","created":"2026-12-01T12:00:00+00:00","paid_at":null,"job_id":"3f1c2a40-6b2e-4d1a-9c3e-1a2b3c4d5e6f","contact_id":"8b2e1c90-1111-4222-8333-444455556666","company_id":"9c3f2d80-2222-4333-8444-555566667777","line_items":[{"id":"4d5e6f70-eeee-4fff-8000-777788889999","name":"Two porters and a van","sku":"VAN-2","quantity":1,"net_price":200,"vat":20,"total_price":240,"position":0}]}],"page":1,"limit":25,"total":1}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"}},"parameters":[{"$ref":"#\/components\/parameters\/page"},{"$ref":"#\/components\/parameters\/limit"},{"name":"job_id","in":"query","required":false,"description":"Only invoices for this job.","schema":{"type":"string","format":"uuid"}},{"name":"contact_id","in":"query","required":false,"description":"Only invoices for this contact.","schema":{"type":"string","format":"uuid"}},{"name":"company_id","in":"query","required":false,"description":"Only invoices for this customer company.","schema":{"type":"string","format":"uuid"}},{"name":"status","in":"query","required":false,"description":"Invoice status, case-insensitive.","schema":{"type":"string"}},{"name":"type","in":"query","required":false,"description":"Invoice type, case-insensitive.","schema":{"type":"string"}},{"name":"number","in":"query","required":false,"description":"Invoice number.","schema":{"type":"integer"}},{"name":"created_from","in":"query","required":false,"description":"Created at or after this time.","schema":{"type":"string","format":"date-time"}},{"name":"created_to","in":"query","required":false,"description":"Created at or before this time.","schema":{"type":"string","format":"date-time"}}]}},"\/invoices\/{id}":{"parameters":[{"$ref":"#\/components\/parameters\/id"}],"get":{"tags":["Invoices"],"operationId":"getInvoices","summary":"Read one invoice","description":"Returns one invoice when it belongs to the token account.","responses":{"200":{"description":"OK.","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","nullable":true,"description":"Invoice id.","readOnly":true},"number":{"type":"integer","nullable":true,"readOnly":true,"description":"Invoice number."},"status":{"type":"string","nullable":true,"description":"Status, for example draft, sent, or paid.","readOnly":true},"type":{"type":"string","nullable":true,"description":"Invoice type.","readOnly":true},"sum":{"type":"number","nullable":true,"description":"Invoice total.","readOnly":true},"discount":{"type":"number","nullable":true,"description":"Discount amount.","readOnly":true},"payment_method":{"type":"string","nullable":true,"description":"Payment method.","readOnly":true},"payment_link":{"type":"string","nullable":true,"description":"Hosted payment link.","readOnly":true},"invoice_date":{"type":"string","format":"date-time","nullable":true,"description":"Invoice date.","readOnly":true},"due_date":{"type":"string","format":"date-time","nullable":true,"description":"Due date.","readOnly":true},"created":{"type":"string","format":"date-time","nullable":true,"description":"When the invoice was created.","readOnly":true},"paid_at":{"type":"string","format":"date-time","nullable":true,"description":"When the invoice was paid.","readOnly":true},"job_id":{"type":"string","format":"uuid","nullable":true,"description":"Related job id.","readOnly":true},"contact_id":{"type":"string","format":"uuid","nullable":true,"description":"Related contact id.","readOnly":true},"company_id":{"type":"string","format":"uuid","nullable":true,"description":"Related customer company id.","readOnly":true},"line_items":{"type":"array","readOnly":true,"description":"Invoice lines.","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"sku":{"type":"string","nullable":true},"quantity":{"type":"number"},"net_price":{"type":"number"},"vat":{"type":"number","description":"VAT percent."},"total_price":{"type":"number"},"position":{"type":"integer"}}}}}}}},"example":{"data":{"id":"a1b2c3d4-5555-4666-8777-888899990000","number":88,"status":"sent","type":"general","sum":240,"discount":0,"payment_method":"card","payment_link":"https:\/\/pay.example\/abc","invoice_date":"2026-12-01T00:00:00+00:00","due_date":"2026-12-15T00:00:00+00:00","created":"2026-12-01T12:00:00+00:00","paid_at":null,"job_id":"3f1c2a40-6b2e-4d1a-9c3e-1a2b3c4d5e6f","contact_id":"8b2e1c90-1111-4222-8333-444455556666","company_id":"9c3f2d80-2222-4333-8444-555566667777","line_items":[{"id":"4d5e6f70-eeee-4fff-8000-777788889999","name":"Two porters and a van","sku":"VAN-2","quantity":1,"net_price":200,"vat":20,"total_price":240,"position":0}]}}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"},"404":{"$ref":"#\/components\/responses\/NotFound"}}}},"\/notes":{"get":{"tags":["Notes"],"operationId":"listNotes","summary":"List notes","description":"Returns one page of notes. Optional filters are combined with AND.","responses":{"200":{"description":"OK.","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","nullable":true,"description":"Note id.","readOnly":true},"content":{"type":"string","nullable":false,"description":"Note text."},"job_id":{"type":"string","format":"uuid","nullable":true,"description":"Job this note belongs to."},"created":{"type":"string","format":"date-time","nullable":true,"description":"When the note was created.","readOnly":true}}}},"page":{"type":"integer","example":1},"limit":{"type":"integer","example":25},"total":{"type":"integer","example":1}}},"example":{"data":[{"id":"b2c3d4e5-6666-4777-8888-999900001111","content":"Customer confirmed access from the side gate.","job_id":"3f1c2a40-6b2e-4d1a-9c3e-1a2b3c4d5e6f","created":"2026-11-25T09:15:00+00:00"}],"page":1,"limit":25,"total":1}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"}},"parameters":[{"$ref":"#\/components\/parameters\/page"},{"$ref":"#\/components\/parameters\/limit"},{"name":"job_id","in":"query","required":false,"description":"Only notes on this job.","schema":{"type":"string","format":"uuid"}},{"name":"q","in":"query","required":false,"description":"Search note text.","schema":{"type":"string"}},{"name":"created_from","in":"query","required":false,"description":"Created at or after this time.","schema":{"type":"string","format":"date-time"}},{"name":"created_to","in":"query","required":false,"description":"Created at or before this time.","schema":{"type":"string","format":"date-time"}}]},"post":{"tags":["Notes"],"operationId":"createNotes","summary":"Create one note","description":"Creates one note. Send only the writable fields.","responses":{"201":{"description":"Created.","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","nullable":true,"description":"Note id.","readOnly":true},"content":{"type":"string","nullable":false,"description":"Note text."},"job_id":{"type":"string","format":"uuid","nullable":true,"description":"Job this note belongs to."},"created":{"type":"string","format":"date-time","nullable":true,"description":"When the note was created.","readOnly":true}}}}},"example":{"data":{"id":"b2c3d4e5-6666-4777-8888-999900001111","content":"Customer confirmed access from the side gate.","job_id":"3f1c2a40-6b2e-4d1a-9c3e-1a2b3c4d5e6f","created":"2026-11-25T09:15:00+00:00"}}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"},"422":{"$ref":"#\/components\/responses\/Unprocessable"}},"requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","properties":{"content":{"type":"string","nullable":false,"description":"Note text."},"job_id":{"type":"string","format":"uuid","nullable":true,"description":"Job this note belongs to."}},"required":["content","job_id"]},"example":{"content":"Customer confirmed access from the side gate.","job_id":"3f1c2a40-6b2e-4d1a-9c3e-1a2b3c4d5e6f"}}}}}},"\/notes\/{id}":{"parameters":[{"$ref":"#\/components\/parameters\/id"}],"get":{"tags":["Notes"],"operationId":"getNotes","summary":"Read one note","description":"Returns one note when it belongs to the token account.","responses":{"200":{"description":"OK.","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","nullable":true,"description":"Note id.","readOnly":true},"content":{"type":"string","nullable":false,"description":"Note text."},"job_id":{"type":"string","format":"uuid","nullable":true,"description":"Job this note belongs to."},"created":{"type":"string","format":"date-time","nullable":true,"description":"When the note was created.","readOnly":true}}}}},"example":{"data":{"id":"b2c3d4e5-6666-4777-8888-999900001111","content":"Customer confirmed access from the side gate.","job_id":"3f1c2a40-6b2e-4d1a-9c3e-1a2b3c4d5e6f","created":"2026-11-25T09:15:00+00:00"}}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"},"404":{"$ref":"#\/components\/responses\/NotFound"}}},"patch":{"tags":["Notes"],"operationId":"updateNotes","summary":"Update one note","description":"Updates one note. Send only the fields that should change.","responses":{"200":{"description":"OK.","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","nullable":true,"description":"Note id.","readOnly":true},"content":{"type":"string","nullable":false,"description":"Note text."},"job_id":{"type":"string","format":"uuid","nullable":true,"description":"Job this note belongs to."},"created":{"type":"string","format":"date-time","nullable":true,"description":"When the note was created.","readOnly":true}}}}},"example":{"data":{"id":"b2c3d4e5-6666-4777-8888-999900001111","content":"Customer confirmed access from the side gate.","job_id":"3f1c2a40-6b2e-4d1a-9c3e-1a2b3c4d5e6f","created":"2026-11-25T09:15:00+00:00"}}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"},"422":{"$ref":"#\/components\/responses\/Unprocessable"},"404":{"$ref":"#\/components\/responses\/NotFound"}},"requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","properties":{"content":{"type":"string","nullable":false,"description":"Note text."},"job_id":{"type":"string","format":"uuid","nullable":true,"description":"Job this note belongs to."}}},"example":{"content":"Side gate code is 1942."}}}}}},"\/tasks":{"get":{"tags":["Tasks"],"operationId":"listTasks","summary":"List tasks","description":"Returns one page of tasks. Optional filters are combined with AND.","responses":{"200":{"description":"OK.","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","nullable":true,"description":"Task id.","readOnly":true},"job_id":{"type":"string","format":"uuid","nullable":true,"description":"Job this task belongs to."},"message":{"type":"string","nullable":true,"description":"Instructions for the crew."},"start_date":{"type":"string","format":"date-time","nullable":true,"description":"Task start."},"end_date":{"type":"string","format":"date-time","nullable":true,"description":"Task end."},"men":{"type":"integer","nullable":true,"description":"Number of people."},"reward":{"type":"integer","nullable":true,"description":"Reward amount."}}}},"page":{"type":"integer","example":1},"limit":{"type":"integer","example":25},"total":{"type":"integer","example":1}}},"example":{"data":[{"id":"c3d4e5f6-7777-4888-8999-000011112222","job_id":"3f1c2a40-6b2e-4d1a-9c3e-1a2b3c4d5e6f","message":"Load from the ground floor only.","start_date":"2026-12-01T08:00:00+00:00","end_date":"2026-12-01T12:00:00+00:00","men":2,"reward":40}],"page":1,"limit":25,"total":1}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"}},"parameters":[{"$ref":"#\/components\/parameters\/page"},{"$ref":"#\/components\/parameters\/limit"},{"name":"job_id","in":"query","required":false,"description":"Only tasks on this job.","schema":{"type":"string","format":"uuid"}},{"name":"q","in":"query","required":false,"description":"Search the task message.","schema":{"type":"string"}},{"name":"start_from","in":"query","required":false,"description":"Starts at or after this time.","schema":{"type":"string","format":"date-time"}},{"name":"start_to","in":"query","required":false,"description":"Starts at or before this time.","schema":{"type":"string","format":"date-time"}}]},"post":{"tags":["Tasks"],"operationId":"createTasks","summary":"Create one task","description":"Creates one task. Send only the writable fields.","responses":{"201":{"description":"Created.","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","nullable":true,"description":"Task id.","readOnly":true},"job_id":{"type":"string","format":"uuid","nullable":true,"description":"Job this task belongs to."},"message":{"type":"string","nullable":true,"description":"Instructions for the crew."},"start_date":{"type":"string","format":"date-time","nullable":true,"description":"Task start."},"end_date":{"type":"string","format":"date-time","nullable":true,"description":"Task end."},"men":{"type":"integer","nullable":true,"description":"Number of people."},"reward":{"type":"integer","nullable":true,"description":"Reward amount."}}}}},"example":{"data":{"id":"c3d4e5f6-7777-4888-8999-000011112222","job_id":"3f1c2a40-6b2e-4d1a-9c3e-1a2b3c4d5e6f","message":"Load from the ground floor only.","start_date":"2026-12-01T08:00:00+00:00","end_date":"2026-12-01T12:00:00+00:00","men":2,"reward":40}}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"},"422":{"$ref":"#\/components\/responses\/Unprocessable"}},"requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","properties":{"job_id":{"type":"string","format":"uuid","nullable":true,"description":"Job this task belongs to."},"message":{"type":"string","nullable":true,"description":"Instructions for the crew."},"start_date":{"type":"string","format":"date-time","nullable":true,"description":"Task start."},"end_date":{"type":"string","format":"date-time","nullable":true,"description":"Task end."},"men":{"type":"integer","nullable":true,"description":"Number of people."},"reward":{"type":"integer","nullable":true,"description":"Reward amount."}},"required":["job_id","start_date","end_date"]},"example":{"job_id":"3f1c2a40-6b2e-4d1a-9c3e-1a2b3c4d5e6f","message":"Load from the ground floor only.","start_date":"2026-12-01T08:00:00+00:00","end_date":"2026-12-01T12:00:00+00:00","men":2,"reward":40}}}}}},"\/tasks\/{id}":{"parameters":[{"$ref":"#\/components\/parameters\/id"}],"get":{"tags":["Tasks"],"operationId":"getTasks","summary":"Read one task","description":"Returns one task when it belongs to the token account.","responses":{"200":{"description":"OK.","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","nullable":true,"description":"Task id.","readOnly":true},"job_id":{"type":"string","format":"uuid","nullable":true,"description":"Job this task belongs to."},"message":{"type":"string","nullable":true,"description":"Instructions for the crew."},"start_date":{"type":"string","format":"date-time","nullable":true,"description":"Task start."},"end_date":{"type":"string","format":"date-time","nullable":true,"description":"Task end."},"men":{"type":"integer","nullable":true,"description":"Number of people."},"reward":{"type":"integer","nullable":true,"description":"Reward amount."}}}}},"example":{"data":{"id":"c3d4e5f6-7777-4888-8999-000011112222","job_id":"3f1c2a40-6b2e-4d1a-9c3e-1a2b3c4d5e6f","message":"Load from the ground floor only.","start_date":"2026-12-01T08:00:00+00:00","end_date":"2026-12-01T12:00:00+00:00","men":2,"reward":40}}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"},"404":{"$ref":"#\/components\/responses\/NotFound"}}},"patch":{"tags":["Tasks"],"operationId":"updateTasks","summary":"Update one task","description":"Updates one task. Send only the fields that should change.","responses":{"200":{"description":"OK.","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","nullable":true,"description":"Task id.","readOnly":true},"job_id":{"type":"string","format":"uuid","nullable":true,"description":"Job this task belongs to."},"message":{"type":"string","nullable":true,"description":"Instructions for the crew."},"start_date":{"type":"string","format":"date-time","nullable":true,"description":"Task start."},"end_date":{"type":"string","format":"date-time","nullable":true,"description":"Task end."},"men":{"type":"integer","nullable":true,"description":"Number of people."},"reward":{"type":"integer","nullable":true,"description":"Reward amount."}}}}},"example":{"data":{"id":"c3d4e5f6-7777-4888-8999-000011112222","job_id":"3f1c2a40-6b2e-4d1a-9c3e-1a2b3c4d5e6f","message":"Load from the ground floor only.","start_date":"2026-12-01T08:00:00+00:00","end_date":"2026-12-01T12:00:00+00:00","men":2,"reward":40}}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"},"422":{"$ref":"#\/components\/responses\/Unprocessable"},"404":{"$ref":"#\/components\/responses\/NotFound"}},"requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","properties":{"job_id":{"type":"string","format":"uuid","nullable":true,"description":"Job this task belongs to."},"message":{"type":"string","nullable":true,"description":"Instructions for the crew."},"start_date":{"type":"string","format":"date-time","nullable":true,"description":"Task start."},"end_date":{"type":"string","format":"date-time","nullable":true,"description":"Task end."},"men":{"type":"integer","nullable":true,"description":"Number of people."},"reward":{"type":"integer","nullable":true,"description":"Reward amount."}}},"example":{"message":"Ground floor only. Customer will meet the crew.","men":3}}}}}},"\/products":{"get":{"tags":["Products"],"operationId":"listProducts","summary":"List products","description":"Returns one page of products. Optional filters are combined with AND.","responses":{"200":{"description":"OK.","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","nullable":true,"description":"Catalog item id.","readOnly":true},"type":{"type":"string","nullable":true,"description":"product or service.","readOnly":true},"name":{"type":"string","nullable":false,"description":"Name."},"sku":{"type":"string","nullable":true,"description":"SKU."},"price":{"type":"number","nullable":true,"description":"Unit price."},"category_id":{"type":"string","format":"uuid","nullable":true,"description":"Category id. A General category is created when this is omitted on create."},"category_name":{"type":"string","nullable":true,"description":"Category name.","readOnly":true}}}},"page":{"type":"integer","example":1},"limit":{"type":"integer","example":25},"total":{"type":"integer","example":1}}},"example":{"data":[{"id":"d4e5f6a7-8888-4999-8aaa-111122223333","type":"product","name":"Medium box","sku":"BOX-M","price":2.5,"category_id":"f6a7b8c9-aaaa-4bbb-8ccc-333344445555","category_name":"Packing"}],"page":1,"limit":25,"total":1}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"}},"parameters":[{"$ref":"#\/components\/parameters\/page"},{"$ref":"#\/components\/parameters\/limit"},{"name":"q","in":"query","required":false,"description":"Search name and SKU.","schema":{"type":"string"}},{"name":"name","in":"query","required":false,"description":"Name contains this text.","schema":{"type":"string"}},{"name":"sku","in":"query","required":false,"description":"SKU, case-insensitive.","schema":{"type":"string"}},{"name":"category_id","in":"query","required":false,"description":"Only items in this category.","schema":{"type":"string","format":"uuid"}}]},"post":{"tags":["Products"],"operationId":"createProducts","summary":"Create one product","description":"Creates one product. Send only the writable fields.","responses":{"201":{"description":"Created.","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","nullable":true,"description":"Catalog item id.","readOnly":true},"type":{"type":"string","nullable":true,"description":"product or service.","readOnly":true},"name":{"type":"string","nullable":false,"description":"Name."},"sku":{"type":"string","nullable":true,"description":"SKU."},"price":{"type":"number","nullable":true,"description":"Unit price."},"category_id":{"type":"string","format":"uuid","nullable":true,"description":"Category id. A General category is created when this is omitted on create."},"category_name":{"type":"string","nullable":true,"description":"Category name.","readOnly":true}}}}},"example":{"data":{"id":"d4e5f6a7-8888-4999-8aaa-111122223333","type":"product","name":"Medium box","sku":"BOX-M","price":2.5,"category_id":"f6a7b8c9-aaaa-4bbb-8ccc-333344445555","category_name":"Packing"}}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"},"422":{"$ref":"#\/components\/responses\/Unprocessable"}},"requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","nullable":false,"description":"Name."},"sku":{"type":"string","nullable":true,"description":"SKU."},"price":{"type":"number","nullable":true,"description":"Unit price."},"category_id":{"type":"string","format":"uuid","nullable":true,"description":"Category id. A General category is created when this is omitted on create."}},"required":["name"]},"example":{"name":"Medium box","sku":"BOX-M","price":2.5,"category_id":"f6a7b8c9-aaaa-4bbb-8ccc-333344445555"}}}}}},"\/products\/{id}":{"parameters":[{"$ref":"#\/components\/parameters\/id"}],"get":{"tags":["Products"],"operationId":"getProducts","summary":"Read one product","description":"Returns one product when it belongs to the token account.","responses":{"200":{"description":"OK.","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","nullable":true,"description":"Catalog item id.","readOnly":true},"type":{"type":"string","nullable":true,"description":"product or service.","readOnly":true},"name":{"type":"string","nullable":false,"description":"Name."},"sku":{"type":"string","nullable":true,"description":"SKU."},"price":{"type":"number","nullable":true,"description":"Unit price."},"category_id":{"type":"string","format":"uuid","nullable":true,"description":"Category id. A General category is created when this is omitted on create."},"category_name":{"type":"string","nullable":true,"description":"Category name.","readOnly":true}}}}},"example":{"data":{"id":"d4e5f6a7-8888-4999-8aaa-111122223333","type":"product","name":"Medium box","sku":"BOX-M","price":2.5,"category_id":"f6a7b8c9-aaaa-4bbb-8ccc-333344445555","category_name":"Packing"}}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"},"404":{"$ref":"#\/components\/responses\/NotFound"}}},"patch":{"tags":["Products"],"operationId":"updateProducts","summary":"Update one product","description":"Updates one product. Send only the fields that should change.","responses":{"200":{"description":"OK.","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","nullable":true,"description":"Catalog item id.","readOnly":true},"type":{"type":"string","nullable":true,"description":"product or service.","readOnly":true},"name":{"type":"string","nullable":false,"description":"Name."},"sku":{"type":"string","nullable":true,"description":"SKU."},"price":{"type":"number","nullable":true,"description":"Unit price."},"category_id":{"type":"string","format":"uuid","nullable":true,"description":"Category id. A General category is created when this is omitted on create."},"category_name":{"type":"string","nullable":true,"description":"Category name.","readOnly":true}}}}},"example":{"data":{"id":"d4e5f6a7-8888-4999-8aaa-111122223333","type":"product","name":"Medium box","sku":"BOX-M","price":2.5,"category_id":"f6a7b8c9-aaaa-4bbb-8ccc-333344445555","category_name":"Packing"}}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"},"422":{"$ref":"#\/components\/responses\/Unprocessable"},"404":{"$ref":"#\/components\/responses\/NotFound"}},"requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","nullable":false,"description":"Name."},"sku":{"type":"string","nullable":true,"description":"SKU."},"price":{"type":"number","nullable":true,"description":"Unit price."},"category_id":{"type":"string","format":"uuid","nullable":true,"description":"Category id. A General category is created when this is omitted on create."}}},"example":{"price":3,"sku":"BOX-M"}}}}}},"\/services":{"get":{"tags":["Services"],"operationId":"listServices","summary":"List services","description":"Returns one page of services. Optional filters are combined with AND.","responses":{"200":{"description":"OK.","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","nullable":true,"description":"Catalog item id.","readOnly":true},"type":{"type":"string","nullable":true,"description":"product or service.","readOnly":true},"name":{"type":"string","nullable":false,"description":"Name."},"sku":{"type":"string","nullable":true,"description":"SKU."},"price":{"type":"number","nullable":true,"description":"Unit price."},"category_id":{"type":"string","format":"uuid","nullable":true,"description":"Category id. A General category is created when this is omitted on create."},"category_name":{"type":"string","nullable":true,"description":"Category name.","readOnly":true}}}},"page":{"type":"integer","example":1},"limit":{"type":"integer","example":25},"total":{"type":"integer","example":1}}},"example":{"data":[{"id":"e5f6a7b8-9999-4aaa-8bbb-222233334444","type":"service","name":"Two porters and a Luton van","sku":"CREW-2","price":200,"category_id":"0a1b2c3d-bbbb-4ccc-8ddd-444455556666","category_name":"Labour"}],"page":1,"limit":25,"total":1}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"}},"parameters":[{"$ref":"#\/components\/parameters\/page"},{"$ref":"#\/components\/parameters\/limit"},{"name":"q","in":"query","required":false,"description":"Search name and SKU.","schema":{"type":"string"}},{"name":"name","in":"query","required":false,"description":"Name contains this text.","schema":{"type":"string"}},{"name":"sku","in":"query","required":false,"description":"SKU, case-insensitive.","schema":{"type":"string"}},{"name":"category_id","in":"query","required":false,"description":"Only items in this category.","schema":{"type":"string","format":"uuid"}}]},"post":{"tags":["Services"],"operationId":"createServices","summary":"Create one service","description":"Creates one service. Send only the writable fields.","responses":{"201":{"description":"Created.","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","nullable":true,"description":"Catalog item id.","readOnly":true},"type":{"type":"string","nullable":true,"description":"product or service.","readOnly":true},"name":{"type":"string","nullable":false,"description":"Name."},"sku":{"type":"string","nullable":true,"description":"SKU."},"price":{"type":"number","nullable":true,"description":"Unit price."},"category_id":{"type":"string","format":"uuid","nullable":true,"description":"Category id. A General category is created when this is omitted on create."},"category_name":{"type":"string","nullable":true,"description":"Category name.","readOnly":true}}}}},"example":{"data":{"id":"e5f6a7b8-9999-4aaa-8bbb-222233334444","type":"service","name":"Two porters and a Luton van","sku":"CREW-2","price":200,"category_id":"0a1b2c3d-bbbb-4ccc-8ddd-444455556666","category_name":"Labour"}}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"},"422":{"$ref":"#\/components\/responses\/Unprocessable"}},"requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","nullable":false,"description":"Name."},"sku":{"type":"string","nullable":true,"description":"SKU."},"price":{"type":"number","nullable":true,"description":"Unit price."},"category_id":{"type":"string","format":"uuid","nullable":true,"description":"Category id. A General category is created when this is omitted on create."}},"required":["name"]},"example":{"name":"Two porters and a Luton van","sku":"CREW-2","price":200,"category_id":"0a1b2c3d-bbbb-4ccc-8ddd-444455556666"}}}}}},"\/services\/{id}":{"parameters":[{"$ref":"#\/components\/parameters\/id"}],"get":{"tags":["Services"],"operationId":"getServices","summary":"Read one service","description":"Returns one service when it belongs to the token account.","responses":{"200":{"description":"OK.","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","nullable":true,"description":"Catalog item id.","readOnly":true},"type":{"type":"string","nullable":true,"description":"product or service.","readOnly":true},"name":{"type":"string","nullable":false,"description":"Name."},"sku":{"type":"string","nullable":true,"description":"SKU."},"price":{"type":"number","nullable":true,"description":"Unit price."},"category_id":{"type":"string","format":"uuid","nullable":true,"description":"Category id. A General category is created when this is omitted on create."},"category_name":{"type":"string","nullable":true,"description":"Category name.","readOnly":true}}}}},"example":{"data":{"id":"e5f6a7b8-9999-4aaa-8bbb-222233334444","type":"service","name":"Two porters and a Luton van","sku":"CREW-2","price":200,"category_id":"0a1b2c3d-bbbb-4ccc-8ddd-444455556666","category_name":"Labour"}}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"},"404":{"$ref":"#\/components\/responses\/NotFound"}}},"patch":{"tags":["Services"],"operationId":"updateServices","summary":"Update one service","description":"Updates one service. Send only the fields that should change.","responses":{"200":{"description":"OK.","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","nullable":true,"description":"Catalog item id.","readOnly":true},"type":{"type":"string","nullable":true,"description":"product or service.","readOnly":true},"name":{"type":"string","nullable":false,"description":"Name."},"sku":{"type":"string","nullable":true,"description":"SKU."},"price":{"type":"number","nullable":true,"description":"Unit price."},"category_id":{"type":"string","format":"uuid","nullable":true,"description":"Category id. A General category is created when this is omitted on create."},"category_name":{"type":"string","nullable":true,"description":"Category name.","readOnly":true}}}}},"example":{"data":{"id":"e5f6a7b8-9999-4aaa-8bbb-222233334444","type":"service","name":"Two porters and a Luton van","sku":"CREW-2","price":200,"category_id":"0a1b2c3d-bbbb-4ccc-8ddd-444455556666","category_name":"Labour"}}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"},"422":{"$ref":"#\/components\/responses\/Unprocessable"},"404":{"$ref":"#\/components\/responses\/NotFound"}},"requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","nullable":false,"description":"Name."},"sku":{"type":"string","nullable":true,"description":"SKU."},"price":{"type":"number","nullable":true,"description":"Unit price."},"category_id":{"type":"string","format":"uuid","nullable":true,"description":"Category id. A General category is created when this is omitted on create."}}},"example":{"price":210}}}}}},"\/storage":{"get":{"tags":["Storage"],"operationId":"listStorage","summary":"List storage locations","description":"Returns one page of storage locations. Optional filters are combined with AND.","responses":{"200":{"description":"OK.","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","nullable":true,"description":"Warehouse id.","readOnly":true},"name":{"type":"string","nullable":false,"description":"Warehouse name."},"street":{"type":"string","nullable":true,"description":"Street."},"city":{"type":"string","nullable":true,"description":"City."},"post_code":{"type":"string","nullable":true,"description":"Postal code."},"country":{"type":"string","nullable":true,"description":"Country."},"lat":{"type":"number","nullable":true,"description":"Latitude. Defaults to 0."},"lng":{"type":"number","nullable":true,"description":"Longitude. Defaults to 0."}}}},"page":{"type":"integer","example":1},"limit":{"type":"integer","example":25},"total":{"type":"integer","example":1}}},"example":{"data":[{"id":"1a2b3c4d-cccc-4ddd-8eee-555566667777","name":"East London warehouse","street":"14 Dock Road","city":"London","post_code":"E14 9GE","country":"UK","lat":51.5074,"lng":-0.0278}],"page":1,"limit":25,"total":1}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"}},"parameters":[{"$ref":"#\/components\/parameters\/page"},{"$ref":"#\/components\/parameters\/limit"},{"name":"q","in":"query","required":false,"description":"Search name, city, and street.","schema":{"type":"string"}},{"name":"name","in":"query","required":false,"description":"Name contains this text.","schema":{"type":"string"}},{"name":"city","in":"query","required":false,"description":"City, case-insensitive.","schema":{"type":"string"}}]},"post":{"tags":["Storage"],"operationId":"createStorage","summary":"Create one storage location","description":"Creates one storage location. Send only the writable fields.","responses":{"201":{"description":"Created.","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","nullable":true,"description":"Warehouse id.","readOnly":true},"name":{"type":"string","nullable":false,"description":"Warehouse name."},"street":{"type":"string","nullable":true,"description":"Street."},"city":{"type":"string","nullable":true,"description":"City."},"post_code":{"type":"string","nullable":true,"description":"Postal code."},"country":{"type":"string","nullable":true,"description":"Country."},"lat":{"type":"number","nullable":true,"description":"Latitude. Defaults to 0."},"lng":{"type":"number","nullable":true,"description":"Longitude. Defaults to 0."}}}}},"example":{"data":{"id":"1a2b3c4d-cccc-4ddd-8eee-555566667777","name":"East London warehouse","street":"14 Dock Road","city":"London","post_code":"E14 9GE","country":"UK","lat":51.5074,"lng":-0.0278}}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"},"422":{"$ref":"#\/components\/responses\/Unprocessable"}},"requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","nullable":false,"description":"Warehouse name."},"street":{"type":"string","nullable":true,"description":"Street."},"city":{"type":"string","nullable":true,"description":"City."},"post_code":{"type":"string","nullable":true,"description":"Postal code."},"country":{"type":"string","nullable":true,"description":"Country."},"lat":{"type":"number","nullable":true,"description":"Latitude. Defaults to 0."},"lng":{"type":"number","nullable":true,"description":"Longitude. Defaults to 0."}},"required":["name"]},"example":{"name":"East London warehouse","street":"14 Dock Road","city":"London","post_code":"E14 9GE","country":"UK","lat":51.5074,"lng":-0.0278}}}}}},"\/storage\/{id}":{"parameters":[{"$ref":"#\/components\/parameters\/id"}],"get":{"tags":["Storage"],"operationId":"getStorage","summary":"Read one storage location","description":"Returns one storage location when it belongs to the token account.","responses":{"200":{"description":"OK.","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","nullable":true,"description":"Warehouse id.","readOnly":true},"name":{"type":"string","nullable":false,"description":"Warehouse name."},"street":{"type":"string","nullable":true,"description":"Street."},"city":{"type":"string","nullable":true,"description":"City."},"post_code":{"type":"string","nullable":true,"description":"Postal code."},"country":{"type":"string","nullable":true,"description":"Country."},"lat":{"type":"number","nullable":true,"description":"Latitude. Defaults to 0."},"lng":{"type":"number","nullable":true,"description":"Longitude. Defaults to 0."}}}}},"example":{"data":{"id":"1a2b3c4d-cccc-4ddd-8eee-555566667777","name":"East London warehouse","street":"14 Dock Road","city":"London","post_code":"E14 9GE","country":"UK","lat":51.5074,"lng":-0.0278}}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"},"404":{"$ref":"#\/components\/responses\/NotFound"}}},"patch":{"tags":["Storage"],"operationId":"updateStorage","summary":"Update one storage location","description":"Updates one storage location. Send only the fields that should change.","responses":{"200":{"description":"OK.","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","nullable":true,"description":"Warehouse id.","readOnly":true},"name":{"type":"string","nullable":false,"description":"Warehouse name."},"street":{"type":"string","nullable":true,"description":"Street."},"city":{"type":"string","nullable":true,"description":"City."},"post_code":{"type":"string","nullable":true,"description":"Postal code."},"country":{"type":"string","nullable":true,"description":"Country."},"lat":{"type":"number","nullable":true,"description":"Latitude. Defaults to 0."},"lng":{"type":"number","nullable":true,"description":"Longitude. Defaults to 0."}}}}},"example":{"data":{"id":"1a2b3c4d-cccc-4ddd-8eee-555566667777","name":"East London warehouse","street":"14 Dock Road","city":"London","post_code":"E14 9GE","country":"UK","lat":51.5074,"lng":-0.0278}}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"},"422":{"$ref":"#\/components\/responses\/Unprocessable"},"404":{"$ref":"#\/components\/responses\/NotFound"}},"requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","nullable":false,"description":"Warehouse name."},"street":{"type":"string","nullable":true,"description":"Street."},"city":{"type":"string","nullable":true,"description":"City."},"post_code":{"type":"string","nullable":true,"description":"Postal code."},"country":{"type":"string","nullable":true,"description":"Country."},"lat":{"type":"number","nullable":true,"description":"Latitude. Defaults to 0."},"lng":{"type":"number","nullable":true,"description":"Longitude. Defaults to 0."}}},"example":{"street":"16 Dock Road","post_code":"E14 9GE"}}}}}},"\/warehouse-slots":{"get":{"tags":["WarehouseSlots"],"operationId":"listWarehouseSlots","summary":"List warehouse slots","description":"Returns one page of warehouse slots. Optional filters are combined with AND.","responses":{"200":{"description":"OK.","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","nullable":true,"description":"Warehouse slot id.","readOnly":true},"job_id":{"type":"string","format":"uuid","nullable":true,"description":"Job this slot is booked for."},"contact_id":{"type":"string","format":"uuid","nullable":true,"description":"Contact copied from the job.","readOnly":true},"warehouse_id":{"type":"string","format":"uuid","nullable":true,"description":"Storage location id from \/storage."},"container_id":{"type":"string","format":"uuid","nullable":true,"description":"Optional container inside that warehouse."},"start_date":{"type":"string","format":"date-time","nullable":true,"description":"Booking start."},"end_date":{"type":"string","format":"date-time","nullable":true,"description":"Booking end."}}}},"page":{"type":"integer","example":1},"limit":{"type":"integer","example":25},"total":{"type":"integer","example":1}}},"example":{"data":[{"id":"5e6f7081-ffff-4011-8111-888899990000","job_id":"3f1c2a40-6b2e-4d1a-9c3e-1a2b3c4d5e6f","contact_id":"8b2e1c90-1111-4222-8333-444455556666","warehouse_id":"1a2b3c4d-cccc-4ddd-8eee-555566667777","container_id":"6f708192-0000-4111-8222-999900001111","start_date":"2026-12-01T09:00:00+00:00","end_date":"2026-12-08T17:00:00+00:00"}],"page":1,"limit":25,"total":1}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"}},"parameters":[{"$ref":"#\/components\/parameters\/page"},{"$ref":"#\/components\/parameters\/limit"},{"name":"job_id","in":"query","required":false,"description":"Only slots booked for this job.","schema":{"type":"string","format":"uuid"}},{"name":"warehouse_id","in":"query","required":false,"description":"Only slots in this warehouse.","schema":{"type":"string","format":"uuid"}},{"name":"contact_id","in":"query","required":false,"description":"Only slots for this contact.","schema":{"type":"string","format":"uuid"}},{"name":"container_id","in":"query","required":false,"description":"Only slots using this container.","schema":{"type":"string","format":"uuid"}},{"name":"from","in":"query","required":false,"description":"Slots that end on or after this time.","schema":{"type":"string","format":"date-time"}},{"name":"to","in":"query","required":false,"description":"Slots that start on or before this time. Use with from to find slots overlapping a period.","schema":{"type":"string","format":"date-time"}}]},"post":{"tags":["WarehouseSlots"],"operationId":"createWarehouseSlots","summary":"Create one warehouse slot","description":"Creates one warehouse slot. Send only the writable fields.","responses":{"201":{"description":"Created.","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","nullable":true,"description":"Warehouse slot id.","readOnly":true},"job_id":{"type":"string","format":"uuid","nullable":true,"description":"Job this slot is booked for."},"contact_id":{"type":"string","format":"uuid","nullable":true,"description":"Contact copied from the job.","readOnly":true},"warehouse_id":{"type":"string","format":"uuid","nullable":true,"description":"Storage location id from \/storage."},"container_id":{"type":"string","format":"uuid","nullable":true,"description":"Optional container inside that warehouse."},"start_date":{"type":"string","format":"date-time","nullable":true,"description":"Booking start."},"end_date":{"type":"string","format":"date-time","nullable":true,"description":"Booking end."}}}}},"example":{"data":{"id":"5e6f7081-ffff-4011-8111-888899990000","job_id":"3f1c2a40-6b2e-4d1a-9c3e-1a2b3c4d5e6f","contact_id":"8b2e1c90-1111-4222-8333-444455556666","warehouse_id":"1a2b3c4d-cccc-4ddd-8eee-555566667777","container_id":"6f708192-0000-4111-8222-999900001111","start_date":"2026-12-01T09:00:00+00:00","end_date":"2026-12-08T17:00:00+00:00"}}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"},"422":{"$ref":"#\/components\/responses\/Unprocessable"}},"requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","properties":{"job_id":{"type":"string","format":"uuid","nullable":true,"description":"Job this slot is booked for."},"warehouse_id":{"type":"string","format":"uuid","nullable":true,"description":"Storage location id from \/storage."},"container_id":{"type":"string","format":"uuid","nullable":true,"description":"Optional container inside that warehouse."},"start_date":{"type":"string","format":"date-time","nullable":true,"description":"Booking start."},"end_date":{"type":"string","format":"date-time","nullable":true,"description":"Booking end."}},"required":["job_id","warehouse_id","start_date","end_date"]},"example":{"job_id":"3f1c2a40-6b2e-4d1a-9c3e-1a2b3c4d5e6f","warehouse_id":"1a2b3c4d-cccc-4ddd-8eee-555566667777","container_id":"6f708192-0000-4111-8222-999900001111","start_date":"2026-12-01T09:00:00+00:00","end_date":"2026-12-08T17:00:00+00:00"}}}}}},"\/warehouse-slots\/{id}":{"parameters":[{"$ref":"#\/components\/parameters\/id"}],"get":{"tags":["WarehouseSlots"],"operationId":"getWarehouseSlots","summary":"Read one warehouse slot","description":"Returns one warehouse slot when it belongs to the token account.","responses":{"200":{"description":"OK.","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","nullable":true,"description":"Warehouse slot id.","readOnly":true},"job_id":{"type":"string","format":"uuid","nullable":true,"description":"Job this slot is booked for."},"contact_id":{"type":"string","format":"uuid","nullable":true,"description":"Contact copied from the job.","readOnly":true},"warehouse_id":{"type":"string","format":"uuid","nullable":true,"description":"Storage location id from \/storage."},"container_id":{"type":"string","format":"uuid","nullable":true,"description":"Optional container inside that warehouse."},"start_date":{"type":"string","format":"date-time","nullable":true,"description":"Booking start."},"end_date":{"type":"string","format":"date-time","nullable":true,"description":"Booking end."}}}}},"example":{"data":{"id":"5e6f7081-ffff-4011-8111-888899990000","job_id":"3f1c2a40-6b2e-4d1a-9c3e-1a2b3c4d5e6f","contact_id":"8b2e1c90-1111-4222-8333-444455556666","warehouse_id":"1a2b3c4d-cccc-4ddd-8eee-555566667777","container_id":"6f708192-0000-4111-8222-999900001111","start_date":"2026-12-01T09:00:00+00:00","end_date":"2026-12-08T17:00:00+00:00"}}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"},"404":{"$ref":"#\/components\/responses\/NotFound"}}},"patch":{"tags":["WarehouseSlots"],"operationId":"updateWarehouseSlots","summary":"Update one warehouse slot","description":"Updates one warehouse slot. Send only the fields that should change.","responses":{"200":{"description":"OK.","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","nullable":true,"description":"Warehouse slot id.","readOnly":true},"job_id":{"type":"string","format":"uuid","nullable":true,"description":"Job this slot is booked for."},"contact_id":{"type":"string","format":"uuid","nullable":true,"description":"Contact copied from the job.","readOnly":true},"warehouse_id":{"type":"string","format":"uuid","nullable":true,"description":"Storage location id from \/storage."},"container_id":{"type":"string","format":"uuid","nullable":true,"description":"Optional container inside that warehouse."},"start_date":{"type":"string","format":"date-time","nullable":true,"description":"Booking start."},"end_date":{"type":"string","format":"date-time","nullable":true,"description":"Booking end."}}}}},"example":{"data":{"id":"5e6f7081-ffff-4011-8111-888899990000","job_id":"3f1c2a40-6b2e-4d1a-9c3e-1a2b3c4d5e6f","contact_id":"8b2e1c90-1111-4222-8333-444455556666","warehouse_id":"1a2b3c4d-cccc-4ddd-8eee-555566667777","container_id":"6f708192-0000-4111-8222-999900001111","start_date":"2026-12-01T09:00:00+00:00","end_date":"2026-12-08T17:00:00+00:00"}}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"},"422":{"$ref":"#\/components\/responses\/Unprocessable"},"404":{"$ref":"#\/components\/responses\/NotFound"}},"requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","properties":{"job_id":{"type":"string","format":"uuid","nullable":true,"description":"Job this slot is booked for."},"warehouse_id":{"type":"string","format":"uuid","nullable":true,"description":"Storage location id from \/storage."},"container_id":{"type":"string","format":"uuid","nullable":true,"description":"Optional container inside that warehouse."},"start_date":{"type":"string","format":"date-time","nullable":true,"description":"Booking start."},"end_date":{"type":"string","format":"date-time","nullable":true,"description":"Booking end."}}},"example":{"end_date":"2026-12-10T17:00:00+00:00","container_id":null}}}}}},"\/expenses":{"get":{"tags":["Expenses"],"operationId":"listExpenses","summary":"List expenses","description":"Returns one page of expenses. Optional filters are combined with AND.","responses":{"200":{"description":"OK.","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","nullable":true,"description":"Expense id.","readOnly":true},"amount":{"type":"number","nullable":true,"description":"Amount.","readOnly":true},"description":{"type":"string","nullable":true,"description":"Description.","readOnly":true},"type":{"type":"string","nullable":true,"description":"Expense type.","readOnly":true},"for_date":{"type":"string","format":"date-time","nullable":true,"description":"Date the expense applies to.","readOnly":true},"created":{"type":"string","format":"date-time","nullable":true,"description":"When the expense was recorded.","readOnly":true},"job_id":{"type":"string","format":"uuid","nullable":true,"description":"Related job id.","readOnly":true}}}},"page":{"type":"integer","example":1},"limit":{"type":"integer","example":25},"total":{"type":"integer","example":1}}},"example":{"data":[{"id":"2b3c4d5e-dddd-4eee-8fff-666677778888","amount":45.5,"description":"Congestion charge","type":"toll","for_date":"2026-12-01T00:00:00+00:00","created":"2026-12-01T18:00:00+00:00","job_id":"3f1c2a40-6b2e-4d1a-9c3e-1a2b3c4d5e6f"}],"page":1,"limit":25,"total":1}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"}},"parameters":[{"$ref":"#\/components\/parameters\/page"},{"$ref":"#\/components\/parameters\/limit"},{"name":"job_id","in":"query","required":false,"description":"Only expenses for this job.","schema":{"type":"string","format":"uuid"}},{"name":"type","in":"query","required":false,"description":"Expense type, case-insensitive.","schema":{"type":"string"}},{"name":"created_from","in":"query","required":false,"description":"Recorded at or after this time.","schema":{"type":"string","format":"date-time"}},{"name":"created_to","in":"query","required":false,"description":"Recorded at or before this time.","schema":{"type":"string","format":"date-time"}},{"name":"for_date_from","in":"query","required":false,"description":"Applies on or after this time.","schema":{"type":"string","format":"date-time"}},{"name":"for_date_to","in":"query","required":false,"description":"Applies on or before this time.","schema":{"type":"string","format":"date-time"}}]}},"\/expenses\/{id}":{"parameters":[{"$ref":"#\/components\/parameters\/id"}],"get":{"tags":["Expenses"],"operationId":"getExpenses","summary":"Read one expense","description":"Returns one expense when it belongs to the token account.","responses":{"200":{"description":"OK.","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","nullable":true,"description":"Expense id.","readOnly":true},"amount":{"type":"number","nullable":true,"description":"Amount.","readOnly":true},"description":{"type":"string","nullable":true,"description":"Description.","readOnly":true},"type":{"type":"string","nullable":true,"description":"Expense type.","readOnly":true},"for_date":{"type":"string","format":"date-time","nullable":true,"description":"Date the expense applies to.","readOnly":true},"created":{"type":"string","format":"date-time","nullable":true,"description":"When the expense was recorded.","readOnly":true},"job_id":{"type":"string","format":"uuid","nullable":true,"description":"Related job id.","readOnly":true}}}}},"example":{"data":{"id":"2b3c4d5e-dddd-4eee-8fff-666677778888","amount":45.5,"description":"Congestion charge","type":"toll","for_date":"2026-12-01T00:00:00+00:00","created":"2026-12-01T18:00:00+00:00","job_id":"3f1c2a40-6b2e-4d1a-9c3e-1a2b3c4d5e6f"}}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"},"404":{"$ref":"#\/components\/responses\/NotFound"}}}}}}