{"openapi":"3.1.0","info":{"title":"Fifi API","version":"1.0.0","description":"The Fifi API reads and changes a workspace's contacts, companies, deals, tasks, and notes, calls and meetings, with the same rules as the app, and reads its floor plans and seats and its service records.\n\nAuthenticate with an API key from Settings → API (owners and admins): `Authorization: Bearer fifi_<prefix>_<secret>`. A key reaches only its own workspace, acts as the member who created it, and can do only what its scopes allow.\n\nRequests and responses are JSON. Money is in integer cents; dates are ISO 8601. Each key may make 120 requests a minute, and each workspace 600."},"servers":[{"url":"https://app.fetchfifi.com/api/v1"}],"security":[{"bearerAuth":[]}],"tags":[{"name":"Workspace"},{"name":"Custom fields"},{"name":"Contacts"},{"name":"Companies"},{"name":"Deals"},{"name":"Tasks"},{"name":"Activities"},{"name":"Webhook endpoints"},{"name":"Floor plans"},{"name":"Seats"},{"name":"Service records"},{"name":"Loads"},{"name":"Invoices"},{"name":"Payments"}],"paths":{"/me":{"get":{"operationId":"getMe","summary":"This key and its workspace","description":"Any valid key: its workspace, name, scopes and rate limits. A quick way to check a key works.","tags":["Workspace"],"x-fifi-scope":"key","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"OK","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"}},"content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Me"}}},"example":{"data":{"workspace":{"id":"0199a8f2-6b1c-7c3e-9a51-3f2d8e4b7c00","name":"CorporateMutt"},"key":{"name":"Zapier","prefix":"k3x9q2ab","scopes":["contacts:read","contacts:write"],"expires_at":null},"rate_limit":{"per_key_per_minute":120,"per_workspace_per_minute":600}}}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"405":{"$ref":"#/components/responses/E405"},"429":{"$ref":"#/components/responses/E429"},"503":{"$ref":"#/components/responses/E503"}}}},"/members":{"get":{"operationId":"listMembers","summary":"List members","description":"Active members (up to 500), oldest first: their IDs are what owner_id and assignee_id take. Needs a read scope of `contacts:read`, `companies:read`, `deals:read`, `tasks:read`, `activities:read` or `webhooks:read` (`floor_plans:read` alone isn't enough).","tags":["Workspace"],"x-fifi-scope":"any_read","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"OK","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"}},"content":{"application/json":{"schema":{"type":"object","required":["data","next_cursor"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Member"}},"next_cursor":{"type":["string","null"],"description":"Pass as `cursor` for the next page; null on the last page."}}},"example":{"data":[{"id":"0199a8f2-6b1c-7c3e-9a51-3f2d8e4b7c12","name":"Olive Owner","role":"owner"}],"next_cursor":null}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"405":{"$ref":"#/components/responses/E405"},"429":{"$ref":"#/components/responses/E429"},"503":{"$ref":"#/components/responses/E503"}}}},"/tags":{"get":{"operationId":"listTags","summary":"List tags","description":"The workspace's contact tags (up to 500), A→Z. Filter contacts by one with GET /contacts?tag_id=.","tags":["Workspace"],"x-fifi-scope":"contacts:read","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"OK","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"}},"content":{"application/json":{"schema":{"type":"object","required":["data","next_cursor"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Tag"}},"next_cursor":{"type":["string","null"],"description":"Pass as `cursor` for the next page; null on the last page."}}},"example":{"data":[{"id":"0199a8f2-6b1c-7c3e-9a51-3f2d8e4b7c13","name":"VIP","color":"primary"}],"next_cursor":null}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"405":{"$ref":"#/components/responses/E405"},"429":{"$ref":"#/components/responses/E429"},"503":{"$ref":"#/components/responses/E503"}}}},"/custom-fields":{"get":{"operationId":"listCustomFields","summary":"List custom fields","description":"The workspace's active custom fields, by record type and in order: their keys are what a contact's, company's or deal's `custom_fields` hold (deal fields only while Deals is on). Needs a read scope of `contacts:read`, `companies:read`, `deals:read`, `tasks:read`, `activities:read` or `webhooks:read`.","tags":["Custom fields"],"x-fifi-scope":"any_read","security":[{"bearerAuth":[]}],"parameters":[{"name":"object","in":"query","required":false,"description":"Only this record type's fields.","schema":{"type":"string","enum":["contact","company","deal"]}}],"responses":{"200":{"description":"OK","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"}},"content":{"application/json":{"schema":{"type":"object","required":["data","next_cursor"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/CustomField"}},"next_cursor":{"type":["string","null"],"description":"Pass as `cursor` for the next page; null on the last page."}}},"example":{"data":[{"object":"company","key":"mc_number","label":"MC number","type":"text","help_text":"The carrier's FMCSA motor carrier number.","position":0,"options":[],"remind_days_before":null},{"object":"company","key":"insurance_expiry","label":"Insurance expiry","type":"date","help_text":null,"position":1,"options":[],"remind_days_before":30}],"next_cursor":null}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"405":{"$ref":"#/components/responses/E405"},"429":{"$ref":"#/components/responses/E429"},"503":{"$ref":"#/components/responses/E503"}}}},"/pipeline":{"get":{"operationId":"getPipeline","summary":"Pipeline stages and statuses","description":"The values a deal's stage, status and lost reason take.","tags":["Workspace"],"x-fifi-scope":"deals:read","x-fifi-modules":["deals"],"security":[{"bearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"OK","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"}},"content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Pipeline"}}},"example":{"data":{"stages":[{"id":"lead","label":"Lead"},{"id":"qualified","label":"Qualified"},{"id":"proposal","label":"Proposal"},{"id":"negotiation","label":"Negotiation"}],"statuses":["open","won","lost"],"lost_reasons":[{"id":"price","label":"Price"},{"id":"timing","label":"Timing"},{"id":"competitor","label":"Competitor"},{"id":"no_decision","label":"No decision"},{"id":"other","label":"Other"}]}}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"405":{"$ref":"#/components/responses/E405"},"429":{"$ref":"#/components/responses/E429"},"503":{"$ref":"#/components/responses/E503"}}}},"/contacts":{"get":{"operationId":"listContacts","summary":"List contacts","description":"Live contacts (never deleted ones), newest first, with the Contacts list's filters. Custom fields filter with up to 5 parameters: `cf.<key>` (equals; a choice by its option's value, a checkbox `true` or `false`), `cf.<key>.gte` and `cf.<key>.lte` (number and date fields) and `cf.<key>.set=true|false`.","tags":["Contacts"],"x-fifi-scope":"contacts:read","security":[{"bearerAuth":[]}],"parameters":[{"name":"limit","in":"query","required":false,"description":"Records per page, 1–100 (default 25).","schema":{"default":25,"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"description":"The `next_cursor` of the previous page. Use it with the same `sort`.","schema":{"type":"string","maxLength":300}},{"name":"sort","in":"query","required":false,"description":"`created_at`: newest first (default). `updated_at`: most recently changed first.","schema":{"default":"created_at","type":"string","enum":["created_at","updated_at"]}},{"name":"updated_since","in":"query","required":false,"description":"Only records changed at or after this time (ISO 8601, with a time zone).","schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},{"name":"owner_id","in":"query","required":false,"description":"Only contacts this member owns.","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"lead_status","in":"query","required":false,"schema":{"type":"string","enum":["new","contacted","qualified","unqualified"]}},{"name":"tag_id","in":"query","required":false,"description":"Only contacts with this tag.","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"company_id","in":"query","required":false,"description":"Only this company's contacts.","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"email","in":"query","required":false,"description":"Only the contact with this email (exact, case-insensitive).","schema":{"type":"string","maxLength":254}}],"responses":{"200":{"description":"OK","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"}},"content":{"application/json":{"schema":{"type":"object","required":["data","next_cursor"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Contact"}},"next_cursor":{"type":["string","null"],"description":"Pass as `cursor` for the next page; null on the last page."}}},"example":{"data":[{"id":"0199a8f2-6b1c-7c3e-9a51-3f2d8e4b7c10","first_name":"Ada","last_name":"Lovelace","email":"ada@acme.com","phone":"+1 555 0100","address":"12 Analytical Way\nLondon","title":"CTO","lead_status":"qualified","source":"referral","do_not_track":false,"company_id":"0199a8f2-6b1c-7c3e-9a51-3f2d8e4b7c11","owner_id":"0199a8f2-6b1c-7c3e-9a51-3f2d8e4b7c12","tags":[{"id":"0199a8f2-6b1c-7c3e-9a51-3f2d8e4b7c13","name":"VIP"}],"custom_fields":{"gate_code":"4410","pets_on_property":true,"property_type":"house"},"created_at":"2026-10-01T14:03:00.000Z","updated_at":"2026-10-02T09:30:00.000Z"}],"next_cursor":null}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"405":{"$ref":"#/components/responses/E405"},"429":{"$ref":"#/components/responses/E429"},"503":{"$ref":"#/components/responses/E503"}}},"post":{"operationId":"createContact","summary":"Create a contact","description":"Created as in the app: the same checks, a timeline entry, and an activity-log entry that names the key.","tags":["Contacts"],"x-fifi-scope":"contacts:write","security":[{"bearerAuth":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Any 1–255 visible ASCII characters. A repeat within 24 hours returns the first response.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"first_name":{"type":"string","maxLength":100,"description":"Required, 1–100 characters."},"last_name":{"type":"string","maxLength":100,"description":"Required, 1–100 characters."},"email":{"format":"email","description":"Unique among live contacts (409 if taken).","anyOf":[{"type":"string","maxLength":254},{"type":"null"}]},"phone":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}]},"address":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"title":{"description":"Job title.","anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"lead_status":{"description":"Default `new`.","type":"string","enum":["new","contacted","qualified","unqualified"]},"source":{"anyOf":[{"type":"string","enum":["inbound","referral","outbound","event","import","other"]},{"type":"null"}]},"company_id":{"description":"A live company in this workspace.","anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"owner_id":{"description":"An active member (default: the key's creator). Reassigning follows the app's rules.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"custom_fields":{"description":"Custom field values by key (GET /custom-fields). Only the keys sent change; null clears. Unknown or archived keys: 400.","type":"object","propertyNames":{"type":"string","maxLength":40},"additionalProperties":{"anyOf":[{"type":"string","maxLength":2048},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}},"required":["first_name","last_name"],"additionalProperties":false},"example":{"first_name":"Ada","last_name":"Lovelace","email":"ada@acme.com","title":"CTO","lead_status":"qualified","company_id":"0199a8f2-6b1c-7c3e-9a51-3f2d8e4b7c11"}}}},"responses":{"201":{"description":"Created","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"}},"content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Contact"}}},"example":{"data":{"id":"0199a8f2-6b1c-7c3e-9a51-3f2d8e4b7c10","first_name":"Ada","last_name":"Lovelace","email":"ada@acme.com","phone":"+1 555 0100","address":"12 Analytical Way\nLondon","title":"CTO","lead_status":"qualified","source":"referral","do_not_track":false,"company_id":"0199a8f2-6b1c-7c3e-9a51-3f2d8e4b7c11","owner_id":"0199a8f2-6b1c-7c3e-9a51-3f2d8e4b7c12","tags":[{"id":"0199a8f2-6b1c-7c3e-9a51-3f2d8e4b7c13","name":"VIP"}],"custom_fields":{"gate_code":"4410","pets_on_property":true,"property_type":"house"},"created_at":"2026-10-01T14:03:00.000Z","updated_at":"2026-10-02T09:30:00.000Z"}}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"405":{"$ref":"#/components/responses/E405"},"409":{"$ref":"#/components/responses/E409"},"411":{"$ref":"#/components/responses/E411"},"413":{"$ref":"#/components/responses/E413"},"415":{"$ref":"#/components/responses/E415"},"422":{"$ref":"#/components/responses/E422"},"429":{"$ref":"#/components/responses/E429"},"503":{"$ref":"#/components/responses/E503"}}}},"/contacts/{id}":{"get":{"operationId":"getContact","summary":"Get a contact","tags":["Contacts"],"x-fifi-scope":"contacts:read","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"}},"content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Contact"}}},"example":{"data":{"id":"0199a8f2-6b1c-7c3e-9a51-3f2d8e4b7c10","first_name":"Ada","last_name":"Lovelace","email":"ada@acme.com","phone":"+1 555 0100","address":"12 Analytical Way\nLondon","title":"CTO","lead_status":"qualified","source":"referral","do_not_track":false,"company_id":"0199a8f2-6b1c-7c3e-9a51-3f2d8e4b7c11","owner_id":"0199a8f2-6b1c-7c3e-9a51-3f2d8e4b7c12","tags":[{"id":"0199a8f2-6b1c-7c3e-9a51-3f2d8e4b7c13","name":"VIP"}],"custom_fields":{"gate_code":"4410","pets_on_property":true,"property_type":"house"},"created_at":"2026-10-01T14:03:00.000Z","updated_at":"2026-10-02T09:30:00.000Z"}}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"405":{"$ref":"#/components/responses/E405"},"429":{"$ref":"#/components/responses/E429"},"503":{"$ref":"#/components/responses/E503"}}},"patch":{"operationId":"updateContact","summary":"Update a contact","description":"Send only the fields to change; null clears an optional field.","tags":["Contacts"],"x-fifi-scope":"contacts:write","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"first_name":{"type":"string","maxLength":100,"description":"Required, 1–100 characters."},"last_name":{"type":"string","maxLength":100,"description":"Required, 1–100 characters."},"email":{"format":"email","description":"Unique among live contacts (409 if taken).","anyOf":[{"type":"string","maxLength":254},{"type":"null"}]},"phone":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}]},"address":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"title":{"description":"Job title.","anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"lead_status":{"description":"Default `new`.","type":"string","enum":["new","contacted","qualified","unqualified"]},"source":{"anyOf":[{"type":"string","enum":["inbound","referral","outbound","event","import","other"]},{"type":"null"}]},"company_id":{"description":"A live company in this workspace.","anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"owner_id":{"description":"An active member (default: the key's creator). Reassigning follows the app's rules.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"custom_fields":{"description":"Custom field values by key (GET /custom-fields). Only the keys sent change; null clears. Unknown or archived keys: 400.","type":"object","propertyNames":{"type":"string","maxLength":40},"additionalProperties":{"anyOf":[{"type":"string","maxLength":2048},{"type":"number"},{"type":"boolean"},{"type":"null"}]}},"do_not_track":{"type":"boolean"},"expected_updated_at":{"description":"Optional precondition: the `updated_at` you last read. If the record has changed since, nothing is changed and the answer is 409 `conflict` (reason `stale`).","type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"additionalProperties":false},"example":{"lead_status":"contacted","phone":null}}}},"responses":{"200":{"description":"OK","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"}},"content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Contact"}}},"example":{"data":{"id":"0199a8f2-6b1c-7c3e-9a51-3f2d8e4b7c10","first_name":"Ada","last_name":"Lovelace","email":"ada@acme.com","phone":null,"address":"12 Analytical Way\nLondon","title":"CTO","lead_status":"contacted","source":"referral","do_not_track":false,"company_id":"0199a8f2-6b1c-7c3e-9a51-3f2d8e4b7c11","owner_id":"0199a8f2-6b1c-7c3e-9a51-3f2d8e4b7c12","tags":[{"id":"0199a8f2-6b1c-7c3e-9a51-3f2d8e4b7c13","name":"VIP"}],"custom_fields":{"gate_code":"4410","pets_on_property":true,"property_type":"house"},"created_at":"2026-10-01T14:03:00.000Z","updated_at":"2026-10-02T09:30:00.000Z"}}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"405":{"$ref":"#/components/responses/E405"},"409":{"$ref":"#/components/responses/E409"},"411":{"$ref":"#/components/responses/E411"},"413":{"$ref":"#/components/responses/E413"},"415":{"$ref":"#/components/responses/E415"},"422":{"$ref":"#/components/responses/E422"},"429":{"$ref":"#/components/responses/E429"},"503":{"$ref":"#/components/responses/E503"}}},"delete":{"operationId":"deleteContact","summary":"Delete a contact","description":"Moves it to Trash, where an owner or admin can restore it for 30 days. As in the app, members delete contacts they own and owners and admins any; a key acts as its creator.","tags":["Contacts"],"x-fifi-scope":"contacts:write","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"}},"content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Deleted"}}},"example":{"data":{"id":"0199a8f2-6b1c-7c3e-9a51-3f2d8e4b7c10","deleted":true}}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"405":{"$ref":"#/components/responses/E405"},"429":{"$ref":"#/components/responses/E429"},"503":{"$ref":"#/components/responses/E503"}}}},"/companies":{"get":{"operationId":"listCompanies","summary":"List companies","description":"Live companies, newest first. Custom fields filter with up to 5 parameters: `cf.<key>` (equals; a choice by its option's value, a checkbox `true` or `false`), `cf.<key>.gte` and `cf.<key>.lte` (number and date fields) and `cf.<key>.set=true|false`.","tags":["Companies"],"x-fifi-scope":"companies:read","security":[{"bearerAuth":[]}],"parameters":[{"name":"limit","in":"query","required":false,"description":"Records per page, 1–100 (default 25).","schema":{"default":25,"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"description":"The `next_cursor` of the previous page. Use it with the same `sort`.","schema":{"type":"string","maxLength":300}},{"name":"sort","in":"query","required":false,"description":"`created_at`: newest first (default). `updated_at`: most recently changed first.","schema":{"default":"created_at","type":"string","enum":["created_at","updated_at"]}},{"name":"updated_since","in":"query","required":false,"description":"Only records changed at or after this time (ISO 8601, with a time zone).","schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},{"name":"owner_id","in":"query","required":false,"description":"Only companies this member owns.","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"domain","in":"query","required":false,"description":"Only the company with this domain (exact, lowercase).","schema":{"type":"string","maxLength":253}}],"responses":{"200":{"description":"OK","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"}},"content":{"application/json":{"schema":{"type":"object","required":["data","next_cursor"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Company"}},"next_cursor":{"type":["string","null"],"description":"Pass as `cursor` for the next page; null on the last page."}}},"example":{"data":[{"id":"0199a8f2-6b1c-7c3e-9a51-3f2d8e4b7c11","name":"Acme","domain":"acme.com","website_url":"https://acme.com/","description":"Makers of everything.","industry":"Manufacturing","phone":null,"address":null,"notes":null,"owner_id":"0199a8f2-6b1c-7c3e-9a51-3f2d8e4b7c12","custom_fields":{"mc_number":"MC-123456","insurance_expiry":"2026-11-30","trucks":12},"created_at":"2026-09-28T10:00:00.000Z","updated_at":"2026-10-02T09:30:00.000Z"}],"next_cursor":null}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"405":{"$ref":"#/components/responses/E405"},"429":{"$ref":"#/components/responses/E429"},"503":{"$ref":"#/components/responses/E503"}}},"post":{"operationId":"createCompany","summary":"Create a company","description":"Created as in the app: the same checks, a timeline entry, and an activity-log entry that names the key.","tags":["Companies"],"x-fifi-scope":"companies:write","security":[{"bearerAuth":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Any 1–255 visible ASCII characters. A repeat within 24 hours returns the first response.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","maxLength":200,"description":"Required, 1–200 characters."},"domain":{"description":"An email domain like acme.com (normalized; filled from website_url when left empty). Unique among live companies (409 if taken).","anyOf":[{"type":"string","maxLength":300},{"type":"null"}]},"website_url":{"description":"http(s) only; acme.com means https://acme.com.","anyOf":[{"type":"string","maxLength":2048},{"type":"null"}]},"description":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}]},"industry":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}]},"phone":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}]},"address":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"notes":{"anyOf":[{"type":"string","maxLength":5000},{"type":"null"}]},"owner_id":{"description":"An active member (default: the key's creator). Reassigning follows the app's rules.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"custom_fields":{"description":"Custom field values by key (GET /custom-fields). Only the keys sent change; null clears. Unknown or archived keys: 400.","type":"object","propertyNames":{"type":"string","maxLength":40},"additionalProperties":{"anyOf":[{"type":"string","maxLength":2048},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}},"required":["name"],"additionalProperties":false},"example":{"name":"Acme","website_url":"acme.com","industry":"Manufacturing"}}}},"responses":{"201":{"description":"Created","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"}},"content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Company"}}},"example":{"data":{"id":"0199a8f2-6b1c-7c3e-9a51-3f2d8e4b7c11","name":"Acme","domain":"acme.com","website_url":"https://acme.com/","description":"Makers of everything.","industry":"Manufacturing","phone":null,"address":null,"notes":null,"owner_id":"0199a8f2-6b1c-7c3e-9a51-3f2d8e4b7c12","custom_fields":{"mc_number":"MC-123456","insurance_expiry":"2026-11-30","trucks":12},"created_at":"2026-09-28T10:00:00.000Z","updated_at":"2026-10-02T09:30:00.000Z"}}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"405":{"$ref":"#/components/responses/E405"},"409":{"$ref":"#/components/responses/E409"},"411":{"$ref":"#/components/responses/E411"},"413":{"$ref":"#/components/responses/E413"},"415":{"$ref":"#/components/responses/E415"},"422":{"$ref":"#/components/responses/E422"},"429":{"$ref":"#/components/responses/E429"},"503":{"$ref":"#/components/responses/E503"}}}},"/companies/{id}":{"get":{"operationId":"getCompany","summary":"Get a company","tags":["Companies"],"x-fifi-scope":"companies:read","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"}},"content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Company"}}},"example":{"data":{"id":"0199a8f2-6b1c-7c3e-9a51-3f2d8e4b7c11","name":"Acme","domain":"acme.com","website_url":"https://acme.com/","description":"Makers of everything.","industry":"Manufacturing","phone":null,"address":null,"notes":null,"owner_id":"0199a8f2-6b1c-7c3e-9a51-3f2d8e4b7c12","custom_fields":{"mc_number":"MC-123456","insurance_expiry":"2026-11-30","trucks":12},"created_at":"2026-09-28T10:00:00.000Z","updated_at":"2026-10-02T09:30:00.000Z"}}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"405":{"$ref":"#/components/responses/E405"},"429":{"$ref":"#/components/responses/E429"},"503":{"$ref":"#/components/responses/E503"}}},"patch":{"operationId":"updateCompany","summary":"Update a company","description":"Send only the fields to change; null clears an optional field.","tags":["Companies"],"x-fifi-scope":"companies:write","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","maxLength":200,"description":"Required, 1–200 characters."},"domain":{"description":"An email domain like acme.com (normalized; filled from website_url when left empty). Unique among live companies (409 if taken).","anyOf":[{"type":"string","maxLength":300},{"type":"null"}]},"website_url":{"description":"http(s) only; acme.com means https://acme.com.","anyOf":[{"type":"string","maxLength":2048},{"type":"null"}]},"description":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}]},"industry":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}]},"phone":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}]},"address":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"notes":{"anyOf":[{"type":"string","maxLength":5000},{"type":"null"}]},"owner_id":{"description":"An active member (default: the key's creator). Reassigning follows the app's rules.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"custom_fields":{"description":"Custom field values by key (GET /custom-fields). Only the keys sent change; null clears. Unknown or archived keys: 400.","type":"object","propertyNames":{"type":"string","maxLength":40},"additionalProperties":{"anyOf":[{"type":"string","maxLength":2048},{"type":"number"},{"type":"boolean"},{"type":"null"}]}},"expected_updated_at":{"description":"Optional precondition: the `updated_at` you last read. If the record has changed since, nothing is changed and the answer is 409 `conflict` (reason `stale`).","type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"additionalProperties":false},"example":{"industry":"Robotics"}}}},"responses":{"200":{"description":"OK","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"}},"content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Company"}}},"example":{"data":{"id":"0199a8f2-6b1c-7c3e-9a51-3f2d8e4b7c11","name":"Acme","domain":"acme.com","website_url":"https://acme.com/","description":"Makers of everything.","industry":"Robotics","phone":null,"address":null,"notes":null,"owner_id":"0199a8f2-6b1c-7c3e-9a51-3f2d8e4b7c12","custom_fields":{"mc_number":"MC-123456","insurance_expiry":"2026-11-30","trucks":12},"created_at":"2026-09-28T10:00:00.000Z","updated_at":"2026-10-02T09:30:00.000Z"}}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"405":{"$ref":"#/components/responses/E405"},"409":{"$ref":"#/components/responses/E409"},"411":{"$ref":"#/components/responses/E411"},"413":{"$ref":"#/components/responses/E413"},"415":{"$ref":"#/components/responses/E415"},"422":{"$ref":"#/components/responses/E422"},"429":{"$ref":"#/components/responses/E429"},"503":{"$ref":"#/components/responses/E503"}}},"delete":{"operationId":"deleteCompany","summary":"Delete a company","description":"Moves it to Trash, where an owner or admin can restore it for 30 days. Its contacts stay, without a company until it's restored. As in the app, members delete companies they own and owners and admins any; a key acts as its creator.","tags":["Companies"],"x-fifi-scope":"companies:write","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"}},"content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Deleted"}}},"example":{"data":{"id":"0199a8f2-6b1c-7c3e-9a51-3f2d8e4b7c11","deleted":true}}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"405":{"$ref":"#/components/responses/E405"},"429":{"$ref":"#/components/responses/E429"},"503":{"$ref":"#/components/responses/E503"}}}},"/deals":{"get":{"operationId":"listDeals","summary":"List deals","description":"Live deals, open and closed, newest first. Custom fields filter with up to 5 parameters: `cf.<key>` (equals; a choice by its option's value, a checkbox `true` or `false`), `cf.<key>.gte` and `cf.<key>.lte` (number and date fields) and `cf.<key>.set=true|false`.","tags":["Deals"],"x-fifi-scope":"deals:read","x-fifi-modules":["deals"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"limit","in":"query","required":false,"description":"Records per page, 1–100 (default 25).","schema":{"default":25,"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"description":"The `next_cursor` of the previous page. Use it with the same `sort`.","schema":{"type":"string","maxLength":300}},{"name":"sort","in":"query","required":false,"description":"`created_at`: newest first (default). `updated_at`: most recently changed first.","schema":{"default":"created_at","type":"string","enum":["created_at","updated_at"]}},{"name":"updated_since","in":"query","required":false,"description":"Only records changed at or after this time (ISO 8601, with a time zone).","schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},{"name":"owner_id","in":"query","required":false,"description":"Only deals this member owns.","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"stage","in":"query","required":false,"schema":{"type":"string","enum":["lead","qualified","proposal","negotiation"]}},{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["open","won","lost"]}},{"name":"company_id","in":"query","required":false,"description":"Only this company's deals.","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"contact_id","in":"query","required":false,"description":"Only deals with this contact.","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"OK","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"}},"content":{"application/json":{"schema":{"type":"object","required":["data","next_cursor"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Deal"}},"next_cursor":{"type":["string","null"],"description":"Pass as `cursor` for the next page; null on the last page."}}},"example":{"data":[{"id":"0199a8f2-6b1c-7c3e-9a51-3f2d8e4b7c20","name":"Acme renewal","value_cents":1250000,"stage":"proposal","status":"open","lost_reason":null,"lost_reason_note":null,"expected_close_date":"2026-11-30","closed_at":null,"company_id":"0199a8f2-6b1c-7c3e-9a51-3f2d8e4b7c11","contact_ids":["0199a8f2-6b1c-7c3e-9a51-3f2d8e4b7c10"],"owner_id":"0199a8f2-6b1c-7c3e-9a51-3f2d8e4b7c12","custom_fields":{"loads_per_week":12},"created_at":"2026-10-01T15:00:00.000Z","updated_at":"2026-10-03T11:20:00.000Z"}],"next_cursor":null}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"405":{"$ref":"#/components/responses/E405"},"429":{"$ref":"#/components/responses/E429"},"503":{"$ref":"#/components/responses/E503"}}},"post":{"operationId":"createDeal","summary":"Create a deal","description":"Created open, as in the app: the same checks, a timeline entry, and an activity-log entry that names the key.","tags":["Deals"],"x-fifi-scope":"deals:write","x-fifi-modules":["deals"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Any 1–255 visible ASCII characters. A repeat within 24 hours returns the first response.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","maxLength":200,"description":"Required, 1–200 characters."},"value_cents":{"type":"integer","minimum":0,"maximum":2000000000,"description":"Value in US cents: an integer up to 2,000,000,000 ($20,000,000)."},"stage":{"description":"Default `lead`.","type":"string","enum":["lead","qualified","proposal","negotiation"]},"expected_close_date":{"description":"YYYY-MM-DD, from 2000 to 2100.","anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},{"type":"null"}]},"company_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"A live company in this workspace."},"contact_ids":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"description":"1–20 live contacts in this workspace."},"owner_id":{"description":"An active member (default: the key's creator). Reassigning follows the app's rules.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"custom_fields":{"description":"Custom field values by key (GET /custom-fields). Only the keys sent change; null clears. Unknown or archived keys: 400.","type":"object","propertyNames":{"type":"string","maxLength":40},"additionalProperties":{"anyOf":[{"type":"string","maxLength":2048},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}},"required":["name","value_cents","company_id","contact_ids"],"additionalProperties":false},"example":{"name":"Acme renewal","value_cents":1250000,"stage":"proposal","expected_close_date":"2026-11-30","company_id":"0199a8f2-6b1c-7c3e-9a51-3f2d8e4b7c11","contact_ids":["0199a8f2-6b1c-7c3e-9a51-3f2d8e4b7c10"]}}}},"responses":{"201":{"description":"Created","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"}},"content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Deal"}}},"example":{"data":{"id":"0199a8f2-6b1c-7c3e-9a51-3f2d8e4b7c20","name":"Acme renewal","value_cents":1250000,"stage":"proposal","status":"open","lost_reason":null,"lost_reason_note":null,"expected_close_date":"2026-11-30","closed_at":null,"company_id":"0199a8f2-6b1c-7c3e-9a51-3f2d8e4b7c11","contact_ids":["0199a8f2-6b1c-7c3e-9a51-3f2d8e4b7c10"],"owner_id":"0199a8f2-6b1c-7c3e-9a51-3f2d8e4b7c12","custom_fields":{"loads_per_week":12},"created_at":"2026-10-01T15:00:00.000Z","updated_at":"2026-10-03T11:20:00.000Z"}}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"405":{"$ref":"#/components/responses/E405"},"409":{"$ref":"#/components/responses/E409"},"411":{"$ref":"#/components/responses/E411"},"413":{"$ref":"#/components/responses/E413"},"415":{"$ref":"#/components/responses/E415"},"422":{"$ref":"#/components/responses/E422"},"429":{"$ref":"#/components/responses/E429"},"503":{"$ref":"#/components/responses/E503"}}}},"/deals/{id}":{"get":{"operationId":"getDeal","summary":"Get a deal","tags":["Deals"],"x-fifi-scope":"deals:read","x-fifi-modules":["deals"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"}},"content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Deal"}}},"example":{"data":{"id":"0199a8f2-6b1c-7c3e-9a51-3f2d8e4b7c20","name":"Acme renewal","value_cents":1250000,"stage":"proposal","status":"open","lost_reason":null,"lost_reason_note":null,"expected_close_date":"2026-11-30","closed_at":null,"company_id":"0199a8f2-6b1c-7c3e-9a51-3f2d8e4b7c11","contact_ids":["0199a8f2-6b1c-7c3e-9a51-3f2d8e4b7c10"],"owner_id":"0199a8f2-6b1c-7c3e-9a51-3f2d8e4b7c12","custom_fields":{"loads_per_week":12},"created_at":"2026-10-01T15:00:00.000Z","updated_at":"2026-10-03T11:20:00.000Z"}}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"405":{"$ref":"#/components/responses/E405"},"429":{"$ref":"#/components/responses/E429"},"503":{"$ref":"#/components/responses/E503"}}},"patch":{"operationId":"updateDeal","summary":"Update, close or reopen a deal","description":"Send only the fields to change. `status` closes (won, lost) or reopens a deal, with the same timeline entries as the app; a closed deal's stage can't change until it's reopened (422).","tags":["Deals"],"x-fifi-scope":"deals:write","x-fifi-modules":["deals"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","maxLength":200,"description":"Required, 1–200 characters."},"value_cents":{"type":"integer","minimum":0,"maximum":2000000000,"description":"Value in US cents: an integer up to 2,000,000,000 ($20,000,000)."},"stage":{"description":"Default `lead`.","type":"string","enum":["lead","qualified","proposal","negotiation"]},"expected_close_date":{"description":"YYYY-MM-DD, from 2000 to 2100.","anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},{"type":"null"}]},"company_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"A live company in this workspace."},"contact_ids":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"description":"1–20 live contacts in this workspace."},"owner_id":{"description":"An active member (default: the key's creator). Reassigning follows the app's rules.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"custom_fields":{"description":"Custom field values by key (GET /custom-fields). Only the keys sent change; null clears. Unknown or archived keys: 400.","type":"object","propertyNames":{"type":"string","maxLength":40},"additionalProperties":{"anyOf":[{"type":"string","maxLength":2048},{"type":"number"},{"type":"boolean"},{"type":"null"}]}},"status":{"description":"`won` or `lost` closes an open deal; `open` reopens a closed one (clearing its lost reason).","type":"string","enum":["open","won","lost"]},"lost_reason":{"description":"Required with `status: lost`.","type":"string","enum":["price","timing","competitor","no_decision","other"]},"lost_reason_note":{"description":"Required with `lost_reason: other`.","anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"expected_updated_at":{"description":"Optional precondition: the `updated_at` you last read. If the record has changed since, nothing is changed and the answer is 409 `conflict` (reason `stale`).","type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"additionalProperties":false},"example":{"status":"lost","lost_reason":"timing"}}}},"responses":{"200":{"description":"OK","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"}},"content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Deal"}}},"example":{"data":{"id":"0199a8f2-6b1c-7c3e-9a51-3f2d8e4b7c20","name":"Acme renewal","value_cents":1250000,"stage":"proposal","status":"lost","lost_reason":"timing","lost_reason_note":null,"expected_close_date":"2026-11-30","closed_at":"2026-10-04T16:00:00.000Z","company_id":"0199a8f2-6b1c-7c3e-9a51-3f2d8e4b7c11","contact_ids":["0199a8f2-6b1c-7c3e-9a51-3f2d8e4b7c10"],"owner_id":"0199a8f2-6b1c-7c3e-9a51-3f2d8e4b7c12","custom_fields":{"loads_per_week":12},"created_at":"2026-10-01T15:00:00.000Z","updated_at":"2026-10-03T11:20:00.000Z"}}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"405":{"$ref":"#/components/responses/E405"},"409":{"$ref":"#/components/responses/E409"},"411":{"$ref":"#/components/responses/E411"},"413":{"$ref":"#/components/responses/E413"},"415":{"$ref":"#/components/responses/E415"},"422":{"$ref":"#/components/responses/E422"},"429":{"$ref":"#/components/responses/E429"},"503":{"$ref":"#/components/responses/E503"}}},"delete":{"operationId":"deleteDeal","summary":"Delete a deal","description":"Moves it to Trash, where an owner or admin can restore it for 30 days. As in the app, members delete deals they own and owners and admins any; a key acts as its creator.","tags":["Deals"],"x-fifi-scope":"deals:write","x-fifi-modules":["deals"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"}},"content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Deleted"}}},"example":{"data":{"id":"0199a8f2-6b1c-7c3e-9a51-3f2d8e4b7c20","deleted":true}}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"405":{"$ref":"#/components/responses/E405"},"429":{"$ref":"#/components/responses/E429"},"503":{"$ref":"#/components/responses/E503"}}}},"/tasks":{"get":{"operationId":"listTasks","summary":"List tasks","description":"Live tasks, open and done, newest first.","tags":["Tasks"],"x-fifi-scope":"tasks:read","security":[{"bearerAuth":[]}],"parameters":[{"name":"limit","in":"query","required":false,"description":"Records per page, 1–100 (default 25).","schema":{"default":25,"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"description":"The `next_cursor` of the previous page. Use it with the same `sort`.","schema":{"type":"string","maxLength":300}},{"name":"sort","in":"query","required":false,"description":"`created_at`: newest first (default). `updated_at`: most recently changed first.","schema":{"default":"created_at","type":"string","enum":["created_at","updated_at"]}},{"name":"updated_since","in":"query","required":false,"description":"Only records changed at or after this time (ISO 8601, with a time zone).","schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},{"name":"assignee_id","in":"query","required":false,"description":"Only tasks for this member.","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"completed","in":"query","required":false,"description":"`false`: open tasks only; `true`: done ones only.","schema":{"type":"string","enum":["true","false"]}},{"name":"due_from","in":"query","required":false,"description":"Due on or after this date (YYYY-MM-DD).","schema":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},{"name":"due_to","in":"query","required":false,"description":"Due on or before this date (YYYY-MM-DD).","schema":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},{"name":"record_type","in":"query","required":false,"schema":{"type":"string","enum":["contact","company","deal"]}},{"name":"record_id","in":"query","required":false,"description":"With record_type: only tasks about this record.","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"OK","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"}},"content":{"application/json":{"schema":{"type":"object","required":["data","next_cursor"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Task"}},"next_cursor":{"type":["string","null"],"description":"Pass as `cursor` for the next page; null on the last page."}}},"example":{"data":[{"id":"0199a8f2-6b1c-7c3e-9a51-3f2d8e4b7c30","title":"Send the proposal","due_date":"2026-10-09","priority":"high","completed":false,"completed_at":null,"assignee_id":"0199a8f2-6b1c-7c3e-9a51-3f2d8e4b7c12","record_type":"deal","record_id":"0199a8f2-6b1c-7c3e-9a51-3f2d8e4b7c20","created_at":"2026-10-02T08:00:00.000Z","updated_at":"2026-10-02T08:00:00.000Z"}],"next_cursor":null}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"405":{"$ref":"#/components/responses/E405"},"429":{"$ref":"#/components/responses/E429"},"503":{"$ref":"#/components/responses/E503"}}},"post":{"operationId":"createTask","summary":"Create a task","description":"Created as in the app, with an activity-log entry that names the key.","tags":["Tasks"],"x-fifi-scope":"tasks:write","security":[{"bearerAuth":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Any 1–255 visible ASCII characters. A repeat within 24 hours returns the first response.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","maxLength":300,"description":"Required, 1–300 characters."},"due_date":{"description":"YYYY-MM-DD, from 2000 to 2100.","anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},{"type":"null"}]},"priority":{"description":"Default `normal`.","type":"string","enum":["low","normal","high"]},"assignee_id":{"description":"An active member (default: the key's creator).","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"record_type":{"description":"With record_id: the live contact, company or deal it's about.","type":"string","enum":["contact","company","deal"]},"record_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["title"],"additionalProperties":false},"example":{"title":"Send the proposal","due_date":"2026-10-09","priority":"high","record_type":"deal","record_id":"0199a8f2-6b1c-7c3e-9a51-3f2d8e4b7c20"}}}},"responses":{"201":{"description":"Created","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"}},"content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Task"}}},"example":{"data":{"id":"0199a8f2-6b1c-7c3e-9a51-3f2d8e4b7c30","title":"Send the proposal","due_date":"2026-10-09","priority":"high","completed":false,"completed_at":null,"assignee_id":"0199a8f2-6b1c-7c3e-9a51-3f2d8e4b7c12","record_type":"deal","record_id":"0199a8f2-6b1c-7c3e-9a51-3f2d8e4b7c20","created_at":"2026-10-02T08:00:00.000Z","updated_at":"2026-10-02T08:00:00.000Z"}}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"405":{"$ref":"#/components/responses/E405"},"409":{"$ref":"#/components/responses/E409"},"411":{"$ref":"#/components/responses/E411"},"413":{"$ref":"#/components/responses/E413"},"415":{"$ref":"#/components/responses/E415"},"422":{"$ref":"#/components/responses/E422"},"429":{"$ref":"#/components/responses/E429"},"503":{"$ref":"#/components/responses/E503"}}}},"/tasks/{id}":{"get":{"operationId":"getTask","summary":"Get a task","tags":["Tasks"],"x-fifi-scope":"tasks:read","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"}},"content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Task"}}},"example":{"data":{"id":"0199a8f2-6b1c-7c3e-9a51-3f2d8e4b7c30","title":"Send the proposal","due_date":"2026-10-09","priority":"high","completed":false,"completed_at":null,"assignee_id":"0199a8f2-6b1c-7c3e-9a51-3f2d8e4b7c12","record_type":"deal","record_id":"0199a8f2-6b1c-7c3e-9a51-3f2d8e4b7c20","created_at":"2026-10-02T08:00:00.000Z","updated_at":"2026-10-02T08:00:00.000Z"}}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"405":{"$ref":"#/components/responses/E405"},"429":{"$ref":"#/components/responses/E429"},"503":{"$ref":"#/components/responses/E503"}}},"patch":{"operationId":"updateTask","summary":"Update or complete a task","description":"Send only the fields to change. Moving the due date moves a pending reminder with it, as in the app.","tags":["Tasks"],"x-fifi-scope":"tasks:write","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","maxLength":300,"description":"Required, 1–300 characters."},"due_date":{"description":"YYYY-MM-DD, from 2000 to 2100.","anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},{"type":"null"}]},"priority":{"description":"Default `normal`.","type":"string","enum":["low","normal","high"]},"assignee_id":{"description":"An active member (default: the key's creator).","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"completed":{"description":"true completes the task (logged on its record's timeline); false reopens it.","type":"boolean"}},"additionalProperties":false},"example":{"completed":true}}}},"responses":{"200":{"description":"OK","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"}},"content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Task"}}},"example":{"data":{"id":"0199a8f2-6b1c-7c3e-9a51-3f2d8e4b7c30","title":"Send the proposal","due_date":"2026-10-09","priority":"high","completed":true,"completed_at":"2026-10-04T16:00:00.000Z","assignee_id":"0199a8f2-6b1c-7c3e-9a51-3f2d8e4b7c12","record_type":"deal","record_id":"0199a8f2-6b1c-7c3e-9a51-3f2d8e4b7c20","created_at":"2026-10-02T08:00:00.000Z","updated_at":"2026-10-02T08:00:00.000Z"}}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"405":{"$ref":"#/components/responses/E405"},"409":{"$ref":"#/components/responses/E409"},"411":{"$ref":"#/components/responses/E411"},"413":{"$ref":"#/components/responses/E413"},"415":{"$ref":"#/components/responses/E415"},"422":{"$ref":"#/components/responses/E422"},"429":{"$ref":"#/components/responses/E429"},"503":{"$ref":"#/components/responses/E503"}}},"delete":{"operationId":"deleteTask","summary":"Delete a task","description":"Deletes it, as in the app: its assignee, its creator or an owner or admin may (a key acts as its creator). Deleted tasks can't be restored.","tags":["Tasks"],"x-fifi-scope":"tasks:write","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"}},"content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Deleted"}}},"example":{"data":{"id":"0199a8f2-6b1c-7c3e-9a51-3f2d8e4b7c30","deleted":true}}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"405":{"$ref":"#/components/responses/E405"},"429":{"$ref":"#/components/responses/E429"},"503":{"$ref":"#/components/responses/E503"}}}},"/activities":{"get":{"operationId":"listActivities","summary":"List notes, calls and meetings","description":"Live entries, newest first. Entries on a deleted record stay listed until it's purged, but can't be changed.","tags":["Activities"],"x-fifi-scope":"activities:read","security":[{"bearerAuth":[]}],"parameters":[{"name":"limit","in":"query","required":false,"description":"Records per page, 1–100 (default 25).","schema":{"default":25,"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"description":"The `next_cursor` of the previous page. Use it with the same `sort`.","schema":{"type":"string","maxLength":300}},{"name":"sort","in":"query","required":false,"description":"`created_at`: newest first (default). `updated_at`: most recently changed first.","schema":{"default":"created_at","type":"string","enum":["created_at","updated_at"]}},{"name":"updated_since","in":"query","required":false,"description":"Only records changed at or after this time (ISO 8601, with a time zone).","schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},{"name":"record_type","in":"query","required":false,"schema":{"type":"string","enum":["contact","company","deal"]}},{"name":"record_id","in":"query","required":false,"description":"With record_type: only this record's entries.","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"type","in":"query","required":false,"schema":{"type":"string","enum":["note","call","meeting"]}},{"name":"author_id","in":"query","required":false,"description":"Only entries this member logged.","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"OK","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"}},"content":{"application/json":{"schema":{"type":"object","required":["data","next_cursor"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Activity"}},"next_cursor":{"type":["string","null"],"description":"Pass as `cursor` for the next page; null on the last page."}}},"example":{"data":[{"id":"0199a8f2-6b1c-7c3e-9a51-3f2d8e4b7c40","type":"call","record_type":"contact","record_id":"0199a8f2-6b1c-7c3e-9a51-3f2d8e4b7c10","title":"Intro call","body":"Wants a quote for 12 seats by Friday.","occurred_at":"2026-10-03T15:30:00.000Z","duration_minutes":null,"author_id":"0199a8f2-6b1c-7c3e-9a51-3f2d8e4b7c12","created_at":"2026-10-03T15:45:00.000Z","updated_at":"2026-10-03T15:45:00.000Z"}],"next_cursor":null}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"405":{"$ref":"#/components/responses/E405"},"429":{"$ref":"#/components/responses/E429"},"503":{"$ref":"#/components/responses/E503"}}},"post":{"operationId":"createActivity","summary":"Log a note, call or meeting","description":"Logged on a live contact, company or deal, as in the app, by the key's creator.","tags":["Activities"],"x-fifi-scope":"activities:write","security":[{"bearerAuth":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Any 1–255 visible ASCII characters. A repeat within 24 hours returns the first response.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["note","call","meeting"]},"record_type":{"type":"string","enum":["contact","company","deal"]},"record_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"A live contact, company or deal in this workspace."},"title":{"description":"Up to 200 characters; null clears it.","anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"body":{"type":"string","maxLength":10000,"description":"Required, 1–10,000 characters."},"occurred_at":{"description":"ISO 8601 with a time zone. Default: now. Only meetings can be in the future (up to two years).","type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"duration_minutes":{"description":"Meetings only: 5 minutes to 24 hours.","anyOf":[{"type":"integer","minimum":5,"maximum":1440},{"type":"null"}]}},"required":["type","record_type","record_id","body"],"additionalProperties":false},"example":{"type":"call","record_type":"contact","record_id":"0199a8f2-6b1c-7c3e-9a51-3f2d8e4b7c10","title":"Intro call","body":"Wants a quote for 12 seats by Friday.","occurred_at":"2026-10-03T11:30:00-04:00"}}}},"responses":{"201":{"description":"Created","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"}},"content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Activity"}}},"example":{"data":{"id":"0199a8f2-6b1c-7c3e-9a51-3f2d8e4b7c40","type":"call","record_type":"contact","record_id":"0199a8f2-6b1c-7c3e-9a51-3f2d8e4b7c10","title":"Intro call","body":"Wants a quote for 12 seats by Friday.","occurred_at":"2026-10-03T15:30:00.000Z","duration_minutes":null,"author_id":"0199a8f2-6b1c-7c3e-9a51-3f2d8e4b7c12","created_at":"2026-10-03T15:45:00.000Z","updated_at":"2026-10-03T15:45:00.000Z"}}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"405":{"$ref":"#/components/responses/E405"},"409":{"$ref":"#/components/responses/E409"},"411":{"$ref":"#/components/responses/E411"},"413":{"$ref":"#/components/responses/E413"},"415":{"$ref":"#/components/responses/E415"},"422":{"$ref":"#/components/responses/E422"},"429":{"$ref":"#/components/responses/E429"},"503":{"$ref":"#/components/responses/E503"}}}},"/activities/{id}":{"get":{"operationId":"getActivity","summary":"Get a note, call or meeting","tags":["Activities"],"x-fifi-scope":"activities:read","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"}},"content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Activity"}}},"example":{"data":{"id":"0199a8f2-6b1c-7c3e-9a51-3f2d8e4b7c40","type":"call","record_type":"contact","record_id":"0199a8f2-6b1c-7c3e-9a51-3f2d8e4b7c10","title":"Intro call","body":"Wants a quote for 12 seats by Friday.","occurred_at":"2026-10-03T15:30:00.000Z","duration_minutes":null,"author_id":"0199a8f2-6b1c-7c3e-9a51-3f2d8e4b7c12","created_at":"2026-10-03T15:45:00.000Z","updated_at":"2026-10-03T15:45:00.000Z"}}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"405":{"$ref":"#/components/responses/E405"},"429":{"$ref":"#/components/responses/E429"},"503":{"$ref":"#/components/responses/E503"}}},"patch":{"operationId":"updateActivity","summary":"Edit a note, call or meeting","description":"As in the app, only its author edits an entry (a key acts as its creator), and only a meeting's time and length can change.","tags":["Activities"],"x-fifi-scope":"activities:write","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"description":"Up to 200 characters; null clears it.","anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"body":{"type":"string","maxLength":10000,"description":"Required, 1–10,000 characters."},"occurred_at":{"description":"ISO 8601 with a time zone. Default: now. Only meetings can be in the future (up to two years).","type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"duration_minutes":{"description":"Meetings only: 5 minutes to 24 hours.","anyOf":[{"type":"integer","minimum":5,"maximum":1440},{"type":"null"}]}},"additionalProperties":false},"example":{"body":"Wants a quote for 15 seats by Friday."}}}},"responses":{"200":{"description":"OK","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"}},"content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Activity"}}},"example":{"data":{"id":"0199a8f2-6b1c-7c3e-9a51-3f2d8e4b7c40","type":"call","record_type":"contact","record_id":"0199a8f2-6b1c-7c3e-9a51-3f2d8e4b7c10","title":"Intro call","body":"Wants a quote for 15 seats by Friday.","occurred_at":"2026-10-03T15:30:00.000Z","duration_minutes":null,"author_id":"0199a8f2-6b1c-7c3e-9a51-3f2d8e4b7c12","created_at":"2026-10-03T15:45:00.000Z","updated_at":"2026-10-03T15:45:00.000Z"}}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"405":{"$ref":"#/components/responses/E405"},"409":{"$ref":"#/components/responses/E409"},"411":{"$ref":"#/components/responses/E411"},"413":{"$ref":"#/components/responses/E413"},"415":{"$ref":"#/components/responses/E415"},"422":{"$ref":"#/components/responses/E422"},"429":{"$ref":"#/components/responses/E429"},"503":{"$ref":"#/components/responses/E503"}}},"delete":{"operationId":"deleteActivity","summary":"Delete a note, call or meeting","description":"As in the app, its author or an owner or admin deletes an entry (a key acts as its creator). Deleted entries can't be restored.","tags":["Activities"],"x-fifi-scope":"activities:write","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"}},"content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Deleted"}}},"example":{"data":{"id":"0199a8f2-6b1c-7c3e-9a51-3f2d8e4b7c40","deleted":true}}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"405":{"$ref":"#/components/responses/E405"},"429":{"$ref":"#/components/responses/E429"},"503":{"$ref":"#/components/responses/E503"}}}},"/webhooks":{"get":{"operationId":"listWebhooks","summary":"List webhook endpoints","description":"The workspace's endpoints (at most 10), oldest first. Secrets are never shown again.","tags":["Webhook endpoints"],"x-fifi-scope":"webhooks:read","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"OK","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"}},"content":{"application/json":{"schema":{"type":"object","required":["data","next_cursor"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/WebhookEndpoint"}},"next_cursor":{"type":["string","null"],"description":"Pass as `cursor` for the next page; null on the last page."}}},"example":{"data":[{"id":"0199a8f2-6b1c-7c3e-9a51-3f2d8e4b7c30","url":"https://hooks.example.com/fifi","description":"Zapier: new contacts","events":["contact.created","contact.updated"],"status":"active","disabled_reason":null,"created_at":"2026-10-04T12:00:00.000Z","updated_at":"2026-10-04T12:00:00.000Z"}],"next_cursor":null}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"405":{"$ref":"#/components/responses/E405"},"429":{"$ref":"#/components/responses/E429"},"503":{"$ref":"#/components/responses/E503"}}},"post":{"operationId":"createWebhook","summary":"Subscribe a webhook endpoint","description":"Adds an endpoint (REST hooks: subscribe on activation, DELETE to unsubscribe). The response carries its signing secret, once. At most 10 per workspace (422 `limit` past that). Audited as made by the key's creator via the key.","tags":["Webhook endpoints"],"x-fifi-scope":"webhooks:write","security":[{"bearerAuth":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Any 1–255 visible ASCII characters. A repeat within 24 hours returns the first response.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","maxLength":2048,"format":"uri","description":"An https:// URL on port 443 with a public host name (not an IP address)."},"description":{"description":"Up to 200 characters.","type":"string","maxLength":200},"events":{"minItems":1,"maxItems":30,"type":"array","items":{"type":"string","enum":["contact.created","contact.updated","contact.deleted","company.created","company.updated","company.deleted","deal.created","deal.updated","deal.stage_changed","deal.won","deal.lost","deal.deleted","task.created","task.updated","task.completed","task.deleted","activity.created","floor_plan.created","floor_plan.updated","floor_plan.deleted","load.created","load.updated","load.status_changed","load.delivered","load.deleted","invoice.sent","invoice.voided","invoice.paid","payment.recorded","payment.voided"]},"description":"One or more events. Each needs the key to have its area's read scope (`contact.*` needs `contacts:read`, and so on)."}},"required":["url","events"],"additionalProperties":false},"example":{"url":"https://hooks.example.com/fifi","description":"Zapier: new contacts","events":["contact.created","contact.updated"]}}}},"responses":{"201":{"description":"Created","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"}},"content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/WebhookEndpointCreated"}}},"example":{"data":{"id":"0199a8f2-6b1c-7c3e-9a51-3f2d8e4b7c30","url":"https://hooks.example.com/fifi","description":"Zapier: new contacts","events":["contact.created","contact.updated"],"status":"active","disabled_reason":null,"created_at":"2026-10-04T12:00:00.000Z","updated_at":"2026-10-04T12:00:00.000Z","secret":"whsec_Q2h3n8pX0aB7cD1eF4gH6iJ9kL2mN5oP8qR1sT4uV7w"}}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"405":{"$ref":"#/components/responses/E405"},"409":{"$ref":"#/components/responses/E409"},"411":{"$ref":"#/components/responses/E411"},"413":{"$ref":"#/components/responses/E413"},"415":{"$ref":"#/components/responses/E415"},"422":{"$ref":"#/components/responses/E422"},"429":{"$ref":"#/components/responses/E429"},"503":{"$ref":"#/components/responses/E503"}}}},"/webhooks/{id}":{"get":{"operationId":"getWebhook","summary":"Get a webhook endpoint","tags":["Webhook endpoints"],"x-fifi-scope":"webhooks:read","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"}},"content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/WebhookEndpoint"}}},"example":{"data":{"id":"0199a8f2-6b1c-7c3e-9a51-3f2d8e4b7c30","url":"https://hooks.example.com/fifi","description":"Zapier: new contacts","events":["contact.created","contact.updated"],"status":"active","disabled_reason":null,"created_at":"2026-10-04T12:00:00.000Z","updated_at":"2026-10-04T12:00:00.000Z"}}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"405":{"$ref":"#/components/responses/E405"},"429":{"$ref":"#/components/responses/E429"},"503":{"$ref":"#/components/responses/E503"}}},"delete":{"operationId":"deleteWebhook","summary":"Unsubscribe a webhook endpoint","description":"Deletes the endpoint and its delivery log. Nothing more is sent to it.","tags":["Webhook endpoints"],"x-fifi-scope":"webhooks:write","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"}},"content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Deleted"}}},"example":{"data":{"id":"0199a8f2-6b1c-7c3e-9a51-3f2d8e4b7c30","deleted":true}}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"405":{"$ref":"#/components/responses/E405"},"429":{"$ref":"#/components/responses/E429"},"503":{"$ref":"#/components/responses/E503"}}}},"/floor-plans":{"get":{"operationId":"listFloorPlans","summary":"List floor plans","description":"Live floor plans (at most 20 a workspace), newest first. Works while Boarding or Online booking is on.","tags":["Floor plans"],"x-fifi-scope":"floor_plans:read","x-fifi-modules":["boarding","booking"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"limit","in":"query","required":false,"description":"Records per page, 1–100 (default 25).","schema":{"default":25,"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"description":"The `next_cursor` of the previous page. Use it with the same `sort`.","schema":{"type":"string","maxLength":300}},{"name":"sort","in":"query","required":false,"description":"`created_at`: newest first (default). `updated_at`: most recently changed first.","schema":{"default":"created_at","type":"string","enum":["created_at","updated_at"]}},{"name":"updated_since","in":"query","required":false,"description":"Only records changed at or after this time (ISO 8601, with a time zone).","schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}}],"responses":{"200":{"description":"OK","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"}},"content":{"application/json":{"schema":{"type":"object","required":["data","next_cursor"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/FloorPlan"}},"next_cursor":{"type":["string","null"],"description":"Pass as `cursor` for the next page; null on the last page."}}},"example":{"data":[{"id":"0199a8f2-6b1c-7c3e-9a51-3f2d8e4b7c40","name":"Salon","columns":30,"rows":20,"version":4,"has_background":false,"created_at":"2026-10-02T08:00:00.000Z","updated_at":"2026-10-05T16:20:00.000Z"}],"next_cursor":null}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"405":{"$ref":"#/components/responses/E405"},"429":{"$ref":"#/components/responses/E429"},"503":{"$ref":"#/components/responses/E503"}}}},"/floor-plans/{id}":{"get":{"operationId":"getFloorPlan","summary":"Get a floor plan","description":"A live plan with its shapes and pods, in quarter cells as stored. Kennels' pods are included only while Boarding is on, and seats' pods only while Online booking is on.","tags":["Floor plans"],"x-fifi-scope":"floor_plans:read","x-fifi-modules":["boarding","booking"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"}},"content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/FloorPlanDetail"}}},"example":{"data":{"id":"0199a8f2-6b1c-7c3e-9a51-3f2d8e4b7c40","name":"Salon","columns":30,"rows":20,"version":4,"has_background":false,"created_at":"2026-10-02T08:00:00.000Z","updated_at":"2026-10-05T16:20:00.000Z","shapes":[{"id":"0199a8f2-6b1c-7c3e-9a51-3f2d8e4b7c41","kind":"wall","label":"","x":0,"y":0,"w":120,"h":1,"rotation":0},{"id":"0199a8f2-6b1c-7c3e-9a51-3f2d8e4b7c42","kind":"area","label":"Waiting area","x":4,"y":56,"w":40,"h":20,"rotation":0}],"pods":[{"kind":"kennel","id":"0199a8f2-6b1c-7c3e-9a51-3f2d8e4b7c43","name":"Run 1","x":64,"y":8,"w":12,"h":12,"rotation":0},{"kind":"seat","id":"0199a8f2-6b1c-7c3e-9a51-3f2d8e4b7c44","name":"Table 1","x":8,"y":8,"w":12,"h":8,"rotation":90}]}}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"405":{"$ref":"#/components/responses/E405"},"429":{"$ref":"#/components/responses/E429"},"503":{"$ref":"#/components/responses/E503"}}}},"/seats":{"get":{"operationId":"listSeats","summary":"List seats","description":"Live appointment seats (tables, tubs, chairs…; at most 100 a workspace), newest first, each with where it's placed. Seats belong to Online booking: while it's off (and Boarding on) the list is empty, as plans then leave seats out.","tags":["Seats"],"x-fifi-scope":"floor_plans:read","x-fifi-modules":["boarding","booking"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"limit","in":"query","required":false,"description":"Records per page, 1–100 (default 25).","schema":{"default":25,"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"description":"The `next_cursor` of the previous page. Use it with the same `sort`.","schema":{"type":"string","maxLength":300}},{"name":"sort","in":"query","required":false,"description":"`created_at`: newest first (default). `updated_at`: most recently changed first.","schema":{"default":"created_at","type":"string","enum":["created_at","updated_at"]}},{"name":"updated_since","in":"query","required":false,"description":"Only records changed at or after this time (ISO 8601, with a time zone).","schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}}],"responses":{"200":{"description":"OK","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"}},"content":{"application/json":{"schema":{"type":"object","required":["data","next_cursor"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Seat"}},"next_cursor":{"type":["string","null"],"description":"Pass as `cursor` for the next page; null on the last page."}}},"example":{"data":[{"id":"0199a8f2-6b1c-7c3e-9a51-3f2d8e4b7c44","name":"Table 1","kind":"Table","active":true,"order":0,"floor_plan_id":"0199a8f2-6b1c-7c3e-9a51-3f2d8e4b7c40","x":8,"y":8,"w":12,"h":8,"rotation":90},{"id":"0199a8f2-6b1c-7c3e-9a51-3f2d8e4b7c45","name":"Tub 1","kind":"Tub","active":true,"order":1,"floor_plan_id":null,"x":null,"y":null,"w":null,"h":null,"rotation":null}],"next_cursor":null}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"405":{"$ref":"#/components/responses/E405"},"429":{"$ref":"#/components/responses/E429"},"503":{"$ref":"#/components/responses/E503"}}}},"/service-records":{"get":{"operationId":"listServiceRecords","summary":"List service records","description":"Service records not in the trash (voided ones too, with their status), newest first, each with its applications.","tags":["Service records"],"x-fifi-scope":"service_records:read","x-fifi-modules":["service_records"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"limit","in":"query","required":false,"description":"Records per page, 1–100 (default 25).","schema":{"default":25,"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"description":"The `next_cursor` of the previous page. Use it with the same `sort`.","schema":{"type":"string","maxLength":300}},{"name":"sort","in":"query","required":false,"description":"`created_at`: newest first (default). `updated_at`: most recently changed first.","schema":{"default":"created_at","type":"string","enum":["created_at","updated_at"]}},{"name":"updated_since","in":"query","required":false,"description":"Only records changed at or after this time (ISO 8601, with a time zone).","schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},{"name":"contact_id","in":"query","required":false,"description":"Only this contact's records.","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"technician_id","in":"query","required":false,"description":"Only this technician's records (a member's ID).","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"status","in":"query","required":false,"description":"Only records with this status.","schema":{"type":"string","enum":["draft","completed","voided"]}},{"name":"service_after","in":"query","required":false,"description":"Only records serviced at or after this time (ISO 8601, with a time zone).","schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},{"name":"service_before","in":"query","required":false,"description":"Only records serviced before this time (ISO 8601, with a time zone).","schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}}],"responses":{"200":{"description":"OK","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"}},"content":{"application/json":{"schema":{"type":"object","required":["data","next_cursor"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ServiceRecord"}},"next_cursor":{"type":["string","null"],"description":"Pass as `cursor` for the next page; null on the last page."}}},"example":{"data":[{"id":"0199b2c4-1d2e-7a3b-8c4d-5e6f7a8b9c01","status":"completed","booking_id":"0199b2c4-1d2e-7a3b-8c4d-5e6f7a8b9c02","contact_id":"0199b2c4-1d2e-7a3b-8c4d-5e6f7a8b9c03","technician_id":"0199b2c4-1d2e-7a3b-8c4d-5e6f7a8b9c04","service_at":"2026-10-12T14:00:00.000Z","service_name":"General pest service","customer_name":"Megan Ross","service_address":"14 Alder Ln, Raleigh, NC 27609","technician_name":"Luis Ortega","licence_number":"NC-12345","conditions":"Sunny, 72°F, wind 5 mph NW","notes":"Perimeter treated; ants at the patio slab.","completed_at":"2026-10-12T15:02:00.000Z","voided_at":null,"void_reason":null,"created_at":"2026-10-12T14:50:00.000Z","updated_at":"2026-10-12T15:02:00.000Z","applications":[{"product_id":"0199b2c4-1d2e-7a3b-8c4d-5e6f7a8b9c05","product_name":"Bifen I/T","epa_reg_no":"53883-118","amount":2.5,"unit":"fl_oz","target_pests":"Ants, spiders","areas":"Foundation perimeter, 3 ft band","method":"Spray","rate":"1 fl oz per gal"},{"product_id":null,"product_name":"Glue boards","epa_reg_no":null,"amount":4,"unit":"each","target_pests":"Spiders","areas":"Garage corners","method":"Trap","rate":null}]}],"next_cursor":null}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"405":{"$ref":"#/components/responses/E405"},"429":{"$ref":"#/components/responses/E429"},"503":{"$ref":"#/components/responses/E503"}}}},"/service-records/{id}":{"get":{"operationId":"getServiceRecord","summary":"Get a service record","description":"A service record not in the trash, with its applications in order.","tags":["Service records"],"x-fifi-scope":"service_records:read","x-fifi-modules":["service_records"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"}},"content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/ServiceRecord"}}},"example":{"data":{"id":"0199b2c4-1d2e-7a3b-8c4d-5e6f7a8b9c01","status":"completed","booking_id":"0199b2c4-1d2e-7a3b-8c4d-5e6f7a8b9c02","contact_id":"0199b2c4-1d2e-7a3b-8c4d-5e6f7a8b9c03","technician_id":"0199b2c4-1d2e-7a3b-8c4d-5e6f7a8b9c04","service_at":"2026-10-12T14:00:00.000Z","service_name":"General pest service","customer_name":"Megan Ross","service_address":"14 Alder Ln, Raleigh, NC 27609","technician_name":"Luis Ortega","licence_number":"NC-12345","conditions":"Sunny, 72°F, wind 5 mph NW","notes":"Perimeter treated; ants at the patio slab.","completed_at":"2026-10-12T15:02:00.000Z","voided_at":null,"void_reason":null,"created_at":"2026-10-12T14:50:00.000Z","updated_at":"2026-10-12T15:02:00.000Z","applications":[{"product_id":"0199b2c4-1d2e-7a3b-8c4d-5e6f7a8b9c05","product_name":"Bifen I/T","epa_reg_no":"53883-118","amount":2.5,"unit":"fl_oz","target_pests":"Ants, spiders","areas":"Foundation perimeter, 3 ft band","method":"Spray","rate":"1 fl oz per gal"},{"product_id":null,"product_name":"Glue boards","epa_reg_no":null,"amount":4,"unit":"each","target_pests":"Spiders","areas":"Garage corners","method":"Trap","rate":null}]}}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"405":{"$ref":"#/components/responses/E405"},"429":{"$ref":"#/components/responses/E429"},"503":{"$ref":"#/components/responses/E503"}}}},"/service-products":{"get":{"operationId":"listServiceProducts","summary":"List service products","description":"The workspace's treatment products (at most 500, archived ones included), newest first.","tags":["Service records"],"x-fifi-scope":"service_records:read","x-fifi-modules":["service_records"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"limit","in":"query","required":false,"description":"Records per page, 1–100 (default 25).","schema":{"default":25,"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"description":"The `next_cursor` of the previous page. Use it with the same `sort`.","schema":{"type":"string","maxLength":300}},{"name":"sort","in":"query","required":false,"description":"`created_at`: newest first (default). `updated_at`: most recently changed first.","schema":{"default":"created_at","type":"string","enum":["created_at","updated_at"]}},{"name":"updated_since","in":"query","required":false,"description":"Only records changed at or after this time (ISO 8601, with a time zone).","schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}}],"responses":{"200":{"description":"OK","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"}},"content":{"application/json":{"schema":{"type":"object","required":["data","next_cursor"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ServiceProduct"}},"next_cursor":{"type":["string","null"],"description":"Pass as `cursor` for the next page; null on the last page."}}},"example":{"data":[{"id":"0199b2c4-1d2e-7a3b-8c4d-5e6f7a8b9c05","name":"Bifen I/T","epa_reg_no":"53883-118","active_ingredient":"Bifenthrin 7.9%","default_unit":"fl_oz","default_method":"Spray","archived":false,"created_at":"2026-09-01T09:00:00.000Z","updated_at":"2026-09-01T09:00:00.000Z"}],"next_cursor":null}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"405":{"$ref":"#/components/responses/E405"},"429":{"$ref":"#/components/responses/E429"},"503":{"$ref":"#/components/responses/E503"}}}},"/loads":{"get":{"operationId":"listLoads","summary":"List loads","description":"Loads not in the trash (delivered and cancelled ones too), newest first, each with its stops and its documents' metadata.","tags":["Loads"],"x-fifi-scope":"loads:read","x-fifi-modules":["loads"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"limit","in":"query","required":false,"description":"Records per page, 1–100 (default 25).","schema":{"default":25,"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"description":"The `next_cursor` of the previous page. Use it with the same `sort`.","schema":{"type":"string","maxLength":300}},{"name":"sort","in":"query","required":false,"description":"`created_at`: newest first (default). `updated_at`: most recently changed first.","schema":{"default":"created_at","type":"string","enum":["created_at","updated_at"]}},{"name":"updated_since","in":"query","required":false,"description":"Only records changed at or after this time (ISO 8601, with a time zone).","schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},{"name":"status","in":"query","required":false,"description":"Only loads with this status.","schema":{"type":"string","enum":["open","covered","dispatched","in_transit","delivered","cancelled"]}},{"name":"shipper_id","in":"query","required":false,"description":"Only this shipper's loads (a company's ID).","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"carrier_id","in":"query","required":false,"description":"Only loads this carrier hauls (a company's ID).","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"deal_id","in":"query","required":false,"description":"Only loads on this lane (a deal's ID).","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"pickup_after","in":"query","required":false,"description":"Only loads whose first pickup is at or after this time (ISO 8601, with a time zone).","schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},{"name":"pickup_before","in":"query","required":false,"description":"Only loads whose first pickup is before this time (ISO 8601, with a time zone).","schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}}],"responses":{"200":{"description":"OK","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"}},"content":{"application/json":{"schema":{"type":"object","required":["data","next_cursor"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Load"}},"next_cursor":{"type":["string","null"],"description":"Pass as `cursor` for the next page; null on the last page."}}},"example":{"data":[{"id":"0199b2c4-1d2e-7a3b-8c4d-5e6f7a8b9d01","number":48213,"status":"in_transit","owner_id":"0199b2c4-1d2e-7a3b-8c4d-5e6f7a8b9d02","shipper_id":"0199b2c4-1d2e-7a3b-8c4d-5e6f7a8b9d03","shipper_contact_id":"0199b2c4-1d2e-7a3b-8c4d-5e6f7a8b9d04","deal_id":"0199b2c4-1d2e-7a3b-8c4d-5e6f7a8b9d05","carrier_id":"0199b2c4-1d2e-7a3b-8c4d-5e6f7a8b9d06","driver_contact_id":"0199b2c4-1d2e-7a3b-8c4d-5e6f7a8b9d07","truck_number":"214","trailer_number":"5531","equipment":"dry_van","temp_min_f":null,"temp_max_f":null,"weight_lb":38000,"pieces":22,"commodity":"Corrugated boxes","hazmat":false,"reference":"PO 77120","rate_cents":145000,"carrier_pay_cents":118000,"margin_cents":27000,"pickup_at":"2026-10-15T13:00:00.000Z","delivery_at":"2026-10-16T15:00:00.000Z","origin":"Joliet, IL","destination":"Memphis, TN","delivered_at":null,"cancelled_at":null,"cancel_reason":null,"notes":"Driver to call 30 minutes out.","created_at":"2026-10-13T16:20:00.000Z","updated_at":"2026-10-15T15:05:00.000Z","stops":[{"id":"0199b2c4-1d2e-7a3b-8c4d-5e6f7a8b9d08","position":0,"kind":"pickup","facility":"Joliet Packaging Co. plant","address":"1200 Mound Rd, Joliet, IL 60436","locality":"Joliet, IL","timezone":"America/Chicago","window_start":"2026-10-15T13:00:00.000Z","window_end":"2026-10-15T15:00:00.000Z","appointment_ref":"JP-5521","booking_id":null,"arrived_at":"2026-10-15T13:10:00.000Z","departed_at":"2026-10-15T14:05:00.000Z","notes":null},{"id":"0199b2c4-1d2e-7a3b-8c4d-5e6f7a8b9d09","position":1,"kind":"delivery","facility":"Delta Distribution Center","address":"3450 Lamar Ave, Memphis, TN 38118","locality":"Memphis, TN","timezone":"America/Chicago","window_start":"2026-10-16T13:00:00.000Z","window_end":"2026-10-16T15:00:00.000Z","appointment_ref":null,"booking_id":null,"arrived_at":null,"departed_at":null,"notes":"Lumper paid by the receiver."}],"documents":[{"id":"0199b2c4-1d2e-7a3b-8c4d-5e6f7a8b9d10","kind":"rate_confirmation","stop_id":null,"content_type":"application/pdf","byte_size":48213,"name":"rate-confirmation-48213.pdf","created_at":"2026-10-13T16:40:00.000Z"}]}],"next_cursor":null}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"405":{"$ref":"#/components/responses/E405"},"429":{"$ref":"#/components/responses/E429"},"503":{"$ref":"#/components/responses/E503"}}}},"/loads/{id}":{"get":{"operationId":"getLoad","summary":"Get a load","description":"A load not in the trash, with its stops in order and its documents' metadata (download them from the load's page in Fifi).","tags":["Loads"],"x-fifi-scope":"loads:read","x-fifi-modules":["loads"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"}},"content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Load"}}},"example":{"data":{"id":"0199b2c4-1d2e-7a3b-8c4d-5e6f7a8b9d01","number":48213,"status":"in_transit","owner_id":"0199b2c4-1d2e-7a3b-8c4d-5e6f7a8b9d02","shipper_id":"0199b2c4-1d2e-7a3b-8c4d-5e6f7a8b9d03","shipper_contact_id":"0199b2c4-1d2e-7a3b-8c4d-5e6f7a8b9d04","deal_id":"0199b2c4-1d2e-7a3b-8c4d-5e6f7a8b9d05","carrier_id":"0199b2c4-1d2e-7a3b-8c4d-5e6f7a8b9d06","driver_contact_id":"0199b2c4-1d2e-7a3b-8c4d-5e6f7a8b9d07","truck_number":"214","trailer_number":"5531","equipment":"dry_van","temp_min_f":null,"temp_max_f":null,"weight_lb":38000,"pieces":22,"commodity":"Corrugated boxes","hazmat":false,"reference":"PO 77120","rate_cents":145000,"carrier_pay_cents":118000,"margin_cents":27000,"pickup_at":"2026-10-15T13:00:00.000Z","delivery_at":"2026-10-16T15:00:00.000Z","origin":"Joliet, IL","destination":"Memphis, TN","delivered_at":null,"cancelled_at":null,"cancel_reason":null,"notes":"Driver to call 30 minutes out.","created_at":"2026-10-13T16:20:00.000Z","updated_at":"2026-10-15T15:05:00.000Z","stops":[{"id":"0199b2c4-1d2e-7a3b-8c4d-5e6f7a8b9d08","position":0,"kind":"pickup","facility":"Joliet Packaging Co. plant","address":"1200 Mound Rd, Joliet, IL 60436","locality":"Joliet, IL","timezone":"America/Chicago","window_start":"2026-10-15T13:00:00.000Z","window_end":"2026-10-15T15:00:00.000Z","appointment_ref":"JP-5521","booking_id":null,"arrived_at":"2026-10-15T13:10:00.000Z","departed_at":"2026-10-15T14:05:00.000Z","notes":null},{"id":"0199b2c4-1d2e-7a3b-8c4d-5e6f7a8b9d09","position":1,"kind":"delivery","facility":"Delta Distribution Center","address":"3450 Lamar Ave, Memphis, TN 38118","locality":"Memphis, TN","timezone":"America/Chicago","window_start":"2026-10-16T13:00:00.000Z","window_end":"2026-10-16T15:00:00.000Z","appointment_ref":null,"booking_id":null,"arrived_at":null,"departed_at":null,"notes":"Lumper paid by the receiver."}],"documents":[{"id":"0199b2c4-1d2e-7a3b-8c4d-5e6f7a8b9d10","kind":"rate_confirmation","stop_id":null,"content_type":"application/pdf","byte_size":48213,"name":"rate-confirmation-48213.pdf","created_at":"2026-10-13T16:40:00.000Z"}]}}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"405":{"$ref":"#/components/responses/E405"},"429":{"$ref":"#/components/responses/E429"},"503":{"$ref":"#/components/responses/E503"}}}},"/invoices":{"get":{"operationId":"listInvoices","summary":"List invoices","description":"Invoices not in the trash (drafts and void ones too, with their status), newest first, without their lines.","tags":["Invoices"],"x-fifi-scope":"invoices:read","x-fifi-modules":["invoicing"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"limit","in":"query","required":false,"description":"Records per page, 1–100 (default 25).","schema":{"default":25,"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"description":"The `next_cursor` of the previous page. Use it with the same `sort`.","schema":{"type":"string","maxLength":300}},{"name":"sort","in":"query","required":false,"description":"`created_at`: newest first (default). `updated_at`: most recently changed first.","schema":{"default":"created_at","type":"string","enum":["created_at","updated_at"]}},{"name":"updated_since","in":"query","required":false,"description":"Only records changed at or after this time (ISO 8601, with a time zone).","schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},{"name":"status","in":"query","required":false,"description":"Only invoices with this status.","schema":{"type":"string","enum":["draft","sent","partially_paid","paid","void"]}},{"name":"contact_id","in":"query","required":false,"description":"Only invoices billed to this contact.","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"company_id","in":"query","required":false,"description":"Only invoices billed to this company.","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"issued_after","in":"query","required":false,"description":"Only invoices issued on or after this date (YYYY-MM-DD).","schema":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},{"name":"issued_before","in":"query","required":false,"description":"Only invoices issued before this date (YYYY-MM-DD).","schema":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},{"name":"overdue","in":"query","required":false,"description":"`true`: only overdue invoices (sent or partially paid, due before today in the workspace owner's time zone). `false`: only the others.","schema":{"type":"string","enum":["true","false"]}}],"responses":{"200":{"description":"OK","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"}},"content":{"application/json":{"schema":{"type":"object","required":["data","next_cursor"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Invoice"}},"next_cursor":{"type":["string","null"],"description":"Pass as `cursor` for the next page; null on the last page."}}},"example":{"data":[{"id":"0199c1a2-3b4c-7d5e-8f60-718293a4b5c6","number":"INV-1042","status":"sent","overdue":false,"contact_id":"0199c1a2-3b4c-7d5e-8f60-718293a4b5c7","company_id":"0199c1a2-3b4c-7d5e-8f60-718293a4b5c8","bill_to_name":"Harbor Grill","bill_to_email":"ap@harborgrill.example","bill_to_address":"18 Pier Rd, Wilmington, NC 28401","customer_reference":"PO 5521","issue_date":"2026-10-15","due_date":"2026-11-14","terms":"net_30","currency":"USD","subtotal_cents":48000,"tax_label":"Sales tax","tax_rate":7.25,"tax_cents":580,"total_cents":48580,"paid_cents":0,"balance_cents":48580,"notes":"Thank you for your business.","issued_at":"2026-10-15T14:02:00.000Z","paid_at":null,"voided_at":null,"void_reason":null,"created_at":"2026-10-15T13:40:00.000Z","updated_at":"2026-10-15T14:02:00.000Z"}],"next_cursor":null}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"405":{"$ref":"#/components/responses/E405"},"429":{"$ref":"#/components/responses/E429"},"503":{"$ref":"#/components/responses/E503"}}}},"/invoices/{id}":{"get":{"operationId":"getInvoice","summary":"Get an invoice","description":"An invoice not in the trash, with its lines in order and its payments (newest received first, voided ones included).","tags":["Invoices"],"x-fifi-scope":"invoices:read","x-fifi-modules":["invoicing"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"}},"content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Invoice"}}},"example":{"data":{"id":"0199c1a2-3b4c-7d5e-8f60-718293a4b5c6","number":"INV-1042","status":"partially_paid","overdue":false,"contact_id":"0199c1a2-3b4c-7d5e-8f60-718293a4b5c7","company_id":"0199c1a2-3b4c-7d5e-8f60-718293a4b5c8","bill_to_name":"Harbor Grill","bill_to_email":"ap@harborgrill.example","bill_to_address":"18 Pier Rd, Wilmington, NC 28401","customer_reference":"PO 5521","issue_date":"2026-10-15","due_date":"2026-11-14","terms":"net_30","currency":"USD","subtotal_cents":48000,"tax_label":"Sales tax","tax_rate":7.25,"tax_cents":580,"total_cents":48580,"paid_cents":24000,"balance_cents":24580,"notes":"Thank you for your business.","issued_at":"2026-10-15T14:02:00.000Z","paid_at":null,"voided_at":null,"void_reason":null,"created_at":"2026-10-15T13:40:00.000Z","updated_at":"2026-10-15T14:02:00.000Z","lines":[{"position":0,"description":"General pest service, Oct 3, 2026","quantity":1,"unit_price_cents":40000,"line_total_cents":40000,"taxable":false,"source_type":"booking","source_id":"0199c1a2-3b4c-7d5e-8f60-718293a4b5c9"},{"position":1,"description":"Bait stations (4)","quantity":4,"unit_price_cents":2000,"line_total_cents":8000,"taxable":true,"source_type":null,"source_id":null}],"payments":[{"id":"0199c1a2-3b4c-7d5e-8f60-718293a4b5d0","invoice_id":"0199c1a2-3b4c-7d5e-8f60-718293a4b5c6","kind":"payment","amount_cents":24000,"received_on":"2026-10-20","method":"check","reference":"Check 1042","notes":null,"voided_at":null,"void_reason":null,"processor":null,"processor_payment_id":null,"fee_cents":null,"dispute_status":null,"created_at":"2026-10-20T16:12:00.000Z","updated_at":"2026-10-20T16:12:00.000Z"}]}}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"405":{"$ref":"#/components/responses/E405"},"429":{"$ref":"#/components/responses/E429"},"503":{"$ref":"#/components/responses/E503"}}}},"/payments":{"get":{"operationId":"listPayments","summary":"List payments","description":"Payments and refunds recorded for invoices (money received elsewhere: Fifi doesn't move money), newest first, those of invoices not in the trash. A refund has `kind` `refund` and a positive `amount_cents`. Voided entries (entered in error) are left out unless `include_voided=true`. Needs the `invoices:read` scope.","tags":["Payments"],"x-fifi-scope":"invoices:read","x-fifi-modules":["invoicing"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"limit","in":"query","required":false,"description":"Records per page, 1–100 (default 25).","schema":{"default":25,"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"description":"The `next_cursor` of the previous page. Use it with the same `sort`.","schema":{"type":"string","maxLength":300}},{"name":"sort","in":"query","required":false,"description":"`created_at`: newest first (default). `updated_at`: most recently changed first.","schema":{"default":"created_at","type":"string","enum":["created_at","updated_at"]}},{"name":"updated_since","in":"query","required":false,"description":"Only records changed at or after this time (ISO 8601, with a time zone).","schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},{"name":"invoice_id","in":"query","required":false,"description":"Only payments for this invoice.","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"received_after","in":"query","required":false,"description":"Only payments received on or after this date (YYYY-MM-DD).","schema":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},{"name":"received_before","in":"query","required":false,"description":"Only payments received before this date (YYYY-MM-DD).","schema":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},{"name":"method","in":"query","required":false,"description":"Only payments by this method.","schema":{"type":"string","enum":["cash","check","bank_transfer","card","other","online"]}},{"name":"kind","in":"query","required":false,"description":"`payment` or `refund`.","schema":{"type":"string","enum":["payment","refund"]}},{"name":"include_voided","in":"query","required":false,"description":"`true`: voided entries too (default `false`).","schema":{"type":"string","enum":["true","false"]}}],"responses":{"200":{"description":"OK","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"}},"content":{"application/json":{"schema":{"type":"object","required":["data","next_cursor"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Payment"}},"next_cursor":{"type":["string","null"],"description":"Pass as `cursor` for the next page; null on the last page."}}},"example":{"data":[{"id":"0199c1a2-3b4c-7d5e-8f60-718293a4b5d0","invoice_id":"0199c1a2-3b4c-7d5e-8f60-718293a4b5c6","kind":"payment","amount_cents":24000,"received_on":"2026-10-20","method":"check","reference":"Check 1042","notes":null,"voided_at":null,"void_reason":null,"processor":null,"processor_payment_id":null,"fee_cents":null,"dispute_status":null,"created_at":"2026-10-20T16:12:00.000Z","updated_at":"2026-10-20T16:12:00.000Z"}],"next_cursor":null}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"405":{"$ref":"#/components/responses/E405"},"429":{"$ref":"#/components/responses/E429"},"503":{"$ref":"#/components/responses/E503"}}}},"/openapi.json":{"get":{"operationId":"getOpenApi","summary":"This document","tags":["Workspace"],"x-fifi-scope":"public","security":[],"responses":{"200":{"description":"The OpenAPI 3.1 document.","content":{"application/json":{"schema":{"type":"object"}}}}}}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"fifi_<prefix>_<secret>","description":"An API key from Settings → API."}},"schemas":{"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["invalid_request","invalid_json","invalid_cursor","cookie_not_allowed","unauthorized","insufficient_scope","forbidden","module_disabled","sample_workspace","not_found","method_not_allowed","conflict","idempotency_key_in_use","payload_too_large","unsupported_media_type","length_required","rule_violation","idempotency_key_reused","rate_limited","internal","api_disabled"],"description":"Stable, machine-readable code."},"message":{"type":"string","description":"What went wrong, for people."},"details":{"description":"For invalid input, `fields` maps each field to what's wrong with it; for conflicts, `reason` and sometimes `existing_id`.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false},"Me":{"type":"object","properties":{"workspace":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},"key":{"type":"object","properties":{"name":{"type":"string"},"prefix":{"type":"string","description":"The key's public prefix, as in Settings → API."},"scopes":{"type":"array","items":{"type":"string","enum":["contacts:read","contacts:write","companies:read","companies:write","deals:read","deals:write","tasks:read","tasks:write","activities:read","activities:write","webhooks:read","webhooks:write","floor_plans:read","service_records:read","loads:read","invoices:read"]}},"expires_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]}},"required":["name","prefix","scopes","expires_at"],"additionalProperties":false},"rate_limit":{"type":"object","properties":{"per_key_per_minute":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"per_workspace_per_minute":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["per_key_per_minute","per_workspace_per_minute"],"additionalProperties":false}},"required":["workspace","key","rate_limit"],"additionalProperties":false},"Member":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"The member's ID: use it for owner_id and assignee_id."},"name":{"type":"string","description":"Their name, or “Unnamed member” if they haven’t set one."},"role":{"type":"string","enum":["owner","admin","member"]}},"required":["id","name","role"],"additionalProperties":false},"Tag":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"color":{"type":"string","enum":["primary","stage-lead","stage-qualified","stage-won","highlight","stage-proposal","warning","stage-negotiation","stage-lost"]}},"required":["id","name","color"],"additionalProperties":false},"CustomField":{"type":"object","properties":{"object":{"type":"string","enum":["contact","company","deal"],"description":"The record type: contact, company or deal."},"key":{"type":"string","description":"Its key in the record's custom_fields (never changes)."},"label":{"type":"string"},"type":{"type":"string","enum":["text","long_text","number","date","choice","checkbox","url"],"description":"text, long_text (left out of webhooks), number, date (YYYY-MM-DD), choice (an option's value), checkbox (true or null) or url."},"help_text":{"type":["string","null"]},"position":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Its place in the record type's order (from 0)."},"options":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string","description":"What the record holds; never changes."},"label":{"type":"string"},"retired":{"type":"boolean","description":"Kept on records that have it; can't be set anew."}},"required":["value","label","retired"],"additionalProperties":false},"description":"A choice field's options; empty for other types."},"remind_days_before":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"A date field that reminds the record's owner this many days before (1–365); null when off."}},"required":["object","key","label","type","help_text","position","options","remind_days_before"],"additionalProperties":false},"Pipeline":{"type":"object","properties":{"stages":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["lead","qualified","proposal","negotiation"]},"label":{"type":"string"}},"required":["id","label"],"additionalProperties":false},"description":"In pipeline order."},"statuses":{"type":"array","items":{"type":"string","enum":["open","won","lost"]}},"lost_reasons":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["price","timing","competitor","no_decision","other"]},"label":{"type":"string"}},"required":["id","label"],"additionalProperties":false}}},"required":["stages","statuses","lost_reasons"],"additionalProperties":false},"Contact":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"The record's ID."},"first_name":{"type":"string"},"last_name":{"type":"string"},"email":{"description":"Stored lowercase. Unique among the workspace's contacts.","type":["string","null"]},"phone":{"type":["string","null"]},"address":{"description":"A home or service address (free text).","type":["string","null"]},"title":{"description":"Job title.","type":["string","null"]},"lead_status":{"type":"string","enum":["new","contacted","qualified","unqualified"]},"source":{"anyOf":[{"type":"string","enum":["inbound","referral","outbound","event","import","other"]},{"type":"null"}]},"do_not_track":{"type":"boolean","description":"Email to this contact is sent without open tracking."},"company_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}],"description":"Their company; null when none, or when it's deleted."},"owner_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Who owns the contact: a member's ID (see GET /members)."},"tags":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},"description":"Up to 50 tags, oldest first."},"custom_fields":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["string","number","boolean","null"]},"description":"Every active custom field by key (GET /custom-fields); null when empty. A choice gives its option's value, a checkbox true, a date YYYY-MM-DD."},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","description":"When it was created (ISO 8601, UTC)."},"updated_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","description":"When it last changed (ISO 8601, UTC)."}},"required":["id","first_name","last_name","email","phone","address","title","lead_status","source","do_not_track","company_id","owner_id","tags","custom_fields","created_at","updated_at"],"additionalProperties":false},"Deleted":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"deleted":{"type":"boolean","const":true}},"required":["id","deleted"],"additionalProperties":false},"Company":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"The record's ID."},"name":{"type":"string"},"domain":{"description":"Email domain, e.g. acme.com. Unique among the workspace's companies.","type":["string","null"]},"website_url":{"type":["string","null"]},"description":{"type":["string","null"]},"industry":{"type":["string","null"]},"phone":{"type":["string","null"]},"address":{"type":["string","null"]},"notes":{"type":["string","null"]},"owner_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Who owns the company: a member's ID (see GET /members)."},"custom_fields":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["string","number","boolean","null"]},"description":"Every active custom field by key (GET /custom-fields); null when empty. A choice gives its option's value, a checkbox true, a date YYYY-MM-DD."},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","description":"When it was created (ISO 8601, UTC)."},"updated_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","description":"When it last changed (ISO 8601, UTC)."}},"required":["id","name","domain","website_url","description","industry","phone","address","notes","owner_id","custom_fields","created_at","updated_at"],"additionalProperties":false},"Deal":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"The record's ID."},"name":{"type":"string"},"value_cents":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Value in US cents (integer)."},"stage":{"type":"string","enum":["lead","qualified","proposal","negotiation"],"description":"Pipeline stage (see GET /pipeline). A closed deal keeps its last stage."},"status":{"type":"string","enum":["open","won","lost"]},"lost_reason":{"anyOf":[{"type":"string","enum":["price","timing","competitor","no_decision","other"]},{"type":"null"}]},"lost_reason_note":{"type":["string","null"]},"expected_close_date":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},{"type":"null"}],"description":"A calendar date, YYYY-MM-DD."},"closed_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]},"company_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"contact_ids":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"description":"Its live contacts (up to 20)."},"owner_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Who owns the deal: a member's ID (see GET /members)."},"custom_fields":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["string","number","boolean","null"]},"description":"Every active custom field by key (GET /custom-fields); null when empty. A choice gives its option's value, a checkbox true, a date YYYY-MM-DD."},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","description":"When it was created (ISO 8601, UTC)."},"updated_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","description":"When it last changed (ISO 8601, UTC)."}},"required":["id","name","value_cents","stage","status","lost_reason","lost_reason_note","expected_close_date","closed_at","company_id","contact_ids","owner_id","custom_fields","created_at","updated_at"],"additionalProperties":false},"Task":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"The record's ID."},"title":{"type":"string"},"due_date":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},{"type":"null"}],"description":"A calendar date, YYYY-MM-DD."},"priority":{"type":"string","enum":["low","normal","high"]},"completed":{"type":"boolean"},"completed_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]},"assignee_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Who it's for: a member's ID (see GET /members)."},"record_type":{"anyOf":[{"type":"string","enum":["contact","company","deal"]},{"type":"null"}],"description":"The contact, company or deal it's about, if any."},"record_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","description":"When it was created (ISO 8601, UTC)."},"updated_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","description":"When it last changed (ISO 8601, UTC)."}},"required":["id","title","due_date","priority","completed","completed_at","assignee_id","record_type","record_id","created_at","updated_at"],"additionalProperties":false},"Activity":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"The record's ID."},"type":{"type":"string","enum":["note","call","meeting"],"description":"A note, a call or a meeting."},"record_type":{"type":"string","enum":["contact","company","deal"],"description":"The contact, company or deal whose timeline it's on."},"record_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"title":{"description":"Its optional title (the app's “subject”).","type":["string","null"]},"body":{"type":"string"},"occurred_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","description":"When it happened; a meeting's start (ISO 8601, UTC)."},"duration_minutes":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"A meeting's length in minutes; null otherwise."},"author_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Who logged it: a member's ID (see GET /members)."},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","description":"When it was created (ISO 8601, UTC)."},"updated_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","description":"When it last changed (ISO 8601, UTC)."}},"required":["id","type","record_type","record_id","title","body","occurred_at","duration_minutes","author_id","created_at","updated_at"],"additionalProperties":false},"WebhookEndpoint":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"The record's ID."},"url":{"type":"string","description":"Where events are POSTed: HTTPS, port 443, a public host name."},"description":{"type":"string","description":"Up to 200 characters; may be empty."},"events":{"type":"array","items":{"type":"string","enum":["contact.created","contact.updated","contact.deleted","company.created","company.updated","company.deleted","deal.created","deal.updated","deal.stage_changed","deal.won","deal.lost","deal.deleted","task.created","task.updated","task.completed","task.deleted","activity.created","floor_plan.created","floor_plan.updated","floor_plan.deleted","load.created","load.updated","load.status_changed","load.delivered","load.deleted","invoice.sent","invoice.voided","invoice.paid","payment.recorded","payment.voided"]},"description":"The events it receives."},"status":{"type":"string","enum":["active","disabled"],"description":"`disabled`: no deliveries are sent (turned off by an owner or admin, or by Fifi after 24 hours of failed deliveries)."},"disabled_reason":{"anyOf":[{"type":"string","enum":["failing","manual","creator_removed","key_revoked"]},{"type":"null"}],"description":"Why it's disabled: `failing` (every delivery failed for 24 hours), `manual`, `creator_removed` (the member who added it left or is no longer an owner or admin) or `key_revoked` (the API key that added it was revoked or expired). The last two can't be turned back on."},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","description":"When it was created (ISO 8601, UTC)."},"updated_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","description":"When it last changed (ISO 8601, UTC)."}},"required":["id","url","description","events","status","disabled_reason","created_at","updated_at"],"additionalProperties":false},"WebhookEndpointCreated":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"The record's ID."},"url":{"type":"string","description":"Where events are POSTed: HTTPS, port 443, a public host name."},"description":{"type":"string","description":"Up to 200 characters; may be empty."},"events":{"type":"array","items":{"type":"string","enum":["contact.created","contact.updated","contact.deleted","company.created","company.updated","company.deleted","deal.created","deal.updated","deal.stage_changed","deal.won","deal.lost","deal.deleted","task.created","task.updated","task.completed","task.deleted","activity.created","floor_plan.created","floor_plan.updated","floor_plan.deleted","load.created","load.updated","load.status_changed","load.delivered","load.deleted","invoice.sent","invoice.voided","invoice.paid","payment.recorded","payment.voided"]},"description":"The events it receives."},"status":{"type":"string","enum":["active","disabled"],"description":"`disabled`: no deliveries are sent (turned off by an owner or admin, or by Fifi after 24 hours of failed deliveries)."},"disabled_reason":{"anyOf":[{"type":"string","enum":["failing","manual","creator_removed","key_revoked"]},{"type":"null"}],"description":"Why it's disabled: `failing` (every delivery failed for 24 hours), `manual`, `creator_removed` (the member who added it left or is no longer an owner or admin) or `key_revoked` (the API key that added it was revoked or expired). The last two can't be turned back on."},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","description":"When it was created (ISO 8601, UTC)."},"updated_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","description":"When it last changed (ISO 8601, UTC)."},"secret":{"description":"The signing secret, `whsec_…`, shown only in this response: store it to verify `Fifi-Signature`. A replay of the request (the same `Idempotency-Key`) answers `null`: Fifi doesn't keep the secret where it could be shown again. If the first response was lost, roll the secret in Settings → API.","type":["string","null"]}},"required":["id","url","description","events","status","disabled_reason","created_at","updated_at","secret"],"additionalProperties":false},"FloorPlan":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"The record's ID."},"name":{"type":"string","description":"1–60 characters, unique among the workspace's live plans in any case."},"columns":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Grid width in cells (4–120)."},"rows":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Grid height in cells (4–120)."},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Starts at 1 and goes up by one each time its layout or grid is saved, a kennel or seat leaves it, or it's deleted."},"has_background":{"type":"boolean","description":"Whether it has a background image (the image itself isn't available through the API)."},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","description":"When it was created (ISO 8601, UTC)."},"updated_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","description":"When it last changed (ISO 8601, UTC)."}},"required":["id","name","columns","rows","version","has_background","created_at","updated_at"],"additionalProperties":false},"FloorPlanDetail":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"The record's ID."},"name":{"type":"string","description":"1–60 characters, unique among the workspace's live plans in any case."},"columns":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Grid width in cells (4–120)."},"rows":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Grid height in cells (4–120)."},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Starts at 1 and goes up by one each time its layout or grid is saved, a kennel or seat leaves it, or it's deleted."},"has_background":{"type":"boolean","description":"Whether it has a background image (the image itself isn't available through the API)."},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","description":"When it was created (ISO 8601, UTC)."},"updated_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","description":"When it last changed (ISO 8601, UTC)."},"shapes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"The record's ID."},"kind":{"type":"string","enum":["wall","door","area","table","label"],"description":"A non-bookable shape: a wall, door, area, table or label."},"label":{"type":"string","description":"An area's or label's text, a table's optional name; empty for none."},"x":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Left edge of its footprint, in quarter cells (4 to a grid cell)."},"y":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Top edge of its footprint, in quarter cells (4 to a grid cell)."},"w":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Width before rotation, in quarter cells (4 to a grid cell)."},"h":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Height before rotation, in quarter cells (4 to a grid cell)."},"rotation":{"anyOf":[{"type":"number","const":0},{"type":"number","const":90},{"type":"number","const":180},{"type":"number","const":270}],"description":"Degrees clockwise."}},"required":["id","kind","label","x","y","w","h","rotation"],"additionalProperties":false},"description":"Up to 500, oldest first."},"pods":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["kennel","seat"],"description":"`kennel`: a boarding place (see Boarding in the app). `seat`: an appointment seat (see GET /seats)."},"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"The kennel's or seat's ID."},"name":{"type":"string"},"x":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Left edge of its footprint, in quarter cells (4 to a grid cell)."},"y":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Top edge of its footprint, in quarter cells (4 to a grid cell)."},"w":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Width before rotation, in quarter cells (4 to a grid cell)."},"h":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Height before rotation, in quarter cells (4 to a grid cell)."},"rotation":{"anyOf":[{"type":"number","const":0},{"type":"number","const":90},{"type":"number","const":180},{"type":"number","const":270}],"description":"Degrees clockwise."}},"required":["kind","id","name","x","y","w","h","rotation"],"additionalProperties":false},"description":"The kennels placed on it (only while Boarding is on), then its seats (only while Online booking is on), each in their order."}},"required":["id","name","columns","rows","version","has_background","created_at","updated_at","shapes","pods"],"additionalProperties":false},"Seat":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"The record's ID."},"name":{"type":"string","description":"1–60 characters, unique among the workspace's live seats in any case."},"kind":{"type":"string","description":"What it is: Table, Tub, Chair, Dryer, Station or the workspace's own word (1–30 characters)."},"active":{"type":"boolean","description":"false: switched off (it takes no new bookings; the ones it has keep it)."},"order":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Its place in the workspace's seat list (ascending)."},"floor_plan_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}],"description":"The live floor plan it's placed on; null when unplaced."},"x":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Left edge of its footprint, in quarter cells; null when it isn't on a plan."},"y":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Top edge of its footprint, in quarter cells; null when it isn't on a plan."},"w":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Width before rotation, in quarter cells; null when it isn't on a plan."},"h":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Height before rotation, in quarter cells; null when it isn't on a plan."},"rotation":{"anyOf":[{"type":"number","const":0},{"type":"number","const":90},{"type":"number","const":180},{"type":"number","const":270},{"type":"null"}],"description":"Degrees clockwise; null when it isn't on a plan."}},"required":["id","name","kind","active","order","floor_plan_id","x","y","w","h","rotation"],"additionalProperties":false},"ServiceRecord":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"The record's ID."},"status":{"type":"string","enum":["draft","completed","voided"],"description":"`draft` (being written), `completed` (kept at least 3 years) or `voided` (kept, with a reason)."},"booking_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}],"description":"The visit (booking) it records, or null: written for a customer, or the visit's contact was purged."},"contact_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}],"description":"The customer (see GET /contacts/{id}), or null once the contact is in the trash or purged."},"technician_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"The technician: a member's ID (see GET /members)."},"service_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","description":"When the service was done (ISO 8601, UTC)."},"service_name":{"type":"string","description":"The service (1–120 characters)."},"customer_name":{"type":"string","description":"The customer's name as written on the record."},"service_address":{"type":"string","description":"The service address as written on the record (empty if none)."},"technician_name":{"type":"string","description":"The technician's name, written on the record when it was completed (empty for a draft)."},"licence_number":{"description":"The technician's applicator licence in force when the record was completed (null for a draft, or none on file).","type":["string","null"]},"conditions":{"description":"Conditions, like weather and wind (up to 200 characters), or null.","type":["string","null"]},"notes":{"description":"Notes (up to 5,000 characters), or null.","type":["string","null"]},"completed_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}],"description":"When it was completed (null for a draft)."},"voided_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}],"description":"When it was voided, or null."},"void_reason":{"description":"Why it was voided, or null.","type":["string","null"]},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","description":"When it was created (ISO 8601, UTC)."},"updated_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","description":"When it last changed (ISO 8601, UTC)."},"applications":{"type":"array","items":{"type":"object","properties":{"product_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}],"description":"The product picked from the workspace's list (see GET /service-products), or null for a one-off."},"product_name":{"type":"string","description":"The product's name as written on the record (1–120 characters)."},"epa_reg_no":{"description":"The EPA Registration Number as printed on the label (like `279-3206`), or null (unregistered items like glue boards).","type":["string","null"]},"amount":{"type":"number","description":"How much was applied, in `unit`: more than 0, up to 1,000,000, with up to 3 decimals."},"unit":{"type":"string","enum":["fl_oz","oz","lb","g","kg","ml","l","gal","qt","pt","each"],"description":"`fl_oz`, `oz` (weight), `lb`, `g`, `kg`, `ml`, `l`, `gal`, `qt`, `pt` or `each`."},"target_pests":{"type":"string","description":"Target pests (1–200 characters)."},"areas":{"type":"string","description":"Areas treated (1–500 characters)."},"method":{"type":"string","description":"Application method, like Spray, Crack and crevice or Bait (1–60 characters)."},"rate":{"description":"Mix rate, as written (up to 100 characters), or null.","type":["string","null"]}},"required":["product_id","product_name","epa_reg_no","amount","unit","target_pests","areas","method","rate"],"additionalProperties":false},"description":"The products applied, in order (up to 30)."}},"required":["id","status","booking_id","contact_id","technician_id","service_at","service_name","customer_name","service_address","technician_name","licence_number","conditions","notes","completed_at","voided_at","void_reason","created_at","updated_at","applications"],"additionalProperties":false},"ServiceProduct":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"The record's ID."},"name":{"type":"string","description":"1–120 characters, unique among the workspace's live products in any case."},"epa_reg_no":{"description":"The EPA Registration Number, or null.","type":["string","null"]},"active_ingredient":{"description":"The active ingredient, or null.","type":["string","null"]},"default_unit":{"anyOf":[{"type":"string","enum":["fl_oz","oz","lb","g","kg","ml","l","gal","qt","pt","each"]},{"type":"null"}],"description":"The unit an application of it starts with, or null."},"default_method":{"description":"The method an application of it starts with, or null.","type":["string","null"]},"archived":{"type":"boolean","description":"true: archived (no longer offered when writing records; records keep their copy)."},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","description":"When it was created (ISO 8601, UTC)."},"updated_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","description":"When it last changed (ISO 8601, UTC)."}},"required":["id","name","epa_reg_no","active_ingredient","default_unit","default_method","archived","created_at","updated_at"],"additionalProperties":false},"Load":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"The record's ID."},"number":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"The load's number in the workspace (from 1001 unless typed; never changes)."},"status":{"type":"string","enum":["open","covered","dispatched","in_transit","delivered","cancelled"],"description":"`open` (needs a carrier), `covered`, `dispatched`, `in_transit`, `delivered` or `cancelled`."},"owner_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"The member who owns it (see GET /members)."},"shipper_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"The shipper (a company; see GET /companies/{id}). It may be in the trash."},"shipper_contact_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}],"description":"The shipper's contact, or null (none, or in the trash)."},"deal_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}],"description":"The lane (a deal of the shipper), or null (none, or in the trash)."},"carrier_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}],"description":"The carrier (a company), or null while it's open."},"driver_contact_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}],"description":"The driver (a contact), or null (none, or in the trash)."},"truck_number":{"description":"The truck's number, or null.","type":["string","null"]},"trailer_number":{"description":"The trailer's number, or null.","type":["string","null"]},"equipment":{"type":"string","enum":["dry_van","reefer","flatbed","step_deck","conestoga","power_only","box_truck","hotshot","tanker","container","other"],"description":"`dry_van`, `reefer`, `flatbed`, `step_deck`, `conestoga`, `power_only`, `box_truck`, `hotshot`, `tanker`, `container` or `other`."},"temp_min_f":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"A reefer's lowest temperature in °F (−40 to 100), or null."},"temp_max_f":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"A reefer's highest temperature in °F, or null."},"weight_lb":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Weight in pounds, or null."},"pieces":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Pieces (pallets, cases), or null."},"commodity":{"description":"What's hauled, or null.","type":["string","null"]},"hazmat":{"type":"boolean","description":"true: hazardous materials."},"reference":{"description":"The shipper's reference (PO, order or BOL number), or null.","type":["string","null"]},"rate_cents":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"The customer rate, all in, in cents (`145000` is $1,450.00)."},"carrier_pay_cents":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"What the carrier is paid, all in, in cents; null until it's covered."},"margin_cents":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"`rate_cents` less `carrier_pay_cents` (negative is a loss); null without carrier pay."},"pickup_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","description":"The first pickup's window start (ISO 8601, UTC)."},"delivery_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","description":"The last delivery's window end, or start (ISO 8601, UTC)."},"origin":{"type":"string","description":"The first pickup's locality."},"destination":{"type":"string","description":"The last delivery's locality."},"delivered_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}],"description":"When it was delivered, or null."},"cancelled_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}],"description":"When it was cancelled, or null."},"cancel_reason":{"description":"Why it was cancelled, or null.","type":["string","null"]},"notes":{"description":"Notes (up to 5,000 characters), or null.","type":["string","null"]},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","description":"When it was created (ISO 8601, UTC)."},"updated_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","description":"When it last changed (ISO 8601, UTC)."},"stops":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"The record's ID."},"position":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Its place on the load, from 0 (the first pickup)."},"kind":{"type":"string","enum":["pickup","delivery"],"description":"`pickup` or `delivery`. The first stop is a pickup and the last a delivery."},"facility":{"description":"The facility's name (up to 120 characters), or null.","type":["string","null"]},"address":{"type":"string","description":"The full address (up to 500 characters)."},"locality":{"type":"string","description":"City and state, like `Joliet, IL`."},"timezone":{"type":"string","description":"The stop's own IANA time zone, like `America/Chicago`: its window is shown in it."},"window_start":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","description":"When its window opens (ISO 8601, UTC)."},"window_end":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}],"description":"When its window closes (at most 7 days after it opens), or null for an appointment time."},"appointment_ref":{"description":"The facility's appointment number, or null.","type":["string","null"]},"booking_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}],"description":"The dock appointment at the workspace's own dock (a booking at a door), or null."},"arrived_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}],"description":"When the truck arrived, or null."},"departed_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}],"description":"When the truck left, or null."},"notes":{"description":"Notes (up to 1,000 characters), or null.","type":["string","null"]}},"required":["id","position","kind","facility","address","locality","timezone","window_start","window_end","appointment_ref","booking_id","arrived_at","departed_at","notes"],"additionalProperties":false},"description":"Its stops in order (2 to 20)."},"documents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"The record's ID."},"kind":{"type":"string","enum":["pod","rate_confirmation","bol","other"],"description":"`pod` (proof of delivery), `rate_confirmation`, `bol` (bill of lading) or `other`."},"stop_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}],"description":"The delivery stop a proof of delivery is for, or null."},"content_type":{"type":"string","enum":["application/pdf","image/jpeg","image/png","image/webp"],"description":"`application/pdf`, `image/jpeg`, `image/png` or `image/webp` (decided by the file's bytes)."},"byte_size":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Its size in bytes (at most 10 MB)."},"name":{"description":"The file's name as uploaded (up to 200 characters), or null.","type":["string","null"]},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","description":"When it was uploaded (ISO 8601, UTC)."}},"required":["id","kind","stop_id","content_type","byte_size","name","created_at"],"additionalProperties":false},"description":"Its documents, oldest first (up to 30), as metadata: download them from the load's page in Fifi."}},"required":["id","number","status","owner_id","shipper_id","shipper_contact_id","deal_id","carrier_id","driver_contact_id","truck_number","trailer_number","equipment","temp_min_f","temp_max_f","weight_lb","pieces","commodity","hazmat","reference","rate_cents","carrier_pay_cents","margin_cents","pickup_at","delivery_at","origin","destination","delivered_at","cancelled_at","cancel_reason","notes","created_at","updated_at","stops","documents"],"additionalProperties":false},"Invoice":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"The record's ID."},"number":{"description":"The invoice number (the workspace's prefix and sequence, like `INV-1042`), assigned when it's issued; null for a draft. Never reused.","type":["string","null"]},"status":{"type":"string","enum":["draft","sent","partially_paid","paid","void"],"description":"`draft`, `sent` (issued), `partially_paid`, `paid` or `void`."},"overdue":{"type":"boolean","description":"true while it's sent or partially paid and its due date has passed (worked out, never stored)."},"contact_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}],"description":"The contact it's billed to (see GET /contacts/{id}), or null."},"company_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}],"description":"The company it's billed to (see GET /companies/{id}), or null."},"bill_to_name":{"type":"string","description":"The name it's billed to, as written on the invoice."},"bill_to_email":{"description":"The email it goes to (a contact's), or null.","type":["string","null"]},"bill_to_address":{"description":"The billing address as written on the invoice, or null.","type":["string","null"]},"customer_reference":{"description":"The customer's PO or reference, or null.","type":["string","null"]},"issue_date":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},{"type":"null"}],"description":"The issue date (YYYY-MM-DD), or null for a draft."},"due_date":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},{"type":"null"}],"description":"The due date (YYYY-MM-DD), or null for a draft (unless its terms are custom)."},"terms":{"type":"string","enum":["due_on_receipt","net_7","net_15","net_30","net_45","net_60","custom"],"description":"`due_on_receipt`, `net_7`, `net_15`, `net_30`, `net_45`, `net_60` or `custom`."},"currency":{"type":"string","const":"USD","description":"Always `USD`."},"subtotal_cents":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"The sum of the lines. In cents (USD)."},"tax_label":{"type":"string","description":"The tax's name on the invoice, like \"Sales tax\"."},"tax_rate":{"type":"number","description":"The sales tax rate in percent, with up to 3 decimals (7.25 is 7.25%)."},"tax_cents":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"The tax: the taxable lines' sum × the rate, rounded half away from zero, once per invoice. In cents (USD)."},"total_cents":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"subtotal_cents + tax_cents. In cents (USD)."},"paid_cents":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"What's been paid so far (payments less refunds). In cents (USD)."},"balance_cents":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"total_cents − paid_cents; 0 for a void invoice (it owes nothing). In cents (USD)."},"notes":{"description":"Notes shown on the invoice, or null.","type":["string","null"]},"issued_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}],"description":"When it was issued (sent or marked as sent), or null."},"paid_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}],"description":"When it was paid in full, or null."},"voided_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}],"description":"When it was voided, or null."},"void_reason":{"description":"Why it was voided, or null.","type":["string","null"]},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","description":"When it was created (ISO 8601, UTC)."},"updated_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","description":"When it last changed (ISO 8601, UTC)."},"lines":{"description":"Its lines in order (1 to 100); only on GET /invoices/{id}.","type":"array","items":{"type":"object","properties":{"position":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Its place on the invoice (0 is the first)."},"description":{"type":"string","description":"What it bills (1–1,000 characters; may have line breaks)."},"quantity":{"type":"number","description":"How many: more than 0, up to 1,000,000, with up to 3 decimals."},"unit_price_cents":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"The price of one (negative for a discount line). In cents (USD)."},"line_total_cents":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"quantity × unit price, rounded half away from zero to the cent. In cents (USD)."},"taxable":{"type":"boolean","description":"Whether the invoice's sales tax applies to it."},"source_type":{"anyOf":[{"type":"string","enum":["booking","stay","service_record","deal","load"]},{"type":"null"}],"description":"The record it bills, if any: `booking` (a visit), `stay`, `service_record`, `deal` or `load`."},"source_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}],"description":"That record's ID (it may since be deleted), or null."}},"required":["position","description","quantity","unit_price_cents","line_total_cents","taxable","source_type","source_id"],"additionalProperties":false}},"payments":{"description":"Its payments and refunds, newest received first (voided ones too, with `voided_at`), up to 200; only on GET /invoices/{id}. Also GET /payments.","type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"The record's ID."},"invoice_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"The invoice it was received for (see GET /invoices/{id})."},"kind":{"type":"string","enum":["payment","refund"],"description":"`payment` (money received) or `refund` (money given back)."},"amount_cents":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Always positive. In cents (USD)."},"received_on":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$","description":"The day it was received or given back (YYYY-MM-DD)."},"method":{"type":"string","enum":["cash","check","bank_transfer","card","other","online"],"description":"`cash`, `check`, `bank_transfer`, `card` (taken outside Fifi) or `other`, or (v0.59.0) `online`: recorded by Fifi from Stripe when a customer paid the invoice online, a refund made in Stripe, or funds a dispute withdrew."},"reference":{"description":"A check number or transaction ID, or null. Never a card number.","type":["string","null"]},"notes":{"description":"Notes about it, or null.","type":["string","null"]},"voided_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}],"description":"When it was voided (entered in error), or null. A voided payment counts for nothing."},"void_reason":{"description":"Why it was voided, or null.","type":["string","null"]},"processor":{"anyOf":[{"type":"string","enum":["stripe","quickbooks"]},{"type":"null"}],"description":"`stripe` for a payment recorded from Stripe (method `online`), `quickbooks` for a payment recorded in QuickBooks Online and brought into Fifi (a manual method; its `processor_payment_id` is Fifi's own `qb_…` id for that payment on that invoice), else null. Added in v0.59.0; `quickbooks` in v0.60.0."},"processor_payment_id":{"description":"Stripe's id for it: `pi_…` (a payment), `re_…` (a refund) or `du_…` (funds a dispute withdrew, recorded as a refund); for a payment from QuickBooks, `qb_<realm>_<payment>_<invoice>_<version>`; else null.","type":["string","null"]},"fee_cents":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Always positive. In cents (USD)."},{"type":"null"}],"description":"Stripe's fee on an online payment (a dispute fee on a chargeback), in cents, else null."},"dispute_status":{"description":"The dispute on an online payment: `needs_response`, `under_review`, `won`, `lost` or an inquiry (`warning_…`), else null.","type":["string","null"]},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","description":"When it was created (ISO 8601, UTC)."},"updated_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","description":"When it last changed (ISO 8601, UTC)."}},"required":["id","invoice_id","kind","amount_cents","received_on","method","reference","notes","voided_at","void_reason","processor","processor_payment_id","fee_cents","dispute_status","created_at","updated_at"],"additionalProperties":false}}},"required":["id","number","status","overdue","contact_id","company_id","bill_to_name","bill_to_email","bill_to_address","customer_reference","issue_date","due_date","terms","currency","subtotal_cents","tax_label","tax_rate","tax_cents","total_cents","paid_cents","balance_cents","notes","issued_at","paid_at","voided_at","void_reason","created_at","updated_at"],"additionalProperties":false},"Payment":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"The record's ID."},"invoice_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"The invoice it was received for (see GET /invoices/{id})."},"kind":{"type":"string","enum":["payment","refund"],"description":"`payment` (money received) or `refund` (money given back)."},"amount_cents":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Always positive. In cents (USD)."},"received_on":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$","description":"The day it was received or given back (YYYY-MM-DD)."},"method":{"type":"string","enum":["cash","check","bank_transfer","card","other","online"],"description":"`cash`, `check`, `bank_transfer`, `card` (taken outside Fifi) or `other`, or (v0.59.0) `online`: recorded by Fifi from Stripe when a customer paid the invoice online, a refund made in Stripe, or funds a dispute withdrew."},"reference":{"description":"A check number or transaction ID, or null. Never a card number.","type":["string","null"]},"notes":{"description":"Notes about it, or null.","type":["string","null"]},"voided_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}],"description":"When it was voided (entered in error), or null. A voided payment counts for nothing."},"void_reason":{"description":"Why it was voided, or null.","type":["string","null"]},"processor":{"anyOf":[{"type":"string","enum":["stripe","quickbooks"]},{"type":"null"}],"description":"`stripe` for a payment recorded from Stripe (method `online`), `quickbooks` for a payment recorded in QuickBooks Online and brought into Fifi (a manual method; its `processor_payment_id` is Fifi's own `qb_…` id for that payment on that invoice), else null. Added in v0.59.0; `quickbooks` in v0.60.0."},"processor_payment_id":{"description":"Stripe's id for it: `pi_…` (a payment), `re_…` (a refund) or `du_…` (funds a dispute withdrew, recorded as a refund); for a payment from QuickBooks, `qb_<realm>_<payment>_<invoice>_<version>`; else null.","type":["string","null"]},"fee_cents":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Always positive. In cents (USD)."},{"type":"null"}],"description":"Stripe's fee on an online payment (a dispute fee on a chargeback), in cents, else null."},"dispute_status":{"description":"The dispute on an online payment: `needs_response`, `under_review`, `won`, `lost` or an inquiry (`warning_…`), else null.","type":["string","null"]},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","description":"When it was created (ISO 8601, UTC)."},"updated_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","description":"When it last changed (ISO 8601, UTC)."}},"required":["id","invoice_id","kind","amount_cents","received_on","method","reference","notes","voided_at","void_reason","processor","processor_payment_id","fee_cents","dispute_status","created_at","updated_at"],"additionalProperties":false}},"headers":{"X-Request-Id":{"description":"This request's ID; quote it when asking for help.","schema":{"type":"string"}},"RateLimit-Remaining":{"description":"Requests left in this minute's window.","schema":{"type":"integer"}}},"responses":{"E400":{"description":"Invalid input: `details.fields` says which fields and why.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"E401":{"description":"Missing, malformed, unknown, revoked or expired key, or its creator is no longer an owner or admin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"E403":{"description":"The key lacks the scope for this endpoint, its creator isn't allowed to do this to this record, or the module the endpoint belongs to is turned off (`module_disabled`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"E404":{"description":"Not found, including records in other workspaces and deleted ones.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"E405":{"description":"This path doesn't take that method; `Allow` lists the ones it does.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"E409":{"description":"Conflict: a contact email or company domain already in use, or the record changed meanwhile.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"E411":{"description":"A body sent without `Content-Length` (chunked bodies are refused).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"E413":{"description":"Request body over 256 KB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"E415":{"description":"The body isn't `application/json`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"E422":{"description":"A rule refused it (for example, changing a closed deal's stage), or the Idempotency-Key was reused with a different body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"E429":{"description":"Rate limited: wait `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"E503":{"description":"The API isn't available on this server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}