{"openapi":"3.2.1","$self":"https://api-crm.rootdigit.com/api/v1/openapi.json","info":{"title":"Root Digit CRM API","version":"1.0.0","summary":"A REST API over every record in a Root Digit CRM workspace.","description":"A REST API over every record in a Root Digit CRM workspace: the same endpoints for each kind of record — contacts, companies, deals, invoices and the rest — plus converting leads, merging duplicates, the recycle bin, CSV export, signed webhooks and an MCP endpoint for AI assistants.\n\n## Authentication\n\nCreate a key under Settings › Developer & API access (an administrator can, on a paid plan; the key is shown once) and send it on every request as `Authorization: Bearer rk_live_…` or `Authorization: ApiKey rk_live_…`. A key acts for the workspace, limited by its scopes: each kind of record has a read scope and a write scope, and every operation names the ones it needs. Keys reach the endpoints in this document and nothing else — any other route answers 403 `api_key_scope`. They do not work during a trial, and a workspace that limits sign-in to its own networks holds keys to the same addresses.\n\n## Records\n\nEvery record has the same envelope — id, name, ownerId, version, timestamps — and its values in `data`. Numbers are numbers and ticks are booleans; everything else is text. A field with nothing in it reads as an empty string; send `null` or `\"\"` to empty one. A field key the object does not have is refused (422 `unknown_field`), so a misspelt key cannot vanish silently. Fields the system keeps, or that the caller may not change, are left alone and listed in `rejectedFields`. Custom fields have keys beginning `custom_`; https://api-crm.rootdigit.com/api/v1/openapi/workspace.json describes a workspace's own fields and modules exactly.\n\n## Lists, search and filters\n\n`limit` (up to 1,000) and `cursor` page through a list: send back `nextCursor` until it is null. `sort=newest` lists the newest first; otherwise the order is fixed but not by date. `q` searches names and values, and any field key used as a query parameter is an exact match.\n\n## Writing safely\n\nBodies are JSON (`application/json`), at most 1 MiB. An `Idempotency-Key` header on a POST makes a retry safe: a repeat within 24 hours returns the first answer with `Idempotent-Replay: true`. Keys are per workspace, so use a fresh one for each request. `If-Match` with a record's `version` refuses an update that would overwrite a newer one (409).\n\n## Errors\n\nFailures are RFC 9457 problem documents (`application/problem+json`) with a stable `code` to branch on; validation failures carry `errors`, one per field.\n\n| Status | Code | Meaning |\n| --- | --- | --- |\n| 400 | `bad_request` | The request was understood but cannot be accepted as sent. |\n| 401 | `unauthorized` | The key is missing, malformed, expired or revoked. |\n| 403 | `forbidden` | Authenticated, but not allowed to do this. |\n| 403 | `api_key_scope` | This endpoint is not part of the API-key surface. |\n| 403 | `module_not_entitled` | The workspace's plan does not include this module. |\n| 404 | `not_found` | No such record, or not visible to this key. |\n| 409 | `conflict` | The change collides with something that already exists. |\n| 422 | `validation` | Field-level validation failed; see the errors array. |\n| 429 | `plan_quota` | The plan's daily API allowance is used up. |\n| 429 | `rate_limited` | Too many requests in a short time. Wait the number of seconds in the Retry-After header, then try again. |\n| 400 | `invalid_json` | The body is not valid JSON. |\n| 401 | `ip_not_allowed` | The workspace takes calls only from its approved networks. |\n| 403 | `over_plan` | The record is older than the newest ones the plan opens. |\n| 409 | `record_settled` | An issued document refuses a change to what it charged. |\n| 409 | `number_taken` | Another document of the kind already carries that number. |\n| 500 | `internal` | Something failed on our side; the problem carries requestId. |\n\n## Limits\n\nEvery answer carries `RateLimit-Limit`, `RateLimit-Remaining` and `RateLimit-Reset` for the calling address (3,000 requests a minute). A key is also held to 600 a minute and CSV exports to 30 a minute per workspace; going over is 429 `rate_limited` with `Retry-After`. The plan's daily allowance counts a key's reads and its writes; while one applies, `X-Plan-Calls-Limit` and `X-Plan-Calls-Remaining` say where it stands, and running out is 429 `plan_quota`.\n\n## Webhooks\n\nAn administrator adds endpoints in Settings; the webhooks in this document are what they receive. Each delivery is a POST of JSON signed in `X-RootDigit-Signature`: check the HMAC-SHA256 of `<t>.<raw body>` with the endpoint's secret, in constant time, and refuse a timestamp more than five minutes old. Deliveries are at least once — deduplicate on the body's `id` — and retried for about thirteen hours.\n\n## This description\n\nGenerated from the constants the server enforces with, so a scope or an endpoint here is one it accepts. Add `?oas=3.1` for the same description as OpenAPI 3.1.2.","contact":{"name":"Root Digit CRM support","email":"support@rootdigit.com","url":"https://crm.rootdigit.com/developers"}},"servers":[{"url":"https://api-crm.rootdigit.com","name":"production","description":"The Root Digit CRM API."}],"tags":[{"name":"Records","kind":"nav","summary":"Records, one section per kind","description":"Each kind of record has the same endpoints at /api/v1/{object}, with its own fields and its own scopes."},{"name":"Contacts","parent":"Records","kind":"nav","summary":"Contacts (/api/v1/contact)","description":"Read with `contacts:read`, change with `contacts:write`.\n\nCounts towards the plan's record allowance: when that is full, a create is refused (400) until records are deleted or the plan grows."},{"name":"Companies","parent":"Records","kind":"nav","summary":"Companies (/api/v1/company)","description":"Read with `companies:read`, change with `companies:write`.\n\nCounts towards the plan's record allowance: when that is full, a create is refused (400) until records are deleted or the plan grows."},{"name":"Leads","parent":"Records","kind":"nav","summary":"Leads (/api/v1/lead)","description":"Read with `leads:read`, change with `leads:write`.\n\nCounts towards the plan's record allowance: when that is full, a create is refused (400) until records are deleted or the plan grows."},{"name":"Deals","parent":"Records","kind":"nav","summary":"Deals (/api/v1/deal)","description":"Read with `deals:read`, change with `deals:write`.\n\nPart of Sales pipeline: listing, creating and bulk updates answer 403 module_not_entitled on a plan without it.\n\nCounts towards the plan's record allowance: when that is full, a create is refused (400) until records are deleted or the plan grows."},{"name":"Tasks","parent":"Records","kind":"nav","summary":"Tasks (/api/v1/task)","description":"Read with `tasks:read`, change with `tasks:write`."},{"name":"Calendar events","parent":"Records","kind":"nav","summary":"Calendar events (/api/v1/event)","description":"Read with `events:read`, change with `events:write`."},{"name":"Campaigns","parent":"Records","kind":"nav","summary":"Campaigns (/api/v1/campaign)","description":"Read with `campaigns:read`, change with `campaigns:write`.\n\nPart of Campaigns: listing, creating and bulk updates answer 403 module_not_entitled on a plan without it."},{"name":"Invoices","parent":"Records","kind":"nav","summary":"Invoices (/api/v1/invoice)","description":"Read with `invoices:read`, change with `invoices:write`.\n\nOnce an invoice has gone out (Pending, Partly paid, Paid or Overdue), a change to what it charged is refused with 409 record_settled — it is corrected with a credit note — and a void invoice refuses every change. Its status may still move, and notes and other descriptive fields stay editable.\n\nIts total and tax are worked out from its line items, which are written in the app — an API key cannot reach them — and come back as lineItems when one record is read.\n\nCounts towards the plan's record allowance: when that is full, a create is refused (400) until records are deleted or the plan grows."},{"name":"Credit notes","parent":"Records","kind":"nav","summary":"Credit notes (/api/v1/creditnote)","description":"Read with `creditnotes:read`, change with `creditnotes:write`.\n\nPart of Credit notes: listing, creating and bulk updates answer 403 module_not_entitled on a plan without it.\n\nOnce a credit note is Issued or Applied, a change to what it credits is refused with 409 record_settled, and a cancelled one refuses every change.\n\nIts total and tax are worked out from its line items, which are written in the app — an API key cannot reach them — and come back as lineItems when one record is read."},{"name":"Recurring invoices","parent":"Records","kind":"nav","summary":"Recurring invoices (/api/v1/recurring)","description":"Read with `recurring:read`, change with `recurring:write`.\n\nPart of Recurring invoices: listing, creating and bulk updates answer 403 module_not_entitled on a plan without it.\n\nWhile a schedule is Active its figures are refused with 409 record_settled — pause it first — and an ended schedule refuses every change.\n\nIts total and tax are worked out from its line items, which are written in the app — an API key cannot reach them — and come back as lineItems when one record is read.\n\nCounts towards the plan's record allowance: when that is full, a create is refused (400) until records are deleted or the plan grows."},{"name":"Products","parent":"Records","kind":"nav","summary":"Products (/api/v1/product)","description":"Read with `products:read`, change with `products:write`."},{"name":"Quotes","parent":"Records","kind":"nav","summary":"Quotes (/api/v1/quote)","description":"Read with `quotes:read`, change with `quotes:write`.\n\nIts total and tax are worked out from its line items, which are written in the app — an API key cannot reach them — and come back as lineItems when one record is read.\n\nCounts towards the plan's record allowance: when that is full, a create is refused (400) until records are deleted or the plan grows."},{"name":"Support cases","parent":"Records","kind":"nav","summary":"Support cases (/api/v1/case)","description":"Read with `cases:read`, change with `cases:write`.\n\nPart of Customer cases: listing, creating and bulk updates answer 403 module_not_entitled on a plan without it."},{"name":"Visits","parent":"Records","kind":"nav","summary":"Visits (/api/v1/visit)","description":"Read with `visits:read`, change with `visits:write`.\n\nPart of Visits: listing, creating and bulk updates answer 403 module_not_entitled on a plan without it."},{"name":"Inventory items","parent":"Records","kind":"nav","summary":"Inventory items (/api/v1/inventory)","description":"Read with `inventories:read`, change with `inventories:write`.\n\nPart of Inventory management: listing, creating and bulk updates answer 403 module_not_entitled on a plan without it."},{"name":"Processes","parent":"Records","kind":"nav","summary":"Processes (/api/v1/process)","description":"Read with `processes:read`, change with `processes:write`.\n\nPart of Process management: listing, creating and bulk updates answer 403 module_not_entitled on a plan without it."},{"name":"Forecasts","parent":"Records","kind":"nav","summary":"Forecasts (/api/v1/forecast)","description":"Read with `forecasts:read`, change with `forecasts:write`.\n\nPart of Sales forecasting: listing, creating and bulk updates answer 403 module_not_entitled on a plan without it.\n\nOnce a forecast is Approved or Locked, its period and figures are refused with 409 record_settled until it is moved back to Draft."},{"name":"Knowledge articles","parent":"Records","kind":"nav","summary":"Knowledge articles (/api/v1/article)","description":"Read with `articles:read`, change with `articles:write`.\n\nPart of Knowledge base: listing, creating and bulk updates answer 403 module_not_entitled on a plan without it."},{"name":"Price books","parent":"Records","kind":"nav","summary":"Price books (/api/v1/pricebook)","description":"Read with `pricebooks:read`, change with `pricebooks:write`.\n\nPart of Price books: listing, creating and bulk updates answer 403 module_not_entitled on a plan without it."},{"name":"Vendors","parent":"Records","kind":"nav","summary":"Vendors (/api/v1/vendor)","description":"Read with `vendors:read`, change with `vendors:write`.\n\nPart of Order management: listing, creating and bulk updates answer 403 module_not_entitled on a plan without it.\n\nCounts towards the plan's record allowance: when that is full, a create is refused (400) until records are deleted or the plan grows."},{"name":"Sales orders","parent":"Records","kind":"nav","summary":"Sales orders (/api/v1/salesorder)","description":"Read with `salesorders:read`, change with `salesorders:write`.\n\nPart of Order management: listing, creating and bulk updates answer 403 module_not_entitled on a plan without it.\n\nIts total and tax are worked out from its line items, which are written in the app — an API key cannot reach them — and come back as lineItems when one record is read.\n\nCounts towards the plan's record allowance: when that is full, a create is refused (400) until records are deleted or the plan grows."},{"name":"Purchase orders","parent":"Records","kind":"nav","summary":"Purchase orders (/api/v1/purchaseorder)","description":"Read with `purchaseorders:read`, change with `purchaseorders:write`.\n\nPart of Order management: listing, creating and bulk updates answer 403 module_not_entitled on a plan without it.\n\nIts total and tax are worked out from its line items, which are written in the app — an API key cannot reach them — and come back as lineItems when one record is read.\n\nCounts towards the plan's record allowance: when that is full, a create is refused (400) until records are deleted or the plan grows."},{"name":"Schema","kind":"nav","summary":"Fields","description":"The fields each object has, standard and custom, as the forms and validation use them."},{"name":"Recycle bin","kind":"nav","summary":"Deleted records","description":"Deleted records stay restorable until the bin is emptied, which an API key cannot do."},{"name":"Duplicates","kind":"nav","summary":"Records held twice","description":"Pairs the workspace's duplicate rules find, ready to merge."},{"name":"Export","kind":"nav","summary":"Taking the data out","description":"Every record of an object as CSV. Free, and as often as you like."},{"name":"AI assistants","kind":"nav","summary":"MCP","description":"The records API in the shape AI assistants speak."},{"name":"OpenAPI","kind":"nav","summary":"This description","description":"This document, and the one made for your workspace."},{"name":"Webhooks","kind":"nav","summary":"What your endpoint receives","description":"Endpoints are added in Settings › Developer & API access by an administrator — not with a key. Deliveries are at least once: deduplicate on id. An endpoint may subscribe to an event, to <object>.*, to *, or to record.created and record.updated for every object's."},{"name":"No key needed","kind":"badge","summary":"Public","description":"Answers without credentials."},{"name":"Module: Sales pipeline","kind":"badge","summary":"Sales pipeline","description":"Needs a plan that includes Sales pipeline."},{"name":"Module: Campaigns","kind":"badge","summary":"Campaigns","description":"Needs a plan that includes Campaigns."},{"name":"Module: Credit notes","kind":"badge","summary":"Credit notes","description":"Needs a plan that includes Credit notes."},{"name":"Module: Recurring invoices","kind":"badge","summary":"Recurring invoices","description":"Needs a plan that includes Recurring invoices."},{"name":"Module: Customer cases","kind":"badge","summary":"Customer cases","description":"Needs a plan that includes Customer cases."},{"name":"Module: Visits","kind":"badge","summary":"Visits","description":"Needs a plan that includes Visits."},{"name":"Module: Inventory management","kind":"badge","summary":"Inventory management","description":"Needs a plan that includes Inventory management."},{"name":"Module: Process management","kind":"badge","summary":"Process management","description":"Needs a plan that includes Process management."},{"name":"Module: Sales forecasting","kind":"badge","summary":"Sales forecasting","description":"Needs a plan that includes Sales forecasting."},{"name":"Module: Knowledge base","kind":"badge","summary":"Knowledge base","description":"Needs a plan that includes Knowledge base."},{"name":"Module: Price books","kind":"badge","summary":"Price books","description":"Needs a plan that includes Price books."},{"name":"Module: Order management","kind":"badge","summary":"Order management","description":"Needs a plan that includes Order management."}],"paths":{"/api/v1/contact":{"get":{"operationId":"listContacts","tags":["Contacts"],"summary":"List contacts","description":"List records. Supports limit, cursor, q, field filters, and sort=newest for newest first.\n\nEvery other query parameter is an exact match on a field, and they combine: `?status=Open&city=Pune`. The fields are listed below; a workspace's custom fields work the same way. ownerId is not a field, so it cannot be filtered on.\n\nA workspace over its plan's record allowance lists only the newest records the plan opens.","parameters":[{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/Cursor"},{"$ref":"#/components/parameters/Search"},{"$ref":"#/components/parameters/Sort"},{"$ref":"#/components/parameters/Deleted"},{"name":"name","in":"query","description":"Only contacts whose Full name is exactly this.","schema":{"type":"string"}},{"name":"salutation","in":"query","description":"Only contacts whose Salutation is exactly this.","schema":{"type":"string"}},{"name":"email","in":"query","description":"Only contacts whose Work email is exactly this.","schema":{"type":"string"}},{"name":"alternateEmail","in":"query","description":"Only contacts whose Alternate email is exactly this.","schema":{"type":"string"}},{"name":"phone","in":"query","description":"Only contacts whose Work phone is exactly this.","schema":{"type":"string"}},{"name":"mobile","in":"query","description":"Only contacts whose Mobile / WhatsApp is exactly this.","schema":{"type":"string"}},{"name":"role","in":"query","description":"Only contacts whose Job title is exactly this.","schema":{"type":"string"}},{"name":"department","in":"query","description":"Only contacts whose Department is exactly this.","schema":{"type":"string"}},{"name":"company","in":"query","description":"Only contacts whose Company / account is exactly this.","schema":{"type":"string"}},{"name":"reportsTo","in":"query","description":"Only contacts whose Reports to is exactly this.","schema":{"type":"string"}},{"name":"status","in":"query","description":"Only contacts whose Lifecycle status is exactly this.","schema":{"type":"string"}},{"name":"owner","in":"query","description":"Only contacts whose Record owner is exactly this.","schema":{"type":"string"}},{"name":"source","in":"query","description":"Only contacts whose Lead source is exactly this.","schema":{"type":"string"}},{"name":"contactRole","in":"query","description":"Only contacts whose Buying role is exactly this.","schema":{"type":"string"}},{"name":"country","in":"query","description":"Only contacts whose Country is exactly this.","schema":{"type":"string"}},{"name":"street","in":"query","description":"Only contacts whose Street address is exactly this.","schema":{"type":"string"}},{"name":"city","in":"query","description":"Only contacts whose City is exactly this.","schema":{"type":"string"}},{"name":"state","in":"query","description":"Only contacts whose State / province is exactly this.","schema":{"type":"string"}},{"name":"postalCode","in":"query","description":"Only contacts whose ZIP / postal code is exactly this.","schema":{"type":"string"}},{"name":"language","in":"query","description":"Only contacts whose Preferred language is exactly this.","schema":{"type":"string"}},{"name":"preferredChannel","in":"query","description":"Only contacts whose Preferred channel is exactly this.","schema":{"type":"string"}},{"name":"linkedin","in":"query","description":"Only contacts whose LinkedIn profile is exactly this.","schema":{"type":"string"}},{"name":"doNotCall","in":"query","description":"Only contacts whose Do not call is exactly this.","schema":{"type":"boolean"}},{"name":"emailOptOut","in":"query","description":"Only contacts whose Email opt-out is exactly this.","schema":{"type":"boolean"}},{"name":"consentDate","in":"query","description":"Only contacts whose Consent recorded on is exactly this.","schema":{"type":"string"}},{"name":"lawfulBasis","in":"query","description":"Only contacts whose Lawful basis is exactly this.","schema":{"type":"string"}},{"name":"consentStatus","in":"query","description":"Only contacts whose Consent status is exactly this.","schema":{"type":"string"}},{"name":"idType","in":"query","description":"Only contacts whose Identity document is exactly this.","schema":{"type":"string"}},{"name":"idNumber","in":"query","description":"Only contacts whose Document number is exactly this.","schema":{"type":"string"}},{"name":"idIssuedBy","in":"query","description":"Only contacts whose Issued by is exactly this.","schema":{"type":"string"}},{"name":"idExpiry","in":"query","description":"Only contacts whose Document expires is exactly this.","schema":{"type":"string"}},{"name":"dateOfBirth","in":"query","description":"Only contacts whose Date of birth is exactly this.","schema":{"type":"string"}},{"name":"kycStatus","in":"query","description":"Only contacts whose Verification status is exactly this.","schema":{"type":"string"}},{"name":"kycVerifiedOn","in":"query","description":"Only contacts whose Verified on is exactly this.","schema":{"type":"string"}},{"name":"kycVerifiedBy","in":"query","description":"Only contacts whose Verified by is exactly this.","schema":{"type":"string"}},{"name":"kycNotes","in":"query","description":"Only contacts whose Verification notes is exactly this.","schema":{"type":"string"}},{"name":"tags","in":"query","description":"Only contacts whose Tags is exactly this.","schema":{"type":"string"}},{"name":"description","in":"query","description":"Only contacts whose Description / notes is exactly this.","schema":{"type":"string"}},{"name":"companyId","in":"query","description":"Only contacts whose Company / account (record id) is exactly this.","schema":{"type":"string"}},{"name":"reportsToId","in":"query","description":"Only contacts whose Reports to (record id) is exactly this.","schema":{"type":"string"}}],"responses":{"200":{"summary":"A page of contacts","description":"The records, with their values masked to what the caller may see, and where to go next.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Plan-Calls-Limit":{"$ref":"#/components/headers/PlanCallsLimit"},"X-Plan-Calls-Remaining":{"$ref":"#/components/headers/PlanCallsRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactPage"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["contacts:read"]},{"apiKeyHeader":["contacts:read"]},{"signIn":["contacts:read"]}]},"post":{"operationId":"createContact","tags":["Contacts"],"summary":"Create a contact","description":"Create a record. Honours Idempotency-Key.\n\nUnknown field keys are refused (422 unknown_field); fields the system keeps are ignored and listed in rejectedFields. Duplicate rules that warn come back as possibleDuplicates; one that blocks answers 409.\n\nCounts towards the plan's record allowance: when that is full, a create is refused (400) until records are deleted or the plan grows.","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactCreate"}}}},"responses":{"201":{"summary":"Created","description":"The new contact, as saved.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Plan-Calls-Limit":{"$ref":"#/components/headers/PlanCallsLimit"},"X-Plan-Calls-Remaining":{"$ref":"#/components/headers/PlanCallsRemaining"},"Idempotent-Replay":{"$ref":"#/components/headers/IdempotentReplay"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactSaved"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["contacts:write"]},{"apiKeyHeader":["contacts:write"]},{"signIn":["contacts:write"]}]}},"/api/v1/contact/{id}":{"get":{"operationId":"getContact","tags":["Contacts"],"summary":"Read a contact","description":"Read one record.\n\nWith its line items, its timeline and the history of its values. A record older than the newest ones the plan opens answers 403 over_plan.","parameters":[{"$ref":"#/components/parameters/RecordId"}],"responses":{"200":{"summary":"The contact","description":"The record and what hangs off it.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Plan-Calls-Limit":{"$ref":"#/components/headers/PlanCallsLimit"},"X-Plan-Calls-Remaining":{"$ref":"#/components/headers/PlanCallsRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactDetail"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["contacts:read"]},{"apiKeyHeader":["contacts:read"]},{"signIn":["contacts:read"]}]},"patch":{"operationId":"updateContact","tags":["Contacts"],"summary":"Change a contact","description":"Update a record. Send only the fields that change.\n\nA record waiting on an approval, or whose subject asked for processing to stop, refuses changes (403).","parameters":[{"$ref":"#/components/parameters/RecordId"},{"$ref":"#/components/parameters/IfMatch"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactUpdate"}}}},"responses":{"200":{"summary":"Changed","description":"The contact, as saved.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Plan-Calls-Limit":{"$ref":"#/components/headers/PlanCallsLimit"},"X-Plan-Calls-Remaining":{"$ref":"#/components/headers/PlanCallsRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactSaved"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["contacts:write"]},{"apiKeyHeader":["contacts:write"]},{"signIn":["contacts:write"]}]},"delete":{"operationId":"deleteContact","tags":["Contacts"],"summary":"Delete a contact","description":"Move a record to the recycle bin.\n\nIt can be restored until the recycle bin is emptied, which an API key cannot do.","parameters":[{"$ref":"#/components/parameters/RecordId"}],"responses":{"204":{"$ref":"#/components/responses/Deleted"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["contacts:write"]},{"apiKeyHeader":["contacts:write"]},{"signIn":["contacts:write"]}]}},"/api/v1/contact/{id}/restore":{"post":{"operationId":"restoreContact","tags":["Contacts"],"summary":"Restore a contact","description":"Restore a record from the recycle bin.","parameters":[{"$ref":"#/components/parameters/RecordId"},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"$ref":"#/components/responses/Restored"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["contacts:write"]},{"apiKeyHeader":["contacts:write"]},{"signIn":["contacts:write"]}]}},"/api/v1/contact/bulk":{"post":{"operationId":"bulkUpdateContacts","tags":["Contacts"],"summary":"Change many contacts","description":"The same change to up to 500 records, each held to the rules of a single update. Records that refuse are listed in failed with the reason; the rest are changed.","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactBulkUpdate"}}}},"responses":{"200":{"$ref":"#/components/responses/BulkUpdated"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["contacts:write"]},{"apiKeyHeader":["contacts:write"]},{"signIn":["contacts:write"]}]}},"/api/v1/contact/merge":{"post":{"operationId":"mergeContacts","tags":["Contacts"],"summary":"Merge two contacts","description":"Merge one record into another, choosing which value survives per field.\n\nIn one transaction: the survivor takes the chosen values, the other's activities, line items, history and files move onto it, records that named the other by name name the survivor, and the other goes to the recycle bin.","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactMerge"}}}},"responses":{"200":{"$ref":"#/components/responses/Merged"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["contacts:write"]},{"apiKeyHeader":["contacts:write"]},{"signIn":["contacts:write"]}]}},"/api/v1/contact/merge-preview":{"get":{"operationId":"previewContactMerge","tags":["Contacts"],"summary":"Compare two contacts before merging","description":"Two records side by side: which fields differ, and what a merge would move.","parameters":[{"$ref":"#/components/parameters/KeepId"},{"$ref":"#/components/parameters/MergeId"}],"responses":{"200":{"$ref":"#/components/responses/MergePreviewed"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["contacts:read"]},{"apiKeyHeader":["contacts:read"]},{"signIn":["contacts:read"]}]}},"/api/v1/company":{"get":{"operationId":"listCompanies","tags":["Companies"],"summary":"List companies","description":"List records. Supports limit, cursor, q, field filters, and sort=newest for newest first.\n\nEvery other query parameter is an exact match on a field, and they combine: `?status=Open&city=Pune`. The fields are listed below; a workspace's custom fields work the same way. ownerId is not a field, so it cannot be filtered on.\n\nA workspace over its plan's record allowance lists only the newest records the plan opens.","parameters":[{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/Cursor"},{"$ref":"#/components/parameters/Search"},{"$ref":"#/components/parameters/Sort"},{"$ref":"#/components/parameters/Deleted"},{"name":"name","in":"query","description":"Only companies whose Company name is exactly this.","schema":{"type":"string"}},{"name":"domain","in":"query","description":"Only companies whose Website / domain is exactly this.","schema":{"type":"string"}},{"name":"email","in":"query","description":"Only companies whose Company email is exactly this.","schema":{"type":"string"}},{"name":"phone","in":"query","description":"Only companies whose Main phone is exactly this.","schema":{"type":"string"}},{"name":"industry","in":"query","description":"Only companies whose Industry is exactly this.","schema":{"type":"string"}},{"name":"size","in":"query","description":"Only companies whose Employee range is exactly this.","schema":{"type":"string"}},{"name":"accountType","in":"query","description":"Only companies whose Account type is exactly this.","schema":{"type":"string"}},{"name":"status","in":"query","description":"Only companies whose Account status is exactly this.","schema":{"type":"string"}},{"name":"owner","in":"query","description":"Only companies whose Record owner is exactly this.","schema":{"type":"string"}},{"name":"parentCompany","in":"query","description":"Only companies whose Parent company is exactly this.","schema":{"type":"string"}},{"name":"primaryContact","in":"query","description":"Only companies whose Primary contact is exactly this.","schema":{"type":"string"}},{"name":"founded","in":"query","description":"Only companies whose Founded year is exactly this.","schema":{"type":"number"}},{"name":"currency","in":"query","description":"Only companies whose Record currency is exactly this.","schema":{"type":"string"}},{"name":"annualRevenue","in":"query","description":"Only companies whose Annual revenue is exactly this.","schema":{"type":"number"}},{"name":"creditLimit","in":"query","description":"Only companies whose Credit limit is exactly this.","schema":{"type":"number"}},{"name":"paymentTerms","in":"query","description":"Only companies whose Payment terms is exactly this.","schema":{"type":"string"}},{"name":"country","in":"query","description":"Only companies whose Country is exactly this.","schema":{"type":"string"}},{"name":"street","in":"query","description":"Only companies whose Billing street is exactly this.","schema":{"type":"string"}},{"name":"city","in":"query","description":"Only companies whose Billing city is exactly this.","schema":{"type":"string"}},{"name":"state","in":"query","description":"Only companies whose Billing state / province is exactly this.","schema":{"type":"string"}},{"name":"postalCode","in":"query","description":"Only companies whose Billing ZIP / postal code is exactly this.","schema":{"type":"string"}},{"name":"shippingstreet","in":"query","description":"Only companies whose Shipping street is exactly this.","schema":{"type":"string"}},{"name":"shippingcity","in":"query","description":"Only companies whose Shipping city is exactly this.","schema":{"type":"string"}},{"name":"shippingstate","in":"query","description":"Only companies whose Shipping state / province is exactly this.","schema":{"type":"string"}},{"name":"shippingpostalCode","in":"query","description":"Only companies whose Shipping ZIP / postal code is exactly this.","schema":{"type":"string"}},{"name":"taxStatus","in":"query","description":"Only companies whose Tax registration status is exactly this.","schema":{"type":"string"}},{"name":"legalName","in":"query","description":"Only companies whose Registered legal name is exactly this.","schema":{"type":"string"}},{"name":"gstin","in":"query","description":"Only companies whose GSTIN is exactly this.","schema":{"type":"string"}},{"name":"pan","in":"query","description":"Only companies whose PAN is exactly this.","schema":{"type":"string"}},{"name":"cin","in":"query","description":"Only companies whose CIN / LLPIN is exactly this.","schema":{"type":"string"}},{"name":"gstType","in":"query","description":"Only companies whose GST registration type is exactly this.","schema":{"type":"string"}},{"name":"gstStateCode","in":"query","description":"Only companies whose GST state code is exactly this.","schema":{"type":"string"}},{"name":"reverseCharge","in":"query","description":"Only companies whose Tax payable on reverse charge is exactly this.","schema":{"type":"string"}},{"name":"placeOfSupply","in":"query","description":"Only companies whose Place of supply is exactly this.","schema":{"type":"string"}},{"name":"trn","in":"query","description":"Only companies whose VAT TRN is exactly this.","schema":{"type":"string"}},{"name":"emirate","in":"query","description":"Only companies whose Emirate is exactly this.","schema":{"type":"string"}},{"name":"vatNumber","in":"query","description":"Only companies whose VAT / tax registration number is exactly this.","schema":{"type":"string"}},{"name":"ein","in":"query","description":"Only companies whose EIN / federal tax ID is exactly this.","schema":{"type":"string"}},{"name":"uen","in":"query","description":"Only companies whose UEN / GST registration is exactly this.","schema":{"type":"string"}},{"name":"abn","in":"query","description":"Only companies whose ABN / GST registration is exactly this.","schema":{"type":"string"}},{"name":"businessNumber","in":"query","description":"Only companies whose Business number / GST-HST is exactly this.","schema":{"type":"string"}},{"name":"taxExempt","in":"query","description":"Only companies whose Tax-exempt customer is exactly this.","schema":{"type":"boolean"}},{"name":"tradeLicense","in":"query","description":"Only companies whose Trade license number is exactly this.","schema":{"type":"string"}},{"name":"tradeLicenseAuthority","in":"query","description":"Only companies whose Licensing authority is exactly this.","schema":{"type":"string"}},{"name":"licenseExpiry","in":"query","description":"Only companies whose Trade license expiry is exactly this.","schema":{"type":"string"}},{"name":"incorporatedOn","in":"query","description":"Only companies whose Incorporated on is exactly this.","schema":{"type":"string"}},{"name":"registeredAddress","in":"query","description":"Only companies whose Registered address is exactly this.","schema":{"type":"string"}},{"name":"beneficialOwner","in":"query","description":"Only companies whose Beneficial owner is exactly this.","schema":{"type":"string"}},{"name":"authorisedPerson","in":"query","description":"Only companies whose Authorised signatory is exactly this.","schema":{"type":"string"}},{"name":"authorisedRole","in":"query","description":"Only companies whose Their role is exactly this.","schema":{"type":"string"}},{"name":"authorisedEmail","in":"query","description":"Only companies whose Their email is exactly this.","schema":{"type":"string"}},{"name":"authorisedIdType","in":"query","description":"Only companies whose Their identity document is exactly this.","schema":{"type":"string"}},{"name":"authorisedIdNumber","in":"query","description":"Only companies whose Their document number is exactly this.","schema":{"type":"string"}},{"name":"authorisedIdExpiry","in":"query","description":"Only companies whose Their document expires is exactly this.","schema":{"type":"string"}},{"name":"kycStatus","in":"query","description":"Only companies whose Verification status is exactly this.","schema":{"type":"string"}},{"name":"kycVerifiedOn","in":"query","description":"Only companies whose Verified on is exactly this.","schema":{"type":"string"}},{"name":"kycVerifiedBy","in":"query","description":"Only companies whose Verified by is exactly this.","schema":{"type":"string"}},{"name":"kycNotes","in":"query","description":"Only companies whose Verification notes is exactly this.","schema":{"type":"string"}},{"name":"tags","in":"query","description":"Only companies whose Tags is exactly this.","schema":{"type":"string"}},{"name":"source","in":"query","description":"Only companies whose Lead source is exactly this.","schema":{"type":"string"}},{"name":"description","in":"query","description":"Only companies whose Description / notes is exactly this.","schema":{"type":"string"}},{"name":"parentCompanyId","in":"query","description":"Only companies whose Parent company (record id) is exactly this.","schema":{"type":"string"}},{"name":"primaryContactId","in":"query","description":"Only companies whose Primary contact (record id) is exactly this.","schema":{"type":"string"}}],"responses":{"200":{"summary":"A page of companies","description":"The records, with their values masked to what the caller may see, and where to go next.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Plan-Calls-Limit":{"$ref":"#/components/headers/PlanCallsLimit"},"X-Plan-Calls-Remaining":{"$ref":"#/components/headers/PlanCallsRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyPage"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["companies:read"]},{"apiKeyHeader":["companies:read"]},{"signIn":["companies:read"]}]},"post":{"operationId":"createCompany","tags":["Companies"],"summary":"Create a company","description":"Create a record. Honours Idempotency-Key.\n\nUnknown field keys are refused (422 unknown_field); fields the system keeps are ignored and listed in rejectedFields. Duplicate rules that warn come back as possibleDuplicates; one that blocks answers 409.\n\nCounts towards the plan's record allowance: when that is full, a create is refused (400) until records are deleted or the plan grows.","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyCreate"}}}},"responses":{"201":{"summary":"Created","description":"The new company, as saved.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Plan-Calls-Limit":{"$ref":"#/components/headers/PlanCallsLimit"},"X-Plan-Calls-Remaining":{"$ref":"#/components/headers/PlanCallsRemaining"},"Idempotent-Replay":{"$ref":"#/components/headers/IdempotentReplay"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanySaved"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["companies:write"]},{"apiKeyHeader":["companies:write"]},{"signIn":["companies:write"]}]}},"/api/v1/company/{id}":{"get":{"operationId":"getCompany","tags":["Companies"],"summary":"Read a company","description":"Read one record.\n\nWith its line items, its timeline and the history of its values. A record older than the newest ones the plan opens answers 403 over_plan.","parameters":[{"$ref":"#/components/parameters/RecordId"}],"responses":{"200":{"summary":"The company","description":"The record and what hangs off it.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Plan-Calls-Limit":{"$ref":"#/components/headers/PlanCallsLimit"},"X-Plan-Calls-Remaining":{"$ref":"#/components/headers/PlanCallsRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyDetail"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["companies:read"]},{"apiKeyHeader":["companies:read"]},{"signIn":["companies:read"]}]},"patch":{"operationId":"updateCompany","tags":["Companies"],"summary":"Change a company","description":"Update a record. Send only the fields that change.\n\nA record waiting on an approval, or whose subject asked for processing to stop, refuses changes (403).","parameters":[{"$ref":"#/components/parameters/RecordId"},{"$ref":"#/components/parameters/IfMatch"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyUpdate"}}}},"responses":{"200":{"summary":"Changed","description":"The company, as saved.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Plan-Calls-Limit":{"$ref":"#/components/headers/PlanCallsLimit"},"X-Plan-Calls-Remaining":{"$ref":"#/components/headers/PlanCallsRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanySaved"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["companies:write"]},{"apiKeyHeader":["companies:write"]},{"signIn":["companies:write"]}]},"delete":{"operationId":"deleteCompany","tags":["Companies"],"summary":"Delete a company","description":"Move a record to the recycle bin.\n\nIt can be restored until the recycle bin is emptied, which an API key cannot do.","parameters":[{"$ref":"#/components/parameters/RecordId"}],"responses":{"204":{"$ref":"#/components/responses/Deleted"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["companies:write"]},{"apiKeyHeader":["companies:write"]},{"signIn":["companies:write"]}]}},"/api/v1/company/{id}/restore":{"post":{"operationId":"restoreCompany","tags":["Companies"],"summary":"Restore a company","description":"Restore a record from the recycle bin.","parameters":[{"$ref":"#/components/parameters/RecordId"},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"$ref":"#/components/responses/Restored"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["companies:write"]},{"apiKeyHeader":["companies:write"]},{"signIn":["companies:write"]}]}},"/api/v1/company/bulk":{"post":{"operationId":"bulkUpdateCompanies","tags":["Companies"],"summary":"Change many companies","description":"The same change to up to 500 records, each held to the rules of a single update. Records that refuse are listed in failed with the reason; the rest are changed.","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyBulkUpdate"}}}},"responses":{"200":{"$ref":"#/components/responses/BulkUpdated"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["companies:write"]},{"apiKeyHeader":["companies:write"]},{"signIn":["companies:write"]}]}},"/api/v1/company/merge":{"post":{"operationId":"mergeCompanies","tags":["Companies"],"summary":"Merge two companies","description":"Merge one record into another, choosing which value survives per field.\n\nIn one transaction: the survivor takes the chosen values, the other's activities, line items, history and files move onto it, records that named the other by name name the survivor, and the other goes to the recycle bin.","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyMerge"}}}},"responses":{"200":{"$ref":"#/components/responses/Merged"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["companies:write"]},{"apiKeyHeader":["companies:write"]},{"signIn":["companies:write"]}]}},"/api/v1/company/merge-preview":{"get":{"operationId":"previewCompanyMerge","tags":["Companies"],"summary":"Compare two companies before merging","description":"Two records side by side: which fields differ, and what a merge would move.","parameters":[{"$ref":"#/components/parameters/KeepId"},{"$ref":"#/components/parameters/MergeId"}],"responses":{"200":{"$ref":"#/components/responses/MergePreviewed"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["companies:read"]},{"apiKeyHeader":["companies:read"]},{"signIn":["companies:read"]}]}},"/api/v1/lead":{"get":{"operationId":"listLeads","tags":["Leads"],"summary":"List leads","description":"List records. Supports limit, cursor, q, field filters, and sort=newest for newest first.\n\nEvery other query parameter is an exact match on a field, and they combine: `?status=Open&city=Pune`. The fields are listed below; a workspace's custom fields work the same way. ownerId is not a field, so it cannot be filtered on.\n\nA workspace over its plan's record allowance lists only the newest records the plan opens.","parameters":[{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/Cursor"},{"$ref":"#/components/parameters/Search"},{"$ref":"#/components/parameters/Sort"},{"$ref":"#/components/parameters/Deleted"},{"name":"name","in":"query","description":"Only leads whose Lead name is exactly this.","schema":{"type":"string"}},{"name":"email","in":"query","description":"Only leads whose Email address is exactly this.","schema":{"type":"string"}},{"name":"phone","in":"query","description":"Only leads whose Phone is exactly this.","schema":{"type":"string"}},{"name":"mobile","in":"query","description":"Only leads whose Mobile / WhatsApp is exactly this.","schema":{"type":"string"}},{"name":"role","in":"query","description":"Only leads whose Job title is exactly this.","schema":{"type":"string"}},{"name":"company","in":"query","description":"Only leads whose Company name is exactly this.","schema":{"type":"string"}},{"name":"status","in":"query","description":"Only leads whose Lead status is exactly this.","schema":{"type":"string"}},{"name":"rating","in":"query","description":"Only leads whose Lead rating is exactly this.","schema":{"type":"string"}},{"name":"score","in":"query","description":"Only leads whose Lead score is exactly this.","schema":{"type":"number"}},{"name":"budget","in":"query","description":"Only leads whose Estimated budget is exactly this.","schema":{"type":"number"}},{"name":"currency","in":"query","description":"Only leads whose Record currency is exactly this.","schema":{"type":"string"}},{"name":"authority","in":"query","description":"Only leads whose Decision authority is exactly this.","schema":{"type":"string"}},{"name":"timeline","in":"query","description":"Only leads whose Purchase timeline is exactly this.","schema":{"type":"string"}},{"name":"need","in":"query","description":"Only leads whose Business need is exactly this.","schema":{"type":"string"}},{"name":"source","in":"query","description":"Only leads whose Lead source is exactly this.","schema":{"type":"string"}},{"name":"owner","in":"query","description":"Only leads whose Record owner is exactly this.","schema":{"type":"string"}},{"name":"country","in":"query","description":"Only leads whose Country is exactly this.","schema":{"type":"string"}},{"name":"street","in":"query","description":"Only leads whose Street address is exactly this.","schema":{"type":"string"}},{"name":"city","in":"query","description":"Only leads whose City is exactly this.","schema":{"type":"string"}},{"name":"state","in":"query","description":"Only leads whose State / province is exactly this.","schema":{"type":"string"}},{"name":"postalCode","in":"query","description":"Only leads whose ZIP / postal code is exactly this.","schema":{"type":"string"}},{"name":"nextFollowUp","in":"query","description":"Only leads whose Next follow-up is exactly this.","schema":{"type":"string"}},{"name":"emailOptOut","in":"query","description":"Only leads whose Email opt-out is exactly this.","schema":{"type":"boolean"}},{"name":"consentDate","in":"query","description":"Only leads whose Consent recorded on is exactly this.","schema":{"type":"string"}},{"name":"lawfulBasis","in":"query","description":"Only leads whose Lawful basis is exactly this.","schema":{"type":"string"}},{"name":"consentStatus","in":"query","description":"Only leads whose Consent status is exactly this.","schema":{"type":"string"}},{"name":"convertedCompany","in":"query","description":"Only leads whose Converted to company is exactly this.","schema":{"type":"string"}},{"name":"convertedContact","in":"query","description":"Only leads whose Converted to contact is exactly this.","schema":{"type":"string"}},{"name":"convertedDeal","in":"query","description":"Only leads whose Converted to opportunity is exactly this.","schema":{"type":"string"}},{"name":"convertedAt","in":"query","description":"Only leads whose Converted on is exactly this.","schema":{"type":"string"}},{"name":"tags","in":"query","description":"Only leads whose Tags is exactly this.","schema":{"type":"string"}},{"name":"description","in":"query","description":"Only leads whose Description / notes is exactly this.","schema":{"type":"string"}},{"name":"companyId","in":"query","description":"Only leads whose Company name (record id) is exactly this.","schema":{"type":"string"}}],"responses":{"200":{"summary":"A page of leads","description":"The records, with their values masked to what the caller may see, and where to go next.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Plan-Calls-Limit":{"$ref":"#/components/headers/PlanCallsLimit"},"X-Plan-Calls-Remaining":{"$ref":"#/components/headers/PlanCallsRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadPage"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["leads:read"]},{"apiKeyHeader":["leads:read"]},{"signIn":["leads:read"]}]},"post":{"operationId":"createLead","tags":["Leads"],"summary":"Create a lead","description":"Create a record. Honours Idempotency-Key.\n\nUnknown field keys are refused (422 unknown_field); fields the system keeps are ignored and listed in rejectedFields. Duplicate rules that warn come back as possibleDuplicates; one that blocks answers 409.\n\nCounts towards the plan's record allowance: when that is full, a create is refused (400) until records are deleted or the plan grows.","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadCreate"}}}},"responses":{"201":{"summary":"Created","description":"The new lead, as saved.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Plan-Calls-Limit":{"$ref":"#/components/headers/PlanCallsLimit"},"X-Plan-Calls-Remaining":{"$ref":"#/components/headers/PlanCallsRemaining"},"Idempotent-Replay":{"$ref":"#/components/headers/IdempotentReplay"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadSaved"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["leads:write"]},{"apiKeyHeader":["leads:write"]},{"signIn":["leads:write"]}]}},"/api/v1/lead/{id}":{"get":{"operationId":"getLead","tags":["Leads"],"summary":"Read a lead","description":"Read one record.\n\nWith its line items, its timeline and the history of its values. A record older than the newest ones the plan opens answers 403 over_plan.","parameters":[{"$ref":"#/components/parameters/RecordId"}],"responses":{"200":{"summary":"The lead","description":"The record and what hangs off it.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Plan-Calls-Limit":{"$ref":"#/components/headers/PlanCallsLimit"},"X-Plan-Calls-Remaining":{"$ref":"#/components/headers/PlanCallsRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadDetail"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["leads:read"]},{"apiKeyHeader":["leads:read"]},{"signIn":["leads:read"]}]},"patch":{"operationId":"updateLead","tags":["Leads"],"summary":"Change a lead","description":"Update a record. Send only the fields that change.\n\nA record waiting on an approval, or whose subject asked for processing to stop, refuses changes (403).","parameters":[{"$ref":"#/components/parameters/RecordId"},{"$ref":"#/components/parameters/IfMatch"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadUpdate"}}}},"responses":{"200":{"summary":"Changed","description":"The lead, as saved.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Plan-Calls-Limit":{"$ref":"#/components/headers/PlanCallsLimit"},"X-Plan-Calls-Remaining":{"$ref":"#/components/headers/PlanCallsRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadSaved"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["leads:write"]},{"apiKeyHeader":["leads:write"]},{"signIn":["leads:write"]}]},"delete":{"operationId":"deleteLead","tags":["Leads"],"summary":"Delete a lead","description":"Move a record to the recycle bin.\n\nIt can be restored until the recycle bin is emptied, which an API key cannot do.","parameters":[{"$ref":"#/components/parameters/RecordId"}],"responses":{"204":{"$ref":"#/components/responses/Deleted"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["leads:write"]},{"apiKeyHeader":["leads:write"]},{"signIn":["leads:write"]}]}},"/api/v1/lead/{id}/restore":{"post":{"operationId":"restoreLead","tags":["Leads"],"summary":"Restore a lead","description":"Restore a record from the recycle bin.","parameters":[{"$ref":"#/components/parameters/RecordId"},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"$ref":"#/components/responses/Restored"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["leads:write"]},{"apiKeyHeader":["leads:write"]},{"signIn":["leads:write"]}]}},"/api/v1/lead/bulk":{"post":{"operationId":"bulkUpdateLeads","tags":["Leads"],"summary":"Change many leads","description":"The same change to up to 500 records, each held to the rules of a single update. Records that refuse are listed in failed with the reason; the rest are changed.","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadBulkUpdate"}}}},"responses":{"200":{"$ref":"#/components/responses/BulkUpdated"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["leads:write"]},{"apiKeyHeader":["leads:write"]},{"signIn":["leads:write"]}]}},"/api/v1/lead/merge":{"post":{"operationId":"mergeLeads","tags":["Leads"],"summary":"Merge two leads","description":"Merge one record into another, choosing which value survives per field.\n\nIn one transaction: the survivor takes the chosen values, the other's activities, line items, history and files move onto it, records that named the other by name name the survivor, and the other goes to the recycle bin.","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadMerge"}}}},"responses":{"200":{"$ref":"#/components/responses/Merged"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["leads:write"]},{"apiKeyHeader":["leads:write"]},{"signIn":["leads:write"]}]}},"/api/v1/lead/merge-preview":{"get":{"operationId":"previewLeadMerge","tags":["Leads"],"summary":"Compare two leads before merging","description":"Two records side by side: which fields differ, and what a merge would move.","parameters":[{"$ref":"#/components/parameters/KeepId"},{"$ref":"#/components/parameters/MergeId"}],"responses":{"200":{"$ref":"#/components/responses/MergePreviewed"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["leads:read"]},{"apiKeyHeader":["leads:read"]},{"signIn":["leads:read"]}]}},"/api/v1/lead/{id}/convert":{"get":{"operationId":"planLeadConversion","tags":["Leads"],"summary":"What converting a lead would do","description":"What converting this lead would do: the company and contact it matches, and the opportunity it would open.","parameters":[{"$ref":"#/components/parameters/RecordId"}],"responses":{"200":{"summary":"The plan","description":"The matches the server found and the opportunity it would open.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Plan-Calls-Limit":{"$ref":"#/components/headers/PlanCallsLimit"},"X-Plan-Calls-Remaining":{"$ref":"#/components/headers/PlanCallsRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadConversionPlan"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["leads:read"]},{"apiKeyHeader":["leads:read"]},{"signIn":["leads:read"]}]},"post":{"operationId":"convertLead","tags":["Leads"],"summary":"Convert a lead","description":"Convert a lead into a company, a contact and (optionally) an opportunity, in one transaction.\n\nNeeds leads:write, contacts:write and companies:write, and deals:write unless deal.create is false; opening an opportunity also needs a plan with the Sales pipeline. The lead's timeline and files move to the contact. A lead converted already answers 409. No webhook event is sent for the records a conversion makes.","parameters":[{"$ref":"#/components/parameters/RecordId"},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadConversionChoices"}}}},"responses":{"201":{"summary":"Converted","description":"The records the lead became.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Plan-Calls-Limit":{"$ref":"#/components/headers/PlanCallsLimit"},"X-Plan-Calls-Remaining":{"$ref":"#/components/headers/PlanCallsRemaining"},"Idempotent-Replay":{"$ref":"#/components/headers/IdempotentReplay"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadConversion"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["leads:write","contacts:write","companies:write"]},{"apiKeyHeader":["leads:write","contacts:write","companies:write"]},{"signIn":["leads:write","contacts:write","companies:write"]}]}},"/api/v1/deal":{"get":{"operationId":"listDeals","tags":["Deals","Module: Sales pipeline"],"summary":"List deals","description":"List records. Supports limit, cursor, q, field filters, and sort=newest for newest first.\n\nEvery other query parameter is an exact match on a field, and they combine: `?status=Open&city=Pune`. The fields are listed below; a workspace's custom fields work the same way. ownerId is not a field, so it cannot be filtered on.\n\nA workspace over its plan's record allowance lists only the newest records the plan opens.\n\nPart of Sales pipeline: listing, creating and bulk updates answer 403 module_not_entitled on a plan without it.","parameters":[{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/Cursor"},{"$ref":"#/components/parameters/Search"},{"$ref":"#/components/parameters/Sort"},{"$ref":"#/components/parameters/Deleted"},{"name":"name","in":"query","description":"Only deals whose Deal name is exactly this.","schema":{"type":"string"}},{"name":"company","in":"query","description":"Only deals whose Company / account is exactly this.","schema":{"type":"string"}},{"name":"primaryContact","in":"query","description":"Only deals whose Primary contact is exactly this.","schema":{"type":"string"}},{"name":"stage","in":"query","description":"Only deals whose Pipeline stage is exactly this.","schema":{"type":"string"}},{"name":"pipeline","in":"query","description":"Only deals whose Sales pipeline is exactly this.","schema":{"type":"string"}},{"name":"value","in":"query","description":"Only deals whose Deal amount is exactly this.","schema":{"type":"number"}},{"name":"currency","in":"query","description":"Only deals whose Record currency is exactly this.","schema":{"type":"string"}},{"name":"probability","in":"query","description":"Only deals whose Win probability (%) is exactly this.","schema":{"type":"number"}},{"name":"date","in":"query","description":"Only deals whose Expected close date is exactly this.","schema":{"type":"string"}},{"name":"dealType","in":"query","description":"Only deals whose Deal type is exactly this.","schema":{"type":"string"}},{"name":"forecast","in":"query","description":"Only deals whose Forecast category is exactly this.","schema":{"type":"string"}},{"name":"owner","in":"query","description":"Only deals whose Record owner is exactly this.","schema":{"type":"string"}},{"name":"source","in":"query","description":"Only deals whose Lead source is exactly this.","schema":{"type":"string"}},{"name":"nextStep","in":"query","description":"Only deals whose Next step is exactly this.","schema":{"type":"string"}},{"name":"competitor","in":"query","description":"Only deals whose Primary competitor is exactly this.","schema":{"type":"string"}},{"name":"lossReason","in":"query","description":"Only deals whose Loss reason is exactly this.","schema":{"type":"string"}},{"name":"contractStart","in":"query","description":"Only deals whose Contract start is exactly this.","schema":{"type":"string"}},{"name":"contractEnd","in":"query","description":"Only deals whose Contract end is exactly this.","schema":{"type":"string"}},{"name":"paymentTerms","in":"query","description":"Only deals whose Payment terms is exactly this.","schema":{"type":"string"}},{"name":"tags","in":"query","description":"Only deals whose Tags is exactly this.","schema":{"type":"string"}},{"name":"description","in":"query","description":"Only deals whose Description / notes is exactly this.","schema":{"type":"string"}},{"name":"companyId","in":"query","description":"Only deals whose Company / account (record id) is exactly this.","schema":{"type":"string"}},{"name":"primaryContactId","in":"query","description":"Only deals whose Primary contact (record id) is exactly this.","schema":{"type":"string"}}],"responses":{"200":{"summary":"A page of deals","description":"The records, with their values masked to what the caller may see, and where to go next.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Plan-Calls-Limit":{"$ref":"#/components/headers/PlanCallsLimit"},"X-Plan-Calls-Remaining":{"$ref":"#/components/headers/PlanCallsRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DealPage"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["deals:read"]},{"apiKeyHeader":["deals:read"]},{"signIn":["deals:read"]}]},"post":{"operationId":"createDeal","tags":["Deals","Module: Sales pipeline"],"summary":"Create a deal","description":"Create a record. Honours Idempotency-Key.\n\nUnknown field keys are refused (422 unknown_field); fields the system keeps are ignored and listed in rejectedFields. Duplicate rules that warn come back as possibleDuplicates; one that blocks answers 409.\n\nCounts towards the plan's record allowance: when that is full, a create is refused (400) until records are deleted or the plan grows.\n\nPart of Sales pipeline: listing, creating and bulk updates answer 403 module_not_entitled on a plan without it.","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DealCreate"}}}},"responses":{"201":{"summary":"Created","description":"The new deal, as saved.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Plan-Calls-Limit":{"$ref":"#/components/headers/PlanCallsLimit"},"X-Plan-Calls-Remaining":{"$ref":"#/components/headers/PlanCallsRemaining"},"Idempotent-Replay":{"$ref":"#/components/headers/IdempotentReplay"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DealSaved"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["deals:write"]},{"apiKeyHeader":["deals:write"]},{"signIn":["deals:write"]}]}},"/api/v1/deal/{id}":{"get":{"operationId":"getDeal","tags":["Deals","Module: Sales pipeline"],"summary":"Read a deal","description":"Read one record.\n\nWith its line items, its timeline and the history of its values. A record older than the newest ones the plan opens answers 403 over_plan.","parameters":[{"$ref":"#/components/parameters/RecordId"}],"responses":{"200":{"summary":"The deal","description":"The record and what hangs off it.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Plan-Calls-Limit":{"$ref":"#/components/headers/PlanCallsLimit"},"X-Plan-Calls-Remaining":{"$ref":"#/components/headers/PlanCallsRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DealDetail"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["deals:read"]},{"apiKeyHeader":["deals:read"]},{"signIn":["deals:read"]}]},"patch":{"operationId":"updateDeal","tags":["Deals","Module: Sales pipeline"],"summary":"Change a deal","description":"Update a record. Send only the fields that change.\n\nA record waiting on an approval, or whose subject asked for processing to stop, refuses changes (403).","parameters":[{"$ref":"#/components/parameters/RecordId"},{"$ref":"#/components/parameters/IfMatch"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DealUpdate"}}}},"responses":{"200":{"summary":"Changed","description":"The deal, as saved.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Plan-Calls-Limit":{"$ref":"#/components/headers/PlanCallsLimit"},"X-Plan-Calls-Remaining":{"$ref":"#/components/headers/PlanCallsRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DealSaved"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["deals:write"]},{"apiKeyHeader":["deals:write"]},{"signIn":["deals:write"]}]},"delete":{"operationId":"deleteDeal","tags":["Deals","Module: Sales pipeline"],"summary":"Delete a deal","description":"Move a record to the recycle bin.\n\nIt can be restored until the recycle bin is emptied, which an API key cannot do.","parameters":[{"$ref":"#/components/parameters/RecordId"}],"responses":{"204":{"$ref":"#/components/responses/Deleted"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["deals:write"]},{"apiKeyHeader":["deals:write"]},{"signIn":["deals:write"]}]}},"/api/v1/deal/{id}/restore":{"post":{"operationId":"restoreDeal","tags":["Deals","Module: Sales pipeline"],"summary":"Restore a deal","description":"Restore a record from the recycle bin.","parameters":[{"$ref":"#/components/parameters/RecordId"},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"$ref":"#/components/responses/Restored"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["deals:write"]},{"apiKeyHeader":["deals:write"]},{"signIn":["deals:write"]}]}},"/api/v1/deal/bulk":{"post":{"operationId":"bulkUpdateDeals","tags":["Deals","Module: Sales pipeline"],"summary":"Change many deals","description":"The same change to up to 500 records, each held to the rules of a single update. Records that refuse are listed in failed with the reason; the rest are changed.\n\nPart of Sales pipeline: listing, creating and bulk updates answer 403 module_not_entitled on a plan without it.","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DealBulkUpdate"}}}},"responses":{"200":{"$ref":"#/components/responses/BulkUpdated"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["deals:write"]},{"apiKeyHeader":["deals:write"]},{"signIn":["deals:write"]}]}},"/api/v1/deal/merge":{"post":{"operationId":"mergeDeals","tags":["Deals","Module: Sales pipeline"],"summary":"Merge two deals","description":"Merge one record into another, choosing which value survives per field.\n\nIn one transaction: the survivor takes the chosen values, the other's activities, line items, history and files move onto it, records that named the other by name name the survivor, and the other goes to the recycle bin.","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DealMerge"}}}},"responses":{"200":{"$ref":"#/components/responses/Merged"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["deals:write"]},{"apiKeyHeader":["deals:write"]},{"signIn":["deals:write"]}]}},"/api/v1/deal/merge-preview":{"get":{"operationId":"previewDealMerge","tags":["Deals","Module: Sales pipeline"],"summary":"Compare two deals before merging","description":"Two records side by side: which fields differ, and what a merge would move.","parameters":[{"$ref":"#/components/parameters/KeepId"},{"$ref":"#/components/parameters/MergeId"}],"responses":{"200":{"$ref":"#/components/responses/MergePreviewed"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["deals:read"]},{"apiKeyHeader":["deals:read"]},{"signIn":["deals:read"]}]}},"/api/v1/task":{"get":{"operationId":"listTasks","tags":["Tasks"],"summary":"List tasks","description":"List records. Supports limit, cursor, q, field filters, and sort=newest for newest first.\n\nEvery other query parameter is an exact match on a field, and they combine: `?status=Open&city=Pune`. The fields are listed below; a workspace's custom fields work the same way. ownerId is not a field, so it cannot be filtered on.\n\nA workspace over its plan's record allowance lists only the newest records the plan opens.","parameters":[{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/Cursor"},{"$ref":"#/components/parameters/Search"},{"$ref":"#/components/parameters/Sort"},{"$ref":"#/components/parameters/Deleted"},{"name":"name","in":"query","description":"Only tasks whose Task name is exactly this.","schema":{"type":"string"}},{"name":"taskType","in":"query","description":"Only tasks whose Task type is exactly this.","schema":{"type":"string"}},{"name":"company","in":"query","description":"Only tasks whose Company / account is exactly this.","schema":{"type":"string"}},{"name":"relatedContact","in":"query","description":"Only tasks whose Related contact is exactly this.","schema":{"type":"string"}},{"name":"relatedDeal","in":"query","description":"Only tasks whose Related deal is exactly this.","schema":{"type":"string"}},{"name":"owner","in":"query","description":"Only tasks whose Record owner is exactly this.","schema":{"type":"string"}},{"name":"priority","in":"query","description":"Only tasks whose Priority is exactly this.","schema":{"type":"string"}},{"name":"status","in":"query","description":"Only tasks whose Task status is exactly this.","schema":{"type":"string"}},{"name":"dueDate","in":"query","description":"Only tasks whose Due date is exactly this.","schema":{"type":"string"}},{"name":"time","in":"query","description":"Only tasks whose Due time is exactly this.","schema":{"type":"string"}},{"name":"reminder","in":"query","description":"Only tasks whose Reminder is exactly this.","schema":{"type":"string"}},{"name":"recurrence","in":"query","description":"Only tasks whose Repeat is exactly this.","schema":{"type":"string"}},{"name":"estimatedMinutes","in":"query","description":"Only tasks whose Estimated duration (minutes) is exactly this.","schema":{"type":"number"}},{"name":"description","in":"query","description":"Only tasks whose Description / notes is exactly this.","schema":{"type":"string"}},{"name":"companyId","in":"query","description":"Only tasks whose Company / account (record id) is exactly this.","schema":{"type":"string"}},{"name":"relatedContactId","in":"query","description":"Only tasks whose Related contact (record id) is exactly this.","schema":{"type":"string"}}],"responses":{"200":{"summary":"A page of tasks","description":"The records, with their values masked to what the caller may see, and where to go next.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Plan-Calls-Limit":{"$ref":"#/components/headers/PlanCallsLimit"},"X-Plan-Calls-Remaining":{"$ref":"#/components/headers/PlanCallsRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskPage"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["tasks:read"]},{"apiKeyHeader":["tasks:read"]},{"signIn":["tasks:read"]}]},"post":{"operationId":"createTask","tags":["Tasks"],"summary":"Create a task","description":"Create a record. Honours Idempotency-Key.\n\nUnknown field keys are refused (422 unknown_field); fields the system keeps are ignored and listed in rejectedFields. Duplicate rules that warn come back as possibleDuplicates; one that blocks answers 409.","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskCreate"}}}},"responses":{"201":{"summary":"Created","description":"The new task, as saved.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Plan-Calls-Limit":{"$ref":"#/components/headers/PlanCallsLimit"},"X-Plan-Calls-Remaining":{"$ref":"#/components/headers/PlanCallsRemaining"},"Idempotent-Replay":{"$ref":"#/components/headers/IdempotentReplay"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskSaved"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["tasks:write"]},{"apiKeyHeader":["tasks:write"]},{"signIn":["tasks:write"]}]}},"/api/v1/task/{id}":{"get":{"operationId":"getTask","tags":["Tasks"],"summary":"Read a task","description":"Read one record.\n\nWith its line items, its timeline and the history of its values. A record older than the newest ones the plan opens answers 403 over_plan.","parameters":[{"$ref":"#/components/parameters/RecordId"}],"responses":{"200":{"summary":"The task","description":"The record and what hangs off it.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Plan-Calls-Limit":{"$ref":"#/components/headers/PlanCallsLimit"},"X-Plan-Calls-Remaining":{"$ref":"#/components/headers/PlanCallsRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskDetail"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["tasks:read"]},{"apiKeyHeader":["tasks:read"]},{"signIn":["tasks:read"]}]},"patch":{"operationId":"updateTask","tags":["Tasks"],"summary":"Change a task","description":"Update a record. Send only the fields that change.\n\nA record waiting on an approval, or whose subject asked for processing to stop, refuses changes (403).","parameters":[{"$ref":"#/components/parameters/RecordId"},{"$ref":"#/components/parameters/IfMatch"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskUpdate"}}}},"responses":{"200":{"summary":"Changed","description":"The task, as saved.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Plan-Calls-Limit":{"$ref":"#/components/headers/PlanCallsLimit"},"X-Plan-Calls-Remaining":{"$ref":"#/components/headers/PlanCallsRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskSaved"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["tasks:write"]},{"apiKeyHeader":["tasks:write"]},{"signIn":["tasks:write"]}]},"delete":{"operationId":"deleteTask","tags":["Tasks"],"summary":"Delete a task","description":"Move a record to the recycle bin.\n\nIt can be restored until the recycle bin is emptied, which an API key cannot do.","parameters":[{"$ref":"#/components/parameters/RecordId"}],"responses":{"204":{"$ref":"#/components/responses/Deleted"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["tasks:write"]},{"apiKeyHeader":["tasks:write"]},{"signIn":["tasks:write"]}]}},"/api/v1/task/{id}/restore":{"post":{"operationId":"restoreTask","tags":["Tasks"],"summary":"Restore a task","description":"Restore a record from the recycle bin.","parameters":[{"$ref":"#/components/parameters/RecordId"},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"$ref":"#/components/responses/Restored"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["tasks:write"]},{"apiKeyHeader":["tasks:write"]},{"signIn":["tasks:write"]}]}},"/api/v1/task/bulk":{"post":{"operationId":"bulkUpdateTasks","tags":["Tasks"],"summary":"Change many tasks","description":"The same change to up to 500 records, each held to the rules of a single update. Records that refuse are listed in failed with the reason; the rest are changed.","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskBulkUpdate"}}}},"responses":{"200":{"$ref":"#/components/responses/BulkUpdated"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["tasks:write"]},{"apiKeyHeader":["tasks:write"]},{"signIn":["tasks:write"]}]}},"/api/v1/task/merge":{"post":{"operationId":"mergeTasks","tags":["Tasks"],"summary":"Merge two tasks","description":"Merge one record into another, choosing which value survives per field.\n\nIn one transaction: the survivor takes the chosen values, the other's activities, line items, history and files move onto it, records that named the other by name name the survivor, and the other goes to the recycle bin.","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskMerge"}}}},"responses":{"200":{"$ref":"#/components/responses/Merged"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["tasks:write"]},{"apiKeyHeader":["tasks:write"]},{"signIn":["tasks:write"]}]}},"/api/v1/task/merge-preview":{"get":{"operationId":"previewTaskMerge","tags":["Tasks"],"summary":"Compare two tasks before merging","description":"Two records side by side: which fields differ, and what a merge would move.","parameters":[{"$ref":"#/components/parameters/KeepId"},{"$ref":"#/components/parameters/MergeId"}],"responses":{"200":{"$ref":"#/components/responses/MergePreviewed"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["tasks:read"]},{"apiKeyHeader":["tasks:read"]},{"signIn":["tasks:read"]}]}},"/api/v1/event":{"get":{"operationId":"listCalendarEvents","tags":["Calendar events"],"summary":"List calendar events","description":"List records. Supports limit, cursor, q, field filters, and sort=newest for newest first.\n\nEvery other query parameter is an exact match on a field, and they combine: `?status=Open&city=Pune`. The fields are listed below; a workspace's custom fields work the same way. ownerId is not a field, so it cannot be filtered on.\n\nA workspace over its plan's record allowance lists only the newest records the plan opens.","parameters":[{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/Cursor"},{"$ref":"#/components/parameters/Search"},{"$ref":"#/components/parameters/Sort"},{"$ref":"#/components/parameters/Deleted"},{"name":"name","in":"query","description":"Only calendar events whose Event name is exactly this.","schema":{"type":"string"}},{"name":"type","in":"query","description":"Only calendar events whose Event type is exactly this.","schema":{"type":"string"}},{"name":"eventDate","in":"query","description":"Only calendar events whose Event date is exactly this.","schema":{"type":"string"}},{"name":"time","in":"query","description":"Only calendar events whose Start time is exactly this.","schema":{"type":"string"}},{"name":"endTime","in":"query","description":"Only calendar events whose End time is exactly this.","schema":{"type":"string"}},{"name":"allDay","in":"query","description":"Only calendar events whose All-day event is exactly this.","schema":{"type":"boolean"}},{"name":"timezone","in":"query","description":"Only calendar events whose Timezone is exactly this.","schema":{"type":"string"}},{"name":"locationType","in":"query","description":"Only calendar events whose Location type is exactly this.","schema":{"type":"string"}},{"name":"location","in":"query","description":"Only calendar events whose Meeting link / location is exactly this.","schema":{"type":"string"}},{"name":"attendees","in":"query","description":"Only calendar events whose Attendees is exactly this.","schema":{"type":"string"}},{"name":"company","in":"query","description":"Only calendar events whose Company / account is exactly this.","schema":{"type":"string"}},{"name":"owner","in":"query","description":"Only calendar events whose Record owner is exactly this.","schema":{"type":"string"}},{"name":"agenda","in":"query","description":"Only calendar events whose Meeting agenda is exactly this.","schema":{"type":"string"}},{"name":"reminder","in":"query","description":"Only calendar events whose Reminder is exactly this.","schema":{"type":"string"}},{"name":"description","in":"query","description":"Only calendar events whose Description / notes is exactly this.","schema":{"type":"string"}},{"name":"companyId","in":"query","description":"Only calendar events whose Company / account (record id) is exactly this.","schema":{"type":"string"}}],"responses":{"200":{"summary":"A page of calendar events","description":"The records, with their values masked to what the caller may see, and where to go next.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Plan-Calls-Limit":{"$ref":"#/components/headers/PlanCallsLimit"},"X-Plan-Calls-Remaining":{"$ref":"#/components/headers/PlanCallsRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CalendarEventPage"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["events:read"]},{"apiKeyHeader":["events:read"]},{"signIn":["events:read"]}]},"post":{"operationId":"createCalendarEvent","tags":["Calendar events"],"summary":"Create a calendar event","description":"Create a record. Honours Idempotency-Key.\n\nUnknown field keys are refused (422 unknown_field); fields the system keeps are ignored and listed in rejectedFields. Duplicate rules that warn come back as possibleDuplicates; one that blocks answers 409.","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CalendarEventCreate"}}}},"responses":{"201":{"summary":"Created","description":"The new calendar event, as saved.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Plan-Calls-Limit":{"$ref":"#/components/headers/PlanCallsLimit"},"X-Plan-Calls-Remaining":{"$ref":"#/components/headers/PlanCallsRemaining"},"Idempotent-Replay":{"$ref":"#/components/headers/IdempotentReplay"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CalendarEventSaved"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["events:write"]},{"apiKeyHeader":["events:write"]},{"signIn":["events:write"]}]}},"/api/v1/event/{id}":{"get":{"operationId":"getCalendarEvent","tags":["Calendar events"],"summary":"Read a calendar event","description":"Read one record.\n\nWith its line items, its timeline and the history of its values. A record older than the newest ones the plan opens answers 403 over_plan.","parameters":[{"$ref":"#/components/parameters/RecordId"}],"responses":{"200":{"summary":"The calendar event","description":"The record and what hangs off it.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Plan-Calls-Limit":{"$ref":"#/components/headers/PlanCallsLimit"},"X-Plan-Calls-Remaining":{"$ref":"#/components/headers/PlanCallsRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CalendarEventDetail"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["events:read"]},{"apiKeyHeader":["events:read"]},{"signIn":["events:read"]}]},"patch":{"operationId":"updateCalendarEvent","tags":["Calendar events"],"summary":"Change a calendar event","description":"Update a record. Send only the fields that change.\n\nA record waiting on an approval, or whose subject asked for processing to stop, refuses changes (403).","parameters":[{"$ref":"#/components/parameters/RecordId"},{"$ref":"#/components/parameters/IfMatch"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CalendarEventUpdate"}}}},"responses":{"200":{"summary":"Changed","description":"The calendar event, as saved.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Plan-Calls-Limit":{"$ref":"#/components/headers/PlanCallsLimit"},"X-Plan-Calls-Remaining":{"$ref":"#/components/headers/PlanCallsRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CalendarEventSaved"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["events:write"]},{"apiKeyHeader":["events:write"]},{"signIn":["events:write"]}]},"delete":{"operationId":"deleteCalendarEvent","tags":["Calendar events"],"summary":"Delete a calendar event","description":"Move a record to the recycle bin.\n\nIt can be restored until the recycle bin is emptied, which an API key cannot do.","parameters":[{"$ref":"#/components/parameters/RecordId"}],"responses":{"204":{"$ref":"#/components/responses/Deleted"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["events:write"]},{"apiKeyHeader":["events:write"]},{"signIn":["events:write"]}]}},"/api/v1/event/{id}/restore":{"post":{"operationId":"restoreCalendarEvent","tags":["Calendar events"],"summary":"Restore a calendar event","description":"Restore a record from the recycle bin.","parameters":[{"$ref":"#/components/parameters/RecordId"},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"$ref":"#/components/responses/Restored"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["events:write"]},{"apiKeyHeader":["events:write"]},{"signIn":["events:write"]}]}},"/api/v1/event/bulk":{"post":{"operationId":"bulkUpdateCalendarEvents","tags":["Calendar events"],"summary":"Change many calendar events","description":"The same change to up to 500 records, each held to the rules of a single update. Records that refuse are listed in failed with the reason; the rest are changed.","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CalendarEventBulkUpdate"}}}},"responses":{"200":{"$ref":"#/components/responses/BulkUpdated"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["events:write"]},{"apiKeyHeader":["events:write"]},{"signIn":["events:write"]}]}},"/api/v1/event/merge":{"post":{"operationId":"mergeCalendarEvents","tags":["Calendar events"],"summary":"Merge two calendar events","description":"Merge one record into another, choosing which value survives per field.\n\nIn one transaction: the survivor takes the chosen values, the other's activities, line items, history and files move onto it, records that named the other by name name the survivor, and the other goes to the recycle bin.","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CalendarEventMerge"}}}},"responses":{"200":{"$ref":"#/components/responses/Merged"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["events:write"]},{"apiKeyHeader":["events:write"]},{"signIn":["events:write"]}]}},"/api/v1/event/merge-preview":{"get":{"operationId":"previewCalendarEventMerge","tags":["Calendar events"],"summary":"Compare two calendar events before merging","description":"Two records side by side: which fields differ, and what a merge would move.","parameters":[{"$ref":"#/components/parameters/KeepId"},{"$ref":"#/components/parameters/MergeId"}],"responses":{"200":{"$ref":"#/components/responses/MergePreviewed"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["events:read"]},{"apiKeyHeader":["events:read"]},{"signIn":["events:read"]}]}},"/api/v1/campaign":{"get":{"operationId":"listCampaigns","tags":["Campaigns","Module: Campaigns"],"summary":"List campaigns","description":"List records. Supports limit, cursor, q, field filters, and sort=newest for newest first.\n\nEvery other query parameter is an exact match on a field, and they combine: `?status=Open&city=Pune`. The fields are listed below; a workspace's custom fields work the same way. ownerId is not a field, so it cannot be filtered on.\n\nA workspace over its plan's record allowance lists only the newest records the plan opens.\n\nPart of Campaigns: listing, creating and bulk updates answer 403 module_not_entitled on a plan without it.","parameters":[{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/Cursor"},{"$ref":"#/components/parameters/Search"},{"$ref":"#/components/parameters/Sort"},{"$ref":"#/components/parameters/Deleted"},{"name":"name","in":"query","description":"Only campaigns whose Campaign name is exactly this.","schema":{"type":"string"}},{"name":"campaignType","in":"query","description":"Only campaigns whose Campaign type is exactly this.","schema":{"type":"string"}},{"name":"status","in":"query","description":"Only campaigns whose Campaign status is exactly this.","schema":{"type":"string"}},{"name":"audience","in":"query","description":"Only campaigns whose Audience is exactly this.","schema":{"type":"string"}},{"name":"subject","in":"query","description":"Only campaigns whose Email subject is exactly this.","schema":{"type":"string"}},{"name":"senderName","in":"query","description":"Only campaigns whose Sender name is exactly this.","schema":{"type":"string"}},{"name":"senderEmail","in":"query","description":"Only campaigns whose Sender email is exactly this.","schema":{"type":"string"}},{"name":"replyTo","in":"query","description":"Only campaigns whose Reply-to email is exactly this.","schema":{"type":"string"}},{"name":"body","in":"query","description":"Only campaigns whose Message content is exactly this.","schema":{"type":"string"}},{"name":"startDate","in":"query","description":"Only campaigns whose Start date is exactly this.","schema":{"type":"string"}},{"name":"endDate","in":"query","description":"Only campaigns whose End date is exactly this.","schema":{"type":"string"}},{"name":"owner","in":"query","description":"Only campaigns whose Record owner is exactly this.","schema":{"type":"string"}},{"name":"currency","in":"query","description":"Only campaigns whose Record currency is exactly this.","schema":{"type":"string"}},{"name":"budget","in":"query","description":"Only campaigns whose Budget is exactly this.","schema":{"type":"number"}},{"name":"actualCost","in":"query","description":"Only campaigns whose Actual cost is exactly this.","schema":{"type":"number"}},{"name":"expectedRevenue","in":"query","description":"Only campaigns whose Expected revenue is exactly this.","schema":{"type":"number"}},{"name":"utmSource","in":"query","description":"Only campaigns whose UTM source is exactly this.","schema":{"type":"string"}},{"name":"utmMedium","in":"query","description":"Only campaigns whose UTM medium is exactly this.","schema":{"type":"string"}},{"name":"utmCampaign","in":"query","description":"Only campaigns whose UTM campaign is exactly this.","schema":{"type":"string"}},{"name":"goal","in":"query","description":"Only campaigns whose Campaign goal is exactly this.","schema":{"type":"string"}},{"name":"tags","in":"query","description":"Only campaigns whose Tags is exactly this.","schema":{"type":"string"}},{"name":"description","in":"query","description":"Only campaigns whose Description / notes is exactly this.","schema":{"type":"string"}}],"responses":{"200":{"summary":"A page of campaigns","description":"The records, with their values masked to what the caller may see, and where to go next.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Plan-Calls-Limit":{"$ref":"#/components/headers/PlanCallsLimit"},"X-Plan-Calls-Remaining":{"$ref":"#/components/headers/PlanCallsRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignPage"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["campaigns:read"]},{"apiKeyHeader":["campaigns:read"]},{"signIn":["campaigns:read"]}]},"post":{"operationId":"createCampaign","tags":["Campaigns","Module: Campaigns"],"summary":"Create a campaign","description":"Create a record. Honours Idempotency-Key.\n\nUnknown field keys are refused (422 unknown_field); fields the system keeps are ignored and listed in rejectedFields. Duplicate rules that warn come back as possibleDuplicates; one that blocks answers 409.\n\nPart of Campaigns: listing, creating and bulk updates answer 403 module_not_entitled on a plan without it.","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignCreate"}}}},"responses":{"201":{"summary":"Created","description":"The new campaign, as saved.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Plan-Calls-Limit":{"$ref":"#/components/headers/PlanCallsLimit"},"X-Plan-Calls-Remaining":{"$ref":"#/components/headers/PlanCallsRemaining"},"Idempotent-Replay":{"$ref":"#/components/headers/IdempotentReplay"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignSaved"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["campaigns:write"]},{"apiKeyHeader":["campaigns:write"]},{"signIn":["campaigns:write"]}]}},"/api/v1/campaign/{id}":{"get":{"operationId":"getCampaign","tags":["Campaigns","Module: Campaigns"],"summary":"Read a campaign","description":"Read one record.\n\nWith its line items, its timeline and the history of its values. A record older than the newest ones the plan opens answers 403 over_plan.","parameters":[{"$ref":"#/components/parameters/RecordId"}],"responses":{"200":{"summary":"The campaign","description":"The record and what hangs off it.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Plan-Calls-Limit":{"$ref":"#/components/headers/PlanCallsLimit"},"X-Plan-Calls-Remaining":{"$ref":"#/components/headers/PlanCallsRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignDetail"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["campaigns:read"]},{"apiKeyHeader":["campaigns:read"]},{"signIn":["campaigns:read"]}]},"patch":{"operationId":"updateCampaign","tags":["Campaigns","Module: Campaigns"],"summary":"Change a campaign","description":"Update a record. Send only the fields that change.\n\nA record waiting on an approval, or whose subject asked for processing to stop, refuses changes (403).","parameters":[{"$ref":"#/components/parameters/RecordId"},{"$ref":"#/components/parameters/IfMatch"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignUpdate"}}}},"responses":{"200":{"summary":"Changed","description":"The campaign, as saved.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Plan-Calls-Limit":{"$ref":"#/components/headers/PlanCallsLimit"},"X-Plan-Calls-Remaining":{"$ref":"#/components/headers/PlanCallsRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignSaved"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["campaigns:write"]},{"apiKeyHeader":["campaigns:write"]},{"signIn":["campaigns:write"]}]},"delete":{"operationId":"deleteCampaign","tags":["Campaigns","Module: Campaigns"],"summary":"Delete a campaign","description":"Move a record to the recycle bin.\n\nIt can be restored until the recycle bin is emptied, which an API key cannot do.","parameters":[{"$ref":"#/components/parameters/RecordId"}],"responses":{"204":{"$ref":"#/components/responses/Deleted"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["campaigns:write"]},{"apiKeyHeader":["campaigns:write"]},{"signIn":["campaigns:write"]}]}},"/api/v1/campaign/{id}/restore":{"post":{"operationId":"restoreCampaign","tags":["Campaigns","Module: Campaigns"],"summary":"Restore a campaign","description":"Restore a record from the recycle bin.","parameters":[{"$ref":"#/components/parameters/RecordId"},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"$ref":"#/components/responses/Restored"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["campaigns:write"]},{"apiKeyHeader":["campaigns:write"]},{"signIn":["campaigns:write"]}]}},"/api/v1/campaign/bulk":{"post":{"operationId":"bulkUpdateCampaigns","tags":["Campaigns","Module: Campaigns"],"summary":"Change many campaigns","description":"The same change to up to 500 records, each held to the rules of a single update. Records that refuse are listed in failed with the reason; the rest are changed.\n\nPart of Campaigns: listing, creating and bulk updates answer 403 module_not_entitled on a plan without it.","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignBulkUpdate"}}}},"responses":{"200":{"$ref":"#/components/responses/BulkUpdated"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["campaigns:write"]},{"apiKeyHeader":["campaigns:write"]},{"signIn":["campaigns:write"]}]}},"/api/v1/campaign/merge":{"post":{"operationId":"mergeCampaigns","tags":["Campaigns","Module: Campaigns"],"summary":"Merge two campaigns","description":"Merge one record into another, choosing which value survives per field.\n\nIn one transaction: the survivor takes the chosen values, the other's activities, line items, history and files move onto it, records that named the other by name name the survivor, and the other goes to the recycle bin.","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignMerge"}}}},"responses":{"200":{"$ref":"#/components/responses/Merged"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["campaigns:write"]},{"apiKeyHeader":["campaigns:write"]},{"signIn":["campaigns:write"]}]}},"/api/v1/campaign/merge-preview":{"get":{"operationId":"previewCampaignMerge","tags":["Campaigns","Module: Campaigns"],"summary":"Compare two campaigns before merging","description":"Two records side by side: which fields differ, and what a merge would move.","parameters":[{"$ref":"#/components/parameters/KeepId"},{"$ref":"#/components/parameters/MergeId"}],"responses":{"200":{"$ref":"#/components/responses/MergePreviewed"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["campaigns:read"]},{"apiKeyHeader":["campaigns:read"]},{"signIn":["campaigns:read"]}]}},"/api/v1/invoice":{"get":{"operationId":"listInvoices","tags":["Invoices"],"summary":"List invoices","description":"List records. Supports limit, cursor, q, field filters, and sort=newest for newest first.\n\nEvery other query parameter is an exact match on a field, and they combine: `?status=Open&city=Pune`. The fields are listed below; a workspace's custom fields work the same way. ownerId is not a field, so it cannot be filtered on.\n\nA workspace over its plan's record allowance lists only the newest records the plan opens.","parameters":[{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/Cursor"},{"$ref":"#/components/parameters/Search"},{"$ref":"#/components/parameters/Sort"},{"$ref":"#/components/parameters/Deleted"},{"name":"country","in":"query","description":"Only invoices whose Country is exactly this.","schema":{"type":"string"}},{"name":"state","in":"query","description":"Only invoices whose State / province is exactly this.","schema":{"type":"string"}},{"name":"name","in":"query","description":"Only invoices whose Invoice reference is exactly this.","schema":{"type":"string"}},{"name":"value","in":"query","description":"Only invoices whose Invoice amount is exactly this.","schema":{"type":"number"}},{"name":"status","in":"query","description":"Only invoices whose Payment status is exactly this.","schema":{"type":"string"}},{"name":"amountPaid","in":"query","description":"Only invoices whose Amount received is exactly this.","schema":{"type":"number"}},{"name":"paidAt","in":"query","description":"Only invoices whose Settled on is exactly this.","schema":{"type":"string"}},{"name":"company","in":"query","description":"Only invoices whose Company / account is exactly this.","schema":{"type":"string"}},{"name":"billingContact","in":"query","description":"Only invoices whose Billing contact is exactly this.","schema":{"type":"string"}},{"name":"billingEmail","in":"query","description":"Only invoices whose Billing email is exactly this.","schema":{"type":"string"}},{"name":"relatedQuote","in":"query","description":"Only invoices whose Raised from quote is exactly this.","schema":{"type":"string"}},{"name":"relatedSalesOrder","in":"query","description":"Only invoices whose Raised from sales order is exactly this.","schema":{"type":"string"}},{"name":"issueDate","in":"query","description":"Only invoices whose Issue date is exactly this.","schema":{"type":"string"}},{"name":"date","in":"query","description":"Only invoices whose Due date is exactly this.","schema":{"type":"string"}},{"name":"supplyDate","in":"query","description":"Only invoices whose Supply date is exactly this.","schema":{"type":"string"}},{"name":"currency","in":"query","description":"Only invoices whose Record currency is exactly this.","schema":{"type":"string"}},{"name":"priceBook","in":"query","description":"Only invoices whose Price book is exactly this.","schema":{"type":"string"}},{"name":"poNumber","in":"query","description":"Only invoices whose Customer PO number is exactly this.","schema":{"type":"string"}},{"name":"paymentTerms","in":"query","description":"Only invoices whose Payment terms is exactly this.","schema":{"type":"string"}},{"name":"street","in":"query","description":"Only invoices whose Street address is exactly this.","schema":{"type":"string"}},{"name":"buildingNumber","in":"query","description":"Only invoices whose Building number is exactly this.","schema":{"type":"string"}},{"name":"district","in":"query","description":"Only invoices whose District is exactly this.","schema":{"type":"string"}},{"name":"city","in":"query","description":"Only invoices whose City is exactly this.","schema":{"type":"string"}},{"name":"postalCode","in":"query","description":"Only invoices whose ZIP / postal code is exactly this.","schema":{"type":"string"}},{"name":"taxStatus","in":"query","description":"Only invoices whose Tax registration status is exactly this.","schema":{"type":"string"}},{"name":"legalName","in":"query","description":"Only invoices whose Registered legal name is exactly this.","schema":{"type":"string"}},{"name":"gstin","in":"query","description":"Only invoices whose GSTIN is exactly this.","schema":{"type":"string"}},{"name":"pan","in":"query","description":"Only invoices whose PAN is exactly this.","schema":{"type":"string"}},{"name":"cin","in":"query","description":"Only invoices whose CIN / LLPIN is exactly this.","schema":{"type":"string"}},{"name":"gstType","in":"query","description":"Only invoices whose GST registration type is exactly this.","schema":{"type":"string"}},{"name":"gstStateCode","in":"query","description":"Only invoices whose GST state code is exactly this.","schema":{"type":"string"}},{"name":"reverseCharge","in":"query","description":"Only invoices whose Tax payable on reverse charge is exactly this.","schema":{"type":"string"}},{"name":"placeOfSupply","in":"query","description":"Only invoices whose Place of supply is exactly this.","schema":{"type":"string"}},{"name":"trn","in":"query","description":"Only invoices whose VAT TRN is exactly this.","schema":{"type":"string"}},{"name":"emirate","in":"query","description":"Only invoices whose Emirate is exactly this.","schema":{"type":"string"}},{"name":"vatNumber","in":"query","description":"Only invoices whose VAT / tax registration number is exactly this.","schema":{"type":"string"}},{"name":"ein","in":"query","description":"Only invoices whose EIN / federal tax ID is exactly this.","schema":{"type":"string"}},{"name":"uen","in":"query","description":"Only invoices whose UEN / GST registration is exactly this.","schema":{"type":"string"}},{"name":"abn","in":"query","description":"Only invoices whose ABN / GST registration is exactly this.","schema":{"type":"string"}},{"name":"businessNumber","in":"query","description":"Only invoices whose Business number / GST-HST is exactly this.","schema":{"type":"string"}},{"name":"taxExempt","in":"query","description":"Only invoices whose Tax-exempt customer is exactly this.","schema":{"type":"boolean"}},{"name":"exportTax","in":"query","description":"Only invoices whose Export / SEZ supply is exactly this.","schema":{"type":"string"}},{"name":"chargeTaxAbroad","in":"query","description":"Only invoices whose Charge tax as at home is exactly this.","schema":{"type":"boolean"}},{"name":"transportMode","in":"query","description":"Only invoices whose Transport mode is exactly this.","schema":{"type":"string"}},{"name":"transportDistance","in":"query","description":"Only invoices whose Distance (km) is exactly this.","schema":{"type":"number"}},{"name":"vehicleNumber","in":"query","description":"Only invoices whose Vehicle number is exactly this.","schema":{"type":"string"}},{"name":"vehicleType","in":"query","description":"Only invoices whose Vehicle type is exactly this.","schema":{"type":"string"}},{"name":"transporterName","in":"query","description":"Only invoices whose Transporter is exactly this.","schema":{"type":"string"}},{"name":"transporterId","in":"query","description":"Only invoices whose Transporter ID is exactly this.","schema":{"type":"string"}},{"name":"transportDocNumber","in":"query","description":"Only invoices whose Transport document no. is exactly this.","schema":{"type":"string"}},{"name":"transportDocDate","in":"query","description":"Only invoices whose Transport document date is exactly this.","schema":{"type":"string"}},{"name":"shippingstreet","in":"query","description":"Only invoices whose Ship-to street is exactly this.","schema":{"type":"string"}},{"name":"shippingcity","in":"query","description":"Only invoices whose Ship-to city is exactly this.","schema":{"type":"string"}},{"name":"shippingstate","in":"query","description":"Only invoices whose Ship-to state / province is exactly this.","schema":{"type":"string"}},{"name":"shippingpostalCode","in":"query","description":"Only invoices whose Ship-to ZIP / postal code is exactly this.","schema":{"type":"string"}},{"name":"dispatchstreet","in":"query","description":"Only invoices whose Dispatch-from street is exactly this.","schema":{"type":"string"}},{"name":"dispatchcity","in":"query","description":"Only invoices whose Dispatch-from city is exactly this.","schema":{"type":"string"}},{"name":"dispatchstate","in":"query","description":"Only invoices whose Dispatch-from state / province is exactly this.","schema":{"type":"string"}},{"name":"dispatchpostalCode","in":"query","description":"Only invoices whose Dispatch-from ZIP / postal code is exactly this.","schema":{"type":"string"}},{"name":"bankName","in":"query","description":"Only invoices whose Bank name is exactly this.","schema":{"type":"string"}},{"name":"bankAccountName","in":"query","description":"Only invoices whose Account holder name is exactly this.","schema":{"type":"string"}},{"name":"bankAccount","in":"query","description":"Only invoices whose Account number is exactly this.","schema":{"type":"string"}},{"name":"iban","in":"query","description":"Only invoices whose IBAN is exactly this.","schema":{"type":"string"}},{"name":"ifsc","in":"query","description":"Only invoices whose IFSC code is exactly this.","schema":{"type":"string"}},{"name":"routingNumber","in":"query","description":"Only invoices whose ABA routing number is exactly this.","schema":{"type":"string"}},{"name":"sortCode","in":"query","description":"Only invoices whose Sort code is exactly this.","schema":{"type":"string"}},{"name":"transitNumber","in":"query","description":"Only invoices whose Transit & institution number is exactly this.","schema":{"type":"string"}},{"name":"bsb","in":"query","description":"Only invoices whose BSB number is exactly this.","schema":{"type":"string"}},{"name":"swiftBic","in":"query","description":"Only invoices whose SWIFT / BIC is exactly this.","schema":{"type":"string"}},{"name":"bankBranch","in":"query","description":"Only invoices whose Branch is exactly this.","schema":{"type":"string"}},{"name":"terms","in":"query","description":"Only invoices whose Terms & conditions is exactly this.","schema":{"type":"string"}},{"name":"customerNotes","in":"query","description":"Only invoices whose Notes to customer is exactly this.","schema":{"type":"string"}},{"name":"companyId","in":"query","description":"Only invoices whose Company / account (record id) is exactly this.","schema":{"type":"string"}},{"name":"billingContactId","in":"query","description":"Only invoices whose Billing contact (record id) is exactly this.","schema":{"type":"string"}}],"responses":{"200":{"summary":"A page of invoices","description":"The records, with their values masked to what the caller may see, and where to go next.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Plan-Calls-Limit":{"$ref":"#/components/headers/PlanCallsLimit"},"X-Plan-Calls-Remaining":{"$ref":"#/components/headers/PlanCallsRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoicePage"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["invoices:read"]},{"apiKeyHeader":["invoices:read"]},{"signIn":["invoices:read"]}]},"post":{"operationId":"createInvoice","tags":["Invoices"],"summary":"Create an invoice","description":"Create a record. Honours Idempotency-Key.\n\nUnknown field keys are refused (422 unknown_field); fields the system keeps are ignored and listed in rejectedFields. Duplicate rules that warn come back as possibleDuplicates; one that blocks answers 409.\n\nLeft without a name, it is given the next number in the workspace's sequence.\n\nIt becomes Partly paid or Paid only by a payment: send amountPaid with a new invoice to record one; a status of Partly paid or Paid with no money behind it is refused (400). Later payments are recorded in the app.\n\nCounts towards the plan's record allowance: when that is full, a create is refused (400) until records are deleted or the plan grows.","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceCreate"}}}},"responses":{"201":{"summary":"Created","description":"The new invoice, as saved.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Plan-Calls-Limit":{"$ref":"#/components/headers/PlanCallsLimit"},"X-Plan-Calls-Remaining":{"$ref":"#/components/headers/PlanCallsRemaining"},"Idempotent-Replay":{"$ref":"#/components/headers/IdempotentReplay"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceSaved"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["invoices:write"]},{"apiKeyHeader":["invoices:write"]},{"signIn":["invoices:write"]}]}},"/api/v1/invoice/{id}":{"get":{"operationId":"getInvoice","tags":["Invoices"],"summary":"Read an invoice","description":"Read one record.\n\nWith its line items, its timeline and the history of its values. A record older than the newest ones the plan opens answers 403 over_plan.","parameters":[{"$ref":"#/components/parameters/RecordId"}],"responses":{"200":{"summary":"The invoice","description":"The record and what hangs off it.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Plan-Calls-Limit":{"$ref":"#/components/headers/PlanCallsLimit"},"X-Plan-Calls-Remaining":{"$ref":"#/components/headers/PlanCallsRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceDetail"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["invoices:read"]},{"apiKeyHeader":["invoices:read"]},{"signIn":["invoices:read"]}]},"patch":{"operationId":"updateInvoice","tags":["Invoices"],"summary":"Change an invoice","description":"Update a record. Send only the fields that change.\n\nA record waiting on an approval, or whose subject asked for processing to stop, refuses changes (403).\n\nOnce an invoice has gone out (Pending, Partly paid, Paid or Overdue), a change to what it charged is refused with 409 record_settled — it is corrected with a credit note — and a void invoice refuses every change. Its status may still move, and notes and other descriptive fields stay editable.\n\nIts total and tax are worked out from its line items, which are written in the app — an API key cannot reach them — and come back as lineItems when one record is read.","parameters":[{"$ref":"#/components/parameters/RecordId"},{"$ref":"#/components/parameters/IfMatch"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceUpdate"}}}},"responses":{"200":{"summary":"Changed","description":"The invoice, as saved.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Plan-Calls-Limit":{"$ref":"#/components/headers/PlanCallsLimit"},"X-Plan-Calls-Remaining":{"$ref":"#/components/headers/PlanCallsRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceSaved"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["invoices:write"]},{"apiKeyHeader":["invoices:write"]},{"signIn":["invoices:write"]}]},"delete":{"operationId":"deleteInvoice","tags":["Invoices"],"summary":"Delete an invoice","description":"Move a record to the recycle bin.\n\nIt can be restored until the recycle bin is emptied, which an API key cannot do.\n\nAn invoice registered on the IRP is cancelled on the portal, not deleted: it answers 409 record_settled.","parameters":[{"$ref":"#/components/parameters/RecordId"}],"responses":{"204":{"$ref":"#/components/responses/Deleted"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["invoices:write"]},{"apiKeyHeader":["invoices:write"]},{"signIn":["invoices:write"]}]}},"/api/v1/invoice/{id}/restore":{"post":{"operationId":"restoreInvoice","tags":["Invoices"],"summary":"Restore an invoice","description":"Restore a record from the recycle bin.","parameters":[{"$ref":"#/components/parameters/RecordId"},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"$ref":"#/components/responses/Restored"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["invoices:write"]},{"apiKeyHeader":["invoices:write"]},{"signIn":["invoices:write"]}]}},"/api/v1/invoice/bulk":{"post":{"operationId":"bulkUpdateInvoices","tags":["Invoices"],"summary":"Change many invoices","description":"The same change to up to 500 records, each held to the rules of a single update. Records that refuse are listed in failed with the reason; the rest are changed.","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceBulkUpdate"}}}},"responses":{"200":{"$ref":"#/components/responses/BulkUpdated"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["invoices:write"]},{"apiKeyHeader":["invoices:write"]},{"signIn":["invoices:write"]}]}},"/api/v1/invoice/merge":{"post":{"operationId":"mergeInvoices","tags":["Invoices"],"summary":"Merge two invoices","description":"Merge one record into another, choosing which value survives per field.\n\nIn one transaction: the survivor takes the chosen values, the other's activities, line items, history and files move onto it, records that named the other by name name the survivor, and the other goes to the recycle bin.","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceMerge"}}}},"responses":{"200":{"$ref":"#/components/responses/Merged"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["invoices:write"]},{"apiKeyHeader":["invoices:write"]},{"signIn":["invoices:write"]}]}},"/api/v1/invoice/merge-preview":{"get":{"operationId":"previewInvoiceMerge","tags":["Invoices"],"summary":"Compare two invoices before merging","description":"Two records side by side: which fields differ, and what a merge would move.","parameters":[{"$ref":"#/components/parameters/KeepId"},{"$ref":"#/components/parameters/MergeId"}],"responses":{"200":{"$ref":"#/components/responses/MergePreviewed"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["invoices:read"]},{"apiKeyHeader":["invoices:read"]},{"signIn":["invoices:read"]}]}},"/api/v1/creditnote":{"get":{"operationId":"listCreditNotes","tags":["Credit notes","Module: Credit notes"],"summary":"List credit notes","description":"List records. Supports limit, cursor, q, field filters, and sort=newest for newest first.\n\nEvery other query parameter is an exact match on a field, and they combine: `?status=Open&city=Pune`. The fields are listed below; a workspace's custom fields work the same way. ownerId is not a field, so it cannot be filtered on.\n\nA workspace over its plan's record allowance lists only the newest records the plan opens.\n\nPart of Credit notes: listing, creating and bulk updates answer 403 module_not_entitled on a plan without it.","parameters":[{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/Cursor"},{"$ref":"#/components/parameters/Search"},{"$ref":"#/components/parameters/Sort"},{"$ref":"#/components/parameters/Deleted"},{"name":"name","in":"query","description":"Only credit notes whose Credit note number is exactly this.","schema":{"type":"string"}},{"name":"againstInvoice","in":"query","description":"Only credit notes whose Against invoice is exactly this.","schema":{"type":"string"}},{"name":"company","in":"query","description":"Only credit notes whose Company / account is exactly this.","schema":{"type":"string"}},{"name":"billingContact","in":"query","description":"Only credit notes whose Billing contact is exactly this.","schema":{"type":"string"}},{"name":"billingEmail","in":"query","description":"Only credit notes whose Billing email is exactly this.","schema":{"type":"string"}},{"name":"value","in":"query","description":"Only credit notes whose Credit amount is exactly this.","schema":{"type":"number"}},{"name":"currency","in":"query","description":"Only credit notes whose Record currency is exactly this.","schema":{"type":"string"}},{"name":"issueDate","in":"query","description":"Only credit notes whose Issue date is exactly this.","schema":{"type":"string"}},{"name":"reason","in":"query","description":"Only credit notes whose Reason is exactly this.","schema":{"type":"string"}},{"name":"status","in":"query","description":"Only credit notes whose Status is exactly this.","schema":{"type":"string"}},{"name":"owner","in":"query","description":"Only credit notes whose Record owner is exactly this.","schema":{"type":"string"}},{"name":"country","in":"query","description":"Only credit notes whose Country is exactly this.","schema":{"type":"string"}},{"name":"description","in":"query","description":"Only credit notes whose Description / notes is exactly this.","schema":{"type":"string"}},{"name":"tags","in":"query","description":"Only credit notes whose Tags is exactly this.","schema":{"type":"string"}},{"name":"companyId","in":"query","description":"Only credit notes whose Company / account (record id) is exactly this.","schema":{"type":"string"}},{"name":"billingContactId","in":"query","description":"Only credit notes whose Billing contact (record id) is exactly this.","schema":{"type":"string"}}],"responses":{"200":{"summary":"A page of credit notes","description":"The records, with their values masked to what the caller may see, and where to go next.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Plan-Calls-Limit":{"$ref":"#/components/headers/PlanCallsLimit"},"X-Plan-Calls-Remaining":{"$ref":"#/components/headers/PlanCallsRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreditNotePage"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["creditnotes:read"]},{"apiKeyHeader":["creditnotes:read"]},{"signIn":["creditnotes:read"]}]},"post":{"operationId":"createCreditNote","tags":["Credit notes","Module: Credit notes"],"summary":"Create a credit note","description":"Create a record. Honours Idempotency-Key.\n\nUnknown field keys are refused (422 unknown_field); fields the system keeps are ignored and listed in rejectedFields. Duplicate rules that warn come back as possibleDuplicates; one that blocks answers 409.\n\nLeft without a name, it is given the next number in the workspace's sequence.\n\nPart of Credit notes: listing, creating and bulk updates answer 403 module_not_entitled on a plan without it.","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreditNoteCreate"}}}},"responses":{"201":{"summary":"Created","description":"The new credit note, as saved.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Plan-Calls-Limit":{"$ref":"#/components/headers/PlanCallsLimit"},"X-Plan-Calls-Remaining":{"$ref":"#/components/headers/PlanCallsRemaining"},"Idempotent-Replay":{"$ref":"#/components/headers/IdempotentReplay"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreditNoteSaved"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["creditnotes:write"]},{"apiKeyHeader":["creditnotes:write"]},{"signIn":["creditnotes:write"]}]}},"/api/v1/creditnote/{id}":{"get":{"operationId":"getCreditNote","tags":["Credit notes","Module: Credit notes"],"summary":"Read a credit note","description":"Read one record.\n\nWith its line items, its timeline and the history of its values. A record older than the newest ones the plan opens answers 403 over_plan.","parameters":[{"$ref":"#/components/parameters/RecordId"}],"responses":{"200":{"summary":"The credit note","description":"The record and what hangs off it.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Plan-Calls-Limit":{"$ref":"#/components/headers/PlanCallsLimit"},"X-Plan-Calls-Remaining":{"$ref":"#/components/headers/PlanCallsRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreditNoteDetail"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["creditnotes:read"]},{"apiKeyHeader":["creditnotes:read"]},{"signIn":["creditnotes:read"]}]},"patch":{"operationId":"updateCreditNote","tags":["Credit notes","Module: Credit notes"],"summary":"Change a credit note","description":"Update a record. Send only the fields that change.\n\nA record waiting on an approval, or whose subject asked for processing to stop, refuses changes (403).\n\nOnce a credit note is Issued or Applied, a change to what it credits is refused with 409 record_settled, and a cancelled one refuses every change.\n\nIts total and tax are worked out from its line items, which are written in the app — an API key cannot reach them — and come back as lineItems when one record is read.","parameters":[{"$ref":"#/components/parameters/RecordId"},{"$ref":"#/components/parameters/IfMatch"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreditNoteUpdate"}}}},"responses":{"200":{"summary":"Changed","description":"The credit note, as saved.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Plan-Calls-Limit":{"$ref":"#/components/headers/PlanCallsLimit"},"X-Plan-Calls-Remaining":{"$ref":"#/components/headers/PlanCallsRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreditNoteSaved"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["creditnotes:write"]},{"apiKeyHeader":["creditnotes:write"]},{"signIn":["creditnotes:write"]}]},"delete":{"operationId":"deleteCreditNote","tags":["Credit notes","Module: Credit notes"],"summary":"Delete a credit note","description":"Move a record to the recycle bin.\n\nIt can be restored until the recycle bin is emptied, which an API key cannot do.","parameters":[{"$ref":"#/components/parameters/RecordId"}],"responses":{"204":{"$ref":"#/components/responses/Deleted"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["creditnotes:write"]},{"apiKeyHeader":["creditnotes:write"]},{"signIn":["creditnotes:write"]}]}},"/api/v1/creditnote/{id}/restore":{"post":{"operationId":"restoreCreditNote","tags":["Credit notes","Module: Credit notes"],"summary":"Restore a credit note","description":"Restore a record from the recycle bin.","parameters":[{"$ref":"#/components/parameters/RecordId"},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"$ref":"#/components/responses/Restored"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["creditnotes:write"]},{"apiKeyHeader":["creditnotes:write"]},{"signIn":["creditnotes:write"]}]}},"/api/v1/creditnote/bulk":{"post":{"operationId":"bulkUpdateCreditNotes","tags":["Credit notes","Module: Credit notes"],"summary":"Change many credit notes","description":"The same change to up to 500 records, each held to the rules of a single update. Records that refuse are listed in failed with the reason; the rest are changed.\n\nPart of Credit notes: listing, creating and bulk updates answer 403 module_not_entitled on a plan without it.","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreditNoteBulkUpdate"}}}},"responses":{"200":{"$ref":"#/components/responses/BulkUpdated"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["creditnotes:write"]},{"apiKeyHeader":["creditnotes:write"]},{"signIn":["creditnotes:write"]}]}},"/api/v1/creditnote/merge":{"post":{"operationId":"mergeCreditNotes","tags":["Credit notes","Module: Credit notes"],"summary":"Merge two credit notes","description":"Merge one record into another, choosing which value survives per field.\n\nIn one transaction: the survivor takes the chosen values, the other's activities, line items, history and files move onto it, records that named the other by name name the survivor, and the other goes to the recycle bin.","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreditNoteMerge"}}}},"responses":{"200":{"$ref":"#/components/responses/Merged"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["creditnotes:write"]},{"apiKeyHeader":["creditnotes:write"]},{"signIn":["creditnotes:write"]}]}},"/api/v1/creditnote/merge-preview":{"get":{"operationId":"previewCreditNoteMerge","tags":["Credit notes","Module: Credit notes"],"summary":"Compare two credit notes before merging","description":"Two records side by side: which fields differ, and what a merge would move.","parameters":[{"$ref":"#/components/parameters/KeepId"},{"$ref":"#/components/parameters/MergeId"}],"responses":{"200":{"$ref":"#/components/responses/MergePreviewed"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["creditnotes:read"]},{"apiKeyHeader":["creditnotes:read"]},{"signIn":["creditnotes:read"]}]}},"/api/v1/recurring":{"get":{"operationId":"listRecurringInvoices","tags":["Recurring invoices","Module: Recurring invoices"],"summary":"List recurring invoices","description":"List records. Supports limit, cursor, q, field filters, and sort=newest for newest first.\n\nEvery other query parameter is an exact match on a field, and they combine: `?status=Open&city=Pune`. The fields are listed below; a workspace's custom fields work the same way. ownerId is not a field, so it cannot be filtered on.\n\nA workspace over its plan's record allowance lists only the newest records the plan opens.\n\nPart of Recurring invoices: listing, creating and bulk updates answer 403 module_not_entitled on a plan without it.","parameters":[{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/Cursor"},{"$ref":"#/components/parameters/Search"},{"$ref":"#/components/parameters/Sort"},{"$ref":"#/components/parameters/Deleted"},{"name":"country","in":"query","description":"Only recurring invoices whose Country is exactly this.","schema":{"type":"string"}},{"name":"state","in":"query","description":"Only recurring invoices whose State / province is exactly this.","schema":{"type":"string"}},{"name":"name","in":"query","description":"Only recurring invoices whose Profile name is exactly this.","schema":{"type":"string"}},{"name":"company","in":"query","description":"Only recurring invoices whose Company / account is exactly this.","schema":{"type":"string"}},{"name":"billingContact","in":"query","description":"Only recurring invoices whose Billing contact is exactly this.","schema":{"type":"string"}},{"name":"billingEmail","in":"query","description":"Only recurring invoices whose Billing email is exactly this.","schema":{"type":"string"}},{"name":"status","in":"query","description":"Only recurring invoices whose Profile status is exactly this.","schema":{"type":"string"}},{"name":"frequency","in":"query","description":"Only recurring invoices whose Repeats is exactly this.","schema":{"type":"string"}},{"name":"interval","in":"query","description":"Only recurring invoices whose Every N periods is exactly this.","schema":{"type":"number"}},{"name":"startDate","in":"query","description":"Only recurring invoices whose First invoice date is exactly this.","schema":{"type":"string"}},{"name":"endCondition","in":"query","description":"Only recurring invoices whose Ends is exactly this.","schema":{"type":"string"}},{"name":"endDate","in":"query","description":"Only recurring invoices whose End date is exactly this.","schema":{"type":"string"}},{"name":"occurrences","in":"query","description":"Only recurring invoices whose Number of invoices is exactly this.","schema":{"type":"number"}},{"name":"nextRunAt","in":"query","description":"Only recurring invoices whose Next invoice due to generate is exactly this.","schema":{"type":"string"}},{"name":"generatedCount","in":"query","description":"Only recurring invoices whose Invoices generated so far is exactly this.","schema":{"type":"number"}},{"name":"value","in":"query","description":"Only recurring invoices whose Amount per invoice is exactly this.","schema":{"type":"number"}},{"name":"currency","in":"query","description":"Only recurring invoices whose Record currency is exactly this.","schema":{"type":"string"}},{"name":"paymentTerms","in":"query","description":"Only recurring invoices whose Payment terms is exactly this.","schema":{"type":"string"}},{"name":"poNumber","in":"query","description":"Only recurring invoices whose Customer PO number is exactly this.","schema":{"type":"string"}},{"name":"autoSend","in":"query","description":"Only recurring invoices whose Email the invoice automatically is exactly this.","schema":{"type":"boolean"}},{"name":"autoCharge","in":"query","description":"Only recurring invoices whose Charge the saved payment method is exactly this.","schema":{"type":"boolean"}},{"name":"retryOnFailure","in":"query","description":"Only recurring invoices whose Retry a failed charge is exactly this.","schema":{"type":"boolean"}},{"name":"proration","in":"query","description":"Only recurring invoices whose Prorate the first invoice is exactly this.","schema":{"type":"boolean"}},{"name":"owner","in":"query","description":"Only recurring invoices whose Record owner is exactly this.","schema":{"type":"string"}},{"name":"taxStatus","in":"query","description":"Only recurring invoices whose Tax registration status is exactly this.","schema":{"type":"string"}},{"name":"legalName","in":"query","description":"Only recurring invoices whose Registered legal name is exactly this.","schema":{"type":"string"}},{"name":"gstin","in":"query","description":"Only recurring invoices whose GSTIN is exactly this.","schema":{"type":"string"}},{"name":"pan","in":"query","description":"Only recurring invoices whose PAN is exactly this.","schema":{"type":"string"}},{"name":"cin","in":"query","description":"Only recurring invoices whose CIN / LLPIN is exactly this.","schema":{"type":"string"}},{"name":"gstType","in":"query","description":"Only recurring invoices whose GST registration type is exactly this.","schema":{"type":"string"}},{"name":"gstStateCode","in":"query","description":"Only recurring invoices whose GST state code is exactly this.","schema":{"type":"string"}},{"name":"reverseCharge","in":"query","description":"Only recurring invoices whose Tax payable on reverse charge is exactly this.","schema":{"type":"string"}},{"name":"placeOfSupply","in":"query","description":"Only recurring invoices whose Place of supply is exactly this.","schema":{"type":"string"}},{"name":"trn","in":"query","description":"Only recurring invoices whose VAT TRN is exactly this.","schema":{"type":"string"}},{"name":"emirate","in":"query","description":"Only recurring invoices whose Emirate is exactly this.","schema":{"type":"string"}},{"name":"vatNumber","in":"query","description":"Only recurring invoices whose VAT / tax registration number is exactly this.","schema":{"type":"string"}},{"name":"ein","in":"query","description":"Only recurring invoices whose EIN / federal tax ID is exactly this.","schema":{"type":"string"}},{"name":"uen","in":"query","description":"Only recurring invoices whose UEN / GST registration is exactly this.","schema":{"type":"string"}},{"name":"abn","in":"query","description":"Only recurring invoices whose ABN / GST registration is exactly this.","schema":{"type":"string"}},{"name":"businessNumber","in":"query","description":"Only recurring invoices whose Business number / GST-HST is exactly this.","schema":{"type":"string"}},{"name":"taxExempt","in":"query","description":"Only recurring invoices whose Tax-exempt customer is exactly this.","schema":{"type":"boolean"}},{"name":"exportTax","in":"query","description":"Only recurring invoices whose Export / SEZ supply is exactly this.","schema":{"type":"string"}},{"name":"chargeTaxAbroad","in":"query","description":"Only recurring invoices whose Charge tax as at home is exactly this.","schema":{"type":"boolean"}},{"name":"lastInvoiceRef","in":"query","description":"Only recurring invoices whose Last invoice raised is exactly this.","schema":{"type":"string"}},{"name":"lastRunAt","in":"query","description":"Only recurring invoices whose Last generated on is exactly this.","schema":{"type":"string"}},{"name":"description","in":"query","description":"Only recurring invoices whose Description / notes is exactly this.","schema":{"type":"string"}},{"name":"companyId","in":"query","description":"Only recurring invoices whose Company / account (record id) is exactly this.","schema":{"type":"string"}},{"name":"billingContactId","in":"query","description":"Only recurring invoices whose Billing contact (record id) is exactly this.","schema":{"type":"string"}}],"responses":{"200":{"summary":"A page of recurring invoices","description":"The records, with their values masked to what the caller may see, and where to go next.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Plan-Calls-Limit":{"$ref":"#/components/headers/PlanCallsLimit"},"X-Plan-Calls-Remaining":{"$ref":"#/components/headers/PlanCallsRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecurringInvoicePage"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["recurring:read"]},{"apiKeyHeader":["recurring:read"]},{"signIn":["recurring:read"]}]},"post":{"operationId":"createRecurringInvoice","tags":["Recurring invoices","Module: Recurring invoices"],"summary":"Create a recurring invoice","description":"Create a record. Honours Idempotency-Key.\n\nUnknown field keys are refused (422 unknown_field); fields the system keeps are ignored and listed in rejectedFields. Duplicate rules that warn come back as possibleDuplicates; one that blocks answers 409.\n\nCounts towards the plan's record allowance: when that is full, a create is refused (400) until records are deleted or the plan grows.\n\nPart of Recurring invoices: listing, creating and bulk updates answer 403 module_not_entitled on a plan without it.","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecurringInvoiceCreate"}}}},"responses":{"201":{"summary":"Created","description":"The new recurring invoice, as saved.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Plan-Calls-Limit":{"$ref":"#/components/headers/PlanCallsLimit"},"X-Plan-Calls-Remaining":{"$ref":"#/components/headers/PlanCallsRemaining"},"Idempotent-Replay":{"$ref":"#/components/headers/IdempotentReplay"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecurringInvoiceSaved"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["recurring:write"]},{"apiKeyHeader":["recurring:write"]},{"signIn":["recurring:write"]}]}},"/api/v1/recurring/{id}":{"get":{"operationId":"getRecurringInvoice","tags":["Recurring invoices","Module: Recurring invoices"],"summary":"Read a recurring invoice","description":"Read one record.\n\nWith its line items, its timeline and the history of its values. A record older than the newest ones the plan opens answers 403 over_plan.","parameters":[{"$ref":"#/components/parameters/RecordId"}],"responses":{"200":{"summary":"The recurring invoice","description":"The record and what hangs off it.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Plan-Calls-Limit":{"$ref":"#/components/headers/PlanCallsLimit"},"X-Plan-Calls-Remaining":{"$ref":"#/components/headers/PlanCallsRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecurringInvoiceDetail"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["recurring:read"]},{"apiKeyHeader":["recurring:read"]},{"signIn":["recurring:read"]}]},"patch":{"operationId":"updateRecurringInvoice","tags":["Recurring invoices","Module: Recurring invoices"],"summary":"Change a recurring invoice","description":"Update a record. Send only the fields that change.\n\nA record waiting on an approval, or whose subject asked for processing to stop, refuses changes (403).\n\nWhile a schedule is Active its figures are refused with 409 record_settled — pause it first — and an ended schedule refuses every change.\n\nIts total and tax are worked out from its line items, which are written in the app — an API key cannot reach them — and come back as lineItems when one record is read.","parameters":[{"$ref":"#/components/parameters/RecordId"},{"$ref":"#/components/parameters/IfMatch"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecurringInvoiceUpdate"}}}},"responses":{"200":{"summary":"Changed","description":"The recurring invoice, as saved.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Plan-Calls-Limit":{"$ref":"#/components/headers/PlanCallsLimit"},"X-Plan-Calls-Remaining":{"$ref":"#/components/headers/PlanCallsRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecurringInvoiceSaved"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["recurring:write"]},{"apiKeyHeader":["recurring:write"]},{"signIn":["recurring:write"]}]},"delete":{"operationId":"deleteRecurringInvoice","tags":["Recurring invoices","Module: Recurring invoices"],"summary":"Delete a recurring invoice","description":"Move a record to the recycle bin.\n\nIt can be restored until the recycle bin is emptied, which an API key cannot do.","parameters":[{"$ref":"#/components/parameters/RecordId"}],"responses":{"204":{"$ref":"#/components/responses/Deleted"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["recurring:write"]},{"apiKeyHeader":["recurring:write"]},{"signIn":["recurring:write"]}]}},"/api/v1/recurring/{id}/restore":{"post":{"operationId":"restoreRecurringInvoice","tags":["Recurring invoices","Module: Recurring invoices"],"summary":"Restore a recurring invoice","description":"Restore a record from the recycle bin.","parameters":[{"$ref":"#/components/parameters/RecordId"},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"$ref":"#/components/responses/Restored"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["recurring:write"]},{"apiKeyHeader":["recurring:write"]},{"signIn":["recurring:write"]}]}},"/api/v1/recurring/bulk":{"post":{"operationId":"bulkUpdateRecurringInvoices","tags":["Recurring invoices","Module: Recurring invoices"],"summary":"Change many recurring invoices","description":"The same change to up to 500 records, each held to the rules of a single update. Records that refuse are listed in failed with the reason; the rest are changed.\n\nPart of Recurring invoices: listing, creating and bulk updates answer 403 module_not_entitled on a plan without it.","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecurringInvoiceBulkUpdate"}}}},"responses":{"200":{"$ref":"#/components/responses/BulkUpdated"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["recurring:write"]},{"apiKeyHeader":["recurring:write"]},{"signIn":["recurring:write"]}]}},"/api/v1/recurring/merge":{"post":{"operationId":"mergeRecurringInvoices","tags":["Recurring invoices","Module: Recurring invoices"],"summary":"Merge two recurring invoices","description":"Merge one record into another, choosing which value survives per field.\n\nIn one transaction: the survivor takes the chosen values, the other's activities, line items, history and files move onto it, records that named the other by name name the survivor, and the other goes to the recycle bin.","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecurringInvoiceMerge"}}}},"responses":{"200":{"$ref":"#/components/responses/Merged"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["recurring:write"]},{"apiKeyHeader":["recurring:write"]},{"signIn":["recurring:write"]}]}},"/api/v1/recurring/merge-preview":{"get":{"operationId":"previewRecurringInvoiceMerge","tags":["Recurring invoices","Module: Recurring invoices"],"summary":"Compare two recurring invoices before merging","description":"Two records side by side: which fields differ, and what a merge would move.","parameters":[{"$ref":"#/components/parameters/KeepId"},{"$ref":"#/components/parameters/MergeId"}],"responses":{"200":{"$ref":"#/components/responses/MergePreviewed"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["recurring:read"]},{"apiKeyHeader":["recurring:read"]},{"signIn":["recurring:read"]}]}},"/api/v1/product":{"get":{"operationId":"listProducts","tags":["Products"],"summary":"List products","description":"List records. Supports limit, cursor, q, field filters, and sort=newest for newest first.\n\nEvery other query parameter is an exact match on a field, and they combine: `?status=Open&city=Pune`. The fields are listed below; a workspace's custom fields work the same way. ownerId is not a field, so it cannot be filtered on.\n\nA workspace over its plan's record allowance lists only the newest records the plan opens.","parameters":[{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/Cursor"},{"$ref":"#/components/parameters/Search"},{"$ref":"#/components/parameters/Sort"},{"$ref":"#/components/parameters/Deleted"},{"name":"name","in":"query","description":"Only products whose Product name is exactly this.","schema":{"type":"string"}},{"name":"sku","in":"query","description":"Only products whose SKU / product code is exactly this.","schema":{"type":"string"}},{"name":"family","in":"query","description":"Only products whose Category is exactly this.","schema":{"type":"string"}},{"name":"status","in":"query","description":"Only products whose Product status is exactly this.","schema":{"type":"string"}},{"name":"unitPrice","in":"query","description":"Only products whose Unit price is exactly this.","schema":{"type":"number"}},{"name":"currency","in":"query","description":"Only products whose Record currency is exactly this.","schema":{"type":"string"}},{"name":"unit","in":"query","description":"Only products whose Unit of measure is exactly this.","schema":{"type":"string"}},{"name":"cost","in":"query","description":"Only products whose Unit cost is exactly this.","schema":{"type":"number"}},{"name":"hsn","in":"query","description":"Only products whose HSN / SAC code is exactly this.","schema":{"type":"string"}},{"name":"taxRate","in":"query","description":"Only products whose Default tax rate (%) is exactly this.","schema":{"type":"number"}},{"name":"taxable","in":"query","description":"Only products whose Tax treatment is exactly this.","schema":{"type":"string"}},{"name":"stock","in":"query","description":"Only products whose Available quantity is exactly this.","schema":{"type":"number"}},{"name":"description","in":"query","description":"Only products whose Description / notes is exactly this.","schema":{"type":"string"}}],"responses":{"200":{"summary":"A page of products","description":"The records, with their values masked to what the caller may see, and where to go next.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Plan-Calls-Limit":{"$ref":"#/components/headers/PlanCallsLimit"},"X-Plan-Calls-Remaining":{"$ref":"#/components/headers/PlanCallsRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductPage"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["products:read"]},{"apiKeyHeader":["products:read"]},{"signIn":["products:read"]}]},"post":{"operationId":"createProduct","tags":["Products"],"summary":"Create a product","description":"Create a record. Honours Idempotency-Key.\n\nUnknown field keys are refused (422 unknown_field); fields the system keeps are ignored and listed in rejectedFields. Duplicate rules that warn come back as possibleDuplicates; one that blocks answers 409.","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductCreate"}}}},"responses":{"201":{"summary":"Created","description":"The new product, as saved.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Plan-Calls-Limit":{"$ref":"#/components/headers/PlanCallsLimit"},"X-Plan-Calls-Remaining":{"$ref":"#/components/headers/PlanCallsRemaining"},"Idempotent-Replay":{"$ref":"#/components/headers/IdempotentReplay"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductSaved"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["products:write"]},{"apiKeyHeader":["products:write"]},{"signIn":["products:write"]}]}},"/api/v1/product/{id}":{"get":{"operationId":"getProduct","tags":["Products"],"summary":"Read a product","description":"Read one record.\n\nWith its line items, its timeline and the history of its values. A record older than the newest ones the plan opens answers 403 over_plan.","parameters":[{"$ref":"#/components/parameters/RecordId"}],"responses":{"200":{"summary":"The product","description":"The record and what hangs off it.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Plan-Calls-Limit":{"$ref":"#/components/headers/PlanCallsLimit"},"X-Plan-Calls-Remaining":{"$ref":"#/components/headers/PlanCallsRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductDetail"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["products:read"]},{"apiKeyHeader":["products:read"]},{"signIn":["products:read"]}]},"patch":{"operationId":"updateProduct","tags":["Products"],"summary":"Change a product","description":"Update a record. Send only the fields that change.\n\nA record waiting on an approval, or whose subject asked for processing to stop, refuses changes (403).","parameters":[{"$ref":"#/components/parameters/RecordId"},{"$ref":"#/components/parameters/IfMatch"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductUpdate"}}}},"responses":{"200":{"summary":"Changed","description":"The product, as saved.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Plan-Calls-Limit":{"$ref":"#/components/headers/PlanCallsLimit"},"X-Plan-Calls-Remaining":{"$ref":"#/components/headers/PlanCallsRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductSaved"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["products:write"]},{"apiKeyHeader":["products:write"]},{"signIn":["products:write"]}]},"delete":{"operationId":"deleteProduct","tags":["Products"],"summary":"Delete a product","description":"Move a record to the recycle bin.\n\nIt can be restored until the recycle bin is emptied, which an API key cannot do.","parameters":[{"$ref":"#/components/parameters/RecordId"}],"responses":{"204":{"$ref":"#/components/responses/Deleted"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["products:write"]},{"apiKeyHeader":["products:write"]},{"signIn":["products:write"]}]}},"/api/v1/product/{id}/restore":{"post":{"operationId":"restoreProduct","tags":["Products"],"summary":"Restore a product","description":"Restore a record from the recycle bin.","parameters":[{"$ref":"#/components/parameters/RecordId"},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"$ref":"#/components/responses/Restored"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["products:write"]},{"apiKeyHeader":["products:write"]},{"signIn":["products:write"]}]}},"/api/v1/product/bulk":{"post":{"operationId":"bulkUpdateProducts","tags":["Products"],"summary":"Change many products","description":"The same change to up to 500 records, each held to the rules of a single update. Records that refuse are listed in failed with the reason; the rest are changed.","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductBulkUpdate"}}}},"responses":{"200":{"$ref":"#/components/responses/BulkUpdated"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["products:write"]},{"apiKeyHeader":["products:write"]},{"signIn":["products:write"]}]}},"/api/v1/product/merge":{"post":{"operationId":"mergeProducts","tags":["Products"],"summary":"Merge two products","description":"Merge one record into another, choosing which value survives per field.\n\nIn one transaction: the survivor takes the chosen values, the other's activities, line items, history and files move onto it, records that named the other by name name the survivor, and the other goes to the recycle bin.","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductMerge"}}}},"responses":{"200":{"$ref":"#/components/responses/Merged"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["products:write"]},{"apiKeyHeader":["products:write"]},{"signIn":["products:write"]}]}},"/api/v1/product/merge-preview":{"get":{"operationId":"previewProductMerge","tags":["Products"],"summary":"Compare two products before merging","description":"Two records side by side: which fields differ, and what a merge would move.","parameters":[{"$ref":"#/components/parameters/KeepId"},{"$ref":"#/components/parameters/MergeId"}],"responses":{"200":{"$ref":"#/components/responses/MergePreviewed"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["products:read"]},{"apiKeyHeader":["products:read"]},{"signIn":["products:read"]}]}},"/api/v1/quote":{"get":{"operationId":"listQuotes","tags":["Quotes"],"summary":"List quotes","description":"List records. Supports limit, cursor, q, field filters, and sort=newest for newest first.\n\nEvery other query parameter is an exact match on a field, and they combine: `?status=Open&city=Pune`. The fields are listed below; a workspace's custom fields work the same way. ownerId is not a field, so it cannot be filtered on.\n\nA workspace over its plan's record allowance lists only the newest records the plan opens.","parameters":[{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/Cursor"},{"$ref":"#/components/parameters/Search"},{"$ref":"#/components/parameters/Sort"},{"$ref":"#/components/parameters/Deleted"},{"name":"country","in":"query","description":"Only quotes whose Country is exactly this.","schema":{"type":"string"}},{"name":"state","in":"query","description":"Only quotes whose State / province is exactly this.","schema":{"type":"string"}},{"name":"name","in":"query","description":"Only quotes whose Quote title is exactly this.","schema":{"type":"string"}},{"name":"quoteNumber","in":"query","description":"Only quotes whose Quote number is exactly this.","schema":{"type":"string"}},{"name":"value","in":"query","description":"Only quotes whose Quote amount is exactly this.","schema":{"type":"number"}},{"name":"company","in":"query","description":"Only quotes whose Company / account is exactly this.","schema":{"type":"string"}},{"name":"relatedDeal","in":"query","description":"Only quotes whose Related deal is exactly this.","schema":{"type":"string"}},{"name":"billingContact","in":"query","description":"Only quotes whose Contact is exactly this.","schema":{"type":"string"}},{"name":"email","in":"query","description":"Only quotes whose Email is exactly this.","schema":{"type":"string"}},{"name":"status","in":"query","description":"Only quotes whose Quote status is exactly this.","schema":{"type":"string"}},{"name":"validUntil","in":"query","description":"Only quotes whose Valid until is exactly this.","schema":{"type":"string"}},{"name":"currency","in":"query","description":"Only quotes whose Record currency is exactly this.","schema":{"type":"string"}},{"name":"priceBook","in":"query","description":"Only quotes whose Price book is exactly this.","schema":{"type":"string"}},{"name":"paymentTerms","in":"query","description":"Only quotes whose Payment terms is exactly this.","schema":{"type":"string"}},{"name":"street","in":"query","description":"Only quotes whose Street address is exactly this.","schema":{"type":"string"}},{"name":"buildingNumber","in":"query","description":"Only quotes whose Building number is exactly this.","schema":{"type":"string"}},{"name":"district","in":"query","description":"Only quotes whose District is exactly this.","schema":{"type":"string"}},{"name":"city","in":"query","description":"Only quotes whose City is exactly this.","schema":{"type":"string"}},{"name":"postalCode","in":"query","description":"Only quotes whose ZIP / postal code is exactly this.","schema":{"type":"string"}},{"name":"taxStatus","in":"query","description":"Only quotes whose Tax registration status is exactly this.","schema":{"type":"string"}},{"name":"legalName","in":"query","description":"Only quotes whose Registered legal name is exactly this.","schema":{"type":"string"}},{"name":"gstin","in":"query","description":"Only quotes whose GSTIN is exactly this.","schema":{"type":"string"}},{"name":"pan","in":"query","description":"Only quotes whose PAN is exactly this.","schema":{"type":"string"}},{"name":"cin","in":"query","description":"Only quotes whose CIN / LLPIN is exactly this.","schema":{"type":"string"}},{"name":"gstType","in":"query","description":"Only quotes whose GST registration type is exactly this.","schema":{"type":"string"}},{"name":"gstStateCode","in":"query","description":"Only quotes whose GST state code is exactly this.","schema":{"type":"string"}},{"name":"reverseCharge","in":"query","description":"Only quotes whose Tax payable on reverse charge is exactly this.","schema":{"type":"string"}},{"name":"placeOfSupply","in":"query","description":"Only quotes whose Place of supply is exactly this.","schema":{"type":"string"}},{"name":"trn","in":"query","description":"Only quotes whose VAT TRN is exactly this.","schema":{"type":"string"}},{"name":"emirate","in":"query","description":"Only quotes whose Emirate is exactly this.","schema":{"type":"string"}},{"name":"vatNumber","in":"query","description":"Only quotes whose VAT / tax registration number is exactly this.","schema":{"type":"string"}},{"name":"ein","in":"query","description":"Only quotes whose EIN / federal tax ID is exactly this.","schema":{"type":"string"}},{"name":"uen","in":"query","description":"Only quotes whose UEN / GST registration is exactly this.","schema":{"type":"string"}},{"name":"abn","in":"query","description":"Only quotes whose ABN / GST registration is exactly this.","schema":{"type":"string"}},{"name":"businessNumber","in":"query","description":"Only quotes whose Business number / GST-HST is exactly this.","schema":{"type":"string"}},{"name":"taxExempt","in":"query","description":"Only quotes whose Tax-exempt customer is exactly this.","schema":{"type":"boolean"}},{"name":"exportTax","in":"query","description":"Only quotes whose Export / SEZ supply is exactly this.","schema":{"type":"string"}},{"name":"chargeTaxAbroad","in":"query","description":"Only quotes whose Charge tax as at home is exactly this.","schema":{"type":"boolean"}},{"name":"owner","in":"query","description":"Only quotes whose Record owner is exactly this.","schema":{"type":"string"}},{"name":"terms","in":"query","description":"Only quotes whose Terms & conditions is exactly this.","schema":{"type":"string"}},{"name":"description","in":"query","description":"Only quotes whose Description / notes is exactly this.","schema":{"type":"string"}},{"name":"companyId","in":"query","description":"Only quotes whose Company / account (record id) is exactly this.","schema":{"type":"string"}},{"name":"billingContactId","in":"query","description":"Only quotes whose Contact (record id) is exactly this.","schema":{"type":"string"}}],"responses":{"200":{"summary":"A page of quotes","description":"The records, with their values masked to what the caller may see, and where to go next.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Plan-Calls-Limit":{"$ref":"#/components/headers/PlanCallsLimit"},"X-Plan-Calls-Remaining":{"$ref":"#/components/headers/PlanCallsRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuotePage"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["quotes:read"]},{"apiKeyHeader":["quotes:read"]},{"signIn":["quotes:read"]}]},"post":{"operationId":"createQuote","tags":["Quotes"],"summary":"Create a quote","description":"Create a record. Honours Idempotency-Key.\n\nUnknown field keys are refused (422 unknown_field); fields the system keeps are ignored and listed in rejectedFields. Duplicate rules that warn come back as possibleDuplicates; one that blocks answers 409.\n\nLeft without a name, it is given the next number in the workspace's sequence.\n\nCounts towards the plan's record allowance: when that is full, a create is refused (400) until records are deleted or the plan grows.","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuoteCreate"}}}},"responses":{"201":{"summary":"Created","description":"The new quote, as saved.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Plan-Calls-Limit":{"$ref":"#/components/headers/PlanCallsLimit"},"X-Plan-Calls-Remaining":{"$ref":"#/components/headers/PlanCallsRemaining"},"Idempotent-Replay":{"$ref":"#/components/headers/IdempotentReplay"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuoteSaved"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["quotes:write"]},{"apiKeyHeader":["quotes:write"]},{"signIn":["quotes:write"]}]}},"/api/v1/quote/{id}":{"get":{"operationId":"getQuote","tags":["Quotes"],"summary":"Read a quote","description":"Read one record.\n\nWith its line items, its timeline and the history of its values. A record older than the newest ones the plan opens answers 403 over_plan.","parameters":[{"$ref":"#/components/parameters/RecordId"}],"responses":{"200":{"summary":"The quote","description":"The record and what hangs off it.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Plan-Calls-Limit":{"$ref":"#/components/headers/PlanCallsLimit"},"X-Plan-Calls-Remaining":{"$ref":"#/components/headers/PlanCallsRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuoteDetail"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["quotes:read"]},{"apiKeyHeader":["quotes:read"]},{"signIn":["quotes:read"]}]},"patch":{"operationId":"updateQuote","tags":["Quotes"],"summary":"Change a quote","description":"Update a record. Send only the fields that change.\n\nA record waiting on an approval, or whose subject asked for processing to stop, refuses changes (403).\n\nIts total and tax are worked out from its line items, which are written in the app — an API key cannot reach them — and come back as lineItems when one record is read.","parameters":[{"$ref":"#/components/parameters/RecordId"},{"$ref":"#/components/parameters/IfMatch"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuoteUpdate"}}}},"responses":{"200":{"summary":"Changed","description":"The quote, as saved.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Plan-Calls-Limit":{"$ref":"#/components/headers/PlanCallsLimit"},"X-Plan-Calls-Remaining":{"$ref":"#/components/headers/PlanCallsRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuoteSaved"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["quotes:write"]},{"apiKeyHeader":["quotes:write"]},{"signIn":["quotes:write"]}]},"delete":{"operationId":"deleteQuote","tags":["Quotes"],"summary":"Delete a quote","description":"Move a record to the recycle bin.\n\nIt can be restored until the recycle bin is emptied, which an API key cannot do.","parameters":[{"$ref":"#/components/parameters/RecordId"}],"responses":{"204":{"$ref":"#/components/responses/Deleted"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["quotes:write"]},{"apiKeyHeader":["quotes:write"]},{"signIn":["quotes:write"]}]}},"/api/v1/quote/{id}/restore":{"post":{"operationId":"restoreQuote","tags":["Quotes"],"summary":"Restore a quote","description":"Restore a record from the recycle bin.","parameters":[{"$ref":"#/components/parameters/RecordId"},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"$ref":"#/components/responses/Restored"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["quotes:write"]},{"apiKeyHeader":["quotes:write"]},{"signIn":["quotes:write"]}]}},"/api/v1/quote/bulk":{"post":{"operationId":"bulkUpdateQuotes","tags":["Quotes"],"summary":"Change many quotes","description":"The same change to up to 500 records, each held to the rules of a single update. Records that refuse are listed in failed with the reason; the rest are changed.","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuoteBulkUpdate"}}}},"responses":{"200":{"$ref":"#/components/responses/BulkUpdated"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["quotes:write"]},{"apiKeyHeader":["quotes:write"]},{"signIn":["quotes:write"]}]}},"/api/v1/quote/merge":{"post":{"operationId":"mergeQuotes","tags":["Quotes"],"summary":"Merge two quotes","description":"Merge one record into another, choosing which value survives per field.\n\nIn one transaction: the survivor takes the chosen values, the other's activities, line items, history and files move onto it, records that named the other by name name the survivor, and the other goes to the recycle bin.","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuoteMerge"}}}},"responses":{"200":{"$ref":"#/components/responses/Merged"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["quotes:write"]},{"apiKeyHeader":["quotes:write"]},{"signIn":["quotes:write"]}]}},"/api/v1/quote/merge-preview":{"get":{"operationId":"previewQuoteMerge","tags":["Quotes"],"summary":"Compare two quotes before merging","description":"Two records side by side: which fields differ, and what a merge would move.","parameters":[{"$ref":"#/components/parameters/KeepId"},{"$ref":"#/components/parameters/MergeId"}],"responses":{"200":{"$ref":"#/components/responses/MergePreviewed"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["quotes:read"]},{"apiKeyHeader":["quotes:read"]},{"signIn":["quotes:read"]}]}},"/api/v1/case":{"get":{"operationId":"listSupportCases","tags":["Support cases","Module: Customer cases"],"summary":"List support cases","description":"List records. Supports limit, cursor, q, field filters, and sort=newest for newest first.\n\nEvery other query parameter is an exact match on a field, and they combine: `?status=Open&city=Pune`. The fields are listed below; a workspace's custom fields work the same way. ownerId is not a field, so it cannot be filtered on.\n\nA workspace over its plan's record allowance lists only the newest records the plan opens.\n\nPart of Customer cases: listing, creating and bulk updates answer 403 module_not_entitled on a plan without it.","parameters":[{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/Cursor"},{"$ref":"#/components/parameters/Search"},{"$ref":"#/components/parameters/Sort"},{"$ref":"#/components/parameters/Deleted"},{"name":"name","in":"query","description":"Only support cases whose Case subject is exactly this.","schema":{"type":"string"}},{"name":"company","in":"query","description":"Only support cases whose Company / account is exactly this.","schema":{"type":"string"}},{"name":"contact","in":"query","description":"Only support cases whose Customer contact is exactly this.","schema":{"type":"string"}},{"name":"email","in":"query","description":"Only support cases whose Customer email is exactly this.","schema":{"type":"string"}},{"name":"status","in":"query","description":"Only support cases whose Case status is exactly this.","schema":{"type":"string"}},{"name":"priority","in":"query","description":"Only support cases whose Priority is exactly this.","schema":{"type":"string"}},{"name":"category","in":"query","description":"Only support cases whose Category is exactly this.","schema":{"type":"string"}},{"name":"origin","in":"query","description":"Only support cases whose Channel is exactly this.","schema":{"type":"string"}},{"name":"owner","in":"query","description":"Only support cases whose Record owner is exactly this.","schema":{"type":"string"}},{"name":"queue","in":"query","description":"Only support cases whose Support queue is exactly this.","schema":{"type":"string"}},{"name":"slaDue","in":"query","description":"Only support cases whose SLA due date is exactly this.","schema":{"type":"string"}},{"name":"product","in":"query","description":"Only support cases whose Related product is exactly this.","schema":{"type":"string"}},{"name":"resolution","in":"query","description":"Only support cases whose Resolution is exactly this.","schema":{"type":"string"}},{"name":"tags","in":"query","description":"Only support cases whose Tags is exactly this.","schema":{"type":"string"}},{"name":"description","in":"query","description":"Only support cases whose Description / notes is exactly this.","schema":{"type":"string"}},{"name":"companyId","in":"query","description":"Only support cases whose Company / account (record id) is exactly this.","schema":{"type":"string"}},{"name":"contactId","in":"query","description":"Only support cases whose Customer contact (record id) is exactly this.","schema":{"type":"string"}}],"responses":{"200":{"summary":"A page of support cases","description":"The records, with their values masked to what the caller may see, and where to go next.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Plan-Calls-Limit":{"$ref":"#/components/headers/PlanCallsLimit"},"X-Plan-Calls-Remaining":{"$ref":"#/components/headers/PlanCallsRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SupportCasePage"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["cases:read"]},{"apiKeyHeader":["cases:read"]},{"signIn":["cases:read"]}]},"post":{"operationId":"createSupportCase","tags":["Support cases","Module: Customer cases"],"summary":"Create a support case","description":"Create a record. Honours Idempotency-Key.\n\nUnknown field keys are refused (422 unknown_field); fields the system keeps are ignored and listed in rejectedFields. Duplicate rules that warn come back as possibleDuplicates; one that blocks answers 409.\n\nPart of Customer cases: listing, creating and bulk updates answer 403 module_not_entitled on a plan without it.","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SupportCaseCreate"}}}},"responses":{"201":{"summary":"Created","description":"The new support case, as saved.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Plan-Calls-Limit":{"$ref":"#/components/headers/PlanCallsLimit"},"X-Plan-Calls-Remaining":{"$ref":"#/components/headers/PlanCallsRemaining"},"Idempotent-Replay":{"$ref":"#/components/headers/IdempotentReplay"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SupportCaseSaved"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["cases:write"]},{"apiKeyHeader":["cases:write"]},{"signIn":["cases:write"]}]}},"/api/v1/case/{id}":{"get":{"operationId":"getSupportCase","tags":["Support cases","Module: Customer cases"],"summary":"Read a support case","description":"Read one record.\n\nWith its line items, its timeline and the history of its values. A record older than the newest ones the plan opens answers 403 over_plan.","parameters":[{"$ref":"#/components/parameters/RecordId"}],"responses":{"200":{"summary":"The support case","description":"The record and what hangs off it.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Plan-Calls-Limit":{"$ref":"#/components/headers/PlanCallsLimit"},"X-Plan-Calls-Remaining":{"$ref":"#/components/headers/PlanCallsRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SupportCaseDetail"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["cases:read"]},{"apiKeyHeader":["cases:read"]},{"signIn":["cases:read"]}]},"patch":{"operationId":"updateSupportCase","tags":["Support cases","Module: Customer cases"],"summary":"Change a support case","description":"Update a record. Send only the fields that change.\n\nA record waiting on an approval, or whose subject asked for processing to stop, refuses changes (403).","parameters":[{"$ref":"#/components/parameters/RecordId"},{"$ref":"#/components/parameters/IfMatch"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SupportCaseUpdate"}}}},"responses":{"200":{"summary":"Changed","description":"The support case, as saved.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Plan-Calls-Limit":{"$ref":"#/components/headers/PlanCallsLimit"},"X-Plan-Calls-Remaining":{"$ref":"#/components/headers/PlanCallsRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SupportCaseSaved"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["cases:write"]},{"apiKeyHeader":["cases:write"]},{"signIn":["cases:write"]}]},"delete":{"operationId":"deleteSupportCase","tags":["Support cases","Module: Customer cases"],"summary":"Delete a support case","description":"Move a record to the recycle bin.\n\nIt can be restored until the recycle bin is emptied, which an API key cannot do.","parameters":[{"$ref":"#/components/parameters/RecordId"}],"responses":{"204":{"$ref":"#/components/responses/Deleted"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["cases:write"]},{"apiKeyHeader":["cases:write"]},{"signIn":["cases:write"]}]}},"/api/v1/case/{id}/restore":{"post":{"operationId":"restoreSupportCase","tags":["Support cases","Module: Customer cases"],"summary":"Restore a support case","description":"Restore a record from the recycle bin.","parameters":[{"$ref":"#/components/parameters/RecordId"},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"$ref":"#/components/responses/Restored"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["cases:write"]},{"apiKeyHeader":["cases:write"]},{"signIn":["cases:write"]}]}},"/api/v1/case/bulk":{"post":{"operationId":"bulkUpdateSupportCases","tags":["Support cases","Module: Customer cases"],"summary":"Change many support cases","description":"The same change to up to 500 records, each held to the rules of a single update. Records that refuse are listed in failed with the reason; the rest are changed.\n\nPart of Customer cases: listing, creating and bulk updates answer 403 module_not_entitled on a plan without it.","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SupportCaseBulkUpdate"}}}},"responses":{"200":{"$ref":"#/components/responses/BulkUpdated"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["cases:write"]},{"apiKeyHeader":["cases:write"]},{"signIn":["cases:write"]}]}},"/api/v1/case/merge":{"post":{"operationId":"mergeSupportCases","tags":["Support cases","Module: Customer cases"],"summary":"Merge two support cases","description":"Merge one record into another, choosing which value survives per field.\n\nIn one transaction: the survivor takes the chosen values, the other's activities, line items, history and files move onto it, records that named the other by name name the survivor, and the other goes to the recycle bin.","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SupportCaseMerge"}}}},"responses":{"200":{"$ref":"#/components/responses/Merged"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["cases:write"]},{"apiKeyHeader":["cases:write"]},{"signIn":["cases:write"]}]}},"/api/v1/case/merge-preview":{"get":{"operationId":"previewSupportCaseMerge","tags":["Support cases","Module: Customer cases"],"summary":"Compare two support cases before merging","description":"Two records side by side: which fields differ, and what a merge would move.","parameters":[{"$ref":"#/components/parameters/KeepId"},{"$ref":"#/components/parameters/MergeId"}],"responses":{"200":{"$ref":"#/components/responses/MergePreviewed"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["cases:read"]},{"apiKeyHeader":["cases:read"]},{"signIn":["cases:read"]}]}},"/api/v1/visit":{"get":{"operationId":"listVisits","tags":["Visits","Module: Visits"],"summary":"List visits","description":"List records. Supports limit, cursor, q, field filters, and sort=newest for newest first.\n\nEvery other query parameter is an exact match on a field, and they combine: `?status=Open&city=Pune`. The fields are listed below; a workspace's custom fields work the same way. ownerId is not a field, so it cannot be filtered on.\n\nA workspace over its plan's record allowance lists only the newest records the plan opens.\n\nPart of Visits: listing, creating and bulk updates answer 403 module_not_entitled on a plan without it.","parameters":[{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/Cursor"},{"$ref":"#/components/parameters/Search"},{"$ref":"#/components/parameters/Sort"},{"$ref":"#/components/parameters/Deleted"},{"name":"name","in":"query","description":"Only visits whose Visit title is exactly this.","schema":{"type":"string"}},{"name":"company","in":"query","description":"Only visits whose Company / account is exactly this.","schema":{"type":"string"}},{"name":"contact","in":"query","description":"Only visits whose Contact is exactly this.","schema":{"type":"string"}},{"name":"visitType","in":"query","description":"Only visits whose Visit type is exactly this.","schema":{"type":"string"}},{"name":"status","in":"query","description":"Only visits whose Visit status is exactly this.","schema":{"type":"string"}},{"name":"owner","in":"query","description":"Only visits whose Record owner is exactly this.","schema":{"type":"string"}},{"name":"scheduledAt","in":"query","description":"Only visits whose Scheduled date & time is exactly this.","schema":{"type":"string"}},{"name":"duration","in":"query","description":"Only visits whose Planned duration (minutes) is exactly this.","schema":{"type":"number"}},{"name":"location","in":"query","description":"Only visits whose Visit location is exactly this.","schema":{"type":"string"}},{"name":"latitude","in":"query","description":"Only visits whose Latitude is exactly this.","schema":{"type":"number"}},{"name":"longitude","in":"query","description":"Only visits whose Longitude is exactly this.","schema":{"type":"number"}},{"name":"checkInAt","in":"query","description":"Only visits whose Check-in time is exactly this.","schema":{"type":"string"}},{"name":"checkOutAt","in":"query","description":"Only visits whose Check-out time is exactly this.","schema":{"type":"string"}},{"name":"outcome","in":"query","description":"Only visits whose Visit outcome is exactly this.","schema":{"type":"string"}},{"name":"nextAction","in":"query","description":"Only visits whose Next action is exactly this.","schema":{"type":"string"}},{"name":"tags","in":"query","description":"Only visits whose Tags is exactly this.","schema":{"type":"string"}},{"name":"description","in":"query","description":"Only visits whose Description / notes is exactly this.","schema":{"type":"string"}},{"name":"companyId","in":"query","description":"Only visits whose Company / account (record id) is exactly this.","schema":{"type":"string"}},{"name":"contactId","in":"query","description":"Only visits whose Contact (record id) is exactly this.","schema":{"type":"string"}}],"responses":{"200":{"summary":"A page of visits","description":"The records, with their values masked to what the caller may see, and where to go next.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Plan-Calls-Limit":{"$ref":"#/components/headers/PlanCallsLimit"},"X-Plan-Calls-Remaining":{"$ref":"#/components/headers/PlanCallsRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VisitPage"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["visits:read"]},{"apiKeyHeader":["visits:read"]},{"signIn":["visits:read"]}]},"post":{"operationId":"createVisit","tags":["Visits","Module: Visits"],"summary":"Create a visit","description":"Create a record. Honours Idempotency-Key.\n\nUnknown field keys are refused (422 unknown_field); fields the system keeps are ignored and listed in rejectedFields. Duplicate rules that warn come back as possibleDuplicates; one that blocks answers 409.\n\nPart of Visits: listing, creating and bulk updates answer 403 module_not_entitled on a plan without it.","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VisitCreate"}}}},"responses":{"201":{"summary":"Created","description":"The new visit, as saved.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Plan-Calls-Limit":{"$ref":"#/components/headers/PlanCallsLimit"},"X-Plan-Calls-Remaining":{"$ref":"#/components/headers/PlanCallsRemaining"},"Idempotent-Replay":{"$ref":"#/components/headers/IdempotentReplay"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VisitSaved"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["visits:write"]},{"apiKeyHeader":["visits:write"]},{"signIn":["visits:write"]}]}},"/api/v1/visit/{id}":{"get":{"operationId":"getVisit","tags":["Visits","Module: Visits"],"summary":"Read a visit","description":"Read one record.\n\nWith its line items, its timeline and the history of its values. A record older than the newest ones the plan opens answers 403 over_plan.","parameters":[{"$ref":"#/components/parameters/RecordId"}],"responses":{"200":{"summary":"The visit","description":"The record and what hangs off it.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Plan-Calls-Limit":{"$ref":"#/components/headers/PlanCallsLimit"},"X-Plan-Calls-Remaining":{"$ref":"#/components/headers/PlanCallsRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VisitDetail"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["visits:read"]},{"apiKeyHeader":["visits:read"]},{"signIn":["visits:read"]}]},"patch":{"operationId":"updateVisit","tags":["Visits","Module: Visits"],"summary":"Change a visit","description":"Update a record. Send only the fields that change.\n\nA record waiting on an approval, or whose subject asked for processing to stop, refuses changes (403).","parameters":[{"$ref":"#/components/parameters/RecordId"},{"$ref":"#/components/parameters/IfMatch"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VisitUpdate"}}}},"responses":{"200":{"summary":"Changed","description":"The visit, as saved.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Plan-Calls-Limit":{"$ref":"#/components/headers/PlanCallsLimit"},"X-Plan-Calls-Remaining":{"$ref":"#/components/headers/PlanCallsRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VisitSaved"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["visits:write"]},{"apiKeyHeader":["visits:write"]},{"signIn":["visits:write"]}]},"delete":{"operationId":"deleteVisit","tags":["Visits","Module: Visits"],"summary":"Delete a visit","description":"Move a record to the recycle bin.\n\nIt can be restored until the recycle bin is emptied, which an API key cannot do.","parameters":[{"$ref":"#/components/parameters/RecordId"}],"responses":{"204":{"$ref":"#/components/responses/Deleted"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["visits:write"]},{"apiKeyHeader":["visits:write"]},{"signIn":["visits:write"]}]}},"/api/v1/visit/{id}/restore":{"post":{"operationId":"restoreVisit","tags":["Visits","Module: Visits"],"summary":"Restore a visit","description":"Restore a record from the recycle bin.","parameters":[{"$ref":"#/components/parameters/RecordId"},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"$ref":"#/components/responses/Restored"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["visits:write"]},{"apiKeyHeader":["visits:write"]},{"signIn":["visits:write"]}]}},"/api/v1/visit/bulk":{"post":{"operationId":"bulkUpdateVisits","tags":["Visits","Module: Visits"],"summary":"Change many visits","description":"The same change to up to 500 records, each held to the rules of a single update. Records that refuse are listed in failed with the reason; the rest are changed.\n\nPart of Visits: listing, creating and bulk updates answer 403 module_not_entitled on a plan without it.","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VisitBulkUpdate"}}}},"responses":{"200":{"$ref":"#/components/responses/BulkUpdated"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["visits:write"]},{"apiKeyHeader":["visits:write"]},{"signIn":["visits:write"]}]}},"/api/v1/visit/merge":{"post":{"operationId":"mergeVisits","tags":["Visits","Module: Visits"],"summary":"Merge two visits","description":"Merge one record into another, choosing which value survives per field.\n\nIn one transaction: the survivor takes the chosen values, the other's activities, line items, history and files move onto it, records that named the other by name name the survivor, and the other goes to the recycle bin.","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VisitMerge"}}}},"responses":{"200":{"$ref":"#/components/responses/Merged"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["visits:write"]},{"apiKeyHeader":["visits:write"]},{"signIn":["visits:write"]}]}},"/api/v1/visit/merge-preview":{"get":{"operationId":"previewVisitMerge","tags":["Visits","Module: Visits"],"summary":"Compare two visits before merging","description":"Two records side by side: which fields differ, and what a merge would move.","parameters":[{"$ref":"#/components/parameters/KeepId"},{"$ref":"#/components/parameters/MergeId"}],"responses":{"200":{"$ref":"#/components/responses/MergePreviewed"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["visits:read"]},{"apiKeyHeader":["visits:read"]},{"signIn":["visits:read"]}]}},"/api/v1/inventory":{"get":{"operationId":"listInventoryItems","tags":["Inventory items","Module: Inventory management"],"summary":"List inventory items","description":"List records. Supports limit, cursor, q, field filters, and sort=newest for newest first.\n\nEvery other query parameter is an exact match on a field, and they combine: `?status=Open&city=Pune`. The fields are listed below; a workspace's custom fields work the same way. ownerId is not a field, so it cannot be filtered on.\n\nA workspace over its plan's record allowance lists only the newest records the plan opens.\n\nPart of Inventory management: listing, creating and bulk updates answer 403 module_not_entitled on a plan without it.","parameters":[{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/Cursor"},{"$ref":"#/components/parameters/Search"},{"$ref":"#/components/parameters/Sort"},{"$ref":"#/components/parameters/Deleted"},{"name":"name","in":"query","description":"Only inventory items whose Inventory item name is exactly this.","schema":{"type":"string"}},{"name":"sku","in":"query","description":"Only inventory items whose SKU / stock code is exactly this.","schema":{"type":"string"}},{"name":"status","in":"query","description":"Only inventory items whose Item status is exactly this.","schema":{"type":"string"}},{"name":"itemType","in":"query","description":"Only inventory items whose Item type is exactly this.","schema":{"type":"string"}},{"name":"warehouse","in":"query","description":"Only inventory items whose Warehouse / location is exactly this.","schema":{"type":"string"}},{"name":"onHand","in":"query","description":"Only inventory items whose Quantity on hand is exactly this.","schema":{"type":"number"}},{"name":"reserved","in":"query","description":"Only inventory items whose Reserved quantity is exactly this.","schema":{"type":"number"}},{"name":"reorderPoint","in":"query","description":"Only inventory items whose Reorder point is exactly this.","schema":{"type":"number"}},{"name":"reorderQuantity","in":"query","description":"Only inventory items whose Reorder quantity is exactly this.","schema":{"type":"number"}},{"name":"unitCost","in":"query","description":"Only inventory items whose Unit cost is exactly this.","schema":{"type":"number"}},{"name":"unitPrice","in":"query","description":"Only inventory items whose Selling price is exactly this.","schema":{"type":"number"}},{"name":"currency","in":"query","description":"Only inventory items whose Record currency is exactly this.","schema":{"type":"string"}},{"name":"supplier","in":"query","description":"Only inventory items whose Preferred supplier is exactly this.","schema":{"type":"string"}},{"name":"leadTimeDays","in":"query","description":"Only inventory items whose Supplier lead time (days) is exactly this.","schema":{"type":"number"}},{"name":"hsn","in":"query","description":"Only inventory items whose HSN / SAC code is exactly this.","schema":{"type":"string"}},{"name":"taxRate","in":"query","description":"Only inventory items whose Default tax rate (%) is exactly this.","schema":{"type":"number"}},{"name":"description","in":"query","description":"Only inventory items whose Description / notes is exactly this.","schema":{"type":"string"}}],"responses":{"200":{"summary":"A page of inventory items","description":"The records, with their values masked to what the caller may see, and where to go next.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Plan-Calls-Limit":{"$ref":"#/components/headers/PlanCallsLimit"},"X-Plan-Calls-Remaining":{"$ref":"#/components/headers/PlanCallsRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InventoryItemPage"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["inventories:read"]},{"apiKeyHeader":["inventories:read"]},{"signIn":["inventories:read"]}]},"post":{"operationId":"createInventoryItem","tags":["Inventory items","Module: Inventory management"],"summary":"Create an inventory item","description":"Create a record. Honours Idempotency-Key.\n\nUnknown field keys are refused (422 unknown_field); fields the system keeps are ignored and listed in rejectedFields. Duplicate rules that warn come back as possibleDuplicates; one that blocks answers 409.\n\nPart of Inventory management: listing, creating and bulk updates answer 403 module_not_entitled on a plan without it.","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InventoryItemCreate"}}}},"responses":{"201":{"summary":"Created","description":"The new inventory item, as saved.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Plan-Calls-Limit":{"$ref":"#/components/headers/PlanCallsLimit"},"X-Plan-Calls-Remaining":{"$ref":"#/components/headers/PlanCallsRemaining"},"Idempotent-Replay":{"$ref":"#/components/headers/IdempotentReplay"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InventoryItemSaved"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["inventories:write"]},{"apiKeyHeader":["inventories:write"]},{"signIn":["inventories:write"]}]}},"/api/v1/inventory/{id}":{"get":{"operationId":"getInventoryItem","tags":["Inventory items","Module: Inventory management"],"summary":"Read an inventory item","description":"Read one record.\n\nWith its line items, its timeline and the history of its values. A record older than the newest ones the plan opens answers 403 over_plan.","parameters":[{"$ref":"#/components/parameters/RecordId"}],"responses":{"200":{"summary":"The inventory item","description":"The record and what hangs off it.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Plan-Calls-Limit":{"$ref":"#/components/headers/PlanCallsLimit"},"X-Plan-Calls-Remaining":{"$ref":"#/components/headers/PlanCallsRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InventoryItemDetail"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["inventories:read"]},{"apiKeyHeader":["inventories:read"]},{"signIn":["inventories:read"]}]},"patch":{"operationId":"updateInventoryItem","tags":["Inventory items","Module: Inventory management"],"summary":"Change an inventory item","description":"Update a record. Send only the fields that change.\n\nA record waiting on an approval, or whose subject asked for processing to stop, refuses changes (403).","parameters":[{"$ref":"#/components/parameters/RecordId"},{"$ref":"#/components/parameters/IfMatch"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InventoryItemUpdate"}}}},"responses":{"200":{"summary":"Changed","description":"The inventory item, as saved.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Plan-Calls-Limit":{"$ref":"#/components/headers/PlanCallsLimit"},"X-Plan-Calls-Remaining":{"$ref":"#/components/headers/PlanCallsRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InventoryItemSaved"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["inventories:write"]},{"apiKeyHeader":["inventories:write"]},{"signIn":["inventories:write"]}]},"delete":{"operationId":"deleteInventoryItem","tags":["Inventory items","Module: Inventory management"],"summary":"Delete an inventory item","description":"Move a record to the recycle bin.\n\nIt can be restored until the recycle bin is emptied, which an API key cannot do.","parameters":[{"$ref":"#/components/parameters/RecordId"}],"responses":{"204":{"$ref":"#/components/responses/Deleted"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["inventories:write"]},{"apiKeyHeader":["inventories:write"]},{"signIn":["inventories:write"]}]}},"/api/v1/inventory/{id}/restore":{"post":{"operationId":"restoreInventoryItem","tags":["Inventory items","Module: Inventory management"],"summary":"Restore an inventory item","description":"Restore a record from the recycle bin.","parameters":[{"$ref":"#/components/parameters/RecordId"},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"$ref":"#/components/responses/Restored"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["inventories:write"]},{"apiKeyHeader":["inventories:write"]},{"signIn":["inventories:write"]}]}},"/api/v1/inventory/bulk":{"post":{"operationId":"bulkUpdateInventoryItems","tags":["Inventory items","Module: Inventory management"],"summary":"Change many inventory items","description":"The same change to up to 500 records, each held to the rules of a single update. Records that refuse are listed in failed with the reason; the rest are changed.\n\nPart of Inventory management: listing, creating and bulk updates answer 403 module_not_entitled on a plan without it.","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InventoryItemBulkUpdate"}}}},"responses":{"200":{"$ref":"#/components/responses/BulkUpdated"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["inventories:write"]},{"apiKeyHeader":["inventories:write"]},{"signIn":["inventories:write"]}]}},"/api/v1/inventory/merge":{"post":{"operationId":"mergeInventoryItems","tags":["Inventory items","Module: Inventory management"],"summary":"Merge two inventory items","description":"Merge one record into another, choosing which value survives per field.\n\nIn one transaction: the survivor takes the chosen values, the other's activities, line items, history and files move onto it, records that named the other by name name the survivor, and the other goes to the recycle bin.","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InventoryItemMerge"}}}},"responses":{"200":{"$ref":"#/components/responses/Merged"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["inventories:write"]},{"apiKeyHeader":["inventories:write"]},{"signIn":["inventories:write"]}]}},"/api/v1/inventory/merge-preview":{"get":{"operationId":"previewInventoryItemMerge","tags":["Inventory items","Module: Inventory management"],"summary":"Compare two inventory items before merging","description":"Two records side by side: which fields differ, and what a merge would move.","parameters":[{"$ref":"#/components/parameters/KeepId"},{"$ref":"#/components/parameters/MergeId"}],"responses":{"200":{"$ref":"#/components/responses/MergePreviewed"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["inventories:read"]},{"apiKeyHeader":["inventories:read"]},{"signIn":["inventories:read"]}]}},"/api/v1/process":{"get":{"operationId":"listProcesses","tags":["Processes","Module: Process management"],"summary":"List processes","description":"List records. Supports limit, cursor, q, field filters, and sort=newest for newest first.\n\nEvery other query parameter is an exact match on a field, and they combine: `?status=Open&city=Pune`. The fields are listed below; a workspace's custom fields work the same way. ownerId is not a field, so it cannot be filtered on.\n\nA workspace over its plan's record allowance lists only the newest records the plan opens.\n\nPart of Process management: listing, creating and bulk updates answer 403 module_not_entitled on a plan without it.","parameters":[{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/Cursor"},{"$ref":"#/components/parameters/Search"},{"$ref":"#/components/parameters/Sort"},{"$ref":"#/components/parameters/Deleted"},{"name":"name","in":"query","description":"Only processes whose Process name is exactly this.","schema":{"type":"string"}},{"name":"status","in":"query","description":"Only processes whose Process status is exactly this.","schema":{"type":"string"}},{"name":"processType","in":"query","description":"Only processes whose Process type is exactly this.","schema":{"type":"string"}},{"name":"owner","in":"query","description":"Only processes whose Process owner is exactly this.","schema":{"type":"string"}},{"name":"runsOn","in":"query","description":"Only processes whose Runs on is exactly this.","schema":{"type":"string"}},{"name":"startTrigger","in":"query","description":"Only processes whose Start trigger is exactly this.","schema":{"type":"string"}},{"name":"triggerField","in":"query","description":"Only processes whose Field that starts it is exactly this.","schema":{"type":"string"}},{"name":"triggerHour","in":"query","description":"Only processes whose Hour it runs each day is exactly this.","schema":{"type":"number"}},{"name":"entryConditions","in":"query","description":"Only processes whose Entry conditions is exactly this.","schema":{"type":"string"}},{"name":"entryMatch","in":"query","description":"Only processes whose Conditions to meet is exactly this.","schema":{"type":"string"}},{"name":"processActions","in":"query","description":"Only processes whose Actions is exactly this.","schema":{"type":"string"}},{"name":"slaHours","in":"query","description":"Only processes whose SLA (hours) is exactly this.","schema":{"type":"number"}},{"name":"approvalRequired","in":"query","description":"Only processes whose Require approval is exactly this.","schema":{"type":"boolean"}},{"name":"hookVersion","in":"query","description":"Only processes whose Webhook address version is exactly this.","schema":{"type":"number"}},{"name":"conditions","in":"query","description":"Only processes whose Notes from before: entry conditions is exactly this.","schema":{"type":"string"}},{"name":"actions","in":"query","description":"Only processes whose Notes from before: actions is exactly this.","schema":{"type":"string"}},{"name":"runbookUrl","in":"query","description":"Only processes whose Runbook URL is exactly this.","schema":{"type":"string"}},{"name":"description","in":"query","description":"Only processes whose Description / notes is exactly this.","schema":{"type":"string"}}],"responses":{"200":{"summary":"A page of processes","description":"The records, with their values masked to what the caller may see, and where to go next.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Plan-Calls-Limit":{"$ref":"#/components/headers/PlanCallsLimit"},"X-Plan-Calls-Remaining":{"$ref":"#/components/headers/PlanCallsRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProcessPage"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["processes:read"]},{"apiKeyHeader":["processes:read"]},{"signIn":["processes:read"]}]},"post":{"operationId":"createProcess","tags":["Processes","Module: Process management"],"summary":"Create a process","description":"Create a record. Honours Idempotency-Key.\n\nUnknown field keys are refused (422 unknown_field); fields the system keeps are ignored and listed in rejectedFields. Duplicate rules that warn come back as possibleDuplicates; one that blocks answers 409.\n\nPart of Process management: listing, creating and bulk updates answer 403 module_not_entitled on a plan without it.","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProcessCreate"}}}},"responses":{"201":{"summary":"Created","description":"The new process, as saved.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Plan-Calls-Limit":{"$ref":"#/components/headers/PlanCallsLimit"},"X-Plan-Calls-Remaining":{"$ref":"#/components/headers/PlanCallsRemaining"},"Idempotent-Replay":{"$ref":"#/components/headers/IdempotentReplay"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProcessSaved"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["processes:write"]},{"apiKeyHeader":["processes:write"]},{"signIn":["processes:write"]}]}},"/api/v1/process/{id}":{"get":{"operationId":"getProcess","tags":["Processes","Module: Process management"],"summary":"Read a process","description":"Read one record.\n\nWith its line items, its timeline and the history of its values. A record older than the newest ones the plan opens answers 403 over_plan.","parameters":[{"$ref":"#/components/parameters/RecordId"}],"responses":{"200":{"summary":"The process","description":"The record and what hangs off it.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Plan-Calls-Limit":{"$ref":"#/components/headers/PlanCallsLimit"},"X-Plan-Calls-Remaining":{"$ref":"#/components/headers/PlanCallsRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProcessDetail"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["processes:read"]},{"apiKeyHeader":["processes:read"]},{"signIn":["processes:read"]}]},"patch":{"operationId":"updateProcess","tags":["Processes","Module: Process management"],"summary":"Change a process","description":"Update a record. Send only the fields that change.\n\nA record waiting on an approval, or whose subject asked for processing to stop, refuses changes (403).","parameters":[{"$ref":"#/components/parameters/RecordId"},{"$ref":"#/components/parameters/IfMatch"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProcessUpdate"}}}},"responses":{"200":{"summary":"Changed","description":"The process, as saved.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Plan-Calls-Limit":{"$ref":"#/components/headers/PlanCallsLimit"},"X-Plan-Calls-Remaining":{"$ref":"#/components/headers/PlanCallsRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProcessSaved"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["processes:write"]},{"apiKeyHeader":["processes:write"]},{"signIn":["processes:write"]}]},"delete":{"operationId":"deleteProcess","tags":["Processes","Module: Process management"],"summary":"Delete a process","description":"Move a record to the recycle bin.\n\nIt can be restored until the recycle bin is emptied, which an API key cannot do.","parameters":[{"$ref":"#/components/parameters/RecordId"}],"responses":{"204":{"$ref":"#/components/responses/Deleted"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["processes:write"]},{"apiKeyHeader":["processes:write"]},{"signIn":["processes:write"]}]}},"/api/v1/process/{id}/restore":{"post":{"operationId":"restoreProcess","tags":["Processes","Module: Process management"],"summary":"Restore a process","description":"Restore a record from the recycle bin.","parameters":[{"$ref":"#/components/parameters/RecordId"},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"$ref":"#/components/responses/Restored"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["processes:write"]},{"apiKeyHeader":["processes:write"]},{"signIn":["processes:write"]}]}},"/api/v1/process/bulk":{"post":{"operationId":"bulkUpdateProcesses","tags":["Processes","Module: Process management"],"summary":"Change many processes","description":"The same change to up to 500 records, each held to the rules of a single update. Records that refuse are listed in failed with the reason; the rest are changed.\n\nPart of Process management: listing, creating and bulk updates answer 403 module_not_entitled on a plan without it.","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProcessBulkUpdate"}}}},"responses":{"200":{"$ref":"#/components/responses/BulkUpdated"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["processes:write"]},{"apiKeyHeader":["processes:write"]},{"signIn":["processes:write"]}]}},"/api/v1/process/merge":{"post":{"operationId":"mergeProcesses","tags":["Processes","Module: Process management"],"summary":"Merge two processes","description":"Merge one record into another, choosing which value survives per field.\n\nIn one transaction: the survivor takes the chosen values, the other's activities, line items, history and files move onto it, records that named the other by name name the survivor, and the other goes to the recycle bin.","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProcessMerge"}}}},"responses":{"200":{"$ref":"#/components/responses/Merged"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["processes:write"]},{"apiKeyHeader":["processes:write"]},{"signIn":["processes:write"]}]}},"/api/v1/process/merge-preview":{"get":{"operationId":"previewProcessMerge","tags":["Processes","Module: Process management"],"summary":"Compare two processes before merging","description":"Two records side by side: which fields differ, and what a merge would move.","parameters":[{"$ref":"#/components/parameters/KeepId"},{"$ref":"#/components/parameters/MergeId"}],"responses":{"200":{"$ref":"#/components/responses/MergePreviewed"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["processes:read"]},{"apiKeyHeader":["processes:read"]},{"signIn":["processes:read"]}]}},"/api/v1/forecast":{"get":{"operationId":"listForecasts","tags":["Forecasts","Module: Sales forecasting"],"summary":"List forecasts","description":"List records. Supports limit, cursor, q, field filters, and sort=newest for newest first.\n\nEvery other query parameter is an exact match on a field, and they combine: `?status=Open&city=Pune`. The fields are listed below; a workspace's custom fields work the same way. ownerId is not a field, so it cannot be filtered on.\n\nA workspace over its plan's record allowance lists only the newest records the plan opens.\n\nPart of Sales forecasting: listing, creating and bulk updates answer 403 module_not_entitled on a plan without it.","parameters":[{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/Cursor"},{"$ref":"#/components/parameters/Search"},{"$ref":"#/components/parameters/Sort"},{"$ref":"#/components/parameters/Deleted"},{"name":"name","in":"query","description":"Only forecasts whose Forecast name is exactly this.","schema":{"type":"string"}},{"name":"forecastPeriod","in":"query","description":"Only forecasts whose Forecast period is exactly this.","schema":{"type":"string"}},{"name":"startDate","in":"query","description":"Only forecasts whose Period start is exactly this.","schema":{"type":"string"}},{"name":"endDate","in":"query","description":"Only forecasts whose Period end is exactly this.","schema":{"type":"string"}},{"name":"target","in":"query","description":"Only forecasts whose Revenue target is exactly this.","schema":{"type":"number"}},{"name":"currency","in":"query","description":"Only forecasts whose Record currency is exactly this.","schema":{"type":"string"}},{"name":"bestCase","in":"query","description":"Only forecasts whose Best-case forecast is exactly this.","schema":{"type":"number"}},{"name":"commit","in":"query","description":"Only forecasts whose Commit forecast is exactly this.","schema":{"type":"number"}},{"name":"pipeline","in":"query","description":"Only forecasts whose Pipeline forecast is exactly this.","schema":{"type":"number"}},{"name":"status","in":"query","description":"Only forecasts whose Forecast status is exactly this.","schema":{"type":"string"}},{"name":"owner","in":"query","description":"Only forecasts whose Forecast owner is exactly this.","schema":{"type":"string"}},{"name":"assumptions","in":"query","description":"Only forecasts whose Forecast assumptions is exactly this.","schema":{"type":"string"}},{"name":"description","in":"query","description":"Only forecasts whose Description / notes is exactly this.","schema":{"type":"string"}}],"responses":{"200":{"summary":"A page of forecasts","description":"The records, with their values masked to what the caller may see, and where to go next.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Plan-Calls-Limit":{"$ref":"#/components/headers/PlanCallsLimit"},"X-Plan-Calls-Remaining":{"$ref":"#/components/headers/PlanCallsRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForecastPage"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["forecasts:read"]},{"apiKeyHeader":["forecasts:read"]},{"signIn":["forecasts:read"]}]},"post":{"operationId":"createForecast","tags":["Forecasts","Module: Sales forecasting"],"summary":"Create a forecast","description":"Create a record. Honours Idempotency-Key.\n\nUnknown field keys are refused (422 unknown_field); fields the system keeps are ignored and listed in rejectedFields. Duplicate rules that warn come back as possibleDuplicates; one that blocks answers 409.\n\nPart of Sales forecasting: listing, creating and bulk updates answer 403 module_not_entitled on a plan without it.","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForecastCreate"}}}},"responses":{"201":{"summary":"Created","description":"The new forecast, as saved.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Plan-Calls-Limit":{"$ref":"#/components/headers/PlanCallsLimit"},"X-Plan-Calls-Remaining":{"$ref":"#/components/headers/PlanCallsRemaining"},"Idempotent-Replay":{"$ref":"#/components/headers/IdempotentReplay"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForecastSaved"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["forecasts:write"]},{"apiKeyHeader":["forecasts:write"]},{"signIn":["forecasts:write"]}]}},"/api/v1/forecast/{id}":{"get":{"operationId":"getForecast","tags":["Forecasts","Module: Sales forecasting"],"summary":"Read a forecast","description":"Read one record.\n\nWith its line items, its timeline and the history of its values. A record older than the newest ones the plan opens answers 403 over_plan.","parameters":[{"$ref":"#/components/parameters/RecordId"}],"responses":{"200":{"summary":"The forecast","description":"The record and what hangs off it.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Plan-Calls-Limit":{"$ref":"#/components/headers/PlanCallsLimit"},"X-Plan-Calls-Remaining":{"$ref":"#/components/headers/PlanCallsRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForecastDetail"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["forecasts:read"]},{"apiKeyHeader":["forecasts:read"]},{"signIn":["forecasts:read"]}]},"patch":{"operationId":"updateForecast","tags":["Forecasts","Module: Sales forecasting"],"summary":"Change a forecast","description":"Update a record. Send only the fields that change.\n\nA record waiting on an approval, or whose subject asked for processing to stop, refuses changes (403).\n\nOnce a forecast is Approved or Locked, its period and figures are refused with 409 record_settled until it is moved back to Draft.","parameters":[{"$ref":"#/components/parameters/RecordId"},{"$ref":"#/components/parameters/IfMatch"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForecastUpdate"}}}},"responses":{"200":{"summary":"Changed","description":"The forecast, as saved.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Plan-Calls-Limit":{"$ref":"#/components/headers/PlanCallsLimit"},"X-Plan-Calls-Remaining":{"$ref":"#/components/headers/PlanCallsRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForecastSaved"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["forecasts:write"]},{"apiKeyHeader":["forecasts:write"]},{"signIn":["forecasts:write"]}]},"delete":{"operationId":"deleteForecast","tags":["Forecasts","Module: Sales forecasting"],"summary":"Delete a forecast","description":"Move a record to the recycle bin.\n\nIt can be restored until the recycle bin is emptied, which an API key cannot do.","parameters":[{"$ref":"#/components/parameters/RecordId"}],"responses":{"204":{"$ref":"#/components/responses/Deleted"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["forecasts:write"]},{"apiKeyHeader":["forecasts:write"]},{"signIn":["forecasts:write"]}]}},"/api/v1/forecast/{id}/restore":{"post":{"operationId":"restoreForecast","tags":["Forecasts","Module: Sales forecasting"],"summary":"Restore a forecast","description":"Restore a record from the recycle bin.","parameters":[{"$ref":"#/components/parameters/RecordId"},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"$ref":"#/components/responses/Restored"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["forecasts:write"]},{"apiKeyHeader":["forecasts:write"]},{"signIn":["forecasts:write"]}]}},"/api/v1/forecast/bulk":{"post":{"operationId":"bulkUpdateForecasts","tags":["Forecasts","Module: Sales forecasting"],"summary":"Change many forecasts","description":"The same change to up to 500 records, each held to the rules of a single update. Records that refuse are listed in failed with the reason; the rest are changed.\n\nPart of Sales forecasting: listing, creating and bulk updates answer 403 module_not_entitled on a plan without it.","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForecastBulkUpdate"}}}},"responses":{"200":{"$ref":"#/components/responses/BulkUpdated"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["forecasts:write"]},{"apiKeyHeader":["forecasts:write"]},{"signIn":["forecasts:write"]}]}},"/api/v1/forecast/merge":{"post":{"operationId":"mergeForecasts","tags":["Forecasts","Module: Sales forecasting"],"summary":"Merge two forecasts","description":"Merge one record into another, choosing which value survives per field.\n\nIn one transaction: the survivor takes the chosen values, the other's activities, line items, history and files move onto it, records that named the other by name name the survivor, and the other goes to the recycle bin.","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForecastMerge"}}}},"responses":{"200":{"$ref":"#/components/responses/Merged"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["forecasts:write"]},{"apiKeyHeader":["forecasts:write"]},{"signIn":["forecasts:write"]}]}},"/api/v1/forecast/merge-preview":{"get":{"operationId":"previewForecastMerge","tags":["Forecasts","Module: Sales forecasting"],"summary":"Compare two forecasts before merging","description":"Two records side by side: which fields differ, and what a merge would move.","parameters":[{"$ref":"#/components/parameters/KeepId"},{"$ref":"#/components/parameters/MergeId"}],"responses":{"200":{"$ref":"#/components/responses/MergePreviewed"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["forecasts:read"]},{"apiKeyHeader":["forecasts:read"]},{"signIn":["forecasts:read"]}]}},"/api/v1/article":{"get":{"operationId":"listKnowledgeArticles","tags":["Knowledge articles","Module: Knowledge base"],"summary":"List knowledge articles","description":"List records. Supports limit, cursor, q, field filters, and sort=newest for newest first.\n\nEvery other query parameter is an exact match on a field, and they combine: `?status=Open&city=Pune`. The fields are listed below; a workspace's custom fields work the same way. ownerId is not a field, so it cannot be filtered on.\n\nA workspace over its plan's record allowance lists only the newest records the plan opens.\n\nPart of Knowledge base: listing, creating and bulk updates answer 403 module_not_entitled on a plan without it.","parameters":[{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/Cursor"},{"$ref":"#/components/parameters/Search"},{"$ref":"#/components/parameters/Sort"},{"$ref":"#/components/parameters/Deleted"},{"name":"name","in":"query","description":"Only knowledge articles whose Article title is exactly this.","schema":{"type":"string"}},{"name":"category","in":"query","description":"Only knowledge articles whose Category is exactly this.","schema":{"type":"string"}},{"name":"status","in":"query","description":"Only knowledge articles whose Publication status is exactly this.","schema":{"type":"string"}},{"name":"visibility","in":"query","description":"Only knowledge articles whose Visible to is exactly this.","schema":{"type":"string"}},{"name":"summary","in":"query","description":"Only knowledge articles whose Short summary is exactly this.","schema":{"type":"string"}},{"name":"body","in":"query","description":"Only knowledge articles whose Article body is exactly this.","schema":{"type":"string"}},{"name":"keywords","in":"query","description":"Only knowledge articles whose Search keywords is exactly this.","schema":{"type":"string"}},{"name":"owner","in":"query","description":"Only knowledge articles whose Record owner is exactly this.","schema":{"type":"string"}},{"name":"reviewer","in":"query","description":"Only knowledge articles whose Reviewer is exactly this.","schema":{"type":"string"}},{"name":"publishedAt","in":"query","description":"Only knowledge articles whose Published on is exactly this.","schema":{"type":"string"}},{"name":"reviewDue","in":"query","description":"Only knowledge articles whose Next review due is exactly this.","schema":{"type":"string"}},{"name":"relatedProduct","in":"query","description":"Only knowledge articles whose Related product is exactly this.","schema":{"type":"string"}},{"name":"views","in":"query","description":"Only knowledge articles whose Views is exactly this.","schema":{"type":"number"}},{"name":"helpful","in":"query","description":"Only knowledge articles whose Marked helpful is exactly this.","schema":{"type":"number"}},{"name":"notHelpful","in":"query","description":"Only knowledge articles whose Marked not helpful is exactly this.","schema":{"type":"number"}},{"name":"tags","in":"query","description":"Only knowledge articles whose Tags is exactly this.","schema":{"type":"string"}}],"responses":{"200":{"summary":"A page of knowledge articles","description":"The records, with their values masked to what the caller may see, and where to go next.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Plan-Calls-Limit":{"$ref":"#/components/headers/PlanCallsLimit"},"X-Plan-Calls-Remaining":{"$ref":"#/components/headers/PlanCallsRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KnowledgeArticlePage"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["articles:read"]},{"apiKeyHeader":["articles:read"]},{"signIn":["articles:read"]}]},"post":{"operationId":"createKnowledgeArticle","tags":["Knowledge articles","Module: Knowledge base"],"summary":"Create a knowledge article","description":"Create a record. Honours Idempotency-Key.\n\nUnknown field keys are refused (422 unknown_field); fields the system keeps are ignored and listed in rejectedFields. Duplicate rules that warn come back as possibleDuplicates; one that blocks answers 409.\n\nPart of Knowledge base: listing, creating and bulk updates answer 403 module_not_entitled on a plan without it.","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KnowledgeArticleCreate"}}}},"responses":{"201":{"summary":"Created","description":"The new knowledge article, as saved.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Plan-Calls-Limit":{"$ref":"#/components/headers/PlanCallsLimit"},"X-Plan-Calls-Remaining":{"$ref":"#/components/headers/PlanCallsRemaining"},"Idempotent-Replay":{"$ref":"#/components/headers/IdempotentReplay"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KnowledgeArticleSaved"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["articles:write"]},{"apiKeyHeader":["articles:write"]},{"signIn":["articles:write"]}]}},"/api/v1/article/{id}":{"get":{"operationId":"getKnowledgeArticle","tags":["Knowledge articles","Module: Knowledge base"],"summary":"Read a knowledge article","description":"Read one record.\n\nWith its line items, its timeline and the history of its values. A record older than the newest ones the plan opens answers 403 over_plan.","parameters":[{"$ref":"#/components/parameters/RecordId"}],"responses":{"200":{"summary":"The knowledge article","description":"The record and what hangs off it.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Plan-Calls-Limit":{"$ref":"#/components/headers/PlanCallsLimit"},"X-Plan-Calls-Remaining":{"$ref":"#/components/headers/PlanCallsRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KnowledgeArticleDetail"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["articles:read"]},{"apiKeyHeader":["articles:read"]},{"signIn":["articles:read"]}]},"patch":{"operationId":"updateKnowledgeArticle","tags":["Knowledge articles","Module: Knowledge base"],"summary":"Change a knowledge article","description":"Update a record. Send only the fields that change.\n\nA record waiting on an approval, or whose subject asked for processing to stop, refuses changes (403).","parameters":[{"$ref":"#/components/parameters/RecordId"},{"$ref":"#/components/parameters/IfMatch"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KnowledgeArticleUpdate"}}}},"responses":{"200":{"summary":"Changed","description":"The knowledge article, as saved.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Plan-Calls-Limit":{"$ref":"#/components/headers/PlanCallsLimit"},"X-Plan-Calls-Remaining":{"$ref":"#/components/headers/PlanCallsRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KnowledgeArticleSaved"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["articles:write"]},{"apiKeyHeader":["articles:write"]},{"signIn":["articles:write"]}]},"delete":{"operationId":"deleteKnowledgeArticle","tags":["Knowledge articles","Module: Knowledge base"],"summary":"Delete a knowledge article","description":"Move a record to the recycle bin.\n\nIt can be restored until the recycle bin is emptied, which an API key cannot do.","parameters":[{"$ref":"#/components/parameters/RecordId"}],"responses":{"204":{"$ref":"#/components/responses/Deleted"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["articles:write"]},{"apiKeyHeader":["articles:write"]},{"signIn":["articles:write"]}]}},"/api/v1/article/{id}/restore":{"post":{"operationId":"restoreKnowledgeArticle","tags":["Knowledge articles","Module: Knowledge base"],"summary":"Restore a knowledge article","description":"Restore a record from the recycle bin.","parameters":[{"$ref":"#/components/parameters/RecordId"},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"$ref":"#/components/responses/Restored"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["articles:write"]},{"apiKeyHeader":["articles:write"]},{"signIn":["articles:write"]}]}},"/api/v1/article/bulk":{"post":{"operationId":"bulkUpdateKnowledgeArticles","tags":["Knowledge articles","Module: Knowledge base"],"summary":"Change many knowledge articles","description":"The same change to up to 500 records, each held to the rules of a single update. Records that refuse are listed in failed with the reason; the rest are changed.\n\nPart of Knowledge base: listing, creating and bulk updates answer 403 module_not_entitled on a plan without it.","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KnowledgeArticleBulkUpdate"}}}},"responses":{"200":{"$ref":"#/components/responses/BulkUpdated"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["articles:write"]},{"apiKeyHeader":["articles:write"]},{"signIn":["articles:write"]}]}},"/api/v1/article/merge":{"post":{"operationId":"mergeKnowledgeArticles","tags":["Knowledge articles","Module: Knowledge base"],"summary":"Merge two knowledge articles","description":"Merge one record into another, choosing which value survives per field.\n\nIn one transaction: the survivor takes the chosen values, the other's activities, line items, history and files move onto it, records that named the other by name name the survivor, and the other goes to the recycle bin.","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KnowledgeArticleMerge"}}}},"responses":{"200":{"$ref":"#/components/responses/Merged"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["articles:write"]},{"apiKeyHeader":["articles:write"]},{"signIn":["articles:write"]}]}},"/api/v1/article/merge-preview":{"get":{"operationId":"previewKnowledgeArticleMerge","tags":["Knowledge articles","Module: Knowledge base"],"summary":"Compare two knowledge articles before merging","description":"Two records side by side: which fields differ, and what a merge would move.","parameters":[{"$ref":"#/components/parameters/KeepId"},{"$ref":"#/components/parameters/MergeId"}],"responses":{"200":{"$ref":"#/components/responses/MergePreviewed"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["articles:read"]},{"apiKeyHeader":["articles:read"]},{"signIn":["articles:read"]}]}},"/api/v1/pricebook":{"get":{"operationId":"listPriceBooks","tags":["Price books","Module: Price books"],"summary":"List price books","description":"List records. Supports limit, cursor, q, field filters, and sort=newest for newest first.\n\nEvery other query parameter is an exact match on a field, and they combine: `?status=Open&city=Pune`. The fields are listed below; a workspace's custom fields work the same way. ownerId is not a field, so it cannot be filtered on.\n\nA workspace over its plan's record allowance lists only the newest records the plan opens.\n\nPart of Price books: listing, creating and bulk updates answer 403 module_not_entitled on a plan without it.","parameters":[{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/Cursor"},{"$ref":"#/components/parameters/Search"},{"$ref":"#/components/parameters/Sort"},{"$ref":"#/components/parameters/Deleted"},{"name":"name","in":"query","description":"Only price books whose Price book name is exactly this.","schema":{"type":"string"}},{"name":"status","in":"query","description":"Only price books whose Status is exactly this.","schema":{"type":"string"}},{"name":"bookType","in":"query","description":"Only price books whose Price book type is exactly this.","schema":{"type":"string"}},{"name":"currency","in":"query","description":"Only price books whose Record currency is exactly this.","schema":{"type":"string"}},{"name":"country","in":"query","description":"Only price books whose Country is exactly this.","schema":{"type":"string"}},{"name":"isDefault","in":"query","description":"Only price books whose Default for this currency is exactly this.","schema":{"type":"boolean"}},{"name":"validFrom","in":"query","description":"Only price books whose Valid from is exactly this.","schema":{"type":"string"}},{"name":"validTo","in":"query","description":"Only price books whose Valid to is exactly this.","schema":{"type":"string"}},{"name":"discountPercent","in":"query","description":"Only price books whose Standard discount (%) is exactly this.","schema":{"type":"number"}},{"name":"minimumOrder","in":"query","description":"Only price books whose Minimum order value is exactly this.","schema":{"type":"number"}},{"name":"roundingRule","in":"query","description":"Only price books whose Rounding rule is exactly this.","schema":{"type":"string"}},{"name":"owner","in":"query","description":"Only price books whose Record owner is exactly this.","schema":{"type":"string"}},{"name":"description","in":"query","description":"Only price books whose Description / notes is exactly this.","schema":{"type":"string"}}],"responses":{"200":{"summary":"A page of price books","description":"The records, with their values masked to what the caller may see, and where to go next.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Plan-Calls-Limit":{"$ref":"#/components/headers/PlanCallsLimit"},"X-Plan-Calls-Remaining":{"$ref":"#/components/headers/PlanCallsRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PriceBookPage"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["pricebooks:read"]},{"apiKeyHeader":["pricebooks:read"]},{"signIn":["pricebooks:read"]}]},"post":{"operationId":"createPriceBook","tags":["Price books","Module: Price books"],"summary":"Create a price book","description":"Create a record. Honours Idempotency-Key.\n\nUnknown field keys are refused (422 unknown_field); fields the system keeps are ignored and listed in rejectedFields. Duplicate rules that warn come back as possibleDuplicates; one that blocks answers 409.\n\nPart of Price books: listing, creating and bulk updates answer 403 module_not_entitled on a plan without it.","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PriceBookCreate"}}}},"responses":{"201":{"summary":"Created","description":"The new price book, as saved.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Plan-Calls-Limit":{"$ref":"#/components/headers/PlanCallsLimit"},"X-Plan-Calls-Remaining":{"$ref":"#/components/headers/PlanCallsRemaining"},"Idempotent-Replay":{"$ref":"#/components/headers/IdempotentReplay"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PriceBookSaved"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["pricebooks:write"]},{"apiKeyHeader":["pricebooks:write"]},{"signIn":["pricebooks:write"]}]}},"/api/v1/pricebook/{id}":{"get":{"operationId":"getPriceBook","tags":["Price books","Module: Price books"],"summary":"Read a price book","description":"Read one record.\n\nWith its line items, its timeline and the history of its values. A record older than the newest ones the plan opens answers 403 over_plan.","parameters":[{"$ref":"#/components/parameters/RecordId"}],"responses":{"200":{"summary":"The price book","description":"The record and what hangs off it.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Plan-Calls-Limit":{"$ref":"#/components/headers/PlanCallsLimit"},"X-Plan-Calls-Remaining":{"$ref":"#/components/headers/PlanCallsRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PriceBookDetail"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["pricebooks:read"]},{"apiKeyHeader":["pricebooks:read"]},{"signIn":["pricebooks:read"]}]},"patch":{"operationId":"updatePriceBook","tags":["Price books","Module: Price books"],"summary":"Change a price book","description":"Update a record. Send only the fields that change.\n\nA record waiting on an approval, or whose subject asked for processing to stop, refuses changes (403).","parameters":[{"$ref":"#/components/parameters/RecordId"},{"$ref":"#/components/parameters/IfMatch"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PriceBookUpdate"}}}},"responses":{"200":{"summary":"Changed","description":"The price book, as saved.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Plan-Calls-Limit":{"$ref":"#/components/headers/PlanCallsLimit"},"X-Plan-Calls-Remaining":{"$ref":"#/components/headers/PlanCallsRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PriceBookSaved"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["pricebooks:write"]},{"apiKeyHeader":["pricebooks:write"]},{"signIn":["pricebooks:write"]}]},"delete":{"operationId":"deletePriceBook","tags":["Price books","Module: Price books"],"summary":"Delete a price book","description":"Move a record to the recycle bin.\n\nIt can be restored until the recycle bin is emptied, which an API key cannot do.","parameters":[{"$ref":"#/components/parameters/RecordId"}],"responses":{"204":{"$ref":"#/components/responses/Deleted"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["pricebooks:write"]},{"apiKeyHeader":["pricebooks:write"]},{"signIn":["pricebooks:write"]}]}},"/api/v1/pricebook/{id}/restore":{"post":{"operationId":"restorePriceBook","tags":["Price books","Module: Price books"],"summary":"Restore a price book","description":"Restore a record from the recycle bin.","parameters":[{"$ref":"#/components/parameters/RecordId"},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"$ref":"#/components/responses/Restored"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["pricebooks:write"]},{"apiKeyHeader":["pricebooks:write"]},{"signIn":["pricebooks:write"]}]}},"/api/v1/pricebook/bulk":{"post":{"operationId":"bulkUpdatePriceBooks","tags":["Price books","Module: Price books"],"summary":"Change many price books","description":"The same change to up to 500 records, each held to the rules of a single update. Records that refuse are listed in failed with the reason; the rest are changed.\n\nPart of Price books: listing, creating and bulk updates answer 403 module_not_entitled on a plan without it.","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PriceBookBulkUpdate"}}}},"responses":{"200":{"$ref":"#/components/responses/BulkUpdated"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["pricebooks:write"]},{"apiKeyHeader":["pricebooks:write"]},{"signIn":["pricebooks:write"]}]}},"/api/v1/pricebook/merge":{"post":{"operationId":"mergePriceBooks","tags":["Price books","Module: Price books"],"summary":"Merge two price books","description":"Merge one record into another, choosing which value survives per field.\n\nIn one transaction: the survivor takes the chosen values, the other's activities, line items, history and files move onto it, records that named the other by name name the survivor, and the other goes to the recycle bin.","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PriceBookMerge"}}}},"responses":{"200":{"$ref":"#/components/responses/Merged"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["pricebooks:write"]},{"apiKeyHeader":["pricebooks:write"]},{"signIn":["pricebooks:write"]}]}},"/api/v1/pricebook/merge-preview":{"get":{"operationId":"previewPriceBookMerge","tags":["Price books","Module: Price books"],"summary":"Compare two price books before merging","description":"Two records side by side: which fields differ, and what a merge would move.","parameters":[{"$ref":"#/components/parameters/KeepId"},{"$ref":"#/components/parameters/MergeId"}],"responses":{"200":{"$ref":"#/components/responses/MergePreviewed"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["pricebooks:read"]},{"apiKeyHeader":["pricebooks:read"]},{"signIn":["pricebooks:read"]}]}},"/api/v1/vendor":{"get":{"operationId":"listVendors","tags":["Vendors","Module: Order management"],"summary":"List vendors","description":"List records. Supports limit, cursor, q, field filters, and sort=newest for newest first.\n\nEvery other query parameter is an exact match on a field, and they combine: `?status=Open&city=Pune`. The fields are listed below; a workspace's custom fields work the same way. ownerId is not a field, so it cannot be filtered on.\n\nA workspace over its plan's record allowance lists only the newest records the plan opens.\n\nPart of Order management: listing, creating and bulk updates answer 403 module_not_entitled on a plan without it.","parameters":[{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/Cursor"},{"$ref":"#/components/parameters/Search"},{"$ref":"#/components/parameters/Sort"},{"$ref":"#/components/parameters/Deleted"},{"name":"name","in":"query","description":"Only vendors whose Vendor name is exactly this.","schema":{"type":"string"}},{"name":"email","in":"query","description":"Only vendors whose Email is exactly this.","schema":{"type":"string"}},{"name":"phone","in":"query","description":"Only vendors whose Phone is exactly this.","schema":{"type":"string"}},{"name":"website","in":"query","description":"Only vendors whose Website is exactly this.","schema":{"type":"string"}},{"name":"contactName","in":"query","description":"Only vendors whose Primary contact is exactly this.","schema":{"type":"string"}},{"name":"status","in":"query","description":"Only vendors whose Vendor status is exactly this.","schema":{"type":"string"}},{"name":"category","in":"query","description":"Only vendors whose What they supply is exactly this.","schema":{"type":"string"}},{"name":"paymentTerms","in":"query","description":"Only vendors whose Payment terms is exactly this.","schema":{"type":"string"}},{"name":"leadTimeDays","in":"query","description":"Only vendors whose Typical lead time (days) is exactly this.","schema":{"type":"number"}},{"name":"creditLimit","in":"query","description":"Only vendors whose Credit limit is exactly this.","schema":{"type":"number"}},{"name":"currency","in":"query","description":"Only vendors whose Record currency is exactly this.","schema":{"type":"string"}},{"name":"country","in":"query","description":"Only vendors whose Country is exactly this.","schema":{"type":"string"}},{"name":"street","in":"query","description":"Only vendors whose Street address is exactly this.","schema":{"type":"string"}},{"name":"city","in":"query","description":"Only vendors whose City is exactly this.","schema":{"type":"string"}},{"name":"state","in":"query","description":"Only vendors whose State / province is exactly this.","schema":{"type":"string"}},{"name":"postalCode","in":"query","description":"Only vendors whose ZIP / postal code is exactly this.","schema":{"type":"string"}},{"name":"taxStatus","in":"query","description":"Only vendors whose Tax registration status is exactly this.","schema":{"type":"string"}},{"name":"legalName","in":"query","description":"Only vendors whose Registered legal name is exactly this.","schema":{"type":"string"}},{"name":"gstin","in":"query","description":"Only vendors whose GSTIN is exactly this.","schema":{"type":"string"}},{"name":"pan","in":"query","description":"Only vendors whose PAN is exactly this.","schema":{"type":"string"}},{"name":"cin","in":"query","description":"Only vendors whose CIN / LLPIN is exactly this.","schema":{"type":"string"}},{"name":"gstType","in":"query","description":"Only vendors whose GST registration type is exactly this.","schema":{"type":"string"}},{"name":"gstStateCode","in":"query","description":"Only vendors whose GST state code is exactly this.","schema":{"type":"string"}},{"name":"reverseCharge","in":"query","description":"Only vendors whose Tax payable on reverse charge is exactly this.","schema":{"type":"string"}},{"name":"placeOfSupply","in":"query","description":"Only vendors whose Place of supply is exactly this.","schema":{"type":"string"}},{"name":"trn","in":"query","description":"Only vendors whose VAT TRN is exactly this.","schema":{"type":"string"}},{"name":"emirate","in":"query","description":"Only vendors whose Emirate is exactly this.","schema":{"type":"string"}},{"name":"vatNumber","in":"query","description":"Only vendors whose VAT / tax registration number is exactly this.","schema":{"type":"string"}},{"name":"ein","in":"query","description":"Only vendors whose EIN / federal tax ID is exactly this.","schema":{"type":"string"}},{"name":"uen","in":"query","description":"Only vendors whose UEN / GST registration is exactly this.","schema":{"type":"string"}},{"name":"abn","in":"query","description":"Only vendors whose ABN / GST registration is exactly this.","schema":{"type":"string"}},{"name":"businessNumber","in":"query","description":"Only vendors whose Business number / GST-HST is exactly this.","schema":{"type":"string"}},{"name":"taxExempt","in":"query","description":"Only vendors whose Tax-exempt is exactly this.","schema":{"type":"boolean"}},{"name":"tradeLicense","in":"query","description":"Only vendors whose Trade license number is exactly this.","schema":{"type":"string"}},{"name":"tradeLicenseAuthority","in":"query","description":"Only vendors whose Licensing authority is exactly this.","schema":{"type":"string"}},{"name":"licenseExpiry","in":"query","description":"Only vendors whose Trade license expiry is exactly this.","schema":{"type":"string"}},{"name":"incorporatedOn","in":"query","description":"Only vendors whose Incorporated on is exactly this.","schema":{"type":"string"}},{"name":"registeredAddress","in":"query","description":"Only vendors whose Registered address is exactly this.","schema":{"type":"string"}},{"name":"beneficialOwner","in":"query","description":"Only vendors whose Beneficial owner is exactly this.","schema":{"type":"string"}},{"name":"authorisedPerson","in":"query","description":"Only vendors whose Authorised signatory is exactly this.","schema":{"type":"string"}},{"name":"authorisedRole","in":"query","description":"Only vendors whose Their role is exactly this.","schema":{"type":"string"}},{"name":"authorisedEmail","in":"query","description":"Only vendors whose Their email is exactly this.","schema":{"type":"string"}},{"name":"authorisedIdType","in":"query","description":"Only vendors whose Their identity document is exactly this.","schema":{"type":"string"}},{"name":"authorisedIdNumber","in":"query","description":"Only vendors whose Their document number is exactly this.","schema":{"type":"string"}},{"name":"authorisedIdExpiry","in":"query","description":"Only vendors whose Their document expires is exactly this.","schema":{"type":"string"}},{"name":"owner","in":"query","description":"Only vendors whose Record owner is exactly this.","schema":{"type":"string"}},{"name":"description","in":"query","description":"Only vendors whose Description / notes is exactly this.","schema":{"type":"string"}}],"responses":{"200":{"summary":"A page of vendors","description":"The records, with their values masked to what the caller may see, and where to go next.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Plan-Calls-Limit":{"$ref":"#/components/headers/PlanCallsLimit"},"X-Plan-Calls-Remaining":{"$ref":"#/components/headers/PlanCallsRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VendorPage"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["vendors:read"]},{"apiKeyHeader":["vendors:read"]},{"signIn":["vendors:read"]}]},"post":{"operationId":"createVendor","tags":["Vendors","Module: Order management"],"summary":"Create a vendor","description":"Create a record. Honours Idempotency-Key.\n\nUnknown field keys are refused (422 unknown_field); fields the system keeps are ignored and listed in rejectedFields. Duplicate rules that warn come back as possibleDuplicates; one that blocks answers 409.\n\nCounts towards the plan's record allowance: when that is full, a create is refused (400) until records are deleted or the plan grows.\n\nPart of Order management: listing, creating and bulk updates answer 403 module_not_entitled on a plan without it.","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VendorCreate"}}}},"responses":{"201":{"summary":"Created","description":"The new vendor, as saved.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Plan-Calls-Limit":{"$ref":"#/components/headers/PlanCallsLimit"},"X-Plan-Calls-Remaining":{"$ref":"#/components/headers/PlanCallsRemaining"},"Idempotent-Replay":{"$ref":"#/components/headers/IdempotentReplay"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VendorSaved"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["vendors:write"]},{"apiKeyHeader":["vendors:write"]},{"signIn":["vendors:write"]}]}},"/api/v1/vendor/{id}":{"get":{"operationId":"getVendor","tags":["Vendors","Module: Order management"],"summary":"Read a vendor","description":"Read one record.\n\nWith its line items, its timeline and the history of its values. A record older than the newest ones the plan opens answers 403 over_plan.","parameters":[{"$ref":"#/components/parameters/RecordId"}],"responses":{"200":{"summary":"The vendor","description":"The record and what hangs off it.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Plan-Calls-Limit":{"$ref":"#/components/headers/PlanCallsLimit"},"X-Plan-Calls-Remaining":{"$ref":"#/components/headers/PlanCallsRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VendorDetail"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["vendors:read"]},{"apiKeyHeader":["vendors:read"]},{"signIn":["vendors:read"]}]},"patch":{"operationId":"updateVendor","tags":["Vendors","Module: Order management"],"summary":"Change a vendor","description":"Update a record. Send only the fields that change.\n\nA record waiting on an approval, or whose subject asked for processing to stop, refuses changes (403).","parameters":[{"$ref":"#/components/parameters/RecordId"},{"$ref":"#/components/parameters/IfMatch"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VendorUpdate"}}}},"responses":{"200":{"summary":"Changed","description":"The vendor, as saved.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Plan-Calls-Limit":{"$ref":"#/components/headers/PlanCallsLimit"},"X-Plan-Calls-Remaining":{"$ref":"#/components/headers/PlanCallsRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VendorSaved"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["vendors:write"]},{"apiKeyHeader":["vendors:write"]},{"signIn":["vendors:write"]}]},"delete":{"operationId":"deleteVendor","tags":["Vendors","Module: Order management"],"summary":"Delete a vendor","description":"Move a record to the recycle bin.\n\nIt can be restored until the recycle bin is emptied, which an API key cannot do.","parameters":[{"$ref":"#/components/parameters/RecordId"}],"responses":{"204":{"$ref":"#/components/responses/Deleted"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["vendors:write"]},{"apiKeyHeader":["vendors:write"]},{"signIn":["vendors:write"]}]}},"/api/v1/vendor/{id}/restore":{"post":{"operationId":"restoreVendor","tags":["Vendors","Module: Order management"],"summary":"Restore a vendor","description":"Restore a record from the recycle bin.","parameters":[{"$ref":"#/components/parameters/RecordId"},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"$ref":"#/components/responses/Restored"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["vendors:write"]},{"apiKeyHeader":["vendors:write"]},{"signIn":["vendors:write"]}]}},"/api/v1/vendor/bulk":{"post":{"operationId":"bulkUpdateVendors","tags":["Vendors","Module: Order management"],"summary":"Change many vendors","description":"The same change to up to 500 records, each held to the rules of a single update. Records that refuse are listed in failed with the reason; the rest are changed.\n\nPart of Order management: listing, creating and bulk updates answer 403 module_not_entitled on a plan without it.","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VendorBulkUpdate"}}}},"responses":{"200":{"$ref":"#/components/responses/BulkUpdated"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["vendors:write"]},{"apiKeyHeader":["vendors:write"]},{"signIn":["vendors:write"]}]}},"/api/v1/vendor/merge":{"post":{"operationId":"mergeVendors","tags":["Vendors","Module: Order management"],"summary":"Merge two vendors","description":"Merge one record into another, choosing which value survives per field.\n\nIn one transaction: the survivor takes the chosen values, the other's activities, line items, history and files move onto it, records that named the other by name name the survivor, and the other goes to the recycle bin.","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VendorMerge"}}}},"responses":{"200":{"$ref":"#/components/responses/Merged"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["vendors:write"]},{"apiKeyHeader":["vendors:write"]},{"signIn":["vendors:write"]}]}},"/api/v1/vendor/merge-preview":{"get":{"operationId":"previewVendorMerge","tags":["Vendors","Module: Order management"],"summary":"Compare two vendors before merging","description":"Two records side by side: which fields differ, and what a merge would move.","parameters":[{"$ref":"#/components/parameters/KeepId"},{"$ref":"#/components/parameters/MergeId"}],"responses":{"200":{"$ref":"#/components/responses/MergePreviewed"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["vendors:read"]},{"apiKeyHeader":["vendors:read"]},{"signIn":["vendors:read"]}]}},"/api/v1/salesorder":{"get":{"operationId":"listSalesOrders","tags":["Sales orders","Module: Order management"],"summary":"List sales orders","description":"List records. Supports limit, cursor, q, field filters, and sort=newest for newest first.\n\nEvery other query parameter is an exact match on a field, and they combine: `?status=Open&city=Pune`. The fields are listed below; a workspace's custom fields work the same way. ownerId is not a field, so it cannot be filtered on.\n\nA workspace over its plan's record allowance lists only the newest records the plan opens.\n\nPart of Order management: listing, creating and bulk updates answer 403 module_not_entitled on a plan without it.","parameters":[{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/Cursor"},{"$ref":"#/components/parameters/Search"},{"$ref":"#/components/parameters/Sort"},{"$ref":"#/components/parameters/Deleted"},{"name":"country","in":"query","description":"Only sales orders whose Country is exactly this.","schema":{"type":"string"}},{"name":"state","in":"query","description":"Only sales orders whose State / province is exactly this.","schema":{"type":"string"}},{"name":"name","in":"query","description":"Only sales orders whose Sales order title is exactly this.","schema":{"type":"string"}},{"name":"orderNumber","in":"query","description":"Only sales orders whose Sales order number is exactly this.","schema":{"type":"string"}},{"name":"value","in":"query","description":"Only sales orders whose Order amount is exactly this.","schema":{"type":"number"}},{"name":"company","in":"query","description":"Only sales orders whose Company / account is exactly this.","schema":{"type":"string"}},{"name":"billingContact","in":"query","description":"Only sales orders whose Contact is exactly this.","schema":{"type":"string"}},{"name":"email","in":"query","description":"Only sales orders whose Email is exactly this.","schema":{"type":"string"}},{"name":"relatedQuote","in":"query","description":"Only sales orders whose Raised from quote is exactly this.","schema":{"type":"string"}},{"name":"poNumber","in":"query","description":"Only sales orders whose Customer PO number is exactly this.","schema":{"type":"string"}},{"name":"status","in":"query","description":"Only sales orders whose Order status is exactly this.","schema":{"type":"string"}},{"name":"orderDate","in":"query","description":"Only sales orders whose Order date is exactly this.","schema":{"type":"string"}},{"name":"deliveryDate","in":"query","description":"Only sales orders whose Promised delivery is exactly this.","schema":{"type":"string"}},{"name":"currency","in":"query","description":"Only sales orders whose Record currency is exactly this.","schema":{"type":"string"}},{"name":"priceBook","in":"query","description":"Only sales orders whose Price book is exactly this.","schema":{"type":"string"}},{"name":"street","in":"query","description":"Only sales orders whose Street address is exactly this.","schema":{"type":"string"}},{"name":"buildingNumber","in":"query","description":"Only sales orders whose Building number is exactly this.","schema":{"type":"string"}},{"name":"district","in":"query","description":"Only sales orders whose District is exactly this.","schema":{"type":"string"}},{"name":"city","in":"query","description":"Only sales orders whose City is exactly this.","schema":{"type":"string"}},{"name":"postalCode","in":"query","description":"Only sales orders whose ZIP / postal code is exactly this.","schema":{"type":"string"}},{"name":"taxStatus","in":"query","description":"Only sales orders whose Tax registration status is exactly this.","schema":{"type":"string"}},{"name":"legalName","in":"query","description":"Only sales orders whose Registered legal name is exactly this.","schema":{"type":"string"}},{"name":"gstin","in":"query","description":"Only sales orders whose GSTIN is exactly this.","schema":{"type":"string"}},{"name":"pan","in":"query","description":"Only sales orders whose PAN is exactly this.","schema":{"type":"string"}},{"name":"cin","in":"query","description":"Only sales orders whose CIN / LLPIN is exactly this.","schema":{"type":"string"}},{"name":"gstType","in":"query","description":"Only sales orders whose GST registration type is exactly this.","schema":{"type":"string"}},{"name":"gstStateCode","in":"query","description":"Only sales orders whose GST state code is exactly this.","schema":{"type":"string"}},{"name":"reverseCharge","in":"query","description":"Only sales orders whose Tax payable on reverse charge is exactly this.","schema":{"type":"string"}},{"name":"placeOfSupply","in":"query","description":"Only sales orders whose Place of supply is exactly this.","schema":{"type":"string"}},{"name":"trn","in":"query","description":"Only sales orders whose VAT TRN is exactly this.","schema":{"type":"string"}},{"name":"emirate","in":"query","description":"Only sales orders whose Emirate is exactly this.","schema":{"type":"string"}},{"name":"vatNumber","in":"query","description":"Only sales orders whose VAT / tax registration number is exactly this.","schema":{"type":"string"}},{"name":"ein","in":"query","description":"Only sales orders whose EIN / federal tax ID is exactly this.","schema":{"type":"string"}},{"name":"uen","in":"query","description":"Only sales orders whose UEN / GST registration is exactly this.","schema":{"type":"string"}},{"name":"abn","in":"query","description":"Only sales orders whose ABN / GST registration is exactly this.","schema":{"type":"string"}},{"name":"businessNumber","in":"query","description":"Only sales orders whose Business number / GST-HST is exactly this.","schema":{"type":"string"}},{"name":"taxExempt","in":"query","description":"Only sales orders whose Tax-exempt customer is exactly this.","schema":{"type":"boolean"}},{"name":"exportTax","in":"query","description":"Only sales orders whose Export / SEZ supply is exactly this.","schema":{"type":"string"}},{"name":"chargeTaxAbroad","in":"query","description":"Only sales orders whose Charge tax as at home is exactly this.","schema":{"type":"boolean"}},{"name":"owner","in":"query","description":"Only sales orders whose Record owner is exactly this.","schema":{"type":"string"}},{"name":"terms","in":"query","description":"Only sales orders whose Terms & conditions is exactly this.","schema":{"type":"string"}},{"name":"description","in":"query","description":"Only sales orders whose Description / notes is exactly this.","schema":{"type":"string"}},{"name":"companyId","in":"query","description":"Only sales orders whose Company / account (record id) is exactly this.","schema":{"type":"string"}},{"name":"billingContactId","in":"query","description":"Only sales orders whose Contact (record id) is exactly this.","schema":{"type":"string"}}],"responses":{"200":{"summary":"A page of sales orders","description":"The records, with their values masked to what the caller may see, and where to go next.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Plan-Calls-Limit":{"$ref":"#/components/headers/PlanCallsLimit"},"X-Plan-Calls-Remaining":{"$ref":"#/components/headers/PlanCallsRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SalesOrderPage"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["salesorders:read"]},{"apiKeyHeader":["salesorders:read"]},{"signIn":["salesorders:read"]}]},"post":{"operationId":"createSalesOrder","tags":["Sales orders","Module: Order management"],"summary":"Create a sales order","description":"Create a record. Honours Idempotency-Key.\n\nUnknown field keys are refused (422 unknown_field); fields the system keeps are ignored and listed in rejectedFields. Duplicate rules that warn come back as possibleDuplicates; one that blocks answers 409.\n\nLeft without a name, it is given the next number in the workspace's sequence.\n\nCounts towards the plan's record allowance: when that is full, a create is refused (400) until records are deleted or the plan grows.\n\nPart of Order management: listing, creating and bulk updates answer 403 module_not_entitled on a plan without it.","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SalesOrderCreate"}}}},"responses":{"201":{"summary":"Created","description":"The new sales order, as saved.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Plan-Calls-Limit":{"$ref":"#/components/headers/PlanCallsLimit"},"X-Plan-Calls-Remaining":{"$ref":"#/components/headers/PlanCallsRemaining"},"Idempotent-Replay":{"$ref":"#/components/headers/IdempotentReplay"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SalesOrderSaved"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["salesorders:write"]},{"apiKeyHeader":["salesorders:write"]},{"signIn":["salesorders:write"]}]}},"/api/v1/salesorder/{id}":{"get":{"operationId":"getSalesOrder","tags":["Sales orders","Module: Order management"],"summary":"Read a sales order","description":"Read one record.\n\nWith its line items, its timeline and the history of its values. A record older than the newest ones the plan opens answers 403 over_plan.","parameters":[{"$ref":"#/components/parameters/RecordId"}],"responses":{"200":{"summary":"The sales order","description":"The record and what hangs off it.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Plan-Calls-Limit":{"$ref":"#/components/headers/PlanCallsLimit"},"X-Plan-Calls-Remaining":{"$ref":"#/components/headers/PlanCallsRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SalesOrderDetail"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["salesorders:read"]},{"apiKeyHeader":["salesorders:read"]},{"signIn":["salesorders:read"]}]},"patch":{"operationId":"updateSalesOrder","tags":["Sales orders","Module: Order management"],"summary":"Change a sales order","description":"Update a record. Send only the fields that change.\n\nA record waiting on an approval, or whose subject asked for processing to stop, refuses changes (403).\n\nIts total and tax are worked out from its line items, which are written in the app — an API key cannot reach them — and come back as lineItems when one record is read.","parameters":[{"$ref":"#/components/parameters/RecordId"},{"$ref":"#/components/parameters/IfMatch"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SalesOrderUpdate"}}}},"responses":{"200":{"summary":"Changed","description":"The sales order, as saved.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Plan-Calls-Limit":{"$ref":"#/components/headers/PlanCallsLimit"},"X-Plan-Calls-Remaining":{"$ref":"#/components/headers/PlanCallsRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SalesOrderSaved"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["salesorders:write"]},{"apiKeyHeader":["salesorders:write"]},{"signIn":["salesorders:write"]}]},"delete":{"operationId":"deleteSalesOrder","tags":["Sales orders","Module: Order management"],"summary":"Delete a sales order","description":"Move a record to the recycle bin.\n\nIt can be restored until the recycle bin is emptied, which an API key cannot do.","parameters":[{"$ref":"#/components/parameters/RecordId"}],"responses":{"204":{"$ref":"#/components/responses/Deleted"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["salesorders:write"]},{"apiKeyHeader":["salesorders:write"]},{"signIn":["salesorders:write"]}]}},"/api/v1/salesorder/{id}/restore":{"post":{"operationId":"restoreSalesOrder","tags":["Sales orders","Module: Order management"],"summary":"Restore a sales order","description":"Restore a record from the recycle bin.","parameters":[{"$ref":"#/components/parameters/RecordId"},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"$ref":"#/components/responses/Restored"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["salesorders:write"]},{"apiKeyHeader":["salesorders:write"]},{"signIn":["salesorders:write"]}]}},"/api/v1/salesorder/bulk":{"post":{"operationId":"bulkUpdateSalesOrders","tags":["Sales orders","Module: Order management"],"summary":"Change many sales orders","description":"The same change to up to 500 records, each held to the rules of a single update. Records that refuse are listed in failed with the reason; the rest are changed.\n\nPart of Order management: listing, creating and bulk updates answer 403 module_not_entitled on a plan without it.","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SalesOrderBulkUpdate"}}}},"responses":{"200":{"$ref":"#/components/responses/BulkUpdated"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["salesorders:write"]},{"apiKeyHeader":["salesorders:write"]},{"signIn":["salesorders:write"]}]}},"/api/v1/salesorder/merge":{"post":{"operationId":"mergeSalesOrders","tags":["Sales orders","Module: Order management"],"summary":"Merge two sales orders","description":"Merge one record into another, choosing which value survives per field.\n\nIn one transaction: the survivor takes the chosen values, the other's activities, line items, history and files move onto it, records that named the other by name name the survivor, and the other goes to the recycle bin.","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SalesOrderMerge"}}}},"responses":{"200":{"$ref":"#/components/responses/Merged"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["salesorders:write"]},{"apiKeyHeader":["salesorders:write"]},{"signIn":["salesorders:write"]}]}},"/api/v1/salesorder/merge-preview":{"get":{"operationId":"previewSalesOrderMerge","tags":["Sales orders","Module: Order management"],"summary":"Compare two sales orders before merging","description":"Two records side by side: which fields differ, and what a merge would move.","parameters":[{"$ref":"#/components/parameters/KeepId"},{"$ref":"#/components/parameters/MergeId"}],"responses":{"200":{"$ref":"#/components/responses/MergePreviewed"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["salesorders:read"]},{"apiKeyHeader":["salesorders:read"]},{"signIn":["salesorders:read"]}]}},"/api/v1/purchaseorder":{"get":{"operationId":"listPurchaseOrders","tags":["Purchase orders","Module: Order management"],"summary":"List purchase orders","description":"List records. Supports limit, cursor, q, field filters, and sort=newest for newest first.\n\nEvery other query parameter is an exact match on a field, and they combine: `?status=Open&city=Pune`. The fields are listed below; a workspace's custom fields work the same way. ownerId is not a field, so it cannot be filtered on.\n\nA workspace over its plan's record allowance lists only the newest records the plan opens.\n\nPart of Order management: listing, creating and bulk updates answer 403 module_not_entitled on a plan without it.","parameters":[{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/Cursor"},{"$ref":"#/components/parameters/Search"},{"$ref":"#/components/parameters/Sort"},{"$ref":"#/components/parameters/Deleted"},{"name":"name","in":"query","description":"Only purchase orders whose Purchase order title is exactly this.","schema":{"type":"string"}},{"name":"orderNumber","in":"query","description":"Only purchase orders whose Purchase order number is exactly this.","schema":{"type":"string"}},{"name":"value","in":"query","description":"Only purchase orders whose Order amount is exactly this.","schema":{"type":"number"}},{"name":"vendor","in":"query","description":"Only purchase orders whose Vendor is exactly this.","schema":{"type":"string"}},{"name":"vendorContact","in":"query","description":"Only purchase orders whose Vendor contact is exactly this.","schema":{"type":"string"}},{"name":"email","in":"query","description":"Only purchase orders whose Vendor email is exactly this.","schema":{"type":"string"}},{"name":"status","in":"query","description":"Only purchase orders whose Order status is exactly this.","schema":{"type":"string"}},{"name":"orderDate","in":"query","description":"Only purchase orders whose Order date is exactly this.","schema":{"type":"string"}},{"name":"expectedDate","in":"query","description":"Only purchase orders whose Expected delivery is exactly this.","schema":{"type":"string"}},{"name":"receivedDate","in":"query","description":"Only purchase orders whose Received on is exactly this.","schema":{"type":"string"}},{"name":"paymentTerms","in":"query","description":"Only purchase orders whose Payment terms is exactly this.","schema":{"type":"string"}},{"name":"shipTo","in":"query","description":"Only purchase orders whose Deliver to is exactly this.","schema":{"type":"string"}},{"name":"currency","in":"query","description":"Only purchase orders whose Record currency is exactly this.","schema":{"type":"string"}},{"name":"country","in":"query","description":"Only purchase orders whose Country is exactly this.","schema":{"type":"string"}},{"name":"taxStatus","in":"query","description":"Only purchase orders whose Tax registration status is exactly this.","schema":{"type":"string"}},{"name":"legalName","in":"query","description":"Only purchase orders whose Registered legal name is exactly this.","schema":{"type":"string"}},{"name":"gstin","in":"query","description":"Only purchase orders whose GSTIN is exactly this.","schema":{"type":"string"}},{"name":"pan","in":"query","description":"Only purchase orders whose PAN is exactly this.","schema":{"type":"string"}},{"name":"cin","in":"query","description":"Only purchase orders whose CIN / LLPIN is exactly this.","schema":{"type":"string"}},{"name":"gstType","in":"query","description":"Only purchase orders whose GST registration type is exactly this.","schema":{"type":"string"}},{"name":"gstStateCode","in":"query","description":"Only purchase orders whose GST state code is exactly this.","schema":{"type":"string"}},{"name":"reverseCharge","in":"query","description":"Only purchase orders whose Tax payable on reverse charge is exactly this.","schema":{"type":"string"}},{"name":"placeOfSupply","in":"query","description":"Only purchase orders whose Place of supply is exactly this.","schema":{"type":"string"}},{"name":"trn","in":"query","description":"Only purchase orders whose VAT TRN is exactly this.","schema":{"type":"string"}},{"name":"emirate","in":"query","description":"Only purchase orders whose Emirate is exactly this.","schema":{"type":"string"}},{"name":"vatNumber","in":"query","description":"Only purchase orders whose VAT / tax registration number is exactly this.","schema":{"type":"string"}},{"name":"ein","in":"query","description":"Only purchase orders whose EIN / federal tax ID is exactly this.","schema":{"type":"string"}},{"name":"uen","in":"query","description":"Only purchase orders whose UEN / GST registration is exactly this.","schema":{"type":"string"}},{"name":"abn","in":"query","description":"Only purchase orders whose ABN / GST registration is exactly this.","schema":{"type":"string"}},{"name":"businessNumber","in":"query","description":"Only purchase orders whose Business number / GST-HST is exactly this.","schema":{"type":"string"}},{"name":"taxExempt","in":"query","description":"Only purchase orders whose Tax-exempt is exactly this.","schema":{"type":"boolean"}},{"name":"owner","in":"query","description":"Only purchase orders whose Record owner is exactly this.","schema":{"type":"string"}},{"name":"terms","in":"query","description":"Only purchase orders whose Terms & conditions is exactly this.","schema":{"type":"string"}},{"name":"description","in":"query","description":"Only purchase orders whose Description / notes is exactly this.","schema":{"type":"string"}}],"responses":{"200":{"summary":"A page of purchase orders","description":"The records, with their values masked to what the caller may see, and where to go next.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Plan-Calls-Limit":{"$ref":"#/components/headers/PlanCallsLimit"},"X-Plan-Calls-Remaining":{"$ref":"#/components/headers/PlanCallsRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PurchaseOrderPage"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["purchaseorders:read"]},{"apiKeyHeader":["purchaseorders:read"]},{"signIn":["purchaseorders:read"]}]},"post":{"operationId":"createPurchaseOrder","tags":["Purchase orders","Module: Order management"],"summary":"Create a purchase order","description":"Create a record. Honours Idempotency-Key.\n\nUnknown field keys are refused (422 unknown_field); fields the system keeps are ignored and listed in rejectedFields. Duplicate rules that warn come back as possibleDuplicates; one that blocks answers 409.\n\nLeft without a name, it is given the next number in the workspace's sequence.\n\nCounts towards the plan's record allowance: when that is full, a create is refused (400) until records are deleted or the plan grows.\n\nPart of Order management: listing, creating and bulk updates answer 403 module_not_entitled on a plan without it.","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PurchaseOrderCreate"}}}},"responses":{"201":{"summary":"Created","description":"The new purchase order, as saved.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Plan-Calls-Limit":{"$ref":"#/components/headers/PlanCallsLimit"},"X-Plan-Calls-Remaining":{"$ref":"#/components/headers/PlanCallsRemaining"},"Idempotent-Replay":{"$ref":"#/components/headers/IdempotentReplay"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PurchaseOrderSaved"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["purchaseorders:write"]},{"apiKeyHeader":["purchaseorders:write"]},{"signIn":["purchaseorders:write"]}]}},"/api/v1/purchaseorder/{id}":{"get":{"operationId":"getPurchaseOrder","tags":["Purchase orders","Module: Order management"],"summary":"Read a purchase order","description":"Read one record.\n\nWith its line items, its timeline and the history of its values. A record older than the newest ones the plan opens answers 403 over_plan.","parameters":[{"$ref":"#/components/parameters/RecordId"}],"responses":{"200":{"summary":"The purchase order","description":"The record and what hangs off it.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Plan-Calls-Limit":{"$ref":"#/components/headers/PlanCallsLimit"},"X-Plan-Calls-Remaining":{"$ref":"#/components/headers/PlanCallsRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PurchaseOrderDetail"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["purchaseorders:read"]},{"apiKeyHeader":["purchaseorders:read"]},{"signIn":["purchaseorders:read"]}]},"patch":{"operationId":"updatePurchaseOrder","tags":["Purchase orders","Module: Order management"],"summary":"Change a purchase order","description":"Update a record. Send only the fields that change.\n\nA record waiting on an approval, or whose subject asked for processing to stop, refuses changes (403).\n\nIts total and tax are worked out from its line items, which are written in the app — an API key cannot reach them — and come back as lineItems when one record is read.","parameters":[{"$ref":"#/components/parameters/RecordId"},{"$ref":"#/components/parameters/IfMatch"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PurchaseOrderUpdate"}}}},"responses":{"200":{"summary":"Changed","description":"The purchase order, as saved.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Plan-Calls-Limit":{"$ref":"#/components/headers/PlanCallsLimit"},"X-Plan-Calls-Remaining":{"$ref":"#/components/headers/PlanCallsRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PurchaseOrderSaved"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["purchaseorders:write"]},{"apiKeyHeader":["purchaseorders:write"]},{"signIn":["purchaseorders:write"]}]},"delete":{"operationId":"deletePurchaseOrder","tags":["Purchase orders","Module: Order management"],"summary":"Delete a purchase order","description":"Move a record to the recycle bin.\n\nIt can be restored until the recycle bin is emptied, which an API key cannot do.","parameters":[{"$ref":"#/components/parameters/RecordId"}],"responses":{"204":{"$ref":"#/components/responses/Deleted"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["purchaseorders:write"]},{"apiKeyHeader":["purchaseorders:write"]},{"signIn":["purchaseorders:write"]}]}},"/api/v1/purchaseorder/{id}/restore":{"post":{"operationId":"restorePurchaseOrder","tags":["Purchase orders","Module: Order management"],"summary":"Restore a purchase order","description":"Restore a record from the recycle bin.","parameters":[{"$ref":"#/components/parameters/RecordId"},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"$ref":"#/components/responses/Restored"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["purchaseorders:write"]},{"apiKeyHeader":["purchaseorders:write"]},{"signIn":["purchaseorders:write"]}]}},"/api/v1/purchaseorder/bulk":{"post":{"operationId":"bulkUpdatePurchaseOrders","tags":["Purchase orders","Module: Order management"],"summary":"Change many purchase orders","description":"The same change to up to 500 records, each held to the rules of a single update. Records that refuse are listed in failed with the reason; the rest are changed.\n\nPart of Order management: listing, creating and bulk updates answer 403 module_not_entitled on a plan without it.","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PurchaseOrderBulkUpdate"}}}},"responses":{"200":{"$ref":"#/components/responses/BulkUpdated"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["purchaseorders:write"]},{"apiKeyHeader":["purchaseorders:write"]},{"signIn":["purchaseorders:write"]}]}},"/api/v1/purchaseorder/merge":{"post":{"operationId":"mergePurchaseOrders","tags":["Purchase orders","Module: Order management"],"summary":"Merge two purchase orders","description":"Merge one record into another, choosing which value survives per field.\n\nIn one transaction: the survivor takes the chosen values, the other's activities, line items, history and files move onto it, records that named the other by name name the survivor, and the other goes to the recycle bin.","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PurchaseOrderMerge"}}}},"responses":{"200":{"$ref":"#/components/responses/Merged"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["purchaseorders:write"]},{"apiKeyHeader":["purchaseorders:write"]},{"signIn":["purchaseorders:write"]}]}},"/api/v1/purchaseorder/merge-preview":{"get":{"operationId":"previewPurchaseOrderMerge","tags":["Purchase orders","Module: Order management"],"summary":"Compare two purchase orders before merging","description":"Two records side by side: which fields differ, and what a merge would move.","parameters":[{"$ref":"#/components/parameters/KeepId"},{"$ref":"#/components/parameters/MergeId"}],"responses":{"200":{"$ref":"#/components/responses/MergePreviewed"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":["purchaseorders:read"]},{"apiKeyHeader":["purchaseorders:read"]},{"signIn":["purchaseorders:read"]}]}},"/api/v1/schema":{"get":{"operationId":"listObjectSchemas","tags":["Schema"],"summary":"Every object's fields","description":"Every object with its fields, including custom fields.\n\nThe built-in objects, each with the workspace's custom fields; a module the workspace made is read one at a time.","responses":{"200":{"summary":"The objects","description":"Each built-in object and its fields.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Plan-Calls-Limit":{"$ref":"#/components/headers/PlanCallsLimit"},"X-Plan-Calls-Remaining":{"$ref":"#/components/headers/PlanCallsRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SchemaList"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":[]},{"apiKeyHeader":[]},{"signIn":[]}]}},"/api/v1/schema/{object}":{"get":{"operationId":"getObjectSchema","tags":["Schema"],"summary":"One object's fields","description":"Fields for one object.","parameters":[{"name":"object","in":"path","required":true,"description":"A kind of record. A workspace's own modules are named by their keys too.","schema":{"type":"string","examples":["contact","company","lead","deal","task","event","campaign","invoice","creditnote","recurring","product","quote","case","visit","inventory","process","forecast","article","pricebook","vendor","salesorder","purchaseorder"]}}],"responses":{"200":{"summary":"The object","description":"Its fields, standard and custom.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Plan-Calls-Limit":{"$ref":"#/components/headers/PlanCallsLimit"},"X-Plan-Calls-Remaining":{"$ref":"#/components/headers/PlanCallsRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ObjectSchema"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":[]},{"apiKeyHeader":[]},{"signIn":[]}]}},"/api/v1/recycle-bin":{"get":{"operationId":"listRecycleBin","tags":["Recycle bin"],"summary":"Deleted records","description":"Records deleted but not yet purged.\n\nThe 200 most recently deleted, of every kind — whatever the key's scopes. Restore one with POST /api/v1/{object}/{id}/restore.","responses":{"200":{"summary":"The recycle bin","description":"Newest first.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Plan-Calls-Limit":{"$ref":"#/components/headers/PlanCallsLimit"},"X-Plan-Calls-Remaining":{"$ref":"#/components/headers/PlanCallsRemaining"}},"content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/RecycledRecord"}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":[]},{"apiKeyHeader":[]},{"signIn":[]}]}},"/api/v1/duplicates":{"get":{"operationId":"listDuplicates","tags":["Duplicates"],"summary":"Records held twice","description":"Records this workspace already holds twice, by its own matching rules.\n\nPairs, by the workspace's active duplicate rules, that the caller may open both of — of every kind the rules cover, whatever the key's scopes. Merge one with POST /api/v1/{object}/merge.","parameters":[{"name":"limit","in":"query","description":"How many pairs to look for: 1 to 200, 50 when left out.","schema":{"type":"integer","minimum":1,"maximum":200,"default":50}}],"responses":{"200":{"summary":"Duplicate pairs","description":"The older record of each pair is the one a merge keeps.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Plan-Calls-Limit":{"$ref":"#/components/headers/PlanCallsLimit"},"X-Plan-Calls-Remaining":{"$ref":"#/components/headers/PlanCallsRemaining"}},"content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/DuplicatePair"}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":[]},{"apiKeyHeader":[]},{"signIn":[]}]}},"/api/v1/export":{"get":{"operationId":"getExportSummary","tags":["Export"],"summary":"What can be exported","description":"What can be exported, and how many records of each object. During a trial it still answers, with paused saying why the files wait.\n\nEach built-in object the plan includes, with how many records it holds. While a trial runs it still answers, and paused says why the files themselves are refused.","responses":{"200":{"summary":"The objects and their counts","description":"No charge, no limit on how often; paused is set while a trial runs.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Plan-Calls-Limit":{"$ref":"#/components/headers/PlanCallsLimit"},"X-Plan-Calls-Remaining":{"$ref":"#/components/headers/PlanCallsRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExportSummary"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":[]},{"apiKeyHeader":[]},{"signIn":[]}]}},"/api/v1/export/{object}":{"get":{"operationId":"exportObject","tags":["Export"],"summary":"One object as CSV","description":"Every record of one object as CSV, including custom fields. Free, and as often as you like — except while a trial runs, when it is refused (403, reason trial or day_trial).\n\nEvery record the caller may see — past the plan's read window, because leaving is never limited — streamed a page at a time. Columns: id, name, ownerId, createdAt, updatedAt, then each field's key in schema order, leaving out fields the caller may not see. A cell that starts with =, +, - or @ is prefixed with an apostrophe so a spreadsheet does not run it. The path may end in .csv. Needs the read scope of the object asked for (contacts:read for contact); thirty exports a minute per workspace.\n\nRefused while a trial runs: 403 with reason trial during the workspace's free trial, or day_trial while a one-day trial runs. Exports open again when the workspace is on a plan, or when the day ends.","parameters":[{"name":"object","in":"path","required":true,"description":"A built-in kind of record; a workspace's own modules are not exported here.","schema":{"type":"string","enum":["contact","company","lead","deal","task","event","campaign","invoice","creditnote","recurring","product","quote","case","visit","inventory","process","forecast","article","pricebook","vendor","salesorder","purchaseorder"]}}],"responses":{"200":{"summary":"The CSV file","description":"RFC 4180 CSV with a header row, as an attachment named after the object and the day.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Plan-Calls-Limit":{"$ref":"#/components/headers/PlanCallsLimit"},"X-Plan-Calls-Remaining":{"$ref":"#/components/headers/PlanCallsRemaining"},"Content-Disposition":{"description":"attachment; filename=\"<object>-<YYYY-MM-DD>.csv\"","schema":{"type":"string"}}},"content":{"text/csv":{"schema":{"type":"string"},"examples":{"contacts":{"summary":"The start of a contacts export","serializedValue":"id,name,ownerId,createdAt,updatedAt,salutation,email\nrec_3f1c9a0b5d2e4f6a7b8c9d0e,Asha Rao,usr_5d2e4f6a7b8c9d0e3f1c9a0b,2026-10-01T09:30:00.000Z,2026-10-02T11:00:00.000Z,Ms.,asha@example.com\n"}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":[]},{"apiKeyHeader":[]},{"signIn":[]}]}},"/api/v1/mcp":{"post":{"operationId":"callMcp","tags":["AI assistants"],"summary":"The MCP endpoint","description":"The Model Context Protocol over HTTP: one JSON-RPC 2.0 message a request, answered as JSON. The tools — list_objects, describe_object, list_records, get_record, create_record and update_record — run through the same code as the endpoints here, and each checks the scope of the object it touches. The protocol version is agreed in initialize.\n\nAssistants that cannot hold a key sign a person in instead (the signIn scheme); discovery is at /.well-known/oauth-protected-resource/api/v1/mcp.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/McpRequest"}}}},"responses":{"200":{"summary":"The JSON-RPC answer","description":"A result, or a JSON-RPC error for an unknown method or tool.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Plan-Calls-Limit":{"$ref":"#/components/headers/PlanCallsLimit"},"X-Plan-Calls-Remaining":{"$ref":"#/components/headers/PlanCallsRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/McpResponse"}}}},"204":{"summary":"Notification taken","description":"A message with no id expects no answer.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Plan-Calls-Limit":{"$ref":"#/components/headers/PlanCallsLimit"},"X-Plan-Calls-Remaining":{"$ref":"#/components/headers/PlanCallsRemaining"}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/McpUnauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":[]},{"apiKeyHeader":[]},{"signIn":[]}],"externalDocs":{"description":"Model Context Protocol","url":"https://modelcontextprotocol.io/specification"}}},"/api/v1/openapi.json":{"get":{"operationId":"getOpenApiDescription","tags":["OpenAPI","No key needed"],"summary":"This description","description":"The public API as OpenAPI 3.2.1: the built-in objects, every scope a key can be granted, the webhooks. Needs no key.","parameters":[{"$ref":"#/components/parameters/Oas"},{"$ref":"#/components/parameters/Download"},{"$ref":"#/components/parameters/IfNoneMatch"}],"responses":{"200":{"summary":"The description","description":"Cached for an hour by anyone; the ETag changes when the description does.","headers":{"ETag":{"description":"A fingerprint of this exact description.","schema":{"type":"string"}},"Cache-Control":{"description":"public, max-age=3600","schema":{"type":"string"}},"Content-Disposition":{"description":"With download: attachment, and a file name.","schema":{"type":"string"}},"X-Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenApiDocument"}}}},"304":{"summary":"Not modified","description":"The copy named in If-None-Match is still this description.","headers":{"ETag":{"description":"The same fingerprint.","schema":{"type":"string"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[]}},"/api/v1/openapi/workspace.json":{"get":{"operationId":"getWorkspaceOpenApiDescription","tags":["OpenAPI"],"summary":"This description, for your workspace","description":"The same description built for whoever asks: only the objects, operations and fields the key (or signed-in person) may use, with the workspace's custom fields and its own modules typed exactly.","parameters":[{"$ref":"#/components/parameters/Oas"},{"$ref":"#/components/parameters/Download"},{"$ref":"#/components/parameters/IfNoneMatch"}],"responses":{"200":{"summary":"The description","description":"For this caller only: revalidate with If-None-Match rather than storing it for others.","headers":{"ETag":{"description":"A fingerprint of this exact description.","schema":{"type":"string"}},"Cache-Control":{"description":"private, no-cache","schema":{"type":"string"}},"Content-Disposition":{"description":"With download: attachment, and a file name.","schema":{"type":"string"}},"X-Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenApiDocument"}}}},"304":{"summary":"Not modified","description":"The copy named in If-None-Match is still this description.","headers":{"ETag":{"description":"The same fingerprint.","schema":{"type":"string"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"5XX":{"$ref":"#/components/responses/ServerError"}},"security":[{"apiKeyBearer":[]},{"apiKeyHeader":[]},{"signIn":[]}]}}},"webhooks":{"contact.created":{"post":{"operationId":"contactCreatedEvent","tags":["Webhooks"],"summary":"A contact was made","description":"Sent when a contact is made.\n\nRecords a lead conversion makes are not announced.","parameters":[{"$ref":"#/components/parameters/EventHeader"},{"$ref":"#/components/parameters/DeliveryHeader"},{"$ref":"#/components/parameters/SignatureHeader"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactEvent"}}}},"responses":{"2XX":{"summary":"Received","description":"Any 2xx within ten seconds marks the delivery delivered. The first 500 characters of the body are kept in the delivery log."},"default":{"summary":"Not received","description":"Anything else — another status, a redirect (never followed), or no answer within ten seconds — is a failure. The delivery is tried again after 1 minute, 5 minutes, 25 minutes, 2 hours and 10 hours, then marked Failed; twenty failures in a row suspend the endpoint until it is resumed in Settings."}},"security":[]}},"contact.updated":{"post":{"operationId":"contactUpdatedEvent","tags":["Webhooks"],"summary":"A contact was changed","description":"Sent when a contact is changed, once for each record a bulk update changes.","parameters":[{"$ref":"#/components/parameters/EventHeader"},{"$ref":"#/components/parameters/DeliveryHeader"},{"$ref":"#/components/parameters/SignatureHeader"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactEvent"}}}},"responses":{"2XX":{"summary":"Received","description":"Any 2xx within ten seconds marks the delivery delivered. The first 500 characters of the body are kept in the delivery log."},"default":{"summary":"Not received","description":"Anything else — another status, a redirect (never followed), or no answer within ten seconds — is a failure. The delivery is tried again after 1 minute, 5 minutes, 25 minutes, 2 hours and 10 hours, then marked Failed; twenty failures in a row suspend the endpoint until it is resumed in Settings."}},"security":[]}},"company.created":{"post":{"operationId":"companyCreatedEvent","tags":["Webhooks"],"summary":"A company was made","description":"Sent when a company is made.\n\nRecords a lead conversion makes are not announced.","parameters":[{"$ref":"#/components/parameters/EventHeader"},{"$ref":"#/components/parameters/DeliveryHeader"},{"$ref":"#/components/parameters/SignatureHeader"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyEvent"}}}},"responses":{"2XX":{"summary":"Received","description":"Any 2xx within ten seconds marks the delivery delivered. The first 500 characters of the body are kept in the delivery log."},"default":{"summary":"Not received","description":"Anything else — another status, a redirect (never followed), or no answer within ten seconds — is a failure. The delivery is tried again after 1 minute, 5 minutes, 25 minutes, 2 hours and 10 hours, then marked Failed; twenty failures in a row suspend the endpoint until it is resumed in Settings."}},"security":[]}},"company.updated":{"post":{"operationId":"companyUpdatedEvent","tags":["Webhooks"],"summary":"A company was changed","description":"Sent when a company is changed, once for each record a bulk update changes.","parameters":[{"$ref":"#/components/parameters/EventHeader"},{"$ref":"#/components/parameters/DeliveryHeader"},{"$ref":"#/components/parameters/SignatureHeader"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyEvent"}}}},"responses":{"2XX":{"summary":"Received","description":"Any 2xx within ten seconds marks the delivery delivered. The first 500 characters of the body are kept in the delivery log."},"default":{"summary":"Not received","description":"Anything else — another status, a redirect (never followed), or no answer within ten seconds — is a failure. The delivery is tried again after 1 minute, 5 minutes, 25 minutes, 2 hours and 10 hours, then marked Failed; twenty failures in a row suspend the endpoint until it is resumed in Settings."}},"security":[]}},"lead.created":{"post":{"operationId":"leadCreatedEvent","tags":["Webhooks"],"summary":"A lead was made","description":"Sent when a lead is made.\n\nRecords a lead conversion makes are not announced.","parameters":[{"$ref":"#/components/parameters/EventHeader"},{"$ref":"#/components/parameters/DeliveryHeader"},{"$ref":"#/components/parameters/SignatureHeader"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadEvent"}}}},"responses":{"2XX":{"summary":"Received","description":"Any 2xx within ten seconds marks the delivery delivered. The first 500 characters of the body are kept in the delivery log."},"default":{"summary":"Not received","description":"Anything else — another status, a redirect (never followed), or no answer within ten seconds — is a failure. The delivery is tried again after 1 minute, 5 minutes, 25 minutes, 2 hours and 10 hours, then marked Failed; twenty failures in a row suspend the endpoint until it is resumed in Settings."}},"security":[]}},"lead.updated":{"post":{"operationId":"leadUpdatedEvent","tags":["Webhooks"],"summary":"A lead was changed","description":"Sent when a lead is changed, once for each record a bulk update changes.","parameters":[{"$ref":"#/components/parameters/EventHeader"},{"$ref":"#/components/parameters/DeliveryHeader"},{"$ref":"#/components/parameters/SignatureHeader"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadEvent"}}}},"responses":{"2XX":{"summary":"Received","description":"Any 2xx within ten seconds marks the delivery delivered. The first 500 characters of the body are kept in the delivery log."},"default":{"summary":"Not received","description":"Anything else — another status, a redirect (never followed), or no answer within ten seconds — is a failure. The delivery is tried again after 1 minute, 5 minutes, 25 minutes, 2 hours and 10 hours, then marked Failed; twenty failures in a row suspend the endpoint until it is resumed in Settings."}},"security":[]}},"deal.created":{"post":{"operationId":"dealCreatedEvent","tags":["Webhooks"],"summary":"A deal was made","description":"Sent when a deal is made.\n\nRecords a lead conversion makes are not announced.","parameters":[{"$ref":"#/components/parameters/EventHeader"},{"$ref":"#/components/parameters/DeliveryHeader"},{"$ref":"#/components/parameters/SignatureHeader"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DealEvent"}}}},"responses":{"2XX":{"summary":"Received","description":"Any 2xx within ten seconds marks the delivery delivered. The first 500 characters of the body are kept in the delivery log."},"default":{"summary":"Not received","description":"Anything else — another status, a redirect (never followed), or no answer within ten seconds — is a failure. The delivery is tried again after 1 minute, 5 minutes, 25 minutes, 2 hours and 10 hours, then marked Failed; twenty failures in a row suspend the endpoint until it is resumed in Settings."}},"security":[]}},"deal.updated":{"post":{"operationId":"dealUpdatedEvent","tags":["Webhooks"],"summary":"A deal was changed","description":"Sent when a deal is changed, once for each record a bulk update changes.","parameters":[{"$ref":"#/components/parameters/EventHeader"},{"$ref":"#/components/parameters/DeliveryHeader"},{"$ref":"#/components/parameters/SignatureHeader"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DealEvent"}}}},"responses":{"2XX":{"summary":"Received","description":"Any 2xx within ten seconds marks the delivery delivered. The first 500 characters of the body are kept in the delivery log."},"default":{"summary":"Not received","description":"Anything else — another status, a redirect (never followed), or no answer within ten seconds — is a failure. The delivery is tried again after 1 minute, 5 minutes, 25 minutes, 2 hours and 10 hours, then marked Failed; twenty failures in a row suspend the endpoint until it is resumed in Settings."}},"security":[]}},"task.created":{"post":{"operationId":"taskCreatedEvent","tags":["Webhooks"],"summary":"A task was made","description":"Sent when a task is made.\n\nRecords a lead conversion makes are not announced.","parameters":[{"$ref":"#/components/parameters/EventHeader"},{"$ref":"#/components/parameters/DeliveryHeader"},{"$ref":"#/components/parameters/SignatureHeader"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskEvent"}}}},"responses":{"2XX":{"summary":"Received","description":"Any 2xx within ten seconds marks the delivery delivered. The first 500 characters of the body are kept in the delivery log."},"default":{"summary":"Not received","description":"Anything else — another status, a redirect (never followed), or no answer within ten seconds — is a failure. The delivery is tried again after 1 minute, 5 minutes, 25 minutes, 2 hours and 10 hours, then marked Failed; twenty failures in a row suspend the endpoint until it is resumed in Settings."}},"security":[]}},"task.updated":{"post":{"operationId":"taskUpdatedEvent","tags":["Webhooks"],"summary":"A task was changed","description":"Sent when a task is changed, once for each record a bulk update changes.","parameters":[{"$ref":"#/components/parameters/EventHeader"},{"$ref":"#/components/parameters/DeliveryHeader"},{"$ref":"#/components/parameters/SignatureHeader"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskEvent"}}}},"responses":{"2XX":{"summary":"Received","description":"Any 2xx within ten seconds marks the delivery delivered. The first 500 characters of the body are kept in the delivery log."},"default":{"summary":"Not received","description":"Anything else — another status, a redirect (never followed), or no answer within ten seconds — is a failure. The delivery is tried again after 1 minute, 5 minutes, 25 minutes, 2 hours and 10 hours, then marked Failed; twenty failures in a row suspend the endpoint until it is resumed in Settings."}},"security":[]}},"event.created":{"post":{"operationId":"eventCreatedEvent","tags":["Webhooks"],"summary":"A calendar event was made","description":"Sent when a calendar event is made.\n\nRecords a lead conversion makes are not announced.","parameters":[{"$ref":"#/components/parameters/EventHeader"},{"$ref":"#/components/parameters/DeliveryHeader"},{"$ref":"#/components/parameters/SignatureHeader"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CalendarEventEvent"}}}},"responses":{"2XX":{"summary":"Received","description":"Any 2xx within ten seconds marks the delivery delivered. The first 500 characters of the body are kept in the delivery log."},"default":{"summary":"Not received","description":"Anything else — another status, a redirect (never followed), or no answer within ten seconds — is a failure. The delivery is tried again after 1 minute, 5 minutes, 25 minutes, 2 hours and 10 hours, then marked Failed; twenty failures in a row suspend the endpoint until it is resumed in Settings."}},"security":[]}},"event.updated":{"post":{"operationId":"eventUpdatedEvent","tags":["Webhooks"],"summary":"A calendar event was changed","description":"Sent when a calendar event is changed, once for each record a bulk update changes.","parameters":[{"$ref":"#/components/parameters/EventHeader"},{"$ref":"#/components/parameters/DeliveryHeader"},{"$ref":"#/components/parameters/SignatureHeader"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CalendarEventEvent"}}}},"responses":{"2XX":{"summary":"Received","description":"Any 2xx within ten seconds marks the delivery delivered. The first 500 characters of the body are kept in the delivery log."},"default":{"summary":"Not received","description":"Anything else — another status, a redirect (never followed), or no answer within ten seconds — is a failure. The delivery is tried again after 1 minute, 5 minutes, 25 minutes, 2 hours and 10 hours, then marked Failed; twenty failures in a row suspend the endpoint until it is resumed in Settings."}},"security":[]}},"campaign.created":{"post":{"operationId":"campaignCreatedEvent","tags":["Webhooks"],"summary":"A campaign was made","description":"Sent when a campaign is made.\n\nRecords a lead conversion makes are not announced.","parameters":[{"$ref":"#/components/parameters/EventHeader"},{"$ref":"#/components/parameters/DeliveryHeader"},{"$ref":"#/components/parameters/SignatureHeader"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignEvent"}}}},"responses":{"2XX":{"summary":"Received","description":"Any 2xx within ten seconds marks the delivery delivered. The first 500 characters of the body are kept in the delivery log."},"default":{"summary":"Not received","description":"Anything else — another status, a redirect (never followed), or no answer within ten seconds — is a failure. The delivery is tried again after 1 minute, 5 minutes, 25 minutes, 2 hours and 10 hours, then marked Failed; twenty failures in a row suspend the endpoint until it is resumed in Settings."}},"security":[]}},"campaign.updated":{"post":{"operationId":"campaignUpdatedEvent","tags":["Webhooks"],"summary":"A campaign was changed","description":"Sent when a campaign is changed, once for each record a bulk update changes.","parameters":[{"$ref":"#/components/parameters/EventHeader"},{"$ref":"#/components/parameters/DeliveryHeader"},{"$ref":"#/components/parameters/SignatureHeader"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignEvent"}}}},"responses":{"2XX":{"summary":"Received","description":"Any 2xx within ten seconds marks the delivery delivered. The first 500 characters of the body are kept in the delivery log."},"default":{"summary":"Not received","description":"Anything else — another status, a redirect (never followed), or no answer within ten seconds — is a failure. The delivery is tried again after 1 minute, 5 minutes, 25 minutes, 2 hours and 10 hours, then marked Failed; twenty failures in a row suspend the endpoint until it is resumed in Settings."}},"security":[]}},"invoice.created":{"post":{"operationId":"invoiceCreatedEvent","tags":["Webhooks"],"summary":"An invoice was made","description":"Sent when an invoice is made.\n\nRecords a lead conversion makes are not announced.","parameters":[{"$ref":"#/components/parameters/EventHeader"},{"$ref":"#/components/parameters/DeliveryHeader"},{"$ref":"#/components/parameters/SignatureHeader"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceEvent"}}}},"responses":{"2XX":{"summary":"Received","description":"Any 2xx within ten seconds marks the delivery delivered. The first 500 characters of the body are kept in the delivery log."},"default":{"summary":"Not received","description":"Anything else — another status, a redirect (never followed), or no answer within ten seconds — is a failure. The delivery is tried again after 1 minute, 5 minutes, 25 minutes, 2 hours and 10 hours, then marked Failed; twenty failures in a row suspend the endpoint until it is resumed in Settings."}},"security":[]}},"invoice.updated":{"post":{"operationId":"invoiceUpdatedEvent","tags":["Webhooks"],"summary":"An invoice was changed","description":"Sent when an invoice is changed, once for each record a bulk update changes.","parameters":[{"$ref":"#/components/parameters/EventHeader"},{"$ref":"#/components/parameters/DeliveryHeader"},{"$ref":"#/components/parameters/SignatureHeader"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceEvent"}}}},"responses":{"2XX":{"summary":"Received","description":"Any 2xx within ten seconds marks the delivery delivered. The first 500 characters of the body are kept in the delivery log."},"default":{"summary":"Not received","description":"Anything else — another status, a redirect (never followed), or no answer within ten seconds — is a failure. The delivery is tried again after 1 minute, 5 minutes, 25 minutes, 2 hours and 10 hours, then marked Failed; twenty failures in a row suspend the endpoint until it is resumed in Settings."}},"security":[]}},"invoice.paid":{"post":{"operationId":"invoicePaidEvent","tags":["Webhooks"],"summary":"An invoice was paid in full","description":"Sent when an invoice is paid in full.","parameters":[{"$ref":"#/components/parameters/EventHeader"},{"$ref":"#/components/parameters/DeliveryHeader"},{"$ref":"#/components/parameters/SignatureHeader"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceEvent"}}}},"responses":{"2XX":{"summary":"Received","description":"Any 2xx within ten seconds marks the delivery delivered. The first 500 characters of the body are kept in the delivery log."},"default":{"summary":"Not received","description":"Anything else — another status, a redirect (never followed), or no answer within ten seconds — is a failure. The delivery is tried again after 1 minute, 5 minutes, 25 minutes, 2 hours and 10 hours, then marked Failed; twenty failures in a row suspend the endpoint until it is resumed in Settings."}},"security":[]}},"invoice.payment_received":{"post":{"operationId":"invoicePaymentReceivedEvent","tags":["Webhooks"],"summary":"An invoice was paid in part","description":"Sent when an invoice is paid in part.","parameters":[{"$ref":"#/components/parameters/EventHeader"},{"$ref":"#/components/parameters/DeliveryHeader"},{"$ref":"#/components/parameters/SignatureHeader"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceEvent"}}}},"responses":{"2XX":{"summary":"Received","description":"Any 2xx within ten seconds marks the delivery delivered. The first 500 characters of the body are kept in the delivery log."},"default":{"summary":"Not received","description":"Anything else — another status, a redirect (never followed), or no answer within ten seconds — is a failure. The delivery is tried again after 1 minute, 5 minutes, 25 minutes, 2 hours and 10 hours, then marked Failed; twenty failures in a row suspend the endpoint until it is resumed in Settings."}},"security":[]}},"invoice.payment_removed":{"post":{"operationId":"invoicePaymentRemovedEvent","tags":["Webhooks"],"summary":"An invoice was has a payment taken back off it","description":"Sent when an invoice is has a payment taken back off it.","parameters":[{"$ref":"#/components/parameters/EventHeader"},{"$ref":"#/components/parameters/DeliveryHeader"},{"$ref":"#/components/parameters/SignatureHeader"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceEvent"}}}},"responses":{"2XX":{"summary":"Received","description":"Any 2xx within ten seconds marks the delivery delivered. The first 500 characters of the body are kept in the delivery log."},"default":{"summary":"Not received","description":"Anything else — another status, a redirect (never followed), or no answer within ten seconds — is a failure. The delivery is tried again after 1 minute, 5 minutes, 25 minutes, 2 hours and 10 hours, then marked Failed; twenty failures in a row suspend the endpoint until it is resumed in Settings."}},"security":[]}},"invoice.payment_link_created":{"post":{"operationId":"invoicePaymentLinkCreatedEvent","tags":["Webhooks"],"summary":"An invoice was given a payment link","description":"Sent when an invoice is given a payment link.","parameters":[{"$ref":"#/components/parameters/EventHeader"},{"$ref":"#/components/parameters/DeliveryHeader"},{"$ref":"#/components/parameters/SignatureHeader"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceEvent"}}}},"responses":{"2XX":{"summary":"Received","description":"Any 2xx within ten seconds marks the delivery delivered. The first 500 characters of the body are kept in the delivery log."},"default":{"summary":"Not received","description":"Anything else — another status, a redirect (never followed), or no answer within ten seconds — is a failure. The delivery is tried again after 1 minute, 5 minutes, 25 minutes, 2 hours and 10 hours, then marked Failed; twenty failures in a row suspend the endpoint until it is resumed in Settings."}},"security":[]}},"creditnote.created":{"post":{"operationId":"creditnoteCreatedEvent","tags":["Webhooks"],"summary":"A credit note was made","description":"Sent when a credit note is made.\n\nRecords a lead conversion makes are not announced.","parameters":[{"$ref":"#/components/parameters/EventHeader"},{"$ref":"#/components/parameters/DeliveryHeader"},{"$ref":"#/components/parameters/SignatureHeader"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreditNoteEvent"}}}},"responses":{"2XX":{"summary":"Received","description":"Any 2xx within ten seconds marks the delivery delivered. The first 500 characters of the body are kept in the delivery log."},"default":{"summary":"Not received","description":"Anything else — another status, a redirect (never followed), or no answer within ten seconds — is a failure. The delivery is tried again after 1 minute, 5 minutes, 25 minutes, 2 hours and 10 hours, then marked Failed; twenty failures in a row suspend the endpoint until it is resumed in Settings."}},"security":[]}},"creditnote.updated":{"post":{"operationId":"creditnoteUpdatedEvent","tags":["Webhooks"],"summary":"A credit note was changed","description":"Sent when a credit note is changed, once for each record a bulk update changes.","parameters":[{"$ref":"#/components/parameters/EventHeader"},{"$ref":"#/components/parameters/DeliveryHeader"},{"$ref":"#/components/parameters/SignatureHeader"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreditNoteEvent"}}}},"responses":{"2XX":{"summary":"Received","description":"Any 2xx within ten seconds marks the delivery delivered. The first 500 characters of the body are kept in the delivery log."},"default":{"summary":"Not received","description":"Anything else — another status, a redirect (never followed), or no answer within ten seconds — is a failure. The delivery is tried again after 1 minute, 5 minutes, 25 minutes, 2 hours and 10 hours, then marked Failed; twenty failures in a row suspend the endpoint until it is resumed in Settings."}},"security":[]}},"recurring.created":{"post":{"operationId":"recurringCreatedEvent","tags":["Webhooks"],"summary":"A recurring invoice was made","description":"Sent when a recurring invoice is made.\n\nRecords a lead conversion makes are not announced.","parameters":[{"$ref":"#/components/parameters/EventHeader"},{"$ref":"#/components/parameters/DeliveryHeader"},{"$ref":"#/components/parameters/SignatureHeader"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecurringInvoiceEvent"}}}},"responses":{"2XX":{"summary":"Received","description":"Any 2xx within ten seconds marks the delivery delivered. The first 500 characters of the body are kept in the delivery log."},"default":{"summary":"Not received","description":"Anything else — another status, a redirect (never followed), or no answer within ten seconds — is a failure. The delivery is tried again after 1 minute, 5 minutes, 25 minutes, 2 hours and 10 hours, then marked Failed; twenty failures in a row suspend the endpoint until it is resumed in Settings."}},"security":[]}},"recurring.updated":{"post":{"operationId":"recurringUpdatedEvent","tags":["Webhooks"],"summary":"A recurring invoice was changed","description":"Sent when a recurring invoice is changed, once for each record a bulk update changes.","parameters":[{"$ref":"#/components/parameters/EventHeader"},{"$ref":"#/components/parameters/DeliveryHeader"},{"$ref":"#/components/parameters/SignatureHeader"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecurringInvoiceEvent"}}}},"responses":{"2XX":{"summary":"Received","description":"Any 2xx within ten seconds marks the delivery delivered. The first 500 characters of the body are kept in the delivery log."},"default":{"summary":"Not received","description":"Anything else — another status, a redirect (never followed), or no answer within ten seconds — is a failure. The delivery is tried again after 1 minute, 5 minutes, 25 minutes, 2 hours and 10 hours, then marked Failed; twenty failures in a row suspend the endpoint until it is resumed in Settings."}},"security":[]}},"product.created":{"post":{"operationId":"productCreatedEvent","tags":["Webhooks"],"summary":"A product was made","description":"Sent when a product is made.\n\nRecords a lead conversion makes are not announced.","parameters":[{"$ref":"#/components/parameters/EventHeader"},{"$ref":"#/components/parameters/DeliveryHeader"},{"$ref":"#/components/parameters/SignatureHeader"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductEvent"}}}},"responses":{"2XX":{"summary":"Received","description":"Any 2xx within ten seconds marks the delivery delivered. The first 500 characters of the body are kept in the delivery log."},"default":{"summary":"Not received","description":"Anything else — another status, a redirect (never followed), or no answer within ten seconds — is a failure. The delivery is tried again after 1 minute, 5 minutes, 25 minutes, 2 hours and 10 hours, then marked Failed; twenty failures in a row suspend the endpoint until it is resumed in Settings."}},"security":[]}},"product.updated":{"post":{"operationId":"productUpdatedEvent","tags":["Webhooks"],"summary":"A product was changed","description":"Sent when a product is changed, once for each record a bulk update changes.","parameters":[{"$ref":"#/components/parameters/EventHeader"},{"$ref":"#/components/parameters/DeliveryHeader"},{"$ref":"#/components/parameters/SignatureHeader"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductEvent"}}}},"responses":{"2XX":{"summary":"Received","description":"Any 2xx within ten seconds marks the delivery delivered. The first 500 characters of the body are kept in the delivery log."},"default":{"summary":"Not received","description":"Anything else — another status, a redirect (never followed), or no answer within ten seconds — is a failure. The delivery is tried again after 1 minute, 5 minutes, 25 minutes, 2 hours and 10 hours, then marked Failed; twenty failures in a row suspend the endpoint until it is resumed in Settings."}},"security":[]}},"quote.created":{"post":{"operationId":"quoteCreatedEvent","tags":["Webhooks"],"summary":"A quote was made","description":"Sent when a quote is made.\n\nRecords a lead conversion makes are not announced.","parameters":[{"$ref":"#/components/parameters/EventHeader"},{"$ref":"#/components/parameters/DeliveryHeader"},{"$ref":"#/components/parameters/SignatureHeader"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuoteEvent"}}}},"responses":{"2XX":{"summary":"Received","description":"Any 2xx within ten seconds marks the delivery delivered. The first 500 characters of the body are kept in the delivery log."},"default":{"summary":"Not received","description":"Anything else — another status, a redirect (never followed), or no answer within ten seconds — is a failure. The delivery is tried again after 1 minute, 5 minutes, 25 minutes, 2 hours and 10 hours, then marked Failed; twenty failures in a row suspend the endpoint until it is resumed in Settings."}},"security":[]}},"quote.updated":{"post":{"operationId":"quoteUpdatedEvent","tags":["Webhooks"],"summary":"A quote was changed","description":"Sent when a quote is changed, once for each record a bulk update changes.","parameters":[{"$ref":"#/components/parameters/EventHeader"},{"$ref":"#/components/parameters/DeliveryHeader"},{"$ref":"#/components/parameters/SignatureHeader"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuoteEvent"}}}},"responses":{"2XX":{"summary":"Received","description":"Any 2xx within ten seconds marks the delivery delivered. The first 500 characters of the body are kept in the delivery log."},"default":{"summary":"Not received","description":"Anything else — another status, a redirect (never followed), or no answer within ten seconds — is a failure. The delivery is tried again after 1 minute, 5 minutes, 25 minutes, 2 hours and 10 hours, then marked Failed; twenty failures in a row suspend the endpoint until it is resumed in Settings."}},"security":[]}},"case.created":{"post":{"operationId":"caseCreatedEvent","tags":["Webhooks"],"summary":"A support case was made","description":"Sent when a support case is made.\n\nRecords a lead conversion makes are not announced.","parameters":[{"$ref":"#/components/parameters/EventHeader"},{"$ref":"#/components/parameters/DeliveryHeader"},{"$ref":"#/components/parameters/SignatureHeader"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SupportCaseEvent"}}}},"responses":{"2XX":{"summary":"Received","description":"Any 2xx within ten seconds marks the delivery delivered. The first 500 characters of the body are kept in the delivery log."},"default":{"summary":"Not received","description":"Anything else — another status, a redirect (never followed), or no answer within ten seconds — is a failure. The delivery is tried again after 1 minute, 5 minutes, 25 minutes, 2 hours and 10 hours, then marked Failed; twenty failures in a row suspend the endpoint until it is resumed in Settings."}},"security":[]}},"case.updated":{"post":{"operationId":"caseUpdatedEvent","tags":["Webhooks"],"summary":"A support case was changed","description":"Sent when a support case is changed, once for each record a bulk update changes.","parameters":[{"$ref":"#/components/parameters/EventHeader"},{"$ref":"#/components/parameters/DeliveryHeader"},{"$ref":"#/components/parameters/SignatureHeader"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SupportCaseEvent"}}}},"responses":{"2XX":{"summary":"Received","description":"Any 2xx within ten seconds marks the delivery delivered. The first 500 characters of the body are kept in the delivery log."},"default":{"summary":"Not received","description":"Anything else — another status, a redirect (never followed), or no answer within ten seconds — is a failure. The delivery is tried again after 1 minute, 5 minutes, 25 minutes, 2 hours and 10 hours, then marked Failed; twenty failures in a row suspend the endpoint until it is resumed in Settings."}},"security":[]}},"visit.created":{"post":{"operationId":"visitCreatedEvent","tags":["Webhooks"],"summary":"A visit was made","description":"Sent when a visit is made.\n\nRecords a lead conversion makes are not announced.","parameters":[{"$ref":"#/components/parameters/EventHeader"},{"$ref":"#/components/parameters/DeliveryHeader"},{"$ref":"#/components/parameters/SignatureHeader"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VisitEvent"}}}},"responses":{"2XX":{"summary":"Received","description":"Any 2xx within ten seconds marks the delivery delivered. The first 500 characters of the body are kept in the delivery log."},"default":{"summary":"Not received","description":"Anything else — another status, a redirect (never followed), or no answer within ten seconds — is a failure. The delivery is tried again after 1 minute, 5 minutes, 25 minutes, 2 hours and 10 hours, then marked Failed; twenty failures in a row suspend the endpoint until it is resumed in Settings."}},"security":[]}},"visit.updated":{"post":{"operationId":"visitUpdatedEvent","tags":["Webhooks"],"summary":"A visit was changed","description":"Sent when a visit is changed, once for each record a bulk update changes.","parameters":[{"$ref":"#/components/parameters/EventHeader"},{"$ref":"#/components/parameters/DeliveryHeader"},{"$ref":"#/components/parameters/SignatureHeader"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VisitEvent"}}}},"responses":{"2XX":{"summary":"Received","description":"Any 2xx within ten seconds marks the delivery delivered. The first 500 characters of the body are kept in the delivery log."},"default":{"summary":"Not received","description":"Anything else — another status, a redirect (never followed), or no answer within ten seconds — is a failure. The delivery is tried again after 1 minute, 5 minutes, 25 minutes, 2 hours and 10 hours, then marked Failed; twenty failures in a row suspend the endpoint until it is resumed in Settings."}},"security":[]}},"inventory.created":{"post":{"operationId":"inventoryCreatedEvent","tags":["Webhooks"],"summary":"An inventory item was made","description":"Sent when an inventory item is made.\n\nRecords a lead conversion makes are not announced.","parameters":[{"$ref":"#/components/parameters/EventHeader"},{"$ref":"#/components/parameters/DeliveryHeader"},{"$ref":"#/components/parameters/SignatureHeader"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InventoryItemEvent"}}}},"responses":{"2XX":{"summary":"Received","description":"Any 2xx within ten seconds marks the delivery delivered. The first 500 characters of the body are kept in the delivery log."},"default":{"summary":"Not received","description":"Anything else — another status, a redirect (never followed), or no answer within ten seconds — is a failure. The delivery is tried again after 1 minute, 5 minutes, 25 minutes, 2 hours and 10 hours, then marked Failed; twenty failures in a row suspend the endpoint until it is resumed in Settings."}},"security":[]}},"inventory.updated":{"post":{"operationId":"inventoryUpdatedEvent","tags":["Webhooks"],"summary":"An inventory item was changed","description":"Sent when an inventory item is changed, once for each record a bulk update changes.","parameters":[{"$ref":"#/components/parameters/EventHeader"},{"$ref":"#/components/parameters/DeliveryHeader"},{"$ref":"#/components/parameters/SignatureHeader"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InventoryItemEvent"}}}},"responses":{"2XX":{"summary":"Received","description":"Any 2xx within ten seconds marks the delivery delivered. The first 500 characters of the body are kept in the delivery log."},"default":{"summary":"Not received","description":"Anything else — another status, a redirect (never followed), or no answer within ten seconds — is a failure. The delivery is tried again after 1 minute, 5 minutes, 25 minutes, 2 hours and 10 hours, then marked Failed; twenty failures in a row suspend the endpoint until it is resumed in Settings."}},"security":[]}},"process.created":{"post":{"operationId":"processCreatedEvent","tags":["Webhooks"],"summary":"A process was made","description":"Sent when a process is made.\n\nRecords a lead conversion makes are not announced.","parameters":[{"$ref":"#/components/parameters/EventHeader"},{"$ref":"#/components/parameters/DeliveryHeader"},{"$ref":"#/components/parameters/SignatureHeader"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProcessEvent"}}}},"responses":{"2XX":{"summary":"Received","description":"Any 2xx within ten seconds marks the delivery delivered. The first 500 characters of the body are kept in the delivery log."},"default":{"summary":"Not received","description":"Anything else — another status, a redirect (never followed), or no answer within ten seconds — is a failure. The delivery is tried again after 1 minute, 5 minutes, 25 minutes, 2 hours and 10 hours, then marked Failed; twenty failures in a row suspend the endpoint until it is resumed in Settings."}},"security":[]}},"process.updated":{"post":{"operationId":"processUpdatedEvent","tags":["Webhooks"],"summary":"A process was changed","description":"Sent when a process is changed, once for each record a bulk update changes.","parameters":[{"$ref":"#/components/parameters/EventHeader"},{"$ref":"#/components/parameters/DeliveryHeader"},{"$ref":"#/components/parameters/SignatureHeader"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProcessEvent"}}}},"responses":{"2XX":{"summary":"Received","description":"Any 2xx within ten seconds marks the delivery delivered. The first 500 characters of the body are kept in the delivery log."},"default":{"summary":"Not received","description":"Anything else — another status, a redirect (never followed), or no answer within ten seconds — is a failure. The delivery is tried again after 1 minute, 5 minutes, 25 minutes, 2 hours and 10 hours, then marked Failed; twenty failures in a row suspend the endpoint until it is resumed in Settings."}},"security":[]}},"forecast.created":{"post":{"operationId":"forecastCreatedEvent","tags":["Webhooks"],"summary":"A forecast was made","description":"Sent when a forecast is made.\n\nRecords a lead conversion makes are not announced.","parameters":[{"$ref":"#/components/parameters/EventHeader"},{"$ref":"#/components/parameters/DeliveryHeader"},{"$ref":"#/components/parameters/SignatureHeader"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForecastEvent"}}}},"responses":{"2XX":{"summary":"Received","description":"Any 2xx within ten seconds marks the delivery delivered. The first 500 characters of the body are kept in the delivery log."},"default":{"summary":"Not received","description":"Anything else — another status, a redirect (never followed), or no answer within ten seconds — is a failure. The delivery is tried again after 1 minute, 5 minutes, 25 minutes, 2 hours and 10 hours, then marked Failed; twenty failures in a row suspend the endpoint until it is resumed in Settings."}},"security":[]}},"forecast.updated":{"post":{"operationId":"forecastUpdatedEvent","tags":["Webhooks"],"summary":"A forecast was changed","description":"Sent when a forecast is changed, once for each record a bulk update changes.","parameters":[{"$ref":"#/components/parameters/EventHeader"},{"$ref":"#/components/parameters/DeliveryHeader"},{"$ref":"#/components/parameters/SignatureHeader"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForecastEvent"}}}},"responses":{"2XX":{"summary":"Received","description":"Any 2xx within ten seconds marks the delivery delivered. The first 500 characters of the body are kept in the delivery log."},"default":{"summary":"Not received","description":"Anything else — another status, a redirect (never followed), or no answer within ten seconds — is a failure. The delivery is tried again after 1 minute, 5 minutes, 25 minutes, 2 hours and 10 hours, then marked Failed; twenty failures in a row suspend the endpoint until it is resumed in Settings."}},"security":[]}},"article.created":{"post":{"operationId":"articleCreatedEvent","tags":["Webhooks"],"summary":"A knowledge article was made","description":"Sent when a knowledge article is made.\n\nRecords a lead conversion makes are not announced.","parameters":[{"$ref":"#/components/parameters/EventHeader"},{"$ref":"#/components/parameters/DeliveryHeader"},{"$ref":"#/components/parameters/SignatureHeader"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KnowledgeArticleEvent"}}}},"responses":{"2XX":{"summary":"Received","description":"Any 2xx within ten seconds marks the delivery delivered. The first 500 characters of the body are kept in the delivery log."},"default":{"summary":"Not received","description":"Anything else — another status, a redirect (never followed), or no answer within ten seconds — is a failure. The delivery is tried again after 1 minute, 5 minutes, 25 minutes, 2 hours and 10 hours, then marked Failed; twenty failures in a row suspend the endpoint until it is resumed in Settings."}},"security":[]}},"article.updated":{"post":{"operationId":"articleUpdatedEvent","tags":["Webhooks"],"summary":"A knowledge article was changed","description":"Sent when a knowledge article is changed, once for each record a bulk update changes.","parameters":[{"$ref":"#/components/parameters/EventHeader"},{"$ref":"#/components/parameters/DeliveryHeader"},{"$ref":"#/components/parameters/SignatureHeader"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KnowledgeArticleEvent"}}}},"responses":{"2XX":{"summary":"Received","description":"Any 2xx within ten seconds marks the delivery delivered. The first 500 characters of the body are kept in the delivery log."},"default":{"summary":"Not received","description":"Anything else — another status, a redirect (never followed), or no answer within ten seconds — is a failure. The delivery is tried again after 1 minute, 5 minutes, 25 minutes, 2 hours and 10 hours, then marked Failed; twenty failures in a row suspend the endpoint until it is resumed in Settings."}},"security":[]}},"pricebook.created":{"post":{"operationId":"pricebookCreatedEvent","tags":["Webhooks"],"summary":"A price book was made","description":"Sent when a price book is made.\n\nRecords a lead conversion makes are not announced.","parameters":[{"$ref":"#/components/parameters/EventHeader"},{"$ref":"#/components/parameters/DeliveryHeader"},{"$ref":"#/components/parameters/SignatureHeader"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PriceBookEvent"}}}},"responses":{"2XX":{"summary":"Received","description":"Any 2xx within ten seconds marks the delivery delivered. The first 500 characters of the body are kept in the delivery log."},"default":{"summary":"Not received","description":"Anything else — another status, a redirect (never followed), or no answer within ten seconds — is a failure. The delivery is tried again after 1 minute, 5 minutes, 25 minutes, 2 hours and 10 hours, then marked Failed; twenty failures in a row suspend the endpoint until it is resumed in Settings."}},"security":[]}},"pricebook.updated":{"post":{"operationId":"pricebookUpdatedEvent","tags":["Webhooks"],"summary":"A price book was changed","description":"Sent when a price book is changed, once for each record a bulk update changes.","parameters":[{"$ref":"#/components/parameters/EventHeader"},{"$ref":"#/components/parameters/DeliveryHeader"},{"$ref":"#/components/parameters/SignatureHeader"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PriceBookEvent"}}}},"responses":{"2XX":{"summary":"Received","description":"Any 2xx within ten seconds marks the delivery delivered. The first 500 characters of the body are kept in the delivery log."},"default":{"summary":"Not received","description":"Anything else — another status, a redirect (never followed), or no answer within ten seconds — is a failure. The delivery is tried again after 1 minute, 5 minutes, 25 minutes, 2 hours and 10 hours, then marked Failed; twenty failures in a row suspend the endpoint until it is resumed in Settings."}},"security":[]}},"vendor.created":{"post":{"operationId":"vendorCreatedEvent","tags":["Webhooks"],"summary":"A vendor was made","description":"Sent when a vendor is made.\n\nRecords a lead conversion makes are not announced.","parameters":[{"$ref":"#/components/parameters/EventHeader"},{"$ref":"#/components/parameters/DeliveryHeader"},{"$ref":"#/components/parameters/SignatureHeader"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VendorEvent"}}}},"responses":{"2XX":{"summary":"Received","description":"Any 2xx within ten seconds marks the delivery delivered. The first 500 characters of the body are kept in the delivery log."},"default":{"summary":"Not received","description":"Anything else — another status, a redirect (never followed), or no answer within ten seconds — is a failure. The delivery is tried again after 1 minute, 5 minutes, 25 minutes, 2 hours and 10 hours, then marked Failed; twenty failures in a row suspend the endpoint until it is resumed in Settings."}},"security":[]}},"vendor.updated":{"post":{"operationId":"vendorUpdatedEvent","tags":["Webhooks"],"summary":"A vendor was changed","description":"Sent when a vendor is changed, once for each record a bulk update changes.","parameters":[{"$ref":"#/components/parameters/EventHeader"},{"$ref":"#/components/parameters/DeliveryHeader"},{"$ref":"#/components/parameters/SignatureHeader"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VendorEvent"}}}},"responses":{"2XX":{"summary":"Received","description":"Any 2xx within ten seconds marks the delivery delivered. The first 500 characters of the body are kept in the delivery log."},"default":{"summary":"Not received","description":"Anything else — another status, a redirect (never followed), or no answer within ten seconds — is a failure. The delivery is tried again after 1 minute, 5 minutes, 25 minutes, 2 hours and 10 hours, then marked Failed; twenty failures in a row suspend the endpoint until it is resumed in Settings."}},"security":[]}},"salesorder.created":{"post":{"operationId":"salesorderCreatedEvent","tags":["Webhooks"],"summary":"A sales order was made","description":"Sent when a sales order is made.\n\nRecords a lead conversion makes are not announced.","parameters":[{"$ref":"#/components/parameters/EventHeader"},{"$ref":"#/components/parameters/DeliveryHeader"},{"$ref":"#/components/parameters/SignatureHeader"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SalesOrderEvent"}}}},"responses":{"2XX":{"summary":"Received","description":"Any 2xx within ten seconds marks the delivery delivered. The first 500 characters of the body are kept in the delivery log."},"default":{"summary":"Not received","description":"Anything else — another status, a redirect (never followed), or no answer within ten seconds — is a failure. The delivery is tried again after 1 minute, 5 minutes, 25 minutes, 2 hours and 10 hours, then marked Failed; twenty failures in a row suspend the endpoint until it is resumed in Settings."}},"security":[]}},"salesorder.updated":{"post":{"operationId":"salesorderUpdatedEvent","tags":["Webhooks"],"summary":"A sales order was changed","description":"Sent when a sales order is changed, once for each record a bulk update changes.","parameters":[{"$ref":"#/components/parameters/EventHeader"},{"$ref":"#/components/parameters/DeliveryHeader"},{"$ref":"#/components/parameters/SignatureHeader"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SalesOrderEvent"}}}},"responses":{"2XX":{"summary":"Received","description":"Any 2xx within ten seconds marks the delivery delivered. The first 500 characters of the body are kept in the delivery log."},"default":{"summary":"Not received","description":"Anything else — another status, a redirect (never followed), or no answer within ten seconds — is a failure. The delivery is tried again after 1 minute, 5 minutes, 25 minutes, 2 hours and 10 hours, then marked Failed; twenty failures in a row suspend the endpoint until it is resumed in Settings."}},"security":[]}},"purchaseorder.created":{"post":{"operationId":"purchaseorderCreatedEvent","tags":["Webhooks"],"summary":"A purchase order was made","description":"Sent when a purchase order is made.\n\nRecords a lead conversion makes are not announced.","parameters":[{"$ref":"#/components/parameters/EventHeader"},{"$ref":"#/components/parameters/DeliveryHeader"},{"$ref":"#/components/parameters/SignatureHeader"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PurchaseOrderEvent"}}}},"responses":{"2XX":{"summary":"Received","description":"Any 2xx within ten seconds marks the delivery delivered. The first 500 characters of the body are kept in the delivery log."},"default":{"summary":"Not received","description":"Anything else — another status, a redirect (never followed), or no answer within ten seconds — is a failure. The delivery is tried again after 1 minute, 5 minutes, 25 minutes, 2 hours and 10 hours, then marked Failed; twenty failures in a row suspend the endpoint until it is resumed in Settings."}},"security":[]}},"purchaseorder.updated":{"post":{"operationId":"purchaseorderUpdatedEvent","tags":["Webhooks"],"summary":"A purchase order was changed","description":"Sent when a purchase order is changed, once for each record a bulk update changes.","parameters":[{"$ref":"#/components/parameters/EventHeader"},{"$ref":"#/components/parameters/DeliveryHeader"},{"$ref":"#/components/parameters/SignatureHeader"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PurchaseOrderEvent"}}}},"responses":{"2XX":{"summary":"Received","description":"Any 2xx within ten seconds marks the delivery delivered. The first 500 characters of the body are kept in the delivery log."},"default":{"summary":"Not received","description":"Anything else — another status, a redirect (never followed), or no answer within ten seconds — is a failure. The delivery is tried again after 1 minute, 5 minutes, 25 minutes, 2 hours and 10 hours, then marked Failed; twenty failures in a row suspend the endpoint until it is resumed in Settings."}},"security":[]}},"record.deleted":{"post":{"operationId":"recordDeletedEvent","tags":["Webhooks"],"summary":"A record was deleted","description":"Sent for a record of any kind moved to the recycle bin, once for each record of a bulk delete. data carries the record as it was, with deleted true.","parameters":[{"$ref":"#/components/parameters/EventHeader"},{"$ref":"#/components/parameters/DeliveryHeader"},{"$ref":"#/components/parameters/SignatureHeader"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecordEvent"}}}},"responses":{"2XX":{"summary":"Received","description":"Any 2xx within ten seconds marks the delivery delivered. The first 500 characters of the body are kept in the delivery log."},"default":{"summary":"Not received","description":"Anything else — another status, a redirect (never followed), or no answer within ten seconds — is a failure. The delivery is tried again after 1 minute, 5 minutes, 25 minutes, 2 hours and 10 hours, then marked Failed; twenty failures in a row suspend the endpoint until it is resumed in Settings."}},"security":[]}},"automation.fired":{"post":{"operationId":"automationFiredEvent","tags":["Webhooks"],"summary":"A workflow rule sent an event","description":"Sent by a workflow rule's \"Send a webhook event\" step. data is the record the rule ran on, and rule names the rule that sent it.","parameters":[{"$ref":"#/components/parameters/EventHeader"},{"$ref":"#/components/parameters/DeliveryHeader"},{"$ref":"#/components/parameters/SignatureHeader"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationEvent"}}}},"responses":{"2XX":{"summary":"Received","description":"Any 2xx within ten seconds marks the delivery delivered. The first 500 characters of the body are kept in the delivery log."},"default":{"summary":"Not received","description":"Anything else — another status, a redirect (never followed), or no answer within ten seconds — is a failure. The delivery is tried again after 1 minute, 5 minutes, 25 minutes, 2 hours and 10 hours, then marked Failed; twenty failures in a row suspend the endpoint until it is resumed in Settings."}},"security":[]}},"webhook.test":{"post":{"operationId":"webhookTestEvent","tags":["Webhooks"],"summary":"A test delivery","description":"Sent when somebody presses Send test in Settings, whatever the endpoint subscribes to — signed like every other delivery.","parameters":[{"$ref":"#/components/parameters/EventHeader"},{"$ref":"#/components/parameters/DeliveryHeader"},{"$ref":"#/components/parameters/SignatureHeader"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestEvent"}}}},"responses":{"2XX":{"summary":"Received","description":"Any 2xx within ten seconds marks the delivery delivered. The first 500 characters of the body are kept in the delivery log."},"default":{"summary":"Not received","description":"Anything else — another status, a redirect (never followed), or no answer within ten seconds — is a failure. The delivery is tried again after 1 minute, 5 minutes, 25 minutes, 2 hours and 10 hours, then marked Failed; twenty failures in a row suspend the endpoint until it is resumed in Settings."}},"security":[]}}},"components":{"schemas":{"RecordEnvelope":{"type":"object","description":"What every record has, whatever its kind. Its values are in data.","required":["id","name","ownerId","version","createdAt","updatedAt","createdBy","updatedBy","sourceSystem","sourceRecordId","processingRestricted","erasedAt"],"properties":{"id":{"type":"string","description":"The record's id: rec_ and 24 hexadecimal characters.","examples":["rec_3f1c9a0b5d2e4f6a7b8c9d0e"]},"object":{"type":"string","description":"Which kind of record it is: the path segment."},"name":{"type":"string","description":"The record's name, kept in step with data.name."},"ownerId":{"type":["string","null"],"description":"Who owns it: a person's id, or apikey:<key id> for a record an API key made without naming an owner."},"version":{"type":"integer","minimum":1,"description":"Goes up by one with every change. Send it as If-Match to refuse an update that would overwrite a newer one."},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"createdBy":{"type":["string","null"],"description":"Who made it: a person's id, or apikey:<key id>."},"updatedBy":{"type":["string","null"],"description":"Who changed it last, in the same form."},"sourceSystem":{"type":["string","null"],"description":"Where it came from, for a record an import, a conversion or a repeat made."},"sourceRecordId":{"type":["string","null"],"description":"Its id in that source."},"processingRestricted":{"type":"boolean","description":"True when its subject has asked for processing to stop: it can be read, not changed."},"erasedAt":{"type":["string","null"],"format":"date-time","description":"When it was erased at its subject's request."},"data":{"type":"object","description":"The record's values, by field key."}}},"Problem":{"type":"object","description":"An RFC 9457 problem document, sent as application/problem+json. Branch on code: the title is written for a person and may change.","required":["type","title","status","code","instance"],"properties":{"type":{"type":"string","format":"uri","description":"https://api-crm.rootdigit.com/errors/ followed by the code."},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"code":{"type":"string","examples":["bad_request","unauthorized","forbidden","api_key_scope","module_not_entitled","not_found","conflict","validation","plan_quota","rate_limited","invalid_json","ip_not_allowed","over_plan","record_settled","number_taken","internal"]},"instance":{"type":"string","format":"uri-reference","description":"The path and query that was asked for."},"errors":{"type":"array","items":{"$ref":"#/components/schemas/FieldError"},"description":"On 422 validation: one entry per field."},"requestId":{"type":"string","description":"On a 500: the request's id, for support."},"scope":{"type":"string","description":"On a missing scope: which one."},"endpoint":{"type":"string","description":"On api_key_scope: the route pattern an API key may not reach."},"module":{"type":"string","description":"On module_not_entitled: the module the plan does not include."},"object":{"type":"string","description":"On a profile refusal: the kind of record."},"verb":{"type":"string","description":"On a profile refusal: read, create, edit or delete."},"reason":{"type":"string","description":"trial: the workspace is on its free trial, so API access and exports are held back. day_trial: a one-day trial is running, so exports wait until it ends.","examples":["trial","day_trial"]},"currentVersion":{"type":"integer","description":"On a version conflict: the record's version now."},"duplicates":{"type":"array","items":{"$ref":"#/components/schemas/PossibleDuplicate"},"description":"On a blocked duplicate: what it matched."},"converted":{"type":"object","description":"On a lead already converted: when, and the records it became."},"erased":{"type":"boolean","description":"On a create refused because the person asked to be erased."},"processingRestricted":{"type":"boolean","description":"On an update refused because processing is restricted."}}},"FieldError":{"type":"object","required":["field","code","detail"],"properties":{"field":{"type":"string"},"code":{"type":"string","description":"unknown_field, required, type, min, max, email, phone, pattern, enum, or range (two fields that disagree).","examples":["unknown_field","required","type","min","max","email","phone","pattern","enum","range"]},"detail":{"type":"string","description":"The sentence to show beside the field."}}},"LineItem":{"type":"object","description":"One line of a document, as stored. Column names are as the database keeps them.","required":["id","record_id","position","description","sku","hsn","quantity","price","discount","tax","taxable_value","cgst","sgst","igst"],"properties":{"id":{"type":"string"},"tenant_id":{"type":"string"},"record_id":{"type":"string"},"position":{"type":"integer","minimum":0},"description":{"type":"string"},"sku":{"type":"string"},"hsn":{"type":"string","description":"The HSN or SAC code, digits only."},"quantity":{"type":["string","number"],"description":"A decimal. Given as a string such as \"2500.0000\", so that no precision is lost on the way."},"price":{"type":["string","number"],"description":"A decimal. Given as a string such as \"2500.0000\", so that no precision is lost on the way."},"discount":{"type":["string","number"],"description":"A percentage, as a decimal string."},"tax":{"type":["string","number"],"description":"The tax rate in per cent, as a decimal string."},"taxable_value":{"type":["string","number"],"description":"A decimal. Given as a string such as \"2500.0000\", so that no precision is lost on the way."},"cgst":{"type":["string","number"],"description":"A decimal. Given as a string such as \"2500.0000\", so that no precision is lost on the way."},"sgst":{"type":["string","number"],"description":"A decimal. Given as a string such as \"2500.0000\", so that no precision is lost on the way."},"igst":{"type":["string","number"],"description":"A decimal. Given as a string such as \"2500.0000\", so that no precision is lost on the way."}}},"Activity":{"type":"object","required":["id","record_id","type","body","meta","outcome","author_name","at"],"properties":{"id":{"type":"string"},"tenant_id":{"type":"string"},"record_id":{"type":"string"},"type":{"type":"string","examples":["Note","Call","Email","Meeting","System"]},"body":{"type":"string"},"meta":{"type":"string"},"outcome":{"type":"string"},"author_id":{"type":["string","null"]},"author_name":{"type":"string"},"at":{"type":"string","format":"date-time"}}},"FieldChange":{"type":"object","required":["field","old_value","new_value","actor_name","at"],"properties":{"field":{"type":"string"},"old_value":{"type":["string","null"]},"new_value":{"type":["string","null"]},"actor_name":{"type":"string"},"at":{"type":"string","format":"date-time"}}},"PossibleDuplicate":{"type":"object","required":["ruleId","onMatch","recordId","name","field"],"properties":{"ruleId":{"type":"string"},"onMatch":{"type":"string","description":"What the rule does on a match, as the workspace set it."},"recordId":{"type":"string"},"name":{"type":"string"},"field":{"type":"string"}}},"BulkResult":{"type":"object","required":["updated","failed"],"properties":{"updated":{"type":"integer","minimum":0},"failed":{"type":"array","description":"The records that were not changed, each with the sentence the single update would have refused with.","items":{"type":"object","required":["id","reason"],"properties":{"id":{"type":"string"},"reason":{"type":"string"}}}}}},"MergeResult":{"type":"object","required":["keptId","keptName","mergedId","mergedName","repointed"],"properties":{"keptId":{"type":"string"},"keptName":{"type":"string"},"mergedId":{"type":"string"},"mergedName":{"type":"string"},"repointed":{"type":"integer","minimum":0,"description":"Other records that named the merged one and now name the survivor."}}},"MergePreview":{"type":"object","required":["data"],"properties":{"data":{"type":"object","required":["keep","merge","fields","conflicts","moves","related","owners"],"properties":{"keep":{"$ref":"#/components/schemas/RecordSummary"},"merge":{"$ref":"#/components/schemas/RecordSummary"},"fields":{"type":"array","description":"Every field either record has a value in, side by side, as text.","items":{"type":"object","required":["key","label","keep","merge","differs","onlyOneSide"],"properties":{"key":{"type":"string"},"label":{"type":"string"},"keep":{"type":"string"},"merge":{"type":"string"},"differs":{"type":"boolean"},"onlyOneSide":{"type":"boolean","description":"One side is empty, so there is nothing to choose."}}}},"conflicts":{"type":"integer","minimum":0,"description":"Fields where both have a value and they differ."},"moves":{"type":"object","required":["activities","attachments","lineItems"],"description":"What would move from the merged record to the survivor.","properties":{"activities":{"type":"integer","minimum":0},"attachments":{"type":"integer","minimum":0},"lineItems":{"type":"integer","minimum":0}}},"related":{"type":"integer","minimum":0,"description":"Other records that name the one that would disappear."},"owners":{"$ref":"#/components/schemas/People"}}}}},"RecordSummary":{"type":"object","required":["id","name","ownerId","createdAt"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"ownerId":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time"}}},"People":{"type":"array","description":"The workspace's active people, who may be given a record.","items":{"type":"object","required":["id","name"],"properties":{"id":{"type":"string"},"name":{"type":"string"}}}},"RecycledRecord":{"type":"object","required":["id","object","name","deleted_at","deleted_by"],"properties":{"id":{"type":"string"},"object":{"type":"string"},"name":{"type":"string"},"deleted_at":{"type":"string","format":"date-time"},"deleted_by":{"type":["string","null"],"description":"Who deleted it: a person's id, or apikey:<key id>."}}},"DuplicatePair":{"type":"object","required":["id","object","field","ruleId","confidence","keepId","keepName","keepAt","mergeId","mergeName","mergeAt","reason"],"properties":{"id":{"type":"string","description":"object:keepId:mergeId."},"object":{"type":"string"},"field":{"type":"string","description":"The field the two share."},"ruleId":{"type":"string"},"confidence":{"type":"string","enum":["High","Medium"]},"keepId":{"type":"string","description":"The older record, which a merge keeps."},"keepName":{"type":"string"},"keepAt":{"type":"string","format":"date-time"},"mergeId":{"type":"string"},"mergeName":{"type":"string"},"mergeAt":{"type":"string","format":"date-time"},"reason":{"type":"string"}}},"ExportSummary":{"type":"object","required":["data","generatedAt","paused","note"],"properties":{"data":{"type":"array","items":{"type":"object","required":["object","label","records"],"properties":{"object":{"type":"string"},"label":{"type":"string"},"records":{"type":"integer","minimum":0}}}},"generatedAt":{"type":"string","format":"date-time"},"paused":{"type":["object","null"],"description":"Why the files are refused now — a trial is running — or null when they can be taken.","required":["code","message"],"properties":{"code":{"type":"string","enum":["trial","day_trial"],"description":"The same value as reason on the refused export."},"message":{"type":"string","description":"The sentence to show a person."}}},"note":{"type":"string"}}},"FieldDefinition":{"type":"object","description":"A field as the workspace defines it: what the forms draw and validate() checks.","required":["key","label","type","section"],"properties":{"key":{"type":"string"},"label":{"type":"string"},"type":{"type":"string","examples":["text","email","tel","url","number","currency","date","datetime-local","time","textarea","select","checkbox","multi_select","radio","percentage","lookup","formula","rollup","file","address","geolocation","rich_text","signature","picklist"]},"section":{"type":"string"},"required":{"type":"boolean"},"options":{"type":"array","items":{"type":"string"}},"allowOther":{"type":"boolean","description":"A value outside options is accepted."},"placeholder":{"type":"string"},"help":{"type":"string"},"country":{"type":"array","items":{"type":"string"},"description":"Countries whose records use it."},"default":{"type":["string","number","boolean"]},"min":{"type":"number"},"max":{"type":"number"},"pattern":{"type":"string","description":"A regular expression the whole value must match."},"custom":{"type":"boolean"},"object":{"type":"string"},"hidden":{"type":"boolean","description":"Not shown on the form."},"readOnly":{"type":"boolean"},"onDocuments":{"type":"boolean"},"inList":{"type":"boolean"},"references":{"type":"string","description":"The kind of record it names, or user."},"idFor":{"type":"string","description":"Set on the field holding the id of the record another field names: that field's key."},"showWhen":{"type":"object","required":["field","equals"],"properties":{"field":{"type":"string"},"equals":{"type":"array","items":{"type":"string"}},"orCountryNot":{"type":"array","items":{"type":"string"},"description":"Also used while the record's country is none of these."},"orAbroad":{"type":"boolean","description":"Also used while the record's country is not the workspace's."}}}}},"ObjectSchema":{"type":"object","required":["object","fields"],"properties":{"object":{"type":"string"},"label":{"type":"string","description":"Absent for a workspace's own module."},"fields":{"type":"array","items":{"$ref":"#/components/schemas/FieldDefinition"}}}},"SchemaList":{"type":"object","required":["data"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ObjectSchema"}}}},"LeadConversionPlan":{"type":"object","required":["data"],"properties":{"data":{"type":"object","required":["lead","converted","company","contact","deal","owners","dealsAvailable"],"properties":{"lead":{"$ref":"#/components/schemas/RecordSummaryOwned"},"converted":{"type":["object","null"],"description":"Set when the lead was converted already: then a conversion is refused.","properties":{"at":{"type":"string"},"companyId":{"type":["string","null"]},"contactId":{"type":["string","null"]},"dealId":{"type":["string","null"]}}},"company":{"type":"object","required":["match","suggestedName","individual"],"properties":{"match":{"$ref":"#/components/schemas/NamedRecord","description":"A company already here by the same name, or null."},"suggestedName":{"type":"string"},"individual":{"type":"boolean","description":"The lead names no company: converting makes none unless one is given."}}},"contact":{"type":"object","required":["match","suggestedName"],"properties":{"match":{"$ref":"#/components/schemas/NamedRecord","description":"A contact with the same email, or else the same name, or null."},"suggestedName":{"type":"string"}}},"deal":{"type":"object","required":["suggestedName","value","currency","stage","date","stages"],"properties":{"suggestedName":{"type":"string"},"value":{"type":"number"},"currency":{"type":"string"},"stage":{"type":"string"},"date":{"type":"string","format":"date"},"stages":{"type":"array","items":{"type":"object","required":["name","probability"],"properties":{"name":{"type":"string"},"probability":{"type":"number"}}}}}},"owners":{"$ref":"#/components/schemas/People"},"dealsAvailable":{"type":"boolean","description":"Whether the plan includes deals, so an opportunity can be opened."}}}}},"RecordSummaryOwned":{"type":"object","required":["id","name","ownerId"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"ownerId":{"type":["string","null"]}}},"NamedRecord":{"type":["object","null"],"required":["id","name"],"properties":{"id":{"type":"string"},"name":{"type":"string"}}},"LeadConversionChoices":{"type":"object","description":"Everything is optional: left out, the company and contact are matched or made, and an opportunity is opened.","properties":{"companyId":{"type":"string","description":"An existing company to file the contact under."},"noCompany":{"type":"boolean","description":"A person buying for themselves: no company at all."},"companyName":{"type":"string","description":"The company's name, when the lead names none or names it wrongly. One by that name already here is used."},"contactId":{"type":"string","description":"An existing contact to use rather than making one."},"ownerId":{"type":"string","description":"Who owns all the records made. Left out, whoever owns the lead."},"deal":{"type":"object","description":"The opportunity. create false opens none, and then deals:write is not needed.","properties":{"create":{"type":"boolean","description":"True unless sent as false."},"name":{"type":"string"},"value":{"type":"number"},"currency":{"type":"string"},"stage":{"type":"string","description":"A stage of this workspace's pipeline."},"date":{"type":"string","format":"date","description":"The expected close date."}}}}},"LeadConversion":{"type":"object","required":["data"],"properties":{"data":{"type":"object","required":["companyId","companyName","companyCreated","contactId","contactCreated","dealId","leadName"],"properties":{"companyId":{"type":["string","null"]},"companyName":{"type":"string"},"companyCreated":{"type":"boolean"},"contactId":{"type":"string"},"contactCreated":{"type":"boolean"},"dealId":{"type":["string","null"]},"leadName":{"type":"string"}}}}},"McpRequest":{"type":"object","description":"One JSON-RPC 2.0 message. The methods that matter are initialize, tools/list and tools/call; a message without an id is a notification.","required":["method"],"properties":{"jsonrpc":{"type":"string","const":"2.0"},"id":{"type":["string","integer","null"]},"method":{"type":"string","examples":["initialize","notifications/initialized","tools/list","tools/call"]},"params":{"type":"object","description":"For tools/call: name (list_objects, describe_object, list_records, get_record, create_record or update_record) and arguments."}}},"McpResponse":{"type":"object","required":["jsonrpc","id"],"properties":{"jsonrpc":{"type":"string","const":"2.0"},"id":{"type":["string","integer","null"]},"result":{"type":"object","description":"For tools/call, MCP content blocks; a refusal is a result with isError true and the reason in words, not a JSON-RPC error."},"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"integer","examples":[-32601,-32602]},"message":{"type":"string"}}}}},"WebhookEvent":{"type":"object","description":"What every delivery's body carries.","required":["id","apiVersion","event","occurredAt"],"properties":{"id":{"type":"string","pattern":"^evt_[0-9]+$","description":"The same on every attempt of one delivery: deduplicate on it."},"apiVersion":{"type":"string","examples":["v1"]},"event":{"type":"string"},"occurredAt":{"type":"string","format":"date-time","description":"When the delivery was prepared, moments after the change."},"data":{"type":"object"}}},"EventRecord":{"type":"object","description":"The record as it stood when the delivery was prepared. Its field values sit at this level, beside these. A record deleted for good before then arrives as its id and deleted alone.","required":["id","deleted"],"properties":{"id":{"type":"string"},"object":{"type":"string"},"name":{"type":"string"},"ownerId":{"type":["string","null"]},"version":{"type":"integer"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"deleted":{"type":"boolean"}}},"RecordEvent":{"type":"object","description":"An event about a record of any kind.","allOf":[{"$ref":"#/components/schemas/WebhookEvent"}],"properties":{"data":{"$ref":"#/components/schemas/EventRecord"}}},"AutomationEvent":{"type":"object","description":"A workflow rule's \"Send a webhook event\" step: the record the rule ran on, and the rule.","allOf":[{"$ref":"#/components/schemas/WebhookEvent"}],"properties":{"data":{"$ref":"#/components/schemas/EventRecord"},"rule":{"type":"object","required":["name"],"properties":{"id":{"type":"string"},"name":{"type":"string"}}}}},"TestEvent":{"type":"object","allOf":[{"$ref":"#/components/schemas/WebhookEvent"}],"properties":{"event":{"type":"string","const":"webhook.test"},"data":{"type":"object","required":["message"],"properties":{"message":{"type":"string"}}}}},"Country":{"type":["string","null"],"description":"A country, by the English name the app lists it under; empty when not set.","enum":["","Afghanistan","Albania","Algeria","Andorra","Angola","Argentina","Armenia","Aruba","Australia","Austria","Azerbaijan","Bahamas","Bahrain","Bangladesh","Barbados","Belarus","Belgium","Belize","Benin","Bhutan","Bolivia","Bosnia and Herzegovina","Botswana","Brazil","Brunei","Bulgaria","Burkina Faso","Burundi","Cambodia","Cameroon","Canada","Cape Verde","Central African Republic","Chad","Chile","China","Colombia","Comoros","Congo","Costa Rica","Croatia","Cuba","Cyprus","Czechia","Denmark","Djibouti","Dominican Republic","Ecuador","Egypt","El Salvador","Estonia","Eswatini","Ethiopia","Fiji","Finland","France","Gabon","Gambia","Georgia","Germany","Ghana","Gibraltar","Greece","Guatemala","Guinea","Guyana","Haiti","Honduras","Hong Kong","Hungary","Iceland","India","Indonesia","Iran","Iraq","Ireland","Israel","Italy","Ivory Coast","Jamaica","Japan","Jordan","Kazakhstan","Kenya","Kuwait","Kyrgyzstan","Laos","Latvia","Lebanon","Lesotho","Liberia","Libya","Liechtenstein","Lithuania","Luxembourg","Macau","Madagascar","Malawi","Malaysia","Maldives","Mali","Malta","Mauritania","Mauritius","Mexico","Moldova","Monaco","Mongolia","Montenegro","Morocco","Mozambique","Myanmar","Namibia","Nepal","Netherlands","New Zealand","Nicaragua","Niger","Nigeria","North Macedonia","Norway","Oman","Pakistan","Palestine","Panama","Papua New Guinea","Paraguay","Peru","Philippines","Poland","Portugal","Puerto Rico","Qatar","Romania","Russia","Rwanda","Saudi Arabia","Senegal","Serbia","Seychelles","Sierra Leone","Singapore","Slovakia","Slovenia","Somalia","South Africa","South Korea","South Sudan","Spain","Sri Lanka","Sudan","Suriname","Sweden","Switzerland","Syria","Taiwan","Tajikistan","Tanzania","Thailand","Togo","Trinidad and Tobago","Tunisia","Turkey","Turkmenistan","Uganda","Ukraine","United Arab Emirates","United Kingdom","United States","Uruguay","Uzbekistan","Venezuela","Vietnam","Yemen","Zambia","Zimbabwe",null]},"Currency":{"type":["string","null"],"description":"An ISO 4217 currency code; empty when not set.","enum":["","USD","EUR","GBP","INR","AED","SGD","AUD","CAD","JPY","CNY","CHF","SAR","ZAR","BRL","AFN","ALL","AMD","AOA","ARS","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","BND","BOB","BSD","BTN","BWP","BYN","BZD","CLP","COP","CRC","CUP","CVE","CZK","DJF","DKK","DOP","DZD","EGP","ETB","FJD","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HTG","HUF","IDR","ILS","IQD","IRR","ISK","JMD","JOD","KES","KGS","KHR","KMF","KRW","KWD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MAD","MDL","MGA","MKD","MMK","MNT","MOP","MRU","MUR","MVR","MWK","MXN","MYR","MZN","NAD","NGN","NIO","NOK","NPR","NZD","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SCR","SDG","SEK","SLE","SOS","SRD","SSP","SYP","SZL","THB","TJS","TMT","TND","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VES","VND","XAF","XOF","YER","ZMW","ZWG",null]},"OpenApiDocument":{"type":"object","description":"An OpenAPI description of this API.","required":["openapi","info"],"properties":{"openapi":{"type":"string"},"info":{"type":"object"}}},"ContactFields":{"type":"object","title":"Contact fields","description":"A contact's values, by field key. A record made here carries every standard field, an empty one as \"\"; a custom field appears once it has a value. It may also carry keys the system adds as it works (a payment, a signature, a calendar link), which are read-only and not listed. A workspace's custom fields (keys beginning custom_) appear alongside; the workspace description lists them. Fields the caller may not see are left out. A value saved before a field's rules or choices changed is kept as it was until the record is next edited, so what is read can fall outside what may be written.","properties":{"name":{"type":["string","null"],"title":"Full name","description":"The person's full name, for example Sarah Miller. Required."},"salutation":{"type":["string","null"],"enum":["","Mr.","Ms.","Mrs.","Dr.","Prof.",null],"title":"Salutation","description":"How to address them in letters and emails, for example Ms. or Dr."},"email":{"type":["string","null"],"format":"email","pattern":"^(?:\\s*[^\\s@]+@[^\\s@]+\\.[^\\s@]+\\s*)?$","title":"Work email","description":"The email address they use for work. Emails and invoices go here."},"alternateEmail":{"type":["string","null"],"format":"email","pattern":"^(?:\\s*[^\\s@]+@[^\\s@]+\\.[^\\s@]+\\s*)?$","title":"Alternate email","description":"A second email address, if they have one."},"phone":{"type":["string","null"],"pattern":"^(?:[\\s.\\(\\)\\-]*\\+?(?:[\\s.\\(\\)\\-]*[0-9]){7,15}[\\s.\\(\\)\\-]*)?$","title":"Work phone","description":"Their work phone number, with the country code, for example +1 512 555 0100. 7 to 15 digits, with an optional + and any spaces, dots, brackets or hyphens."},"mobile":{"type":["string","null"],"pattern":"^(?:[\\s.\\(\\)\\-]*\\+?(?:[\\s.\\(\\)\\-]*[0-9]){7,15}[\\s.\\(\\)\\-]*)?$","title":"Mobile / WhatsApp","description":"Their mobile number, with the country code, for example +1 512 555 0100. WhatsApp messages go to this number. 7 to 15 digits, with an optional + and any spaces, dots, brackets or hyphens."},"role":{"type":["string","null"],"title":"Job title","description":"Their job title, for example Head of Sales."},"department":{"type":["string","null"],"title":"Department","description":"The team they work in, for example Finance or Marketing."},"company":{"type":["string","null"],"title":"Company / account","description":"The company this record belongs to. Choose one you have already added under Companies. Names a company by its name, as the app offers them to pick; it is not an id. The id of the company it means is in `companyId`."},"reportsTo":{"type":["string","null"],"title":"Reports to","description":"The name of their manager, if you know it. Names a contact by its name, as the app offers them to pick; it is not an id. The id of the contact it means is in `reportsToId`."},"status":{"type":["string","null"],"enum":["","Lead","Prospect","Customer","Inactive",null],"title":"Lifecycle status","description":"Where this person is with you. Prospect means they might buy. Customer means they have bought. Defaults to \"Lead\"."},"owner":{"type":["string","null"],"title":"Record owner","description":"The person in your team who looks after this record. It shows in their lists, and they get its reminders. A person in this workspace, by name. Who owns the record is set with ownerId."},"source":{"type":["string","null"],"enum":["","Website","Referral","Advertising","LinkedIn","Email campaign","Trade show","Partner","Cold outreach","Other",null],"title":"Lead source","description":"Where they first heard about you, for example your website or a referral. It shows which channels bring you business. Defaults to \"Website\"."},"contactRole":{"type":["string","null"],"enum":["","Decision maker","Influencer","Champion","End user","Other",null],"title":"Buying role","description":"The part they play in a purchase. The Decision maker says yes or no. A Champion supports you inside their company."},"country":{"$ref":"#/components/schemas/Country","title":"Country","description":"The country this record is in. It decides which tax fields you see. Defaults to the workspace's own country."},"street":{"type":["string","null"],"title":"Street address","description":"The street address, for example 221 Main Street, Suite 4."},"city":{"type":["string","null"],"title":"City","description":"The city, for example Austin or Leeds."},"state":{"type":["string","null"],"title":"State / province","description":"The state, province or region, for example Texas or Ontario."},"postalCode":{"type":["string","null"],"title":"ZIP / postal code","description":"The ZIP or postal code, for example 78701."},"language":{"type":["string","null"],"enum":["","English","Hindi","Arabic","German","French",null],"title":"Preferred language","description":"The language they prefer to read and speak."},"preferredChannel":{"type":["string","null"],"enum":["","Email","Phone","WhatsApp","SMS",null],"title":"Preferred channel","description":"How they like to be contacted: email, phone, WhatsApp or text message."},"linkedin":{"type":["string","null"],"format":"uri","title":"LinkedIn profile","description":"The web address of their LinkedIn profile. Kept as typed; the server does not check it is a full address."},"doNotCall":{"type":["boolean","null"],"title":"Do not call","description":"Tick this if they asked not to be called. Your team sees a warning before calling."},"emailOptOut":{"type":["boolean","null"],"title":"Email opt-out","description":"Tick this if they do not want marketing emails. Campaigns will skip them."},"consentDate":{"type":["string","null"],"format":"date","title":"Consent recorded on","description":"The date they agreed to hear from you. Keep it if privacy laws such as GDPR apply to you."},"lawfulBasis":{"type":["string","null"],"enum":["","Not applicable","Consent","Contract","Legal obligation","Vital interests","Public task","Legitimate interests",null],"title":"Lawful basis","description":"Under privacy laws such as GDPR, your reason for keeping their details, for example their consent or a contract with them. Defaults to \"Not applicable\"."},"consentStatus":{"type":["string","null"],"enum":["","Not applicable","Pending","Waiting","Obtained","Withdrawn",null],"title":"Consent status","description":"Whether they agreed to be contacted. Withdrawn means they said no, so do not send them marketing. Defaults to \"Not applicable\"."},"idType":{"type":["string","null"],"enum":["","Passport","National ID","Emirates ID","Aadhaar","Driving licence","Residence permit","Other",null],"title":"Identity document","description":"The kind of identity document they showed you, for example a passport."},"idNumber":{"type":["string","null"],"title":"Document number","description":"The number on their identity document. It never shows in search. You can hide this section from people who do not need it."},"idIssuedBy":{"type":["string","null"],"title":"Issued by","description":"The country or office that issued the document."},"idExpiry":{"type":["string","null"],"format":"date","title":"Document expires","description":"The date the document runs out. A rule under Processes & automation can remind you before then."},"dateOfBirth":{"type":["string","null"],"format":"date","title":"Date of birth","description":"Their date of birth. On their birthday you get a reminder, so you can send a greeting; identity checks use it too."},"kycStatus":{"type":["string","null"],"enum":["","Not started","Documents requested","In review","Verified","Expired","Rejected",null],"title":"Verification status","description":"How far you are with checking this customer's documents, if your business has to check them. Defaults to \"Not started\"."},"kycVerifiedOn":{"type":["string","null"],"format":"date","title":"Verified on","description":"The date someone in your team checked their documents."},"kycVerifiedBy":{"type":["string","null"],"title":"Verified by","description":"The person in your team who checked the documents."},"kycNotes":{"type":["string","null"],"title":"Verification notes","description":"Anything to remember about the checks, for example which documents you saw."},"tags":{"type":["string","null"],"title":"Tags","description":"Short words that help you group and find records, for example VIP or Trade show. Separate them with commas."},"description":{"type":["string","null"],"title":"Description / notes","description":"Anything else worth knowing. Only people in your workspace can see it."},"companyId":{"type":["string","null"],"title":"Company / account (record id)","description":"The id of the company named in “Company / account”: set when one is picked from the list, and by the server when the name matches exactly one company. Send it to point at one record when names repeat; a name sent without it is matched to the record when exactly one has that name. Refused (422) when it is not a live record of that kind in this workspace; an id alone fills in the name."},"reportsToId":{"type":["string","null"],"title":"Reports to (record id)","description":"The id of the contact named in “Reports to”: set when one is picked from the list, and by the server when the name matches exactly one contact. Send it to point at one record when names repeat; a name sent without it is matched to the record when exactly one has that name. Refused (422) when it is not a live record of that kind in this workspace; an id alone fills in the name."},"birthday":{"type":["string","null"],"format":"date","description":"The old name for dateOfBirth: still accepted, and saved as dateOfBirth.","deprecated":true,"writeOnly":true}}},"ContactUpdate":{"type":"object","title":"Contact changes","description":"Only the fields to change. A key the object does not have is refused (422 unknown_field); one the system keeps is ignored and listed in rejectedFields. A custom field the workspace has archived is accepted and ignored.","allOf":[{"$ref":"#/components/schemas/ContactFields"}],"properties":{"ownerId":{"type":"string","minLength":1,"description":"Who owns the record: the id of an active person in this workspace. Left out of a create, the record belongs to whoever made it — and a record an API key makes belongs to the person who created the key (failing that, the workspace's owner), so it is not hidden from everyone without View All. Left out of an update, the owner stays as it is."}},"patternProperties":{"^custom_\\w{1,80}$":{"description":"A custom field the workspace added. GET /api/v1/schema/{object} lists them, and the workspace description types them."}},"unevaluatedProperties":false},"ContactCreate":{"type":"object","title":"New contact","description":"The fields of a new contact. `name` is required; the rest take their defaults. Unknown keys are refused as on an update.","allOf":[{"$ref":"#/components/schemas/ContactFields"}],"properties":{"ownerId":{"type":"string","minLength":1,"description":"Who owns the record: the id of an active person in this workspace. Left out of a create, the record belongs to whoever made it — and a record an API key makes belongs to the person who created the key (failing that, the workspace's owner), so it is not hidden from everyone without View All. Left out of an update, the owner stays as it is."}},"patternProperties":{"^custom_\\w{1,80}$":{"description":"A custom field the workspace added. GET /api/v1/schema/{object} lists them, and the workspace description types them."}},"unevaluatedProperties":false,"required":["name"]},"Contact":{"type":"object","title":"Contact","allOf":[{"$ref":"#/components/schemas/RecordEnvelope"}],"properties":{"object":{"type":"string","const":"contact"},"data":{"$ref":"#/components/schemas/ContactFields"}},"required":["object","data"]},"ContactPage":{"type":"object","title":"A page of contacts","required":["data","nextCursor"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Contact"}},"nextCursor":{"type":["string","null"],"description":"Send back as cursor, with the same sort, for the next page; null when this was the last."}}},"ContactDetail":{"type":"object","title":"One contact, with what hangs off it","required":["data","lineItems","activities","fieldHistory"],"properties":{"data":{"$ref":"#/components/schemas/Contact"},"lineItems":{"type":"array","items":{"$ref":"#/components/schemas/LineItem"},"description":"Lines, for the kinds of record that have them; empty here."},"activities":{"type":"array","items":{"$ref":"#/components/schemas/Activity"},"description":"The timeline, newest first, at most 100."},"fieldHistory":{"type":"array","items":{"$ref":"#/components/schemas/FieldChange"},"description":"Value changes, newest first, at most 100 — without the fields the caller may not see."}}},"ContactSaved":{"type":"object","title":"The contact, as saved","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Contact"},"rejectedFields":{"type":"array","items":{"type":"string"},"description":"Fields that were sent but not written: kept by the system, worked out from the lines, or not the caller's to change."},"possibleDuplicates":{"type":"array","items":{"$ref":"#/components/schemas/PossibleDuplicate"},"description":"On a create: records the workspace's duplicate rules matched, where the rule warns rather than blocks."}}},"ContactBulkUpdate":{"type":"object","title":"The same change to many contacts","required":["ids","patch"],"properties":{"ids":{"type":"array","items":{"type":"string","minLength":1},"minItems":1,"maxItems":500},"patch":{"$ref":"#/components/schemas/ContactUpdate"}}},"ContactMerge":{"type":"object","title":"Merge two contacts","required":["keepId","mergeId"],"properties":{"keepId":{"type":"string","minLength":1,"description":"The record that survives."},"mergeId":{"type":"string","minLength":1,"description":"The record folded into it, then moved to the recycle bin."},"fields":{"type":"object","description":"Which side each field's value comes from. A field left out keeps the survivor's value, or takes the other's where the survivor's is empty.","propertyNames":{"anyOf":[{"enum":["name","salutation","email","alternateEmail","phone","mobile","role","department","company","reportsTo","status","owner","source","contactRole","country","street","city","state","postalCode","language","preferredChannel","linkedin","doNotCall","emailOptOut","consentDate","lawfulBasis","consentStatus","idType","idNumber","idIssuedBy","idExpiry","dateOfBirth","kycStatus","kycVerifiedOn","kycVerifiedBy","kycNotes","tags","description","companyId","reportsToId"]},{"pattern":"^custom_\\w{1,80}$"}]},"additionalProperties":{"type":"string","enum":["keep","merge"]}},"ownerId":{"type":"string","minLength":1,"description":"Who owns the merged record. Left out, the survivor's owner."}}},"ContactEvent":{"type":"object","title":"A contact event","allOf":[{"$ref":"#/components/schemas/WebhookEvent"}],"properties":{"event":{"type":"string","enum":["contact.created","contact.updated"]},"data":{"allOf":[{"$ref":"#/components/schemas/EventRecord"},{"$ref":"#/components/schemas/ContactFields"}],"description":"The contact with its field values beside id, object and name — not masked by any profile's field permissions."}}},"CompanyFields":{"type":"object","title":"Company fields","description":"A company's values, by field key. A record made here carries every standard field, an empty one as \"\"; a custom field appears once it has a value. It may also carry keys the system adds as it works (a payment, a signature, a calendar link), which are read-only and not listed. A workspace's custom fields (keys beginning custom_) appear alongside; the workspace description lists them. Fields the caller may not see are left out. A value saved before a field's rules or choices changed is kept as it was until the record is next edited, so what is read can fall outside what may be written.","properties":{"name":{"type":["string","null"],"title":"Company name","description":"The name people know the company by, for example Acme Inc. Required."},"domain":{"type":["string","null"],"title":"Website / domain","description":"The company's website, for example acme.com. It helps spot the same company added twice."},"email":{"type":["string","null"],"format":"email","pattern":"^(?:\\s*[^\\s@]+@[^\\s@]+\\.[^\\s@]+\\s*)?$","title":"Company email","description":"The company's general email address, for example hello@acme.com."},"phone":{"type":["string","null"],"pattern":"^(?:[\\s.\\(\\)\\-]*\\+?(?:[\\s.\\(\\)\\-]*[0-9]){7,15}[\\s.\\(\\)\\-]*)?$","title":"Main phone","description":"The company's main phone number, with the country code. 7 to 15 digits, with an optional + and any spaces, dots, brackets or hyphens."},"industry":{"type":["string","null"],"enum":["","Technology","Software","Finance","Design","Manufacturing","Retail","Healthcare","Professional services","Other",null],"title":"Industry","description":"The kind of business they are in. Use it to group companies in reports."},"size":{"type":["string","null"],"enum":["","1–50","50–100","100–250","250–500","500–1,000","1,000+",null],"title":"Employee range","description":"Roughly how many people work there."},"accountType":{"type":["string","null"],"enum":["","Prospect","Customer","Partner","Vendor","Reseller",null],"title":"Account type","description":"Your relationship with them. A Prospect might buy, a Customer buys, a Vendor sells to you, and a Reseller sells your products."},"status":{"type":["string","null"],"enum":["","Active","Inactive","On hold",null],"title":"Account status","description":"Whether you work with them now. On hold pauses the work without losing anything. Defaults to \"Active\"."},"owner":{"type":["string","null"],"title":"Record owner","description":"The person in your team who looks after this record. It shows in their lists, and they get its reminders. A person in this workspace, by name. Who owns the record is set with ownerId."},"parentCompany":{"type":["string","null"],"title":"Parent company","description":"The bigger company that owns this one, if any. Names a company by its name, as the app offers them to pick; it is not an id. The id of the company it means is in `parentCompanyId`."},"primaryContact":{"type":["string","null"],"title":"Primary contact","description":"The main person you deal with there. Names a contact by its name, as the app offers them to pick; it is not an id. The id of the contact it means is in `primaryContactId`."},"founded":{"anyOf":[{"type":"number","minimum":1800,"maximum":2100},{"type":"string","enum":[""]},{"type":"null"}],"title":"Founded year","description":"The year the company started, for example 2012."},"currency":{"$ref":"#/components/schemas/Currency","title":"Record currency","description":"The currency for the amounts on this record, for example USD or EUR. Defaults to the workspace's own currency."},"annualRevenue":{"anyOf":[{"type":"number","minimum":0},{"type":"string","enum":[""]},{"type":"null"}],"title":"Annual revenue","description":"Roughly how much money the company makes in a year. A guess is fine."},"creditLimit":{"anyOf":[{"type":"number","minimum":0},{"type":"string","enum":[""]},{"type":"null"}],"title":"Credit limit","description":"The most this customer can owe you at one time. Past this, you may want payment before new orders."},"paymentTerms":{"type":["string","null"],"examples":["Due on receipt","Net 15","Net 30","Net 45","Net 60","50% advance, balance on delivery","100% advance"],"title":"Payment terms","description":"How long there is to pay. For example, Net 30 means payment is due 30 days after the invoice date. Defaults to \"Net 30\". Usually Due on receipt, Net 15, Net 30, Net 45, Net 60, 50% advance, balance on delivery or 100% advance; any other text is accepted too."},"country":{"$ref":"#/components/schemas/Country","title":"Country","description":"The country this record is in. It decides which tax fields you see. Defaults to the workspace's own country."},"street":{"type":["string","null"],"title":"Billing street","description":"The street address, for example 221 Main Street, Suite 4."},"city":{"type":["string","null"],"title":"Billing city","description":"The city, for example Austin or Leeds."},"state":{"type":["string","null"],"title":"Billing state / province","description":"The state, province or region, for example Texas or Ontario."},"postalCode":{"type":["string","null"],"title":"Billing ZIP / postal code","description":"The ZIP or postal code, for example 78701."},"shippingstreet":{"type":["string","null"],"title":"Shipping street","description":"The street address for deliveries, if it is not the main address."},"shippingcity":{"type":["string","null"],"title":"Shipping city","description":"The city for deliveries."},"shippingstate":{"type":["string","null"],"title":"Shipping state / province","description":"The state, province or region for deliveries."},"shippingpostalCode":{"type":["string","null"],"title":"Shipping ZIP / postal code","description":"The ZIP or postal code for deliveries."},"taxStatus":{"type":["string","null"],"enum":["","Not registered","Registered","Exempt","Unknown",null],"title":"Tax registration status","description":"Whether this business is registered for tax, such as GST or VAT. Choose Unknown if you are not sure. Defaults to \"Not registered\"."},"legalName":{"type":["string","null"],"title":"Registered legal name","description":"The official name on the business's registration papers, for example Acme Holdings LLC. It can differ from the name people use."},"gstin":{"type":["string","null"],"title":"GSTIN","description":"India only. Their 15-character GST number. It prints on invoices. We check that it looks right, but we do not check it with the GST office. Used on records in India, where it must match `^(?:[0-9]{2}[A-Z]{5}[0-9]{4}[A-Z][1-9A-Z]Z[0-9A-Z])$`."},"pan":{"type":["string","null"],"title":"PAN","description":"India only. The 10-character PAN (Permanent Account Number) of the business. Used on records in India, where it must match `^(?:[A-Z]{5}[0-9]{4}[A-Z])$`."},"cin":{"type":["string","null"],"title":"CIN / LLPIN","description":"India only. The company's registration number (CIN), or the LLPIN for a limited liability partnership. Used on records in India."},"gstType":{"type":["string","null"],"enum":["","Regular","Composition","SEZ","Unregistered",null],"title":"GST registration type","description":"India only. The kind of GST registration they have. Most businesses are Regular. Used on records in India."},"gstStateCode":{"type":["string","null"],"title":"GST state code","description":"India only. The two-digit state code. It is also the first two digits of the GSTIN. Used on records in India, where it must match `^(?:[0-9]{2})$`."},"reverseCharge":{"type":["string","null"],"enum":["","No","Yes",null],"title":"Tax payable on reverse charge","description":"India only. Choose Yes if the customer, not you, pays the GST on this sale. The invoice always shows this, because the law asks for it. Used on records in India. Defaults to \"No\"."},"placeOfSupply":{"type":["string","null"],"title":"Place of supply","description":"India only. The state the goods or services go to. Leave it empty when it is the customer's state. Used on records in India."},"trn":{"type":["string","null"],"title":"VAT TRN","description":"UAE only. The 15-digit VAT registration number (TRN). We check the format only. Used on records in United Arab Emirates, where it must match `^(?:[0-9]{15})$`."},"emirate":{"type":["string","null"],"enum":["","Abu Dhabi","Dubai","Sharjah","Ajman","Umm Al Quwain","Ras Al Khaimah","Fujairah",null],"title":"Emirate","description":"UAE only. The emirate where the business is registered. Used on records in United Arab Emirates."},"vatNumber":{"type":["string","null"],"title":"VAT / tax registration number","description":"The business's VAT or tax registration number. It prints on invoices. Used on records in United Kingdom, Saudi Arabia, Bahrain, Oman, Switzerland, Norway, South Africa, Austria, Belgium, Bulgaria, Croatia, Cyprus, Czechia, Denmark, Estonia, Finland, France, Germany, Greece, Hungary, Ireland, Italy, Latvia, Lithuania, Luxembourg, Malta, Netherlands, Poland, Portugal, Romania, Slovakia, Slovenia, Spain, Sweden or Other."},"ein":{"type":["string","null"],"title":"EIN / federal tax ID","description":"United States only. The 9-digit Employer Identification Number from the IRS, for example 12-3456789. Used on records in United States."},"uen":{"type":["string","null"],"title":"UEN / GST registration","description":"Singapore only. The Unique Entity Number. Add the GST number too if they are registered for GST. Used on records in Singapore."},"abn":{"type":["string","null"],"title":"ABN / GST registration","description":"Australia only. The 11-digit Australian Business Number. Used on records in Australia."},"businessNumber":{"type":["string","null"],"title":"Business number / GST-HST","description":"Canada only. The 9-digit Business Number, with the GST/HST account if they have one. Used on records in Canada."},"taxExempt":{"type":["boolean","null"],"title":"Tax-exempt customer","description":"Tick this if the customer does not pay tax, for example a charity with an exemption certificate."},"tradeLicense":{"type":["string","null"],"title":"Trade license number","description":"UAE and the Gulf. The number on the business's trade license. Used on records in United Arab Emirates, Saudi Arabia, Qatar, Kuwait, Bahrain or Oman."},"tradeLicenseAuthority":{"type":["string","null"],"title":"Licensing authority","description":"UAE only. The authority that issued the trade license, as it is named on it. A UAE e-invoice names it beside the number. Used on records in United Arab Emirates."},"licenseExpiry":{"type":["string","null"],"format":"date","title":"Trade license expiry","description":"The date it runs out. A rule under Processes & automation can remind you before then. Used on records in United Arab Emirates, Saudi Arabia, Qatar, Kuwait, Bahrain or Oman."},"incorporatedOn":{"type":["string","null"],"format":"date","title":"Incorporated on","description":"The date the company was legally registered."},"registeredAddress":{"type":["string","null"],"title":"Registered address","description":"The official address on the company's papers, if it is not where they work."},"beneficialOwner":{"type":["string","null"],"title":"Beneficial owner","description":"The person who really owns or controls the company. Banks often ask for this."},"authorisedPerson":{"type":["string","null"],"title":"Authorised signatory","description":"The person who is allowed to sign contracts for this company."},"authorisedRole":{"type":["string","null"],"title":"Their role","description":"The job title of the person who can sign for this company, for example Director."},"authorisedEmail":{"type":["string","null"],"format":"email","pattern":"^(?:\\s*[^\\s@]+@[^\\s@]+\\.[^\\s@]+\\s*)?$","title":"Their email","description":"The email address of the person who can sign for this company."},"authorisedIdType":{"type":["string","null"],"enum":["","Passport","National ID","Emirates ID","Aadhaar","Driving licence","Residence permit","Other",null],"title":"Their identity document","description":"The kind of identity document that person showed, for example a passport."},"authorisedIdNumber":{"type":["string","null"],"title":"Their document number","description":"The number on their identity document. Like every document number here, it never shows in search."},"authorisedIdExpiry":{"type":["string","null"],"format":"date","title":"Their document expires","description":"The date it runs out. A rule under Processes & automation can remind you before then."},"kycStatus":{"type":["string","null"],"enum":["","Not started","Documents requested","In review","Verified","Expired","Rejected",null],"title":"Verification status","description":"How far you are with checking this customer's documents, if your business has to check them. Defaults to \"Not started\"."},"kycVerifiedOn":{"type":["string","null"],"format":"date","title":"Verified on","description":"The date someone in your team checked their documents."},"kycVerifiedBy":{"type":["string","null"],"title":"Verified by","description":"The person in your team who checked the documents."},"kycNotes":{"type":["string","null"],"title":"Verification notes","description":"Anything to remember about the checks, for example which documents you saw."},"tags":{"type":["string","null"],"title":"Tags","description":"Short words that help you group and find records, for example VIP or Trade show. Separate them with commas."},"source":{"type":["string","null"],"enum":["","Website","Referral","Advertising","LinkedIn","Email campaign","Trade show","Partner","Cold outreach","Other",null],"title":"Lead source","description":"Where they first heard about you, for example your website or a referral. It shows which channels bring you business. Defaults to \"Website\"."},"description":{"type":["string","null"],"title":"Description / notes","description":"Anything else worth knowing. Only people in your workspace can see it."},"parentCompanyId":{"type":["string","null"],"title":"Parent company (record id)","description":"The id of the company named in “Parent company”: set when one is picked from the list, and by the server when the name matches exactly one company. Send it to point at one record when names repeat; a name sent without it is matched to the record when exactly one has that name. Refused (422) when it is not a live record of that kind in this workspace; an id alone fills in the name."},"primaryContactId":{"type":["string","null"],"title":"Primary contact (record id)","description":"The id of the contact named in “Primary contact”: set when one is picked from the list, and by the server when the name matches exactly one contact. Send it to point at one record when names repeat; a name sent without it is matched to the record when exactly one has that name. Refused (422) when it is not a live record of that kind in this workspace; an id alone fills in the name."}}},"CompanyUpdate":{"type":"object","title":"Company changes","description":"Only the fields to change. A key the object does not have is refused (422 unknown_field); one the system keeps is ignored and listed in rejectedFields. A custom field the workspace has archived is accepted and ignored.","allOf":[{"$ref":"#/components/schemas/CompanyFields"}],"properties":{"ownerId":{"type":"string","minLength":1,"description":"Who owns the record: the id of an active person in this workspace. Left out of a create, the record belongs to whoever made it — and a record an API key makes belongs to the person who created the key (failing that, the workspace's owner), so it is not hidden from everyone without View All. Left out of an update, the owner stays as it is."}},"patternProperties":{"^custom_\\w{1,80}$":{"description":"A custom field the workspace added. GET /api/v1/schema/{object} lists them, and the workspace description types them."}},"unevaluatedProperties":false},"CompanyCreate":{"type":"object","title":"New company","description":"The fields of a new company. `name` is required; the rest take their defaults. Unknown keys are refused as on an update.","allOf":[{"$ref":"#/components/schemas/CompanyFields"}],"properties":{"ownerId":{"type":"string","minLength":1,"description":"Who owns the record: the id of an active person in this workspace. Left out of a create, the record belongs to whoever made it — and a record an API key makes belongs to the person who created the key (failing that, the workspace's owner), so it is not hidden from everyone without View All. Left out of an update, the owner stays as it is."}},"patternProperties":{"^custom_\\w{1,80}$":{"description":"A custom field the workspace added. GET /api/v1/schema/{object} lists them, and the workspace description types them."}},"unevaluatedProperties":false,"required":["name"]},"Company":{"type":"object","title":"Company","allOf":[{"$ref":"#/components/schemas/RecordEnvelope"}],"properties":{"object":{"type":"string","const":"company"},"data":{"$ref":"#/components/schemas/CompanyFields"}},"required":["object","data"]},"CompanyPage":{"type":"object","title":"A page of companies","required":["data","nextCursor"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Company"}},"nextCursor":{"type":["string","null"],"description":"Send back as cursor, with the same sort, for the next page; null when this was the last."}}},"CompanyDetail":{"type":"object","title":"One company, with what hangs off it","required":["data","lineItems","activities","fieldHistory"],"properties":{"data":{"$ref":"#/components/schemas/Company"},"lineItems":{"type":"array","items":{"$ref":"#/components/schemas/LineItem"},"description":"Lines, for the kinds of record that have them; empty here."},"activities":{"type":"array","items":{"$ref":"#/components/schemas/Activity"},"description":"The timeline, newest first, at most 100."},"fieldHistory":{"type":"array","items":{"$ref":"#/components/schemas/FieldChange"},"description":"Value changes, newest first, at most 100 — without the fields the caller may not see."}}},"CompanySaved":{"type":"object","title":"The company, as saved","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Company"},"rejectedFields":{"type":"array","items":{"type":"string"},"description":"Fields that were sent but not written: kept by the system, worked out from the lines, or not the caller's to change."},"possibleDuplicates":{"type":"array","items":{"$ref":"#/components/schemas/PossibleDuplicate"},"description":"On a create: records the workspace's duplicate rules matched, where the rule warns rather than blocks."}}},"CompanyBulkUpdate":{"type":"object","title":"The same change to many companies","required":["ids","patch"],"properties":{"ids":{"type":"array","items":{"type":"string","minLength":1},"minItems":1,"maxItems":500},"patch":{"$ref":"#/components/schemas/CompanyUpdate"}}},"CompanyMerge":{"type":"object","title":"Merge two companies","required":["keepId","mergeId"],"properties":{"keepId":{"type":"string","minLength":1,"description":"The record that survives."},"mergeId":{"type":"string","minLength":1,"description":"The record folded into it, then moved to the recycle bin."},"fields":{"type":"object","description":"Which side each field's value comes from. A field left out keeps the survivor's value, or takes the other's where the survivor's is empty.","propertyNames":{"anyOf":[{"enum":["name","domain","email","phone","industry","size","accountType","status","owner","parentCompany","primaryContact","founded","currency","annualRevenue","creditLimit","paymentTerms","country","street","city","state","postalCode","shippingstreet","shippingcity","shippingstate","shippingpostalCode","taxStatus","legalName","gstin","pan","cin","gstType","gstStateCode","reverseCharge","placeOfSupply","trn","emirate","vatNumber","ein","uen","abn","businessNumber","taxExempt","tradeLicense","tradeLicenseAuthority","licenseExpiry","incorporatedOn","registeredAddress","beneficialOwner","authorisedPerson","authorisedRole","authorisedEmail","authorisedIdType","authorisedIdNumber","authorisedIdExpiry","kycStatus","kycVerifiedOn","kycVerifiedBy","kycNotes","tags","source","description","parentCompanyId","primaryContactId"]},{"pattern":"^custom_\\w{1,80}$"}]},"additionalProperties":{"type":"string","enum":["keep","merge"]}},"ownerId":{"type":"string","minLength":1,"description":"Who owns the merged record. Left out, the survivor's owner."}}},"CompanyEvent":{"type":"object","title":"A company event","allOf":[{"$ref":"#/components/schemas/WebhookEvent"}],"properties":{"event":{"type":"string","enum":["company.created","company.updated"]},"data":{"allOf":[{"$ref":"#/components/schemas/EventRecord"},{"$ref":"#/components/schemas/CompanyFields"}],"description":"The company with its field values beside id, object and name — not masked by any profile's field permissions."}}},"LeadFields":{"type":"object","title":"Lead fields","description":"A lead's values, by field key. A record made here carries every standard field, an empty one as \"\"; a custom field appears once it has a value. It may also carry keys the system adds as it works (a payment, a signature, a calendar link), which are read-only and not listed. A workspace's custom fields (keys beginning custom_) appear alongside; the workspace description lists them. Fields the caller may not see are left out. A value saved before a field's rules or choices changed is kept as it was until the record is next edited, so what is read can fall outside what may be written.","properties":{"name":{"type":["string","null"],"title":"Lead name","description":"The person's name, for example James Wilson. Required."},"email":{"type":["string","null"],"format":"email","pattern":"^(?:\\s*[^\\s@]+@[^\\s@]+\\.[^\\s@]+\\s*)?$","title":"Email address","description":"Their email address."},"phone":{"type":["string","null"],"pattern":"^(?:[\\s.\\(\\)\\-]*\\+?(?:[\\s.\\(\\)\\-]*[0-9]){7,15}[\\s.\\(\\)\\-]*)?$","title":"Phone","description":"Their phone number, with the country code. 7 to 15 digits, with an optional + and any spaces, dots, brackets or hyphens."},"mobile":{"type":["string","null"],"pattern":"^(?:[\\s.\\(\\)\\-]*\\+?(?:[\\s.\\(\\)\\-]*[0-9]){7,15}[\\s.\\(\\)\\-]*)?$","title":"Mobile / WhatsApp","description":"Their mobile number, with the country code, for example +1 512 555 0100. WhatsApp messages go to this number. 7 to 15 digits, with an optional + and any spaces, dots, brackets or hyphens."},"role":{"type":["string","null"],"title":"Job title","description":"Their job title, for example Head of Sales."},"company":{"type":["string","null"],"title":"Company name","description":"The company they work for, if any. When you convert the lead, it becomes a company record. Names a company by its name, as the app offers them to pick; it is not an id. The id of the company it means is in `companyId`."},"status":{"type":["string","null"],"enum":["","New","Contacted","Working","Qualified","Unqualified","Converted",null],"title":"Lead status","description":"How far you have got with this lead. Qualified means they are a good fit. Converted means they are now a contact. Defaults to \"New\"."},"rating":{"type":["string","null"],"enum":["","Hot","Warm","Cold",null],"title":"Lead rating","description":"How keen they seem. Hot means ready to buy soon. Cold means not interested yet. Defaults to \"Warm\"."},"score":{"anyOf":[{"type":"number","minimum":0,"maximum":100},{"type":"string","enum":[""]},{"type":"null"}],"title":"Lead score","description":"A number from 0 to 100 that shows how likely this lead is to buy. Higher is better. Defaults to 50."},"budget":{"anyOf":[{"type":"number"},{"type":"string","enum":[""]},{"type":"null"}],"title":"Estimated budget","description":"How much they might spend, as a rough guess."},"currency":{"$ref":"#/components/schemas/Currency","title":"Record currency","description":"The currency for the amounts on this record, for example USD or EUR. Defaults to the workspace's own currency."},"authority":{"type":["string","null"],"enum":["","Decision maker","Influencer","Researching",null],"title":"Decision authority","description":"Whether this person can decide to buy, or needs someone else to say yes."},"timeline":{"type":["string","null"],"enum":["","This month","This quarter","3–6 months","6+ months",null],"title":"Purchase timeline","description":"When they plan to buy."},"need":{"type":["string","null"],"title":"Business need","description":"The problem they want to solve, in their own words."},"source":{"type":["string","null"],"enum":["","Website","Referral","Advertising","LinkedIn","Email campaign","Trade show","Partner","Cold outreach","Other",null],"title":"Lead source","description":"Where they first heard about you, for example your website or a referral. It shows which channels bring you business. Defaults to \"Website\"."},"owner":{"type":["string","null"],"title":"Record owner","description":"The person in your team who looks after this record. It shows in their lists, and they get its reminders. A person in this workspace, by name. Who owns the record is set with ownerId."},"country":{"$ref":"#/components/schemas/Country","title":"Country","description":"The country this record is in. It decides which tax fields you see. Defaults to the workspace's own country."},"street":{"type":["string","null"],"title":"Street address","description":"The street address, for example 221 Main Street, Suite 4."},"city":{"type":["string","null"],"title":"City","description":"The city, for example Austin or Leeds."},"state":{"type":["string","null"],"title":"State / province","description":"The state, province or region, for example Texas or Ontario."},"postalCode":{"type":["string","null"],"title":"ZIP / postal code","description":"The ZIP or postal code, for example 78701."},"nextFollowUp":{"type":["string","null"],"format":"date","title":"Next follow-up","description":"The date you plan to contact them next."},"emailOptOut":{"type":["boolean","null"],"title":"Email opt-out","description":"Tick this if they do not want marketing emails. Campaigns will skip them."},"consentDate":{"type":["string","null"],"format":"date","title":"Consent recorded on","description":"The date they agreed to hear from you. Keep it if privacy laws such as GDPR apply to you."},"lawfulBasis":{"type":["string","null"],"enum":["","Not applicable","Consent","Contract","Legal obligation","Vital interests","Public task","Legitimate interests",null],"title":"Lawful basis","description":"Under privacy laws such as GDPR, your reason for keeping their details, for example their consent or a contract with them. Defaults to \"Not applicable\"."},"consentStatus":{"type":["string","null"],"enum":["","Not applicable","Pending","Waiting","Obtained","Withdrawn",null],"title":"Consent status","description":"Whether they agreed to be contacted. Withdrawn means they said no, so do not send them marketing. Defaults to \"Not applicable\"."},"convertedCompany":{"type":["string","null"],"title":"Converted to company","description":"Filled in when you convert the lead: the company record that was made."},"convertedContact":{"type":["string","null"],"title":"Converted to contact","description":"Filled in when you convert the lead: the contact record that was made."},"convertedDeal":{"type":["string","null"],"title":"Converted to opportunity","description":"Filled in when you convert the lead: the deal that was made, if any."},"convertedAt":{"type":["string","null"],"examples":["2026-12-05T10:30"],"title":"Converted on","description":"The date and time the lead was converted. A date and time as typed, without a time zone: YYYY-MM-DDTHH:MM."},"tags":{"type":["string","null"],"title":"Tags","description":"Short words that help you group and find records, for example VIP or Trade show. Separate them with commas."},"description":{"type":["string","null"],"title":"Description / notes","description":"Anything else worth knowing. Only people in your workspace can see it."},"companyId":{"type":["string","null"],"title":"Company name (record id)","description":"The id of the company named in “Company name”: set when one is picked from the list, and by the server when the name matches exactly one company. Send it to point at one record when names repeat; a name sent without it is matched to the record when exactly one has that name. Refused (422) when it is not a live record of that kind in this workspace; an id alone fills in the name."}}},"LeadUpdate":{"type":"object","title":"Lead changes","description":"Only the fields to change. A key the object does not have is refused (422 unknown_field); one the system keeps is ignored and listed in rejectedFields. A custom field the workspace has archived is accepted and ignored.","allOf":[{"$ref":"#/components/schemas/LeadFields"}],"properties":{"ownerId":{"type":"string","minLength":1,"description":"Who owns the record: the id of an active person in this workspace. Left out of a create, the record belongs to whoever made it — and a record an API key makes belongs to the person who created the key (failing that, the workspace's owner), so it is not hidden from everyone without View All. Left out of an update, the owner stays as it is."}},"patternProperties":{"^custom_\\w{1,80}$":{"description":"A custom field the workspace added. GET /api/v1/schema/{object} lists them, and the workspace description types them."}},"unevaluatedProperties":false},"LeadCreate":{"type":"object","title":"New lead","description":"The fields of a new lead. `name` is required; the rest take their defaults. Unknown keys are refused as on an update.","allOf":[{"$ref":"#/components/schemas/LeadFields"}],"properties":{"ownerId":{"type":"string","minLength":1,"description":"Who owns the record: the id of an active person in this workspace. Left out of a create, the record belongs to whoever made it — and a record an API key makes belongs to the person who created the key (failing that, the workspace's owner), so it is not hidden from everyone without View All. Left out of an update, the owner stays as it is."}},"patternProperties":{"^custom_\\w{1,80}$":{"description":"A custom field the workspace added. GET /api/v1/schema/{object} lists them, and the workspace description types them."}},"unevaluatedProperties":false,"required":["name"]},"Lead":{"type":"object","title":"Lead","allOf":[{"$ref":"#/components/schemas/RecordEnvelope"}],"properties":{"object":{"type":"string","const":"lead"},"data":{"$ref":"#/components/schemas/LeadFields"}},"required":["object","data"]},"LeadPage":{"type":"object","title":"A page of leads","required":["data","nextCursor"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Lead"}},"nextCursor":{"type":["string","null"],"description":"Send back as cursor, with the same sort, for the next page; null when this was the last."}}},"LeadDetail":{"type":"object","title":"One lead, with what hangs off it","required":["data","lineItems","activities","fieldHistory"],"properties":{"data":{"$ref":"#/components/schemas/Lead"},"lineItems":{"type":"array","items":{"$ref":"#/components/schemas/LineItem"},"description":"Lines, for the kinds of record that have them; empty here."},"activities":{"type":"array","items":{"$ref":"#/components/schemas/Activity"},"description":"The timeline, newest first, at most 100."},"fieldHistory":{"type":"array","items":{"$ref":"#/components/schemas/FieldChange"},"description":"Value changes, newest first, at most 100 — without the fields the caller may not see."}}},"LeadSaved":{"type":"object","title":"The lead, as saved","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Lead"},"rejectedFields":{"type":"array","items":{"type":"string"},"description":"Fields that were sent but not written: kept by the system, worked out from the lines, or not the caller's to change."},"possibleDuplicates":{"type":"array","items":{"$ref":"#/components/schemas/PossibleDuplicate"},"description":"On a create: records the workspace's duplicate rules matched, where the rule warns rather than blocks."}}},"LeadBulkUpdate":{"type":"object","title":"The same change to many leads","required":["ids","patch"],"properties":{"ids":{"type":"array","items":{"type":"string","minLength":1},"minItems":1,"maxItems":500},"patch":{"$ref":"#/components/schemas/LeadUpdate"}}},"LeadMerge":{"type":"object","title":"Merge two leads","required":["keepId","mergeId"],"properties":{"keepId":{"type":"string","minLength":1,"description":"The record that survives."},"mergeId":{"type":"string","minLength":1,"description":"The record folded into it, then moved to the recycle bin."},"fields":{"type":"object","description":"Which side each field's value comes from. A field left out keeps the survivor's value, or takes the other's where the survivor's is empty.","propertyNames":{"anyOf":[{"enum":["name","email","phone","mobile","role","company","status","rating","score","budget","currency","authority","timeline","need","source","owner","country","street","city","state","postalCode","nextFollowUp","emailOptOut","consentDate","lawfulBasis","consentStatus","convertedCompany","convertedContact","convertedDeal","convertedAt","tags","description","companyId"]},{"pattern":"^custom_\\w{1,80}$"}]},"additionalProperties":{"type":"string","enum":["keep","merge"]}},"ownerId":{"type":"string","minLength":1,"description":"Who owns the merged record. Left out, the survivor's owner."}}},"LeadEvent":{"type":"object","title":"A lead event","allOf":[{"$ref":"#/components/schemas/WebhookEvent"}],"properties":{"event":{"type":"string","enum":["lead.created","lead.updated"]},"data":{"allOf":[{"$ref":"#/components/schemas/EventRecord"},{"$ref":"#/components/schemas/LeadFields"}],"description":"The lead with its field values beside id, object and name — not masked by any profile's field permissions."}}},"DealFields":{"type":"object","title":"Deal fields","description":"A deal's values, by field key. A record made here carries every standard field, an empty one as \"\"; a custom field appears once it has a value. It may also carry keys the system adds as it works (a payment, a signature, a calendar link), which are read-only and not listed. A workspace's custom fields (keys beginning custom_) appear alongside; the workspace description lists them. Fields the caller may not see are left out. A value saved before a field's rules or choices changed is kept as it was until the record is next edited, so what is read can fall outside what may be written.","properties":{"name":{"type":["string","null"],"title":"Deal name","description":"A short name for the deal, for example Acme Inc. – website redesign. Required."},"company":{"type":["string","null"],"title":"Company / account","description":"The company this record belongs to. Choose one you have already added under Companies. Names a company by its name, as the app offers them to pick; it is not an id. The id of the company it means is in `companyId`."},"primaryContact":{"type":["string","null"],"title":"Primary contact","description":"The main person you deal with on this deal. Names a contact by its name, as the app offers them to pick; it is not an id. The id of the contact it means is in `primaryContactId`."},"stage":{"type":["string","null"],"enum":["","New lead","Qualified","Proposal","Negotiation","Won","Lost",null],"title":"Pipeline stage","description":"How close the deal is to being won. Move it forward as things happen, for example from Proposal to Negotiation. Defaults to \"New lead\"."},"pipeline":{"type":["string","null"],"enum":["","Sales pipeline","Enterprise sales","Partnerships",null],"title":"Sales pipeline","description":"The set of stages this deal goes through. Most teams use one. Some keep a separate one, for example for partners. Defaults to \"Sales pipeline\"."},"value":{"anyOf":[{"type":"number","minimum":0},{"type":"string","enum":[""]},{"type":"null"}],"title":"Deal amount","description":"How much the deal is worth if you win it. Required."},"currency":{"$ref":"#/components/schemas/Currency","title":"Record currency","description":"The currency for the amounts on this record, for example USD or EUR. Defaults to the workspace's own currency."},"probability":{"anyOf":[{"type":"number","minimum":0,"maximum":100},{"type":"string","enum":[""]},{"type":"null"}],"title":"Win probability (%)","description":"Your chance of winning it, from 0 to 100. It usually goes up as the deal moves through the stages. Defaults to 20."},"date":{"type":["string","null"],"format":"date","title":"Expected close date","description":"The date you expect to win or lose the deal. Forecasts use this date. Defaults to 30 days after the day the record is created."},"dealType":{"type":["string","null"],"enum":["","New business","Expansion","Renewal","Cross-sell",null],"title":"Deal type","description":"The kind of sale: a new customer (New business), more for a current customer (Expansion), a Renewal, or a different product (Cross-sell)."},"forecast":{"type":["string","null"],"enum":["","Pipeline","Best case","Commit","Closed","Omitted",null],"title":"Forecast category","description":"How sure you are that it closes this period. Commit means you are confident. Best case means it could close if things go well. Pipeline means it is too early to say."},"owner":{"type":["string","null"],"title":"Record owner","description":"The person in your team who looks after this record. It shows in their lists, and they get its reminders. A person in this workspace, by name. Who owns the record is set with ownerId."},"source":{"type":["string","null"],"enum":["","Website","Referral","Advertising","LinkedIn","Email campaign","Trade show","Partner","Cold outreach","Other",null],"title":"Lead source","description":"Where they first heard about you, for example your website or a referral. It shows which channels bring you business. Defaults to \"Website\"."},"nextStep":{"type":["string","null"],"title":"Next step","description":"The next thing that needs to happen, for example Send the proposal on Friday."},"competitor":{"type":["string","null"],"title":"Primary competitor","description":"The main other company the customer is looking at, if you know."},"lossReason":{"type":["string","null"],"title":"Loss reason","description":"If you lost the deal, why. It helps you win the next one. Used only while Pipeline stage is Lost or Closed lost."},"contractStart":{"type":["string","null"],"format":"date","title":"Contract start","description":"The date the contract begins, once the deal is won."},"contractEnd":{"type":["string","null"],"format":"date","title":"Contract end","description":"The date the contract ends. Use it to plan the renewal."},"paymentTerms":{"type":["string","null"],"title":"Payment terms","description":"How long there is to pay. For example, Net 30 means payment is due 30 days after the invoice date."},"tags":{"type":["string","null"],"title":"Tags","description":"Short words that help you group and find records, for example VIP or Trade show. Separate them with commas."},"description":{"type":["string","null"],"title":"Description / notes","description":"Anything else worth knowing. Only people in your workspace can see it."},"companyId":{"type":["string","null"],"title":"Company / account (record id)","description":"The id of the company named in “Company / account”: set when one is picked from the list, and by the server when the name matches exactly one company. Send it to point at one record when names repeat; a name sent without it is matched to the record when exactly one has that name. Refused (422) when it is not a live record of that kind in this workspace; an id alone fills in the name."},"primaryContactId":{"type":["string","null"],"title":"Primary contact (record id)","description":"The id of the contact named in “Primary contact”: set when one is picked from the list, and by the server when the name matches exactly one contact. Send it to point at one record when names repeat; a name sent without it is matched to the record when exactly one has that name. Refused (422) when it is not a live record of that kind in this workspace; an id alone fills in the name."}}},"DealUpdate":{"type":"object","title":"Deal changes","description":"Only the fields to change. A key the object does not have is refused (422 unknown_field); one the system keeps is ignored and listed in rejectedFields. A custom field the workspace has archived is accepted and ignored.","allOf":[{"$ref":"#/components/schemas/DealFields"}],"properties":{"ownerId":{"type":"string","minLength":1,"description":"Who owns the record: the id of an active person in this workspace. Left out of a create, the record belongs to whoever made it — and a record an API key makes belongs to the person who created the key (failing that, the workspace's owner), so it is not hidden from everyone without View All. Left out of an update, the owner stays as it is."}},"patternProperties":{"^custom_\\w{1,80}$":{"description":"A custom field the workspace added. GET /api/v1/schema/{object} lists them, and the workspace description types them."}},"unevaluatedProperties":false},"DealCreate":{"type":"object","title":"New deal","description":"The fields of a new deal. `name` and `value` are required; the rest take their defaults. Unknown keys are refused as on an update.","allOf":[{"$ref":"#/components/schemas/DealFields"}],"properties":{"ownerId":{"type":"string","minLength":1,"description":"Who owns the record: the id of an active person in this workspace. Left out of a create, the record belongs to whoever made it — and a record an API key makes belongs to the person who created the key (failing that, the workspace's owner), so it is not hidden from everyone without View All. Left out of an update, the owner stays as it is."}},"patternProperties":{"^custom_\\w{1,80}$":{"description":"A custom field the workspace added. GET /api/v1/schema/{object} lists them, and the workspace description types them."}},"unevaluatedProperties":false,"required":["name","value"]},"Deal":{"type":"object","title":"Deal","allOf":[{"$ref":"#/components/schemas/RecordEnvelope"}],"properties":{"object":{"type":"string","const":"deal"},"data":{"$ref":"#/components/schemas/DealFields"}},"required":["object","data"]},"DealPage":{"type":"object","title":"A page of deals","required":["data","nextCursor"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Deal"}},"nextCursor":{"type":["string","null"],"description":"Send back as cursor, with the same sort, for the next page; null when this was the last."}}},"DealDetail":{"type":"object","title":"One deal, with what hangs off it","required":["data","lineItems","activities","fieldHistory"],"properties":{"data":{"$ref":"#/components/schemas/Deal"},"lineItems":{"type":"array","items":{"$ref":"#/components/schemas/LineItem"},"description":"Lines, for the kinds of record that have them; empty here."},"activities":{"type":"array","items":{"$ref":"#/components/schemas/Activity"},"description":"The timeline, newest first, at most 100."},"fieldHistory":{"type":"array","items":{"$ref":"#/components/schemas/FieldChange"},"description":"Value changes, newest first, at most 100 — without the fields the caller may not see."}}},"DealSaved":{"type":"object","title":"The deal, as saved","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Deal"},"rejectedFields":{"type":"array","items":{"type":"string"},"description":"Fields that were sent but not written: kept by the system, worked out from the lines, or not the caller's to change."},"possibleDuplicates":{"type":"array","items":{"$ref":"#/components/schemas/PossibleDuplicate"},"description":"On a create: records the workspace's duplicate rules matched, where the rule warns rather than blocks."}}},"DealBulkUpdate":{"type":"object","title":"The same change to many deals","required":["ids","patch"],"properties":{"ids":{"type":"array","items":{"type":"string","minLength":1},"minItems":1,"maxItems":500},"patch":{"$ref":"#/components/schemas/DealUpdate"}}},"DealMerge":{"type":"object","title":"Merge two deals","required":["keepId","mergeId"],"properties":{"keepId":{"type":"string","minLength":1,"description":"The record that survives."},"mergeId":{"type":"string","minLength":1,"description":"The record folded into it, then moved to the recycle bin."},"fields":{"type":"object","description":"Which side each field's value comes from. A field left out keeps the survivor's value, or takes the other's where the survivor's is empty.","propertyNames":{"anyOf":[{"enum":["name","company","primaryContact","stage","pipeline","value","currency","probability","date","dealType","forecast","owner","source","nextStep","competitor","lossReason","contractStart","contractEnd","paymentTerms","tags","description","companyId","primaryContactId"]},{"pattern":"^custom_\\w{1,80}$"}]},"additionalProperties":{"type":"string","enum":["keep","merge"]}},"ownerId":{"type":"string","minLength":1,"description":"Who owns the merged record. Left out, the survivor's owner."}}},"DealEvent":{"type":"object","title":"A deal event","allOf":[{"$ref":"#/components/schemas/WebhookEvent"}],"properties":{"event":{"type":"string","enum":["deal.created","deal.updated"]},"data":{"allOf":[{"$ref":"#/components/schemas/EventRecord"},{"$ref":"#/components/schemas/DealFields"}],"description":"The deal with its field values beside id, object and name — not masked by any profile's field permissions."}}},"TaskFields":{"type":"object","title":"Task fields","description":"A task's values, by field key. A record made here carries every standard field, an empty one as \"\"; a custom field appears once it has a value. It may also carry keys the system adds as it works (a payment, a signature, a calendar link), which are read-only and not listed. A workspace's custom fields (keys beginning custom_) appear alongside; the workspace description lists them. Fields the caller may not see are left out. A value saved before a field's rules or choices changed is kept as it was until the record is next edited, so what is read can fall outside what may be written.","properties":{"name":{"type":["string","null"],"title":"Task name","description":"What needs to be done, for example Call Sarah about the quote. Required."},"taskType":{"type":["string","null"],"enum":["","Call","Email","Follow-up","Meeting preparation","Internal",null],"title":"Task type","description":"The kind of task. It helps you plan your day."},"company":{"type":["string","null"],"title":"Company / account","description":"The company this record belongs to. Choose one you have already added under Companies. Names a company by its name, as the app offers them to pick; it is not an id. The id of the company it means is in `companyId`."},"relatedContact":{"type":["string","null"],"title":"Related contact","description":"The person this task is about, if any. Names a contact by its name, as the app offers them to pick; it is not an id. The id of the contact it means is in `relatedContactId`."},"relatedDeal":{"type":["string","null"],"title":"Related deal","description":"The deal this is about, if there is one. Names a deal by its name, as the app offers them to pick; it is not an id."},"owner":{"type":["string","null"],"title":"Record owner","description":"The person in your team who looks after this record. It shows in their lists, and they get its reminders. A person in this workspace, by name. Who owns the record is set with ownerId."},"priority":{"type":["string","null"],"enum":["","Low","Medium","High","Urgent",null],"title":"Priority","description":"How urgent it is. Urgent and High show first. Defaults to \"Medium\"."},"status":{"type":["string","null"],"enum":["","To do","In progress","Completed","Deferred",null],"title":"Task status","description":"How far along the task is. Mark it Completed when it is done. Defaults to \"To do\"."},"dueDate":{"type":["string","null"],"format":"date","title":"Due date","description":"The date it should be done by. Defaults to the day the record is created."},"time":{"type":["string","null"],"examples":["10:00"],"title":"Due time","description":"The time it should be done by, if the time matters. Defaults to \"10:00\". A time of day, HH:MM on the 24-hour clock."},"reminder":{"type":["string","null"],"enum":["","None","At due time","15 minutes before","1 hour before","1 day before",null],"title":"Reminder","description":"When to remind you, for example 1 hour before."},"recurrence":{"type":["string","null"],"enum":["","Does not repeat","Daily","Weekly","Monthly",null],"title":"Repeat","description":"When you mark it Completed, the next one is made for you: due a day, a week or a month after this one."},"estimatedMinutes":{"anyOf":[{"type":"number","minimum":0},{"type":"string","enum":[""]},{"type":"null"}],"title":"Estimated duration (minutes)","description":"Roughly how long it will take, in minutes."},"description":{"type":["string","null"],"title":"Description / notes","description":"Anything else worth knowing. Only people in your workspace can see it."},"companyId":{"type":["string","null"],"title":"Company / account (record id)","description":"The id of the company named in “Company / account”: set when one is picked from the list, and by the server when the name matches exactly one company. Send it to point at one record when names repeat; a name sent without it is matched to the record when exactly one has that name. Refused (422) when it is not a live record of that kind in this workspace; an id alone fills in the name."},"relatedContactId":{"type":["string","null"],"title":"Related contact (record id)","description":"The id of the contact named in “Related contact”: set when one is picked from the list, and by the server when the name matches exactly one contact. Send it to point at one record when names repeat; a name sent without it is matched to the record when exactly one has that name. Refused (422) when it is not a live record of that kind in this workspace; an id alone fills in the name."}}},"TaskUpdate":{"type":"object","title":"Task changes","description":"Only the fields to change. A key the object does not have is refused (422 unknown_field); one the system keeps is ignored and listed in rejectedFields. A custom field the workspace has archived is accepted and ignored.","allOf":[{"$ref":"#/components/schemas/TaskFields"}],"properties":{"ownerId":{"type":"string","minLength":1,"description":"Who owns the record: the id of an active person in this workspace. Left out of a create, the record belongs to whoever made it — and a record an API key makes belongs to the person who created the key (failing that, the workspace's owner), so it is not hidden from everyone without View All. Left out of an update, the owner stays as it is."}},"patternProperties":{"^custom_\\w{1,80}$":{"description":"A custom field the workspace added. GET /api/v1/schema/{object} lists them, and the workspace description types them."}},"unevaluatedProperties":false},"TaskCreate":{"type":"object","title":"New task","description":"The fields of a new task. `name` is required; the rest take their defaults. Unknown keys are refused as on an update.","allOf":[{"$ref":"#/components/schemas/TaskFields"}],"properties":{"ownerId":{"type":"string","minLength":1,"description":"Who owns the record: the id of an active person in this workspace. Left out of a create, the record belongs to whoever made it — and a record an API key makes belongs to the person who created the key (failing that, the workspace's owner), so it is not hidden from everyone without View All. Left out of an update, the owner stays as it is."}},"patternProperties":{"^custom_\\w{1,80}$":{"description":"A custom field the workspace added. GET /api/v1/schema/{object} lists them, and the workspace description types them."}},"unevaluatedProperties":false,"required":["name"]},"Task":{"type":"object","title":"Task","allOf":[{"$ref":"#/components/schemas/RecordEnvelope"}],"properties":{"object":{"type":"string","const":"task"},"data":{"$ref":"#/components/schemas/TaskFields"}},"required":["object","data"]},"TaskPage":{"type":"object","title":"A page of tasks","required":["data","nextCursor"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Task"}},"nextCursor":{"type":["string","null"],"description":"Send back as cursor, with the same sort, for the next page; null when this was the last."}}},"TaskDetail":{"type":"object","title":"One task, with what hangs off it","required":["data","lineItems","activities","fieldHistory"],"properties":{"data":{"$ref":"#/components/schemas/Task"},"lineItems":{"type":"array","items":{"$ref":"#/components/schemas/LineItem"},"description":"Lines, for the kinds of record that have them; empty here."},"activities":{"type":"array","items":{"$ref":"#/components/schemas/Activity"},"description":"The timeline, newest first, at most 100."},"fieldHistory":{"type":"array","items":{"$ref":"#/components/schemas/FieldChange"},"description":"Value changes, newest first, at most 100 — without the fields the caller may not see."}}},"TaskSaved":{"type":"object","title":"The task, as saved","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Task"},"rejectedFields":{"type":"array","items":{"type":"string"},"description":"Fields that were sent but not written: kept by the system, worked out from the lines, or not the caller's to change."},"possibleDuplicates":{"type":"array","items":{"$ref":"#/components/schemas/PossibleDuplicate"},"description":"On a create: records the workspace's duplicate rules matched, where the rule warns rather than blocks."}}},"TaskBulkUpdate":{"type":"object","title":"The same change to many tasks","required":["ids","patch"],"properties":{"ids":{"type":"array","items":{"type":"string","minLength":1},"minItems":1,"maxItems":500},"patch":{"$ref":"#/components/schemas/TaskUpdate"}}},"TaskMerge":{"type":"object","title":"Merge two tasks","required":["keepId","mergeId"],"properties":{"keepId":{"type":"string","minLength":1,"description":"The record that survives."},"mergeId":{"type":"string","minLength":1,"description":"The record folded into it, then moved to the recycle bin."},"fields":{"type":"object","description":"Which side each field's value comes from. A field left out keeps the survivor's value, or takes the other's where the survivor's is empty.","propertyNames":{"anyOf":[{"enum":["name","taskType","company","relatedContact","relatedDeal","owner","priority","status","dueDate","time","reminder","recurrence","estimatedMinutes","description","companyId","relatedContactId"]},{"pattern":"^custom_\\w{1,80}$"}]},"additionalProperties":{"type":"string","enum":["keep","merge"]}},"ownerId":{"type":"string","minLength":1,"description":"Who owns the merged record. Left out, the survivor's owner."}}},"TaskEvent":{"type":"object","title":"A task event","allOf":[{"$ref":"#/components/schemas/WebhookEvent"}],"properties":{"event":{"type":"string","enum":["task.created","task.updated"]},"data":{"allOf":[{"$ref":"#/components/schemas/EventRecord"},{"$ref":"#/components/schemas/TaskFields"}],"description":"The task with its field values beside id, object and name — not masked by any profile's field permissions."}}},"CalendarEventFields":{"type":"object","title":"Calendar event fields","description":"A calendar event's values, by field key. A record made here carries every standard field, an empty one as \"\"; a custom field appears once it has a value. It may also carry keys the system adds as it works (a payment, a signature, a calendar link), which are read-only and not listed. A workspace's custom fields (keys beginning custom_) appear alongside; the workspace description lists them. Fields the caller may not see are left out. A value saved before a field's rules or choices changed is kept as it was until the record is next edited, so what is read can fall outside what may be written.","properties":{"name":{"type":["string","null"],"title":"Event name","description":"A short name for the event, for example Demo with Acme Inc. Required."},"type":{"type":["string","null"],"enum":["","Meeting","Call","Demo","Workshop",null],"title":"Event type","description":"The kind of event."},"eventDate":{"type":["string","null"],"format":"date","title":"Event date","description":"The day of the event. Defaults to the day the record is created."},"time":{"type":["string","null"],"examples":["10:00"],"title":"Start time","description":"The time it starts. Defaults to \"10:00\". A time of day, HH:MM on the 24-hour clock."},"endTime":{"type":["string","null"],"examples":["10:00"],"title":"End time","description":"The time it ends. Defaults to \"11:00\". A time of day, HH:MM on the 24-hour clock."},"allDay":{"type":["boolean","null"],"title":"All-day event","description":"Tick this if it lasts the whole day, like a trade show."},"timezone":{"type":["string","null"],"enum":["","Asia/Kabul","Europe/Tirane","Africa/Algiers","Europe/Andorra","Africa/Luanda","America/Argentina/Buenos_Aires","Asia/Yerevan","America/Aruba","Australia/Sydney","Europe/Vienna","Asia/Baku","America/Nassau","Asia/Bahrain","Asia/Dhaka","America/Barbados","Europe/Minsk","Europe/Brussels","America/Belize","Africa/Porto-Novo","Asia/Thimphu","America/La_Paz","Europe/Sarajevo","Africa/Gaborone","America/Sao_Paulo","Asia/Brunei","Europe/Sofia","Africa/Ouagadougou","Africa/Bujumbura","Asia/Phnom_Penh","Africa/Douala","America/Toronto","Atlantic/Cape_Verde","Africa/Bangui","Africa/Ndjamena","America/Santiago","Asia/Shanghai","America/Bogota","Indian/Comoro","Africa/Brazzaville","America/Costa_Rica","Europe/Zagreb","America/Havana","Asia/Nicosia","Europe/Prague","Europe/Copenhagen","Africa/Djibouti","America/Santo_Domingo","America/Guayaquil","Africa/Cairo","America/El_Salvador","Europe/Tallinn","Africa/Mbabane","Africa/Addis_Ababa","Pacific/Fiji","Europe/Helsinki","Europe/Paris","Africa/Libreville","Africa/Banjul","Asia/Tbilisi","Europe/Berlin","Africa/Accra","Europe/Gibraltar","Europe/Athens","America/Guatemala","Africa/Conakry","America/Guyana","America/Port-au-Prince","America/Tegucigalpa","Asia/Hong_Kong","Europe/Budapest","Atlantic/Reykjavik","Asia/Kolkata","Asia/Jakarta","Asia/Tehran","Asia/Baghdad","Europe/Dublin","Asia/Jerusalem","Europe/Rome","Africa/Abidjan","America/Jamaica","Asia/Tokyo","Asia/Amman","Asia/Almaty","Africa/Nairobi","Asia/Kuwait","Asia/Bishkek","Asia/Vientiane","Europe/Riga","Asia/Beirut","Africa/Maseru","Africa/Monrovia","Africa/Tripoli","Europe/Vaduz","Europe/Vilnius","Europe/Luxembourg","Asia/Macau","Indian/Antananarivo","Africa/Blantyre","Asia/Kuala_Lumpur","Indian/Maldives","Africa/Bamako","Europe/Malta","Africa/Nouakchott","Indian/Mauritius","America/Mexico_City","Europe/Chisinau","Europe/Monaco","Asia/Ulaanbaatar","Europe/Podgorica","Africa/Casablanca","Africa/Maputo","Asia/Yangon","Africa/Windhoek","Asia/Kathmandu","Europe/Amsterdam","Pacific/Auckland","America/Managua","Africa/Niamey","Africa/Lagos","Europe/Skopje","Europe/Oslo","Asia/Muscat","Asia/Karachi","Asia/Hebron","America/Panama","Pacific/Port_Moresby","America/Asuncion","America/Lima","Asia/Manila","Europe/Warsaw","Europe/Lisbon","America/Puerto_Rico","Asia/Qatar","Europe/Bucharest","Europe/Moscow","Africa/Kigali","Asia/Riyadh","Africa/Dakar","Europe/Belgrade","Indian/Mahe","Africa/Freetown","Asia/Singapore","Europe/Bratislava","Europe/Ljubljana","Africa/Mogadishu","Africa/Johannesburg","Asia/Seoul","Africa/Juba","Europe/Madrid","Asia/Colombo","Africa/Khartoum","America/Paramaribo","Europe/Stockholm","Europe/Zurich","Asia/Damascus","Asia/Taipei","Asia/Dushanbe","Africa/Dar_es_Salaam","Asia/Bangkok","Africa/Lome","America/Port_of_Spain","Africa/Tunis","Europe/Istanbul","Asia/Ashgabat","Africa/Kampala","Europe/Kyiv","Asia/Dubai","Europe/London","America/New_York","America/Montevideo","Asia/Tashkent","America/Caracas","Asia/Ho_Chi_Minh","Asia/Aden","Africa/Lusaka","Africa/Harare",null],"title":"Timezone","description":"The time zone of the start and end times. It matters when people are in different countries."},"locationType":{"type":["string","null"],"enum":["","Video call","Office","Customer site","Phone",null],"title":"Location type","description":"Where it happens: on a video call, at your office, at the customer's place, or by phone."},"location":{"type":["string","null"],"title":"Meeting link / location","description":"The video call link, or the address."},"attendees":{"type":["string","null"],"title":"Attendees","description":"Who is coming. Separate the names with commas."},"company":{"type":["string","null"],"title":"Company / account","description":"The company this record belongs to. Choose one you have already added under Companies. Names a company by its name, as the app offers them to pick; it is not an id. The id of the company it means is in `companyId`."},"owner":{"type":["string","null"],"title":"Record owner","description":"The person in your team who looks after this record. It shows in their lists, and they get its reminders. A person in this workspace, by name. Who owns the record is set with ownerId."},"agenda":{"type":["string","null"],"title":"Meeting agenda","description":"What you plan to talk about."},"reminder":{"type":["string","null"],"enum":["","None","5 minutes before","15 minutes before","30 minutes before","1 day before",null],"title":"Reminder","description":"When to remind you, for example 1 hour before."},"description":{"type":["string","null"],"title":"Description / notes","description":"Anything else worth knowing. Only people in your workspace can see it."},"companyId":{"type":["string","null"],"title":"Company / account (record id)","description":"The id of the company named in “Company / account”: set when one is picked from the list, and by the server when the name matches exactly one company. Send it to point at one record when names repeat; a name sent without it is matched to the record when exactly one has that name. Refused (422) when it is not a live record of that kind in this workspace; an id alone fills in the name."},"recurrence":{"description":"No longer used. Accepted from older clients and ignored.","deprecated":true,"writeOnly":true}}},"CalendarEventUpdate":{"type":"object","title":"Calendar event changes","description":"Only the fields to change. A key the object does not have is refused (422 unknown_field); one the system keeps is ignored and listed in rejectedFields. A custom field the workspace has archived is accepted and ignored.","allOf":[{"$ref":"#/components/schemas/CalendarEventFields"}],"properties":{"ownerId":{"type":"string","minLength":1,"description":"Who owns the record: the id of an active person in this workspace. Left out of a create, the record belongs to whoever made it — and a record an API key makes belongs to the person who created the key (failing that, the workspace's owner), so it is not hidden from everyone without View All. Left out of an update, the owner stays as it is."}},"patternProperties":{"^custom_\\w{1,80}$":{"description":"A custom field the workspace added. GET /api/v1/schema/{object} lists them, and the workspace description types them."}},"unevaluatedProperties":false},"CalendarEventCreate":{"type":"object","title":"New calendar event","description":"The fields of a new calendar event. `name` is required; the rest take their defaults. Unknown keys are refused as on an update.","allOf":[{"$ref":"#/components/schemas/CalendarEventFields"}],"properties":{"ownerId":{"type":"string","minLength":1,"description":"Who owns the record: the id of an active person in this workspace. Left out of a create, the record belongs to whoever made it — and a record an API key makes belongs to the person who created the key (failing that, the workspace's owner), so it is not hidden from everyone without View All. Left out of an update, the owner stays as it is."}},"patternProperties":{"^custom_\\w{1,80}$":{"description":"A custom field the workspace added. GET /api/v1/schema/{object} lists them, and the workspace description types them."}},"unevaluatedProperties":false,"required":["name"]},"CalendarEvent":{"type":"object","title":"Calendar event","allOf":[{"$ref":"#/components/schemas/RecordEnvelope"}],"properties":{"object":{"type":"string","const":"event"},"data":{"$ref":"#/components/schemas/CalendarEventFields"}},"required":["object","data"]},"CalendarEventPage":{"type":"object","title":"A page of calendar events","required":["data","nextCursor"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/CalendarEvent"}},"nextCursor":{"type":["string","null"],"description":"Send back as cursor, with the same sort, for the next page; null when this was the last."}}},"CalendarEventDetail":{"type":"object","title":"One calendar event, with what hangs off it","required":["data","lineItems","activities","fieldHistory"],"properties":{"data":{"$ref":"#/components/schemas/CalendarEvent"},"lineItems":{"type":"array","items":{"$ref":"#/components/schemas/LineItem"},"description":"Lines, for the kinds of record that have them; empty here."},"activities":{"type":"array","items":{"$ref":"#/components/schemas/Activity"},"description":"The timeline, newest first, at most 100."},"fieldHistory":{"type":"array","items":{"$ref":"#/components/schemas/FieldChange"},"description":"Value changes, newest first, at most 100 — without the fields the caller may not see."}}},"CalendarEventSaved":{"type":"object","title":"The calendar event, as saved","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/CalendarEvent"},"rejectedFields":{"type":"array","items":{"type":"string"},"description":"Fields that were sent but not written: kept by the system, worked out from the lines, or not the caller's to change."},"possibleDuplicates":{"type":"array","items":{"$ref":"#/components/schemas/PossibleDuplicate"},"description":"On a create: records the workspace's duplicate rules matched, where the rule warns rather than blocks."}}},"CalendarEventBulkUpdate":{"type":"object","title":"The same change to many calendar events","required":["ids","patch"],"properties":{"ids":{"type":"array","items":{"type":"string","minLength":1},"minItems":1,"maxItems":500},"patch":{"$ref":"#/components/schemas/CalendarEventUpdate"}}},"CalendarEventMerge":{"type":"object","title":"Merge two calendar events","required":["keepId","mergeId"],"properties":{"keepId":{"type":"string","minLength":1,"description":"The record that survives."},"mergeId":{"type":"string","minLength":1,"description":"The record folded into it, then moved to the recycle bin."},"fields":{"type":"object","description":"Which side each field's value comes from. A field left out keeps the survivor's value, or takes the other's where the survivor's is empty.","propertyNames":{"anyOf":[{"enum":["name","type","eventDate","time","endTime","allDay","timezone","locationType","location","attendees","company","owner","agenda","reminder","description","companyId"]},{"pattern":"^custom_\\w{1,80}$"}]},"additionalProperties":{"type":"string","enum":["keep","merge"]}},"ownerId":{"type":"string","minLength":1,"description":"Who owns the merged record. Left out, the survivor's owner."}}},"CalendarEventEvent":{"type":"object","title":"A calendar event event","allOf":[{"$ref":"#/components/schemas/WebhookEvent"}],"properties":{"event":{"type":"string","enum":["event.created","event.updated"]},"data":{"allOf":[{"$ref":"#/components/schemas/EventRecord"},{"$ref":"#/components/schemas/CalendarEventFields"}],"description":"The calendar event with its field values beside id, object and name — not masked by any profile's field permissions."}}},"CampaignFields":{"type":"object","title":"Campaign fields","description":"A campaign's values, by field key. A record made here carries every standard field, an empty one as \"\"; a custom field appears once it has a value. It may also carry keys the system adds as it works (a payment, a signature, a calendar link), which are read-only and not listed. A workspace's custom fields (keys beginning custom_) appear alongside; the workspace description lists them. Fields the caller may not see are left out. A value saved before a field's rules or choices changed is kept as it was until the record is next edited, so what is read can fall outside what may be written.","properties":{"name":{"type":["string","null"],"title":"Campaign name","description":"A name your team will recognise, for example Spring offer 2026. Required."},"campaignType":{"type":["string","null"],"enum":["","Email","Webinar","Event","Social media","Paid advertising","Partner",null],"title":"Campaign type","description":"How this campaign reaches people."},"status":{"type":["string","null"],"enum":["","Draft","Active","Paused","Completed",null],"title":"Campaign status","description":"Where the campaign is. Draft means not started yet. Active means it is running now. Defaults to \"Draft\"."},"audience":{"type":["string","null"],"enum":["","All customers","New leads","Enterprise","Prospects",null],"title":"Audience","description":"The group of people this campaign is for."},"subject":{"type":["string","null"],"title":"Email subject","description":"The subject line people see in their inbox. Keep it short and clear."},"senderName":{"type":["string","null"],"title":"Sender name","description":"The name people see as the sender, for example Sarah at Acme Inc."},"senderEmail":{"type":["string","null"],"format":"email","pattern":"^(?:\\s*[^\\s@]+@[^\\s@]+\\.[^\\s@]+\\s*)?$","title":"Sender email","description":"The email address the campaign is sent from."},"replyTo":{"type":["string","null"],"format":"email","pattern":"^(?:\\s*[^\\s@]+@[^\\s@]+\\.[^\\s@]+\\s*)?$","title":"Reply-to email","description":"Where replies go, if not to the sender's address."},"body":{"type":["string","null"],"title":"Message content","description":"The message people receive."},"startDate":{"type":["string","null"],"format":"date","title":"Start date","description":"The day the campaign starts."},"endDate":{"type":["string","null"],"format":"date","title":"End date","description":"The day the campaign ends."},"owner":{"type":["string","null"],"title":"Record owner","description":"The person in your team who looks after this record. It shows in their lists, and they get its reminders. A person in this workspace, by name. Who owns the record is set with ownerId."},"currency":{"$ref":"#/components/schemas/Currency","title":"Record currency","description":"The currency for the amounts on this record, for example USD or EUR. Defaults to the workspace's own currency."},"budget":{"anyOf":[{"type":"number","minimum":0},{"type":"string","enum":[""]},{"type":"null"}],"title":"Budget","description":"How much you plan to spend."},"actualCost":{"anyOf":[{"type":"number","minimum":0},{"type":"string","enum":[""]},{"type":"null"}],"title":"Actual cost","description":"How much you really spent. Compare it with the budget and with the business it brought in."},"expectedRevenue":{"anyOf":[{"type":"number","minimum":0},{"type":"string","enum":[""]},{"type":"null"}],"title":"Expected revenue","description":"How much new business you hope this campaign brings in."},"utmSource":{"type":["string","null"],"title":"UTM source","description":"A tag added to your links that shows where visitors came from, for example newsletter. Tools like Google Analytics read it."},"utmMedium":{"type":["string","null"],"title":"UTM medium","description":"A tag added to your links that shows the kind of channel, for example email or social."},"utmCampaign":{"type":["string","null"],"title":"UTM campaign","description":"A tag added to your links with the campaign's name, for example spring_offer."},"goal":{"type":["string","null"],"title":"Campaign goal","description":"What you want the campaign to achieve, for example 50 new leads."},"tags":{"type":["string","null"],"title":"Tags","description":"Short words that help you group and find records, for example VIP or Trade show. Separate them with commas."},"description":{"type":["string","null"],"title":"Description / notes","description":"Anything else worth knowing. Only people in your workspace can see it."}}},"CampaignUpdate":{"type":"object","title":"Campaign changes","description":"Only the fields to change. A key the object does not have is refused (422 unknown_field); one the system keeps is ignored and listed in rejectedFields. A custom field the workspace has archived is accepted and ignored.","allOf":[{"$ref":"#/components/schemas/CampaignFields"}],"properties":{"ownerId":{"type":"string","minLength":1,"description":"Who owns the record: the id of an active person in this workspace. Left out of a create, the record belongs to whoever made it — and a record an API key makes belongs to the person who created the key (failing that, the workspace's owner), so it is not hidden from everyone without View All. Left out of an update, the owner stays as it is."}},"patternProperties":{"^custom_\\w{1,80}$":{"description":"A custom field the workspace added. GET /api/v1/schema/{object} lists them, and the workspace description types them."}},"unevaluatedProperties":false},"CampaignCreate":{"type":"object","title":"New campaign","description":"The fields of a new campaign. `name` is required; the rest take their defaults. Unknown keys are refused as on an update.","allOf":[{"$ref":"#/components/schemas/CampaignFields"}],"properties":{"ownerId":{"type":"string","minLength":1,"description":"Who owns the record: the id of an active person in this workspace. Left out of a create, the record belongs to whoever made it — and a record an API key makes belongs to the person who created the key (failing that, the workspace's owner), so it is not hidden from everyone without View All. Left out of an update, the owner stays as it is."}},"patternProperties":{"^custom_\\w{1,80}$":{"description":"A custom field the workspace added. GET /api/v1/schema/{object} lists them, and the workspace description types them."}},"unevaluatedProperties":false,"required":["name"]},"Campaign":{"type":"object","title":"Campaign","allOf":[{"$ref":"#/components/schemas/RecordEnvelope"}],"properties":{"object":{"type":"string","const":"campaign"},"data":{"$ref":"#/components/schemas/CampaignFields"}},"required":["object","data"]},"CampaignPage":{"type":"object","title":"A page of campaigns","required":["data","nextCursor"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Campaign"}},"nextCursor":{"type":["string","null"],"description":"Send back as cursor, with the same sort, for the next page; null when this was the last."}}},"CampaignDetail":{"type":"object","title":"One campaign, with what hangs off it","required":["data","lineItems","activities","fieldHistory"],"properties":{"data":{"$ref":"#/components/schemas/Campaign"},"lineItems":{"type":"array","items":{"$ref":"#/components/schemas/LineItem"},"description":"Lines, for the kinds of record that have them; empty here."},"activities":{"type":"array","items":{"$ref":"#/components/schemas/Activity"},"description":"The timeline, newest first, at most 100."},"fieldHistory":{"type":"array","items":{"$ref":"#/components/schemas/FieldChange"},"description":"Value changes, newest first, at most 100 — without the fields the caller may not see."}}},"CampaignSaved":{"type":"object","title":"The campaign, as saved","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Campaign"},"rejectedFields":{"type":"array","items":{"type":"string"},"description":"Fields that were sent but not written: kept by the system, worked out from the lines, or not the caller's to change."},"possibleDuplicates":{"type":"array","items":{"$ref":"#/components/schemas/PossibleDuplicate"},"description":"On a create: records the workspace's duplicate rules matched, where the rule warns rather than blocks."}}},"CampaignBulkUpdate":{"type":"object","title":"The same change to many campaigns","required":["ids","patch"],"properties":{"ids":{"type":"array","items":{"type":"string","minLength":1},"minItems":1,"maxItems":500},"patch":{"$ref":"#/components/schemas/CampaignUpdate"}}},"CampaignMerge":{"type":"object","title":"Merge two campaigns","required":["keepId","mergeId"],"properties":{"keepId":{"type":"string","minLength":1,"description":"The record that survives."},"mergeId":{"type":"string","minLength":1,"description":"The record folded into it, then moved to the recycle bin."},"fields":{"type":"object","description":"Which side each field's value comes from. A field left out keeps the survivor's value, or takes the other's where the survivor's is empty.","propertyNames":{"anyOf":[{"enum":["name","campaignType","status","audience","subject","senderName","senderEmail","replyTo","body","startDate","endDate","owner","currency","budget","actualCost","expectedRevenue","utmSource","utmMedium","utmCampaign","goal","tags","description"]},{"pattern":"^custom_\\w{1,80}$"}]},"additionalProperties":{"type":"string","enum":["keep","merge"]}},"ownerId":{"type":"string","minLength":1,"description":"Who owns the merged record. Left out, the survivor's owner."}}},"CampaignEvent":{"type":"object","title":"A campaign event","allOf":[{"$ref":"#/components/schemas/WebhookEvent"}],"properties":{"event":{"type":"string","enum":["campaign.created","campaign.updated"]},"data":{"allOf":[{"$ref":"#/components/schemas/EventRecord"},{"$ref":"#/components/schemas/CampaignFields"}],"description":"The campaign with its field values beside id, object and name — not masked by any profile's field permissions."}}},"InvoiceFields":{"type":"object","title":"Invoice fields","description":"An invoice's values, by field key. A record made here carries every standard field, an empty one as \"\"; a custom field appears once it has a value. It may also carry keys the system adds as it works (a payment, a signature, a calendar link), which are read-only and not listed. A workspace's custom fields (keys beginning custom_) appear alongside; the workspace description lists them. Fields the caller may not see are left out. A value saved before a field's rules or choices changed is kept as it was until the record is next edited, so what is read can fall outside what may be written.","properties":{"country":{"$ref":"#/components/schemas/Country","title":"Country","description":"The country this record is in. It decides which tax fields you see. Defaults to the workspace's own country."},"state":{"type":["string","null"],"title":"State / province","description":"The state, province or region, for example Texas or Ontario."},"name":{"type":["string","null"],"title":"Invoice reference","description":"The invoice number. It is filled in for you when you save. Leave it out and the next number in the workspace's sequence is given (Settings › Document numbering). A number another invoice already carries is refused with 409 number_taken."},"value":{"anyOf":[{"type":"number","minimum":0},{"type":"string","enum":[""]},{"type":"null"}],"title":"Invoice amount","description":"Worked out for you by adding up the lines. Worked out from the document's line items once it has some; then a value sent is ignored and listed in rejectedFields. Defaults to 0."},"status":{"type":["string","null"],"enum":["","Draft","Pending","Partly paid","Paid","Overdue","Void",null],"title":"Payment status","description":"Changes by itself when you record payments. Defaults to \"Draft\"."},"amountPaid":{"anyOf":[{"type":"number","minimum":0},{"type":"string","enum":[""]},{"type":"null"}],"title":"Amount received","description":"Filled in when you record a payment. What has been received, from the invoice's payments. Sent with a new invoice it records an opening payment; on an update it is ignored. Defaults to 0."},"paidAt":{"type":["string","null"],"format":"date","title":"Settled on","description":"Filled in on the day the invoice is fully paid. The day the invoice was settled in full, from its payments. On a new invoice with amountPaid it dates the opening payment; on an update it is ignored."},"company":{"type":["string","null"],"title":"Company / account","description":"The company this record belongs to. Choose one you have already added under Companies. Names a company by its name, as the app offers them to pick; it is not an id. The id of the company it means is in `companyId`."},"billingContact":{"type":["string","null"],"title":"Billing contact","description":"The person who receives the document and pays it. Names a contact by its name, as the app offers them to pick; it is not an id. The id of the contact it means is in `billingContactId`."},"billingEmail":{"type":["string","null"],"format":"email","pattern":"^(?:\\s*[^\\s@]+@[^\\s@]+\\.[^\\s@]+\\s*)?$","title":"Billing email","description":"The email address the invoice is sent to."},"relatedQuote":{"type":["string","null"],"title":"Raised from quote","description":"The quote this invoice was raised from. Filled in for you when it is raised from one. Names a quote by its name, as the app offers them to pick; it is not an id. Kept by the system: a value sent is ignored and listed in rejectedFields.","readOnly":true},"relatedSalesOrder":{"type":["string","null"],"title":"Raised from sales order","description":"The sales order this invoice was raised from. Filled in for you when it is raised from one. Names a sales order by its name, as the app offers them to pick; it is not an id. Kept by the system: a value sent is ignored and listed in rejectedFields.","readOnly":true},"issueDate":{"type":["string","null"],"format":"date","title":"Issue date","description":"The date printed on the document. Usually today. Defaults to the day the record is created."},"date":{"type":["string","null"],"format":"date","title":"Due date","description":"The last day to pay. It comes from the payment terms, but you can change it. Defaults to 30 days after the day the record is created."},"supplyDate":{"type":["string","null"],"format":"date","title":"Supply date","description":"When the goods or services were supplied. Empty uses the issue date."},"currency":{"$ref":"#/components/schemas/Currency","title":"Record currency","description":"The currency for the amounts on this record, for example USD or EUR. Defaults to the workspace's own currency."},"priceBook":{"type":["string","null"],"title":"Price book","description":"The price list this document is priced from. A product added to its lines takes that list's price. Names a price book by its name, as the app offers them to pick; it is not an id."},"poNumber":{"type":["string","null"],"title":"Customer PO number","description":"The purchase order number the customer gave you, if they use one. It prints on the invoice so their team can match it."},"paymentTerms":{"type":["string","null"],"examples":["Due on receipt","Net 15","Net 30","Net 45","Net 60","50% advance, balance on delivery","100% advance"],"title":"Payment terms","description":"How long there is to pay. For example, Net 30 means payment is due 30 days after the invoice date. Usually Due on receipt, Net 15, Net 30, Net 45, Net 60, 50% advance, balance on delivery or 100% advance; any other text is accepted too."},"street":{"type":["string","null"],"title":"Street address","description":"The street address, for example 221 Main Street, Suite 4."},"buildingNumber":{"type":["string","null"],"title":"Building number","description":"From the customer's national address. ZATCA asks for it on a tax invoice. Used on records in Saudi Arabia, where it must match `^(?:[0-9]{4})$`."},"district":{"type":["string","null"],"title":"District","description":"Used on records in Saudi Arabia."},"city":{"type":["string","null"],"title":"City","description":"The city, for example Austin or Leeds."},"postalCode":{"type":["string","null"],"title":"ZIP / postal code","description":"The ZIP or postal code, for example 78701."},"taxStatus":{"type":["string","null"],"enum":["","Not registered","Registered","Exempt","Unknown",null],"title":"Tax registration status","description":"Whether this business is registered for tax, such as GST or VAT. Choose Unknown if you are not sure. Defaults to \"Not registered\"."},"legalName":{"type":["string","null"],"title":"Registered legal name","description":"The official name on the business's registration papers, for example Acme Holdings LLC. It can differ from the name people use."},"gstin":{"type":["string","null"],"title":"GSTIN","description":"India only. Their 15-character GST number. It prints on invoices. We check that it looks right, but we do not check it with the GST office. Used on records in India, where it must match `^(?:[0-9]{2}[A-Z]{5}[0-9]{4}[A-Z][1-9A-Z]Z[0-9A-Z])$`."},"pan":{"type":["string","null"],"title":"PAN","description":"India only. The 10-character PAN (Permanent Account Number) of the business. Used on records in India, where it must match `^(?:[A-Z]{5}[0-9]{4}[A-Z])$`."},"cin":{"type":["string","null"],"title":"CIN / LLPIN","description":"India only. The company's registration number (CIN), or the LLPIN for a limited liability partnership. Used on records in India."},"gstType":{"type":["string","null"],"enum":["","Regular","Composition","SEZ","Unregistered",null],"title":"GST registration type","description":"India only. The kind of GST registration they have. Most businesses are Regular. Used on records in India."},"gstStateCode":{"type":["string","null"],"title":"GST state code","description":"India only. The two-digit state code. It is also the first two digits of the GSTIN. Used on records in India, where it must match `^(?:[0-9]{2})$`."},"reverseCharge":{"type":["string","null"],"enum":["","No","Yes",null],"title":"Tax payable on reverse charge","description":"India only. Choose Yes if the customer, not you, pays the GST on this sale. The invoice always shows this, because the law asks for it. Used on records in India. Defaults to \"No\"."},"placeOfSupply":{"type":["string","null"],"title":"Place of supply","description":"India only. The state the goods or services go to. Leave it empty when it is the customer's state. Used on records in India."},"trn":{"type":["string","null"],"title":"VAT TRN","description":"UAE only. The 15-digit VAT registration number (TRN). We check the format only. Used on records in United Arab Emirates, where it must match `^(?:[0-9]{15})$`."},"emirate":{"type":["string","null"],"enum":["","Abu Dhabi","Dubai","Sharjah","Ajman","Umm Al Quwain","Ras Al Khaimah","Fujairah",null],"title":"Emirate","description":"UAE only. The emirate where the business is registered. Used on records in United Arab Emirates."},"vatNumber":{"type":["string","null"],"title":"VAT / tax registration number","description":"The business's VAT or tax registration number. It prints on invoices. Used on records in United Kingdom, Saudi Arabia, Bahrain, Oman, Switzerland, Norway, South Africa, Austria, Belgium, Bulgaria, Croatia, Cyprus, Czechia, Denmark, Estonia, Finland, France, Germany, Greece, Hungary, Ireland, Italy, Latvia, Lithuania, Luxembourg, Malta, Netherlands, Poland, Portugal, Romania, Slovakia, Slovenia, Spain, Sweden or Other."},"ein":{"type":["string","null"],"title":"EIN / federal tax ID","description":"United States only. The 9-digit Employer Identification Number from the IRS, for example 12-3456789. Used on records in United States."},"uen":{"type":["string","null"],"title":"UEN / GST registration","description":"Singapore only. The Unique Entity Number. Add the GST number too if they are registered for GST. Used on records in Singapore."},"abn":{"type":["string","null"],"title":"ABN / GST registration","description":"Australia only. The 11-digit Australian Business Number. Used on records in Australia."},"businessNumber":{"type":["string","null"],"title":"Business number / GST-HST","description":"Canada only. The 9-digit Business Number, with the GST/HST account if they have one. Used on records in Canada."},"taxExempt":{"type":["boolean","null"],"title":"Tax-exempt customer","description":"Tick this if the customer does not pay tax, for example a charity with an exemption certificate."},"exportTax":{"type":["string","null"],"enum":["","Under LUT, without IGST","With IGST paid",null],"title":"Export / SEZ supply","description":"India only. Under your LUT for the year, no IGST is charged. With IGST paid, it is charged and you claim it back. Empty uses your LUT when there is one for the year. Used only while GST registration type is SEZ, or while the country is not India."},"chargeTaxAbroad":{"type":["boolean","null"],"title":"Charge tax as at home","description":"A sale to a customer in another country carries no tax: it is an export, or a business customer in another EU country accounts for the VAT. Tick this when it is taxed here all the same: a course or event held here, or a service used here. Used only while the country is not the workspace's own."},"transportMode":{"type":["string","null"],"enum":["","Road","Rail","Air","Ship",null],"title":"Transport mode","description":"India only. How the goods travel, for the e-way bill. Leave it empty and name the transporter if they will add the vehicle themselves. Used on records in India."},"transportDistance":{"anyOf":[{"type":"number","minimum":0,"maximum":4000},{"type":"string","enum":[""]},{"type":"null"}],"title":"Distance (km)","description":"From where the goods leave to where they go. 0 lets the e-way bill portal work it out from the two PIN codes. Used on records in India."},"vehicleNumber":{"type":["string","null"],"title":"Vehicle number","description":"Used on records in India."},"vehicleType":{"type":["string","null"],"enum":["","Regular","Over-dimensional cargo",null],"title":"Vehicle type","description":"Over-dimensional cargo is a load too large for a regular vehicle; its e-way bill runs a day for every 20 km rather than 200. Used on records in India."},"transporterName":{"type":["string","null"],"title":"Transporter","description":"Used on records in India."},"transporterId":{"type":["string","null"],"title":"Transporter ID","description":"The transporter's 15-character GSTIN, or the TRANSIN the e-way bill portal gave them. Enough on its own for Part A: they add the vehicle. Used on records in India, where it must match `^(?:[0-9]{2}[0-9A-Z]{13})$`."},"transportDocNumber":{"type":["string","null"],"title":"Transport document no.","description":"The LR, RR, airway bill or bill of lading number. Needed when the goods go by rail, air or ship. Used on records in India."},"transportDocDate":{"type":["string","null"],"format":"date","title":"Transport document date","description":"Used on records in India."},"shippingstreet":{"type":["string","null"],"title":"Ship-to street","description":"The street address for deliveries, if it is not the main address. Used on records in India."},"shippingcity":{"type":["string","null"],"title":"Ship-to city","description":"The city for deliveries. Used on records in India."},"shippingstate":{"type":["string","null"],"title":"Ship-to state / province","description":"The state, province or region for deliveries. Used on records in India."},"shippingpostalCode":{"type":["string","null"],"title":"Ship-to ZIP / postal code","description":"The ZIP or postal code for deliveries. Used on records in India."},"dispatchstreet":{"type":["string","null"],"title":"Dispatch-from street","description":"Where the goods leave from, if not your registered address — a warehouse or a factory. For the e-way bill. Used on records in India."},"dispatchcity":{"type":["string","null"],"title":"Dispatch-from city","description":"The city the goods leave from. Used on records in India."},"dispatchstate":{"type":["string","null"],"title":"Dispatch-from state / province","description":"The state the goods leave from. Used on records in India."},"dispatchpostalCode":{"type":["string","null"],"title":"Dispatch-from ZIP / postal code","description":"The PIN code the goods leave from. Used on records in India."},"bankName":{"type":["string","null"],"title":"Bank name","description":"The name of your bank. It prints on the invoice, so the customer knows where to pay."},"bankAccountName":{"type":["string","null"],"title":"Account holder name","description":"The name on your bank account."},"bankAccount":{"type":["string","null"],"title":"Account number","description":"Your bank account number."},"iban":{"type":["string","null"],"title":"IBAN","description":"Your bank account number for international payments (IBAN). We check the format, not the account."},"ifsc":{"type":["string","null"],"pattern":"^(?:[A-Z]{4}0[A-Z0-9]{6})?$","title":"IFSC code","description":"India only. The 11-character IFSC code of your bank branch."},"routingNumber":{"type":["string","null"],"pattern":"^(?:[0-9]{9})?$","title":"ABA routing number","description":"United States only. Your bank's 9-digit routing number."},"sortCode":{"type":["string","null"],"pattern":"^(?:[0-9]{2}-?[0-9]{2}-?[0-9]{2})?$","title":"Sort code","description":"United Kingdom only. Your bank's 6-digit sort code, for example 12-34-56."},"transitNumber":{"type":["string","null"],"title":"Transit & institution number","description":"Canada only. Your bank's transit and institution numbers."},"bsb":{"type":["string","null"],"pattern":"^(?:[0-9]{3}-?[0-9]{3})?$","title":"BSB number","description":"Australia only. Your bank's 6-digit BSB number."},"swiftBic":{"type":["string","null"],"pattern":"^(?:[A-Z]{6}[A-Z0-9]{2}([A-Z0-9]{3})?)?$","title":"SWIFT / BIC","description":"Your bank's SWIFT or BIC code. Customers in other countries need it to pay you."},"bankBranch":{"type":["string","null"],"title":"Branch","description":"The bank branch that holds your account."},"terms":{"type":["string","null"],"title":"Terms & conditions","description":"The rules of the sale, for example delivery and refunds. They print at the bottom of the document."},"customerNotes":{"type":["string","null"],"title":"Notes to customer","description":"A short message printed on the invoice, for example Thank you for your business."},"companyId":{"type":["string","null"],"title":"Company / account (record id)","description":"The id of the company named in “Company / account”: set when one is picked from the list, and by the server when the name matches exactly one company. Send it to point at one record when names repeat; a name sent without it is matched to the record when exactly one has that name. Refused (422) when it is not a live record of that kind in this workspace; an id alone fills in the name."},"billingContactId":{"type":["string","null"],"title":"Billing contact (record id)","description":"The id of the contact named in “Billing contact”: set when one is picked from the list, and by the server when the name matches exactly one contact. Send it to point at one record when names repeat; a name sent without it is matched to the record when exactly one has that name. Refused (422) when it is not a live record of that kind in this workspace; an id alone fills in the name."}}},"InvoiceUpdate":{"type":"object","title":"Invoice changes","description":"Only the fields to change. A key the object does not have is refused (422 unknown_field); one the system keeps is ignored and listed in rejectedFields. A custom field the workspace has archived is accepted and ignored.","allOf":[{"$ref":"#/components/schemas/InvoiceFields"}],"properties":{"ownerId":{"type":"string","minLength":1,"description":"Who owns the record: the id of an active person in this workspace. Left out of a create, the record belongs to whoever made it — and a record an API key makes belongs to the person who created the key (failing that, the workspace's owner), so it is not hidden from everyone without View All. Left out of an update, the owner stays as it is."}},"patternProperties":{"^custom_\\w{1,80}$":{"description":"A custom field the workspace added. GET /api/v1/schema/{object} lists them, and the workspace description types them."}},"unevaluatedProperties":false},"InvoiceCreate":{"type":"object","title":"New invoice","description":"The fields of a new invoice; anything left out takes its default. Unknown keys are refused as on an update.","allOf":[{"$ref":"#/components/schemas/InvoiceFields"}],"properties":{"ownerId":{"type":"string","minLength":1,"description":"Who owns the record: the id of an active person in this workspace. Left out of a create, the record belongs to whoever made it — and a record an API key makes belongs to the person who created the key (failing that, the workspace's owner), so it is not hidden from everyone without View All. Left out of an update, the owner stays as it is."}},"patternProperties":{"^custom_\\w{1,80}$":{"description":"A custom field the workspace added. GET /api/v1/schema/{object} lists them, and the workspace description types them."}},"unevaluatedProperties":false},"Invoice":{"type":"object","title":"Invoice","allOf":[{"$ref":"#/components/schemas/RecordEnvelope"}],"properties":{"object":{"type":"string","const":"invoice"},"data":{"$ref":"#/components/schemas/InvoiceFields"}},"required":["object","data"]},"InvoicePage":{"type":"object","title":"A page of invoices","required":["data","nextCursor"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Invoice"}},"nextCursor":{"type":["string","null"],"description":"Send back as cursor, with the same sort, for the next page; null when this was the last."}}},"InvoiceDetail":{"type":"object","title":"One invoice, with what hangs off it","required":["data","lineItems","activities","fieldHistory"],"properties":{"data":{"$ref":"#/components/schemas/Invoice"},"lineItems":{"type":"array","items":{"$ref":"#/components/schemas/LineItem"},"description":"The document's lines, in order. They are written in the app; an API key cannot change them."},"activities":{"type":"array","items":{"$ref":"#/components/schemas/Activity"},"description":"The timeline, newest first, at most 100."},"fieldHistory":{"type":"array","items":{"$ref":"#/components/schemas/FieldChange"},"description":"Value changes, newest first, at most 100 — without the fields the caller may not see."}}},"InvoiceSaved":{"type":"object","title":"The invoice, as saved","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Invoice"},"rejectedFields":{"type":"array","items":{"type":"string"},"description":"Fields that were sent but not written: kept by the system, worked out from the lines, or not the caller's to change."},"possibleDuplicates":{"type":"array","items":{"$ref":"#/components/schemas/PossibleDuplicate"},"description":"On a create: records the workspace's duplicate rules matched, where the rule warns rather than blocks."}}},"InvoiceBulkUpdate":{"type":"object","title":"The same change to many invoices","required":["ids","patch"],"properties":{"ids":{"type":"array","items":{"type":"string","minLength":1},"minItems":1,"maxItems":500},"patch":{"$ref":"#/components/schemas/InvoiceUpdate"}}},"InvoiceMerge":{"type":"object","title":"Merge two invoices","required":["keepId","mergeId"],"properties":{"keepId":{"type":"string","minLength":1,"description":"The record that survives."},"mergeId":{"type":"string","minLength":1,"description":"The record folded into it, then moved to the recycle bin."},"fields":{"type":"object","description":"Which side each field's value comes from. A field left out keeps the survivor's value, or takes the other's where the survivor's is empty.","propertyNames":{"anyOf":[{"enum":["country","state","name","value","status","amountPaid","paidAt","company","billingContact","billingEmail","relatedQuote","relatedSalesOrder","issueDate","date","supplyDate","currency","priceBook","poNumber","paymentTerms","street","buildingNumber","district","city","postalCode","taxStatus","legalName","gstin","pan","cin","gstType","gstStateCode","reverseCharge","placeOfSupply","trn","emirate","vatNumber","ein","uen","abn","businessNumber","taxExempt","exportTax","chargeTaxAbroad","transportMode","transportDistance","vehicleNumber","vehicleType","transporterName","transporterId","transportDocNumber","transportDocDate","shippingstreet","shippingcity","shippingstate","shippingpostalCode","dispatchstreet","dispatchcity","dispatchstate","dispatchpostalCode","bankName","bankAccountName","bankAccount","iban","ifsc","routingNumber","sortCode","transitNumber","bsb","swiftBic","bankBranch","terms","customerNotes","companyId","billingContactId"]},{"pattern":"^custom_\\w{1,80}$"}]},"additionalProperties":{"type":"string","enum":["keep","merge"]}},"ownerId":{"type":"string","minLength":1,"description":"Who owns the merged record. Left out, the survivor's owner."}}},"InvoiceEvent":{"type":"object","title":"An invoice event","allOf":[{"$ref":"#/components/schemas/WebhookEvent"}],"properties":{"event":{"type":"string","enum":["invoice.created","invoice.updated","invoice.paid","invoice.payment_received","invoice.payment_removed","invoice.payment_link_created"]},"data":{"allOf":[{"$ref":"#/components/schemas/EventRecord"},{"$ref":"#/components/schemas/InvoiceFields"}],"description":"The invoice with its field values beside id, object and name — not masked by any profile's field permissions."}}},"CreditNoteFields":{"type":"object","title":"Credit note fields","description":"A credit note's values, by field key. A record made here carries every standard field, an empty one as \"\"; a custom field appears once it has a value. It may also carry keys the system adds as it works (a payment, a signature, a calendar link), which are read-only and not listed. A workspace's custom fields (keys beginning custom_) appear alongside; the workspace description lists them. Fields the caller may not see are left out. A value saved before a field's rules or choices changed is kept as it was until the record is next edited, so what is read can fall outside what may be written.","properties":{"name":{"type":["string","null"],"title":"Credit note number","description":"The credit note number. It is filled in for you when you save. Leave it out and the next number in the workspace's sequence is given (Settings › Document numbering). A number another credit note already carries is refused with 409 number_taken."},"againstInvoice":{"type":["string","null"],"title":"Against invoice","description":"The invoice this credit note corrects. Every credit note must point to an invoice. Required. Names an invoice by its name, as the app offers them to pick; it is not an id."},"company":{"type":["string","null"],"title":"Company / account","description":"The company this record belongs to. Choose one you have already added under Companies. Names a company by its name, as the app offers them to pick; it is not an id. The id of the company it means is in `companyId`."},"billingContact":{"type":["string","null"],"title":"Billing contact","description":"The person who receives the document and pays it. Names a contact by its name, as the app offers them to pick; it is not an id. The id of the contact it means is in `billingContactId`."},"billingEmail":{"type":["string","null"],"format":"email","pattern":"^(?:\\s*[^\\s@]+@[^\\s@]+\\.[^\\s@]+\\s*)?$","title":"Billing email","description":"The email address the invoice is sent to."},"value":{"anyOf":[{"type":"number","minimum":0},{"type":"string","enum":[""]},{"type":"null"}],"title":"Credit amount","description":"How much you are taking off what the customer owes, or giving back. Required. Worked out from the document's line items once it has some; then a value sent is ignored and listed in rejectedFields."},"currency":{"$ref":"#/components/schemas/Currency","title":"Record currency","description":"The currency for the amounts on this record, for example USD or EUR. Defaults to the workspace's own currency."},"issueDate":{"type":["string","null"],"format":"date","title":"Issue date","description":"The date printed on the document. Usually today."},"reason":{"type":["string","null"],"enum":["","Goods returned","Service not delivered","Price correction","Post-sale discount","Tax correction","Cancelled order","Other",null],"title":"Reason","description":"Why you are giving this credit. Tax returns, like GST returns, ask for the reason. Defaults to \"Price correction\"."},"status":{"type":["string","null"],"enum":["","Draft","Issued","Applied","Cancelled",null],"title":"Status","description":"Where the credit note is. Applied means it has been used against an invoice. Defaults to \"Draft\"."},"owner":{"type":["string","null"],"title":"Record owner","description":"The person in your team who looks after this record. It shows in their lists, and they get its reminders. A person in this workspace, by name. Who owns the record is set with ownerId."},"country":{"$ref":"#/components/schemas/Country","title":"Country","description":"The country this record is in. It decides which tax fields you see. Defaults to the workspace's own country."},"description":{"type":["string","null"],"title":"Description / notes","description":"Anything else worth knowing. Only people in your workspace can see it."},"tags":{"type":["string","null"],"title":"Tags","description":"Short words that help you group and find records, for example VIP or Trade show. Separate them with commas."},"companyId":{"type":["string","null"],"title":"Company / account (record id)","description":"The id of the company named in “Company / account”: set when one is picked from the list, and by the server when the name matches exactly one company. Send it to point at one record when names repeat; a name sent without it is matched to the record when exactly one has that name. Refused (422) when it is not a live record of that kind in this workspace; an id alone fills in the name."},"billingContactId":{"type":["string","null"],"title":"Billing contact (record id)","description":"The id of the contact named in “Billing contact”: set when one is picked from the list, and by the server when the name matches exactly one contact. Send it to point at one record when names repeat; a name sent without it is matched to the record when exactly one has that name. Refused (422) when it is not a live record of that kind in this workspace; an id alone fills in the name."}}},"CreditNoteUpdate":{"type":"object","title":"Credit note changes","description":"Only the fields to change. A key the object does not have is refused (422 unknown_field); one the system keeps is ignored and listed in rejectedFields. A custom field the workspace has archived is accepted and ignored.","allOf":[{"$ref":"#/components/schemas/CreditNoteFields"}],"properties":{"ownerId":{"type":"string","minLength":1,"description":"Who owns the record: the id of an active person in this workspace. Left out of a create, the record belongs to whoever made it — and a record an API key makes belongs to the person who created the key (failing that, the workspace's owner), so it is not hidden from everyone without View All. Left out of an update, the owner stays as it is."}},"patternProperties":{"^custom_\\w{1,80}$":{"description":"A custom field the workspace added. GET /api/v1/schema/{object} lists them, and the workspace description types them."}},"unevaluatedProperties":false},"CreditNoteCreate":{"type":"object","title":"New credit note","description":"The fields of a new credit note. `againstInvoice` and `value` are required; the rest take their defaults. Unknown keys are refused as on an update.","allOf":[{"$ref":"#/components/schemas/CreditNoteFields"}],"properties":{"ownerId":{"type":"string","minLength":1,"description":"Who owns the record: the id of an active person in this workspace. Left out of a create, the record belongs to whoever made it — and a record an API key makes belongs to the person who created the key (failing that, the workspace's owner), so it is not hidden from everyone without View All. Left out of an update, the owner stays as it is."}},"patternProperties":{"^custom_\\w{1,80}$":{"description":"A custom field the workspace added. GET /api/v1/schema/{object} lists them, and the workspace description types them."}},"unevaluatedProperties":false,"required":["againstInvoice","value"]},"CreditNote":{"type":"object","title":"Credit note","allOf":[{"$ref":"#/components/schemas/RecordEnvelope"}],"properties":{"object":{"type":"string","const":"creditnote"},"data":{"$ref":"#/components/schemas/CreditNoteFields"}},"required":["object","data"]},"CreditNotePage":{"type":"object","title":"A page of credit notes","required":["data","nextCursor"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/CreditNote"}},"nextCursor":{"type":["string","null"],"description":"Send back as cursor, with the same sort, for the next page; null when this was the last."}}},"CreditNoteDetail":{"type":"object","title":"One credit note, with what hangs off it","required":["data","lineItems","activities","fieldHistory"],"properties":{"data":{"$ref":"#/components/schemas/CreditNote"},"lineItems":{"type":"array","items":{"$ref":"#/components/schemas/LineItem"},"description":"The document's lines, in order. They are written in the app; an API key cannot change them."},"activities":{"type":"array","items":{"$ref":"#/components/schemas/Activity"},"description":"The timeline, newest first, at most 100."},"fieldHistory":{"type":"array","items":{"$ref":"#/components/schemas/FieldChange"},"description":"Value changes, newest first, at most 100 — without the fields the caller may not see."}}},"CreditNoteSaved":{"type":"object","title":"The credit note, as saved","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/CreditNote"},"rejectedFields":{"type":"array","items":{"type":"string"},"description":"Fields that were sent but not written: kept by the system, worked out from the lines, or not the caller's to change."},"possibleDuplicates":{"type":"array","items":{"$ref":"#/components/schemas/PossibleDuplicate"},"description":"On a create: records the workspace's duplicate rules matched, where the rule warns rather than blocks."}}},"CreditNoteBulkUpdate":{"type":"object","title":"The same change to many credit notes","required":["ids","patch"],"properties":{"ids":{"type":"array","items":{"type":"string","minLength":1},"minItems":1,"maxItems":500},"patch":{"$ref":"#/components/schemas/CreditNoteUpdate"}}},"CreditNoteMerge":{"type":"object","title":"Merge two credit notes","required":["keepId","mergeId"],"properties":{"keepId":{"type":"string","minLength":1,"description":"The record that survives."},"mergeId":{"type":"string","minLength":1,"description":"The record folded into it, then moved to the recycle bin."},"fields":{"type":"object","description":"Which side each field's value comes from. A field left out keeps the survivor's value, or takes the other's where the survivor's is empty.","propertyNames":{"anyOf":[{"enum":["name","againstInvoice","company","billingContact","billingEmail","value","currency","issueDate","reason","status","owner","country","description","tags","companyId","billingContactId"]},{"pattern":"^custom_\\w{1,80}$"}]},"additionalProperties":{"type":"string","enum":["keep","merge"]}},"ownerId":{"type":"string","minLength":1,"description":"Who owns the merged record. Left out, the survivor's owner."}}},"CreditNoteEvent":{"type":"object","title":"A credit note event","allOf":[{"$ref":"#/components/schemas/WebhookEvent"}],"properties":{"event":{"type":"string","enum":["creditnote.created","creditnote.updated"]},"data":{"allOf":[{"$ref":"#/components/schemas/EventRecord"},{"$ref":"#/components/schemas/CreditNoteFields"}],"description":"The credit note with its field values beside id, object and name — not masked by any profile's field permissions."}}},"RecurringInvoiceFields":{"type":"object","title":"Recurring invoice fields","description":"A recurring invoice's values, by field key. A record made here carries every standard field, an empty one as \"\"; a custom field appears once it has a value. It may also carry keys the system adds as it works (a payment, a signature, a calendar link), which are read-only and not listed. A workspace's custom fields (keys beginning custom_) appear alongside; the workspace description lists them. Fields the caller may not see are left out. A value saved before a field's rules or choices changed is kept as it was until the record is next edited, so what is read can fall outside what may be written.","properties":{"country":{"$ref":"#/components/schemas/Country","title":"Country","description":"The country this record is in. It decides which tax fields you see. Defaults to the workspace's own country."},"state":{"type":["string","null"],"title":"State / province","description":"The state, province or region, for example Texas or Ontario."},"name":{"type":["string","null"],"title":"Profile name","description":"A name for this repeating invoice, for example Acme Inc. – monthly support. Required."},"company":{"type":["string","null"],"title":"Company / account","description":"The company this record belongs to. Choose one you have already added under Companies. Names a company by its name, as the app offers them to pick; it is not an id. The id of the company it means is in `companyId`."},"billingContact":{"type":["string","null"],"title":"Billing contact","description":"The person who receives the document and pays it. Names a contact by its name, as the app offers them to pick; it is not an id. The id of the contact it means is in `billingContactId`."},"billingEmail":{"type":["string","null"],"format":"email","pattern":"^(?:\\s*[^\\s@]+@[^\\s@]+\\.[^\\s@]+\\s*)?$","title":"Billing email","description":"The email address the invoice is sent to."},"status":{"type":["string","null"],"enum":["","Draft","Active","Paused","Ended",null],"title":"Profile status","description":"Active makes invoices on schedule. Paused stops them until you start again. Defaults to \"Draft\"."},"frequency":{"type":["string","null"],"enum":["","Weekly","Fortnightly","Monthly","Quarterly","Half-yearly","Yearly",null],"title":"Repeats","description":"How often a new invoice is made. Defaults to \"Monthly\"."},"interval":{"anyOf":[{"type":"number","minimum":1,"maximum":12},{"type":"string","enum":[""]},{"type":"null"}],"title":"Every N periods","description":"How many periods between invoices. For example, Monthly with 3 here sends an invoice every three months. Defaults to 1."},"startDate":{"type":["string","null"],"format":"date","title":"First invoice date","description":"The date of the first invoice. Defaults to the day the record is created."},"endCondition":{"type":["string","null"],"enum":["","Never","On a date","After a number of invoices",null],"title":"Ends","description":"When to stop: never, on a date, or after a number of invoices. Defaults to \"Never\"."},"endDate":{"type":["string","null"],"format":"date","title":"End date","description":"The date to stop making invoices, if you chose to end on a date."},"occurrences":{"anyOf":[{"type":"number","minimum":1},{"type":"string","enum":[""]},{"type":"null"}],"title":"Number of invoices","description":"How many invoices to make in total, if you chose to stop after a number."},"nextRunAt":{"type":["string","null"],"format":"date","title":"Next invoice due to generate","description":"Filled in for you. If a date is missed while the system is busy, the invoice is made later. It is never skipped. Kept by the system: a value sent is ignored and listed in rejectedFields.","readOnly":true},"generatedCount":{"anyOf":[{"type":"number","minimum":0},{"type":"string","enum":[""]},{"type":"null"}],"title":"Invoices generated so far","description":"How many invoices have been made so far. Filled in for you. Kept by the system: a value sent is ignored and listed in rejectedFields. Defaults to 0.","readOnly":true},"value":{"anyOf":[{"type":"number","minimum":0},{"type":"string","enum":[""]},{"type":"null"}],"title":"Amount per invoice","description":"The amount on each invoice. Required. Worked out from the document's line items once it has some; then a value sent is ignored and listed in rejectedFields."},"currency":{"$ref":"#/components/schemas/Currency","title":"Record currency","description":"The currency for the amounts on this record, for example USD or EUR. Defaults to the workspace's own currency."},"paymentTerms":{"type":["string","null"],"examples":["Due on receipt","Net 15","Net 30","Net 45","Net 60","50% advance, balance on delivery","100% advance"],"title":"Payment terms","description":"How long there is to pay. For example, Net 30 means payment is due 30 days after the invoice date. Defaults to \"Net 30\". Usually Due on receipt, Net 15, Net 30, Net 45, Net 60, 50% advance, balance on delivery or 100% advance; any other text is accepted too."},"poNumber":{"type":["string","null"],"title":"Customer PO number","description":"The purchase order number the customer gave you, if they use one. It prints on the invoice so their team can match it."},"autoSend":{"type":["boolean","null"],"title":"Email the invoice automatically","description":"Tick this to email each new invoice to the customer as soon as it is made. Defaults to true."},"autoCharge":{"type":["boolean","null"],"title":"Charge the saved payment method","description":"Not in use: no saved card or mandate is held, so nothing is charged automatically. Invoices go out to be paid by link or recorded when the money arrives."},"retryOnFailure":{"type":["boolean","null"],"title":"Retry a failed charge","description":"Not in use: nothing is charged automatically, so there is no charge to retry. Defaults to true."},"proration":{"type":["boolean","null"],"title":"Prorate the first invoice","description":"Not in use: a schedule starts on its first invoice date, so its first invoice covers a whole period."},"owner":{"type":["string","null"],"title":"Record owner","description":"The person in your team who looks after this record. It shows in their lists, and they get its reminders. A person in this workspace, by name. Who owns the record is set with ownerId."},"taxStatus":{"type":["string","null"],"enum":["","Not registered","Registered","Exempt","Unknown",null],"title":"Tax registration status","description":"Whether this business is registered for tax, such as GST or VAT. Choose Unknown if you are not sure. Defaults to \"Not registered\"."},"legalName":{"type":["string","null"],"title":"Registered legal name","description":"The official name on the business's registration papers, for example Acme Holdings LLC. It can differ from the name people use."},"gstin":{"type":["string","null"],"title":"GSTIN","description":"India only. Their 15-character GST number. It prints on invoices. We check that it looks right, but we do not check it with the GST office. Used on records in India, where it must match `^(?:[0-9]{2}[A-Z]{5}[0-9]{4}[A-Z][1-9A-Z]Z[0-9A-Z])$`."},"pan":{"type":["string","null"],"title":"PAN","description":"India only. The 10-character PAN (Permanent Account Number) of the business. Used on records in India, where it must match `^(?:[A-Z]{5}[0-9]{4}[A-Z])$`."},"cin":{"type":["string","null"],"title":"CIN / LLPIN","description":"India only. The company's registration number (CIN), or the LLPIN for a limited liability partnership. Used on records in India."},"gstType":{"type":["string","null"],"enum":["","Regular","Composition","SEZ","Unregistered",null],"title":"GST registration type","description":"India only. The kind of GST registration they have. Most businesses are Regular. Used on records in India."},"gstStateCode":{"type":["string","null"],"title":"GST state code","description":"India only. The two-digit state code. It is also the first two digits of the GSTIN. Used on records in India, where it must match `^(?:[0-9]{2})$`."},"reverseCharge":{"type":["string","null"],"enum":["","No","Yes",null],"title":"Tax payable on reverse charge","description":"India only. Choose Yes if the customer, not you, pays the GST on this sale. The invoice always shows this, because the law asks for it. Used on records in India. Defaults to \"No\"."},"placeOfSupply":{"type":["string","null"],"title":"Place of supply","description":"India only. The state the goods or services go to. Leave it empty when it is the customer's state. Used on records in India."},"trn":{"type":["string","null"],"title":"VAT TRN","description":"UAE only. The 15-digit VAT registration number (TRN). We check the format only. Used on records in United Arab Emirates, where it must match `^(?:[0-9]{15})$`."},"emirate":{"type":["string","null"],"enum":["","Abu Dhabi","Dubai","Sharjah","Ajman","Umm Al Quwain","Ras Al Khaimah","Fujairah",null],"title":"Emirate","description":"UAE only. The emirate where the business is registered. Used on records in United Arab Emirates."},"vatNumber":{"type":["string","null"],"title":"VAT / tax registration number","description":"The business's VAT or tax registration number. It prints on invoices. Used on records in United Kingdom, Saudi Arabia, Bahrain, Oman, Switzerland, Norway, South Africa, Austria, Belgium, Bulgaria, Croatia, Cyprus, Czechia, Denmark, Estonia, Finland, France, Germany, Greece, Hungary, Ireland, Italy, Latvia, Lithuania, Luxembourg, Malta, Netherlands, Poland, Portugal, Romania, Slovakia, Slovenia, Spain, Sweden or Other."},"ein":{"type":["string","null"],"title":"EIN / federal tax ID","description":"United States only. The 9-digit Employer Identification Number from the IRS, for example 12-3456789. Used on records in United States."},"uen":{"type":["string","null"],"title":"UEN / GST registration","description":"Singapore only. The Unique Entity Number. Add the GST number too if they are registered for GST. Used on records in Singapore."},"abn":{"type":["string","null"],"title":"ABN / GST registration","description":"Australia only. The 11-digit Australian Business Number. Used on records in Australia."},"businessNumber":{"type":["string","null"],"title":"Business number / GST-HST","description":"Canada only. The 9-digit Business Number, with the GST/HST account if they have one. Used on records in Canada."},"taxExempt":{"type":["boolean","null"],"title":"Tax-exempt customer","description":"Tick this if the customer does not pay tax, for example a charity with an exemption certificate."},"exportTax":{"type":["string","null"],"enum":["","Under LUT, without IGST","With IGST paid",null],"title":"Export / SEZ supply","description":"India only. Under your LUT for the year, no IGST is charged. With IGST paid, it is charged and you claim it back. Empty uses your LUT when there is one for the year. Used only while GST registration type is SEZ, or while the country is not India."},"chargeTaxAbroad":{"type":["boolean","null"],"title":"Charge tax as at home","description":"A sale to a customer in another country carries no tax: it is an export, or a business customer in another EU country accounts for the VAT. Tick this when it is taxed here all the same: a course or event held here, or a service used here. Used only while the country is not the workspace's own."},"lastInvoiceRef":{"type":["string","null"],"title":"Last invoice raised","description":"The number of the most recent invoice made. Filled in for you. Kept by the system: a value sent is ignored and listed in rejectedFields.","readOnly":true},"lastRunAt":{"type":["string","null"],"format":"date","title":"Last generated on","description":"The date the last invoice was made. Filled in for you. Kept by the system: a value sent is ignored and listed in rejectedFields.","readOnly":true},"description":{"type":["string","null"],"title":"Description / notes","description":"Anything else worth knowing. Only people in your workspace can see it."},"companyId":{"type":["string","null"],"title":"Company / account (record id)","description":"The id of the company named in “Company / account”: set when one is picked from the list, and by the server when the name matches exactly one company. Send it to point at one record when names repeat; a name sent without it is matched to the record when exactly one has that name. Refused (422) when it is not a live record of that kind in this workspace; an id alone fills in the name."},"billingContactId":{"type":["string","null"],"title":"Billing contact (record id)","description":"The id of the contact named in “Billing contact”: set when one is picked from the list, and by the server when the name matches exactly one contact. Send it to point at one record when names repeat; a name sent without it is matched to the record when exactly one has that name. Refused (422) when it is not a live record of that kind in this workspace; an id alone fills in the name."}}},"RecurringInvoiceUpdate":{"type":"object","title":"Recurring invoice changes","description":"Only the fields to change. A key the object does not have is refused (422 unknown_field); one the system keeps is ignored and listed in rejectedFields. A custom field the workspace has archived is accepted and ignored.","allOf":[{"$ref":"#/components/schemas/RecurringInvoiceFields"}],"properties":{"ownerId":{"type":"string","minLength":1,"description":"Who owns the record: the id of an active person in this workspace. Left out of a create, the record belongs to whoever made it — and a record an API key makes belongs to the person who created the key (failing that, the workspace's owner), so it is not hidden from everyone without View All. Left out of an update, the owner stays as it is."}},"patternProperties":{"^custom_\\w{1,80}$":{"description":"A custom field the workspace added. GET /api/v1/schema/{object} lists them, and the workspace description types them."}},"unevaluatedProperties":false},"RecurringInvoiceCreate":{"type":"object","title":"New recurring invoice","description":"The fields of a new recurring invoice. `name` and `value` are required; the rest take their defaults. Unknown keys are refused as on an update.","allOf":[{"$ref":"#/components/schemas/RecurringInvoiceFields"}],"properties":{"ownerId":{"type":"string","minLength":1,"description":"Who owns the record: the id of an active person in this workspace. Left out of a create, the record belongs to whoever made it — and a record an API key makes belongs to the person who created the key (failing that, the workspace's owner), so it is not hidden from everyone without View All. Left out of an update, the owner stays as it is."}},"patternProperties":{"^custom_\\w{1,80}$":{"description":"A custom field the workspace added. GET /api/v1/schema/{object} lists them, and the workspace description types them."}},"unevaluatedProperties":false,"required":["name","value"]},"RecurringInvoice":{"type":"object","title":"Recurring invoice","allOf":[{"$ref":"#/components/schemas/RecordEnvelope"}],"properties":{"object":{"type":"string","const":"recurring"},"data":{"$ref":"#/components/schemas/RecurringInvoiceFields"}},"required":["object","data"]},"RecurringInvoicePage":{"type":"object","title":"A page of recurring invoices","required":["data","nextCursor"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/RecurringInvoice"}},"nextCursor":{"type":["string","null"],"description":"Send back as cursor, with the same sort, for the next page; null when this was the last."}}},"RecurringInvoiceDetail":{"type":"object","title":"One recurring invoice, with what hangs off it","required":["data","lineItems","activities","fieldHistory"],"properties":{"data":{"$ref":"#/components/schemas/RecurringInvoice"},"lineItems":{"type":"array","items":{"$ref":"#/components/schemas/LineItem"},"description":"The document's lines, in order. They are written in the app; an API key cannot change them."},"activities":{"type":"array","items":{"$ref":"#/components/schemas/Activity"},"description":"The timeline, newest first, at most 100."},"fieldHistory":{"type":"array","items":{"$ref":"#/components/schemas/FieldChange"},"description":"Value changes, newest first, at most 100 — without the fields the caller may not see."}}},"RecurringInvoiceSaved":{"type":"object","title":"The recurring invoice, as saved","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/RecurringInvoice"},"rejectedFields":{"type":"array","items":{"type":"string"},"description":"Fields that were sent but not written: kept by the system, worked out from the lines, or not the caller's to change."},"possibleDuplicates":{"type":"array","items":{"$ref":"#/components/schemas/PossibleDuplicate"},"description":"On a create: records the workspace's duplicate rules matched, where the rule warns rather than blocks."}}},"RecurringInvoiceBulkUpdate":{"type":"object","title":"The same change to many recurring invoices","required":["ids","patch"],"properties":{"ids":{"type":"array","items":{"type":"string","minLength":1},"minItems":1,"maxItems":500},"patch":{"$ref":"#/components/schemas/RecurringInvoiceUpdate"}}},"RecurringInvoiceMerge":{"type":"object","title":"Merge two recurring invoices","required":["keepId","mergeId"],"properties":{"keepId":{"type":"string","minLength":1,"description":"The record that survives."},"mergeId":{"type":"string","minLength":1,"description":"The record folded into it, then moved to the recycle bin."},"fields":{"type":"object","description":"Which side each field's value comes from. A field left out keeps the survivor's value, or takes the other's where the survivor's is empty.","propertyNames":{"anyOf":[{"enum":["country","state","name","company","billingContact","billingEmail","status","frequency","interval","startDate","endCondition","endDate","occurrences","nextRunAt","generatedCount","value","currency","paymentTerms","poNumber","autoSend","autoCharge","retryOnFailure","proration","owner","taxStatus","legalName","gstin","pan","cin","gstType","gstStateCode","reverseCharge","placeOfSupply","trn","emirate","vatNumber","ein","uen","abn","businessNumber","taxExempt","exportTax","chargeTaxAbroad","lastInvoiceRef","lastRunAt","description","companyId","billingContactId"]},{"pattern":"^custom_\\w{1,80}$"}]},"additionalProperties":{"type":"string","enum":["keep","merge"]}},"ownerId":{"type":"string","minLength":1,"description":"Who owns the merged record. Left out, the survivor's owner."}}},"RecurringInvoiceEvent":{"type":"object","title":"A recurring invoice event","allOf":[{"$ref":"#/components/schemas/WebhookEvent"}],"properties":{"event":{"type":"string","enum":["recurring.created","recurring.updated"]},"data":{"allOf":[{"$ref":"#/components/schemas/EventRecord"},{"$ref":"#/components/schemas/RecurringInvoiceFields"}],"description":"The recurring invoice with its field values beside id, object and name — not masked by any profile's field permissions."}}},"ProductFields":{"type":"object","title":"Product fields","description":"A product's values, by field key. A record made here carries every standard field, an empty one as \"\"; a custom field appears once it has a value. It may also carry keys the system adds as it works (a payment, a signature, a calendar link), which are read-only and not listed. A workspace's custom fields (keys beginning custom_) appear alongside; the workspace description lists them. Fields the caller may not see are left out. A value saved before a field's rules or choices changed is kept as it was until the record is next edited, so what is read can fall outside what may be written.","properties":{"name":{"type":["string","null"],"title":"Product name","description":"What you sell, as it should appear on quotes and invoices. Required."},"sku":{"type":["string","null"],"title":"SKU / product code","description":"Your own short code for this product, for example WEB-001. SKU means stock keeping unit. Required."},"family":{"type":["string","null"],"enum":["","Software","Services","Hardware","Subscription","Other",null],"title":"Category","description":"The group this product belongs to. Use it to sort products and in reports."},"status":{"type":["string","null"],"enum":["","Active","Inactive",null],"title":"Product status","description":"Whether you still sell it. Choose Inactive for products you no longer sell. Defaults to \"Active\"."},"unitPrice":{"anyOf":[{"type":"number","minimum":0},{"type":"string","enum":[""]},{"type":"null"}],"title":"Unit price","description":"The price of one unit, before tax. Required."},"currency":{"$ref":"#/components/schemas/Currency","title":"Record currency","description":"The currency for the amounts on this record, for example USD or EUR. Defaults to the workspace's own currency."},"unit":{"type":["string","null"],"enum":["","Each","Hour","Day","Month","Year","License",null],"title":"Unit of measure","description":"How you count it, for example per hour or per license."},"cost":{"anyOf":[{"type":"number","minimum":0},{"type":"string","enum":[""]},{"type":"null"}],"title":"Unit cost","description":"What one unit costs you. Reports use it to show your profit."},"hsn":{"type":["string","null"],"pattern":"^(?:[0-9]{4}(?:[ .\\-]?[0-9]{2}){0,2})?$","title":"HSN / SAC code","description":"India only. The HSN code for goods, or the SAC code for services. GST invoices must show it."},"taxRate":{"anyOf":[{"type":"number","minimum":0,"maximum":100},{"type":"string","enum":[""]},{"type":"null"}],"title":"Default tax rate (%)","description":"The usual tax percentage for this item, for example 20 for 20% VAT. You can still change it on each line."},"taxable":{"type":["string","null"],"enum":["","Taxable","Exempt","Zero-rated",null],"title":"Tax treatment","description":"Whether tax is charged. Exempt means no tax applies. Zero-rated means tax applies at 0%."},"stock":{"anyOf":[{"type":"number","minimum":0},{"type":"string","enum":[""]},{"type":"null"}],"title":"Available quantity","description":"How many you have ready to sell."},"description":{"type":["string","null"],"title":"Description / notes","description":"Anything else worth knowing. Only people in your workspace can see it."}}},"ProductUpdate":{"type":"object","title":"Product changes","description":"Only the fields to change. A key the object does not have is refused (422 unknown_field); one the system keeps is ignored and listed in rejectedFields. A custom field the workspace has archived is accepted and ignored.","allOf":[{"$ref":"#/components/schemas/ProductFields"}],"properties":{"ownerId":{"type":"string","minLength":1,"description":"Who owns the record: the id of an active person in this workspace. Left out of a create, the record belongs to whoever made it — and a record an API key makes belongs to the person who created the key (failing that, the workspace's owner), so it is not hidden from everyone without View All. Left out of an update, the owner stays as it is."}},"patternProperties":{"^custom_\\w{1,80}$":{"description":"A custom field the workspace added. GET /api/v1/schema/{object} lists them, and the workspace description types them."}},"unevaluatedProperties":false},"ProductCreate":{"type":"object","title":"New product","description":"The fields of a new product. `name`, `sku` and `unitPrice` are required; the rest take their defaults. Unknown keys are refused as on an update.","allOf":[{"$ref":"#/components/schemas/ProductFields"}],"properties":{"ownerId":{"type":"string","minLength":1,"description":"Who owns the record: the id of an active person in this workspace. Left out of a create, the record belongs to whoever made it — and a record an API key makes belongs to the person who created the key (failing that, the workspace's owner), so it is not hidden from everyone without View All. Left out of an update, the owner stays as it is."}},"patternProperties":{"^custom_\\w{1,80}$":{"description":"A custom field the workspace added. GET /api/v1/schema/{object} lists them, and the workspace description types them."}},"unevaluatedProperties":false,"required":["name","sku","unitPrice"]},"Product":{"type":"object","title":"Product","allOf":[{"$ref":"#/components/schemas/RecordEnvelope"}],"properties":{"object":{"type":"string","const":"product"},"data":{"$ref":"#/components/schemas/ProductFields"}},"required":["object","data"]},"ProductPage":{"type":"object","title":"A page of products","required":["data","nextCursor"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Product"}},"nextCursor":{"type":["string","null"],"description":"Send back as cursor, with the same sort, for the next page; null when this was the last."}}},"ProductDetail":{"type":"object","title":"One product, with what hangs off it","required":["data","lineItems","activities","fieldHistory"],"properties":{"data":{"$ref":"#/components/schemas/Product"},"lineItems":{"type":"array","items":{"$ref":"#/components/schemas/LineItem"},"description":"Lines, for the kinds of record that have them; empty here."},"activities":{"type":"array","items":{"$ref":"#/components/schemas/Activity"},"description":"The timeline, newest first, at most 100."},"fieldHistory":{"type":"array","items":{"$ref":"#/components/schemas/FieldChange"},"description":"Value changes, newest first, at most 100 — without the fields the caller may not see."}}},"ProductSaved":{"type":"object","title":"The product, as saved","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Product"},"rejectedFields":{"type":"array","items":{"type":"string"},"description":"Fields that were sent but not written: kept by the system, worked out from the lines, or not the caller's to change."},"possibleDuplicates":{"type":"array","items":{"$ref":"#/components/schemas/PossibleDuplicate"},"description":"On a create: records the workspace's duplicate rules matched, where the rule warns rather than blocks."}}},"ProductBulkUpdate":{"type":"object","title":"The same change to many products","required":["ids","patch"],"properties":{"ids":{"type":"array","items":{"type":"string","minLength":1},"minItems":1,"maxItems":500},"patch":{"$ref":"#/components/schemas/ProductUpdate"}}},"ProductMerge":{"type":"object","title":"Merge two products","required":["keepId","mergeId"],"properties":{"keepId":{"type":"string","minLength":1,"description":"The record that survives."},"mergeId":{"type":"string","minLength":1,"description":"The record folded into it, then moved to the recycle bin."},"fields":{"type":"object","description":"Which side each field's value comes from. A field left out keeps the survivor's value, or takes the other's where the survivor's is empty.","propertyNames":{"anyOf":[{"enum":["name","sku","family","status","unitPrice","currency","unit","cost","hsn","taxRate","taxable","stock","description"]},{"pattern":"^custom_\\w{1,80}$"}]},"additionalProperties":{"type":"string","enum":["keep","merge"]}},"ownerId":{"type":"string","minLength":1,"description":"Who owns the merged record. Left out, the survivor's owner."}}},"ProductEvent":{"type":"object","title":"A product event","allOf":[{"$ref":"#/components/schemas/WebhookEvent"}],"properties":{"event":{"type":"string","enum":["product.created","product.updated"]},"data":{"allOf":[{"$ref":"#/components/schemas/EventRecord"},{"$ref":"#/components/schemas/ProductFields"}],"description":"The product with its field values beside id, object and name — not masked by any profile's field permissions."}}},"QuoteFields":{"type":"object","title":"Quote fields","description":"A quote's values, by field key. A record made here carries every standard field, an empty one as \"\"; a custom field appears once it has a value. It may also carry keys the system adds as it works (a payment, a signature, a calendar link), which are read-only and not listed. A workspace's custom fields (keys beginning custom_) appear alongside; the workspace description lists them. Fields the caller may not see are left out. A value saved before a field's rules or choices changed is kept as it was until the record is next edited, so what is read can fall outside what may be written.","properties":{"country":{"$ref":"#/components/schemas/Country","title":"Country","description":"The country this record is in. It decides which tax fields you see. Defaults to the workspace's own country."},"state":{"type":["string","null"],"title":"State / province","description":"The state, province or region, for example Texas or Ontario."},"name":{"type":["string","null"],"title":"Quote title","description":"A short title for the quote, for example Website redesign for Acme Inc. Leave it out and the next number in the workspace's sequence is given (Settings › Document numbering). A number another quote already carries is refused with 409 number_taken."},"quoteNumber":{"type":["string","null"],"title":"Quote number","description":"Given when the quote is first saved, from Settings → Document numbering. It prints after No. on the quote. Kept by the system: a value sent is ignored and listed in rejectedFields.","readOnly":true},"value":{"anyOf":[{"type":"number","minimum":0},{"type":"string","enum":[""]},{"type":"null"}],"title":"Quote amount","description":"Worked out for you by adding up the lines. Worked out from the document's line items once it has some; then a value sent is ignored and listed in rejectedFields. Defaults to 0."},"company":{"type":["string","null"],"title":"Company / account","description":"The company this record belongs to. Choose one you have already added under Companies. Names a company by its name, as the app offers them to pick; it is not an id. The id of the company it means is in `companyId`."},"relatedDeal":{"type":["string","null"],"title":"Related deal","description":"The deal this is about, if there is one. Names a deal by its name, as the app offers them to pick; it is not an id."},"billingContact":{"type":["string","null"],"title":"Contact","description":"The person the quote is for. Names a contact by its name, as the app offers them to pick; it is not an id. The id of the contact it means is in `billingContactId`."},"email":{"type":["string","null"],"format":"email","pattern":"^(?:\\s*[^\\s@]+@[^\\s@]+\\.[^\\s@]+\\s*)?$","title":"Email","description":"The email address the quote is sent to."},"status":{"type":["string","null"],"enum":["","Draft","Presented","Accepted","Rejected","Expired",null],"title":"Quote status","description":"Where the quote is. Presented means you sent it. Accepted means the customer said yes. Defaults to \"Draft\"."},"validUntil":{"type":["string","null"],"format":"date","title":"Valid until","description":"The last day the customer can accept this price. Defaults to 30 days after the day the record is created."},"currency":{"$ref":"#/components/schemas/Currency","title":"Record currency","description":"The currency for the amounts on this record, for example USD or EUR. Defaults to the workspace's own currency."},"priceBook":{"type":["string","null"],"title":"Price book","description":"The price list this document is priced from. A product added to its lines takes that list's price. Names a price book by its name, as the app offers them to pick; it is not an id."},"paymentTerms":{"type":["string","null"],"examples":["Due on receipt","Net 15","Net 30","Net 45","Net 60","50% advance, balance on delivery","100% advance"],"title":"Payment terms","description":"How long there is to pay. For example, Net 30 means payment is due 30 days after the invoice date. Usually Due on receipt, Net 15, Net 30, Net 45, Net 60, 50% advance, balance on delivery or 100% advance; any other text is accepted too."},"street":{"type":["string","null"],"title":"Street address","description":"The street address, for example 221 Main Street, Suite 4."},"buildingNumber":{"type":["string","null"],"title":"Building number","description":"From the customer's national address. ZATCA asks for it on a tax invoice. Used on records in Saudi Arabia, where it must match `^(?:[0-9]{4})$`."},"district":{"type":["string","null"],"title":"District","description":"Used on records in Saudi Arabia."},"city":{"type":["string","null"],"title":"City","description":"The city, for example Austin or Leeds."},"postalCode":{"type":["string","null"],"title":"ZIP / postal code","description":"The ZIP or postal code, for example 78701."},"taxStatus":{"type":["string","null"],"enum":["","Not registered","Registered","Exempt","Unknown",null],"title":"Tax registration status","description":"Whether this business is registered for tax, such as GST or VAT. Choose Unknown if you are not sure. Defaults to \"Not registered\"."},"legalName":{"type":["string","null"],"title":"Registered legal name","description":"The official name on the business's registration papers, for example Acme Holdings LLC. It can differ from the name people use."},"gstin":{"type":["string","null"],"title":"GSTIN","description":"India only. Their 15-character GST number. It prints on invoices. We check that it looks right, but we do not check it with the GST office. Used on records in India, where it must match `^(?:[0-9]{2}[A-Z]{5}[0-9]{4}[A-Z][1-9A-Z]Z[0-9A-Z])$`."},"pan":{"type":["string","null"],"title":"PAN","description":"India only. The 10-character PAN (Permanent Account Number) of the business. Used on records in India, where it must match `^(?:[A-Z]{5}[0-9]{4}[A-Z])$`."},"cin":{"type":["string","null"],"title":"CIN / LLPIN","description":"India only. The company's registration number (CIN), or the LLPIN for a limited liability partnership. Used on records in India."},"gstType":{"type":["string","null"],"enum":["","Regular","Composition","SEZ","Unregistered",null],"title":"GST registration type","description":"India only. The kind of GST registration they have. Most businesses are Regular. Used on records in India."},"gstStateCode":{"type":["string","null"],"title":"GST state code","description":"India only. The two-digit state code. It is also the first two digits of the GSTIN. Used on records in India, where it must match `^(?:[0-9]{2})$`."},"reverseCharge":{"type":["string","null"],"enum":["","No","Yes",null],"title":"Tax payable on reverse charge","description":"India only. Choose Yes if the customer, not you, pays the GST on this sale. The invoice always shows this, because the law asks for it. Used on records in India. Defaults to \"No\"."},"placeOfSupply":{"type":["string","null"],"title":"Place of supply","description":"India only. The state the goods or services go to. Leave it empty when it is the customer's state. Used on records in India."},"trn":{"type":["string","null"],"title":"VAT TRN","description":"UAE only. The 15-digit VAT registration number (TRN). We check the format only. Used on records in United Arab Emirates, where it must match `^(?:[0-9]{15})$`."},"emirate":{"type":["string","null"],"enum":["","Abu Dhabi","Dubai","Sharjah","Ajman","Umm Al Quwain","Ras Al Khaimah","Fujairah",null],"title":"Emirate","description":"UAE only. The emirate where the business is registered. Used on records in United Arab Emirates."},"vatNumber":{"type":["string","null"],"title":"VAT / tax registration number","description":"The business's VAT or tax registration number. It prints on invoices. Used on records in United Kingdom, Saudi Arabia, Bahrain, Oman, Switzerland, Norway, South Africa, Austria, Belgium, Bulgaria, Croatia, Cyprus, Czechia, Denmark, Estonia, Finland, France, Germany, Greece, Hungary, Ireland, Italy, Latvia, Lithuania, Luxembourg, Malta, Netherlands, Poland, Portugal, Romania, Slovakia, Slovenia, Spain, Sweden or Other."},"ein":{"type":["string","null"],"title":"EIN / federal tax ID","description":"United States only. The 9-digit Employer Identification Number from the IRS, for example 12-3456789. Used on records in United States."},"uen":{"type":["string","null"],"title":"UEN / GST registration","description":"Singapore only. The Unique Entity Number. Add the GST number too if they are registered for GST. Used on records in Singapore."},"abn":{"type":["string","null"],"title":"ABN / GST registration","description":"Australia only. The 11-digit Australian Business Number. Used on records in Australia."},"businessNumber":{"type":["string","null"],"title":"Business number / GST-HST","description":"Canada only. The 9-digit Business Number, with the GST/HST account if they have one. Used on records in Canada."},"taxExempt":{"type":["boolean","null"],"title":"Tax-exempt customer","description":"Tick this if the customer does not pay tax, for example a charity with an exemption certificate."},"exportTax":{"type":["string","null"],"enum":["","Under LUT, without IGST","With IGST paid",null],"title":"Export / SEZ supply","description":"India only. Under your LUT for the year, no IGST is charged. With IGST paid, it is charged and you claim it back. Empty uses your LUT when there is one for the year. Used only while GST registration type is SEZ, or while the country is not India."},"chargeTaxAbroad":{"type":["boolean","null"],"title":"Charge tax as at home","description":"A sale to a customer in another country carries no tax: it is an export, or a business customer in another EU country accounts for the VAT. Tick this when it is taxed here all the same: a course or event held here, or a service used here. Used only while the country is not the workspace's own."},"owner":{"type":["string","null"],"title":"Record owner","description":"The person in your team who looks after this record. It shows in their lists, and they get its reminders. A person in this workspace, by name. Who owns the record is set with ownerId."},"terms":{"type":["string","null"],"title":"Terms & conditions","description":"The rules of the sale, for example delivery and refunds. They print at the bottom of the document."},"description":{"type":["string","null"],"title":"Description / notes","description":"Anything else worth knowing. Only people in your workspace can see it."},"companyId":{"type":["string","null"],"title":"Company / account (record id)","description":"The id of the company named in “Company / account”: set when one is picked from the list, and by the server when the name matches exactly one company. Send it to point at one record when names repeat; a name sent without it is matched to the record when exactly one has that name. Refused (422) when it is not a live record of that kind in this workspace; an id alone fills in the name."},"billingContactId":{"type":["string","null"],"title":"Contact (record id)","description":"The id of the contact named in “Contact”: set when one is picked from the list, and by the server when the name matches exactly one contact. Send it to point at one record when names repeat; a name sent without it is matched to the record when exactly one has that name. Refused (422) when it is not a live record of that kind in this workspace; an id alone fills in the name."}}},"QuoteUpdate":{"type":"object","title":"Quote changes","description":"Only the fields to change. A key the object does not have is refused (422 unknown_field); one the system keeps is ignored and listed in rejectedFields. A custom field the workspace has archived is accepted and ignored.","allOf":[{"$ref":"#/components/schemas/QuoteFields"}],"properties":{"ownerId":{"type":"string","minLength":1,"description":"Who owns the record: the id of an active person in this workspace. Left out of a create, the record belongs to whoever made it — and a record an API key makes belongs to the person who created the key (failing that, the workspace's owner), so it is not hidden from everyone without View All. Left out of an update, the owner stays as it is."}},"patternProperties":{"^custom_\\w{1,80}$":{"description":"A custom field the workspace added. GET /api/v1/schema/{object} lists them, and the workspace description types them."}},"unevaluatedProperties":false},"QuoteCreate":{"type":"object","title":"New quote","description":"The fields of a new quote; anything left out takes its default. Unknown keys are refused as on an update.","allOf":[{"$ref":"#/components/schemas/QuoteFields"}],"properties":{"ownerId":{"type":"string","minLength":1,"description":"Who owns the record: the id of an active person in this workspace. Left out of a create, the record belongs to whoever made it — and a record an API key makes belongs to the person who created the key (failing that, the workspace's owner), so it is not hidden from everyone without View All. Left out of an update, the owner stays as it is."}},"patternProperties":{"^custom_\\w{1,80}$":{"description":"A custom field the workspace added. GET /api/v1/schema/{object} lists them, and the workspace description types them."}},"unevaluatedProperties":false},"Quote":{"type":"object","title":"Quote","allOf":[{"$ref":"#/components/schemas/RecordEnvelope"}],"properties":{"object":{"type":"string","const":"quote"},"data":{"$ref":"#/components/schemas/QuoteFields"}},"required":["object","data"]},"QuotePage":{"type":"object","title":"A page of quotes","required":["data","nextCursor"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Quote"}},"nextCursor":{"type":["string","null"],"description":"Send back as cursor, with the same sort, for the next page; null when this was the last."}}},"QuoteDetail":{"type":"object","title":"One quote, with what hangs off it","required":["data","lineItems","activities","fieldHistory"],"properties":{"data":{"$ref":"#/components/schemas/Quote"},"lineItems":{"type":"array","items":{"$ref":"#/components/schemas/LineItem"},"description":"The document's lines, in order. They are written in the app; an API key cannot change them."},"activities":{"type":"array","items":{"$ref":"#/components/schemas/Activity"},"description":"The timeline, newest first, at most 100."},"fieldHistory":{"type":"array","items":{"$ref":"#/components/schemas/FieldChange"},"description":"Value changes, newest first, at most 100 — without the fields the caller may not see."}}},"QuoteSaved":{"type":"object","title":"The quote, as saved","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Quote"},"rejectedFields":{"type":"array","items":{"type":"string"},"description":"Fields that were sent but not written: kept by the system, worked out from the lines, or not the caller's to change."},"possibleDuplicates":{"type":"array","items":{"$ref":"#/components/schemas/PossibleDuplicate"},"description":"On a create: records the workspace's duplicate rules matched, where the rule warns rather than blocks."}}},"QuoteBulkUpdate":{"type":"object","title":"The same change to many quotes","required":["ids","patch"],"properties":{"ids":{"type":"array","items":{"type":"string","minLength":1},"minItems":1,"maxItems":500},"patch":{"$ref":"#/components/schemas/QuoteUpdate"}}},"QuoteMerge":{"type":"object","title":"Merge two quotes","required":["keepId","mergeId"],"properties":{"keepId":{"type":"string","minLength":1,"description":"The record that survives."},"mergeId":{"type":"string","minLength":1,"description":"The record folded into it, then moved to the recycle bin."},"fields":{"type":"object","description":"Which side each field's value comes from. A field left out keeps the survivor's value, or takes the other's where the survivor's is empty.","propertyNames":{"anyOf":[{"enum":["country","state","name","quoteNumber","value","company","relatedDeal","billingContact","email","status","validUntil","currency","priceBook","paymentTerms","street","buildingNumber","district","city","postalCode","taxStatus","legalName","gstin","pan","cin","gstType","gstStateCode","reverseCharge","placeOfSupply","trn","emirate","vatNumber","ein","uen","abn","businessNumber","taxExempt","exportTax","chargeTaxAbroad","owner","terms","description","companyId","billingContactId"]},{"pattern":"^custom_\\w{1,80}$"}]},"additionalProperties":{"type":"string","enum":["keep","merge"]}},"ownerId":{"type":"string","minLength":1,"description":"Who owns the merged record. Left out, the survivor's owner."}}},"QuoteEvent":{"type":"object","title":"A quote event","allOf":[{"$ref":"#/components/schemas/WebhookEvent"}],"properties":{"event":{"type":"string","enum":["quote.created","quote.updated"]},"data":{"allOf":[{"$ref":"#/components/schemas/EventRecord"},{"$ref":"#/components/schemas/QuoteFields"}],"description":"The quote with its field values beside id, object and name — not masked by any profile's field permissions."}}},"SupportCaseFields":{"type":"object","title":"Support case fields","description":"A support case's values, by field key. A record made here carries every standard field, an empty one as \"\"; a custom field appears once it has a value. It may also carry keys the system adds as it works (a payment, a signature, a calendar link), which are read-only and not listed. A workspace's custom fields (keys beginning custom_) appear alongside; the workspace description lists them. Fields the caller may not see are left out. A value saved before a field's rules or choices changed is kept as it was until the record is next edited, so what is read can fall outside what may be written.","properties":{"name":{"type":["string","null"],"title":"Case subject","description":"A short summary of the problem, for example Cannot download invoice. Required."},"company":{"type":["string","null"],"title":"Company / account","description":"The company this record belongs to. Choose one you have already added under Companies. Names a company by its name, as the app offers them to pick; it is not an id. The id of the company it means is in `companyId`."},"contact":{"type":["string","null"],"title":"Customer contact","description":"The customer who reported the problem. Names a contact by its name, as the app offers them to pick; it is not an id. The id of the contact it means is in `contactId`."},"email":{"type":["string","null"],"format":"email","pattern":"^(?:\\s*[^\\s@]+@[^\\s@]+\\.[^\\s@]+\\s*)?$","title":"Customer email","description":"The customer's email address for replies."},"status":{"type":["string","null"],"enum":["","New","Open","In progress","Waiting on customer","Resolved","Closed",null],"title":"Case status","description":"Where the case is. Waiting on customer means you need their reply. Resolved means it is fixed. Defaults to \"New\"."},"priority":{"type":["string","null"],"enum":["","Low","Medium","High","Critical",null],"title":"Priority","description":"How urgent it is. Urgent and High show first. Defaults to \"Medium\"."},"category":{"type":["string","null"],"enum":["","Technical issue","Billing","Feature request","General question",null],"title":"Category","description":"The kind of problem. It helps send the case to the right people."},"origin":{"type":["string","null"],"enum":["","Email","Phone","Web form","Chat",null],"title":"Channel","description":"How the customer contacted you."},"owner":{"type":["string","null"],"title":"Record owner","description":"The person in your team who looks after this record. It shows in their lists, and they get its reminders. A person in this workspace, by name. Who owns the record is set with ownerId."},"queue":{"type":["string","null"],"enum":["","General support","Technical support","Billing",null],"title":"Support queue","description":"The team that should handle this case."},"slaDue":{"type":["string","null"],"format":"date","title":"SLA due date","description":"The date by which you promised to fix it. SLA means service level agreement: your promise to the customer."},"product":{"type":["string","null"],"title":"Related product","description":"The product the problem is about, if any. Names a product by its name, as the app offers them to pick; it is not an id."},"resolution":{"type":["string","null"],"title":"Resolution","description":"How the problem was fixed. It helps with similar cases later."},"tags":{"type":["string","null"],"title":"Tags","description":"Short words that help you group and find records, for example VIP or Trade show. Separate them with commas."},"description":{"type":["string","null"],"title":"Description / notes","description":"Anything else worth knowing. Only people in your workspace can see it."},"companyId":{"type":["string","null"],"title":"Company / account (record id)","description":"The id of the company named in “Company / account”: set when one is picked from the list, and by the server when the name matches exactly one company. Send it to point at one record when names repeat; a name sent without it is matched to the record when exactly one has that name. Refused (422) when it is not a live record of that kind in this workspace; an id alone fills in the name."},"contactId":{"type":["string","null"],"title":"Customer contact (record id)","description":"The id of the contact named in “Customer contact”: set when one is picked from the list, and by the server when the name matches exactly one contact. Send it to point at one record when names repeat; a name sent without it is matched to the record when exactly one has that name. Refused (422) when it is not a live record of that kind in this workspace; an id alone fills in the name."}}},"SupportCaseUpdate":{"type":"object","title":"Support case changes","description":"Only the fields to change. A key the object does not have is refused (422 unknown_field); one the system keeps is ignored and listed in rejectedFields. A custom field the workspace has archived is accepted and ignored.","allOf":[{"$ref":"#/components/schemas/SupportCaseFields"}],"properties":{"ownerId":{"type":"string","minLength":1,"description":"Who owns the record: the id of an active person in this workspace. Left out of a create, the record belongs to whoever made it — and a record an API key makes belongs to the person who created the key (failing that, the workspace's owner), so it is not hidden from everyone without View All. Left out of an update, the owner stays as it is."}},"patternProperties":{"^custom_\\w{1,80}$":{"description":"A custom field the workspace added. GET /api/v1/schema/{object} lists them, and the workspace description types them."}},"unevaluatedProperties":false},"SupportCaseCreate":{"type":"object","title":"New support case","description":"The fields of a new support case. `name` is required; the rest take their defaults. Unknown keys are refused as on an update.","allOf":[{"$ref":"#/components/schemas/SupportCaseFields"}],"properties":{"ownerId":{"type":"string","minLength":1,"description":"Who owns the record: the id of an active person in this workspace. Left out of a create, the record belongs to whoever made it — and a record an API key makes belongs to the person who created the key (failing that, the workspace's owner), so it is not hidden from everyone without View All. Left out of an update, the owner stays as it is."}},"patternProperties":{"^custom_\\w{1,80}$":{"description":"A custom field the workspace added. GET /api/v1/schema/{object} lists them, and the workspace description types them."}},"unevaluatedProperties":false,"required":["name"]},"SupportCase":{"type":"object","title":"Support case","allOf":[{"$ref":"#/components/schemas/RecordEnvelope"}],"properties":{"object":{"type":"string","const":"case"},"data":{"$ref":"#/components/schemas/SupportCaseFields"}},"required":["object","data"]},"SupportCasePage":{"type":"object","title":"A page of support cases","required":["data","nextCursor"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/SupportCase"}},"nextCursor":{"type":["string","null"],"description":"Send back as cursor, with the same sort, for the next page; null when this was the last."}}},"SupportCaseDetail":{"type":"object","title":"One support case, with what hangs off it","required":["data","lineItems","activities","fieldHistory"],"properties":{"data":{"$ref":"#/components/schemas/SupportCase"},"lineItems":{"type":"array","items":{"$ref":"#/components/schemas/LineItem"},"description":"Lines, for the kinds of record that have them; empty here."},"activities":{"type":"array","items":{"$ref":"#/components/schemas/Activity"},"description":"The timeline, newest first, at most 100."},"fieldHistory":{"type":"array","items":{"$ref":"#/components/schemas/FieldChange"},"description":"Value changes, newest first, at most 100 — without the fields the caller may not see."}}},"SupportCaseSaved":{"type":"object","title":"The support case, as saved","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/SupportCase"},"rejectedFields":{"type":"array","items":{"type":"string"},"description":"Fields that were sent but not written: kept by the system, worked out from the lines, or not the caller's to change."},"possibleDuplicates":{"type":"array","items":{"$ref":"#/components/schemas/PossibleDuplicate"},"description":"On a create: records the workspace's duplicate rules matched, where the rule warns rather than blocks."}}},"SupportCaseBulkUpdate":{"type":"object","title":"The same change to many support cases","required":["ids","patch"],"properties":{"ids":{"type":"array","items":{"type":"string","minLength":1},"minItems":1,"maxItems":500},"patch":{"$ref":"#/components/schemas/SupportCaseUpdate"}}},"SupportCaseMerge":{"type":"object","title":"Merge two support cases","required":["keepId","mergeId"],"properties":{"keepId":{"type":"string","minLength":1,"description":"The record that survives."},"mergeId":{"type":"string","minLength":1,"description":"The record folded into it, then moved to the recycle bin."},"fields":{"type":"object","description":"Which side each field's value comes from. A field left out keeps the survivor's value, or takes the other's where the survivor's is empty.","propertyNames":{"anyOf":[{"enum":["name","company","contact","email","status","priority","category","origin","owner","queue","slaDue","product","resolution","tags","description","companyId","contactId"]},{"pattern":"^custom_\\w{1,80}$"}]},"additionalProperties":{"type":"string","enum":["keep","merge"]}},"ownerId":{"type":"string","minLength":1,"description":"Who owns the merged record. Left out, the survivor's owner."}}},"SupportCaseEvent":{"type":"object","title":"A support case event","allOf":[{"$ref":"#/components/schemas/WebhookEvent"}],"properties":{"event":{"type":"string","enum":["case.created","case.updated"]},"data":{"allOf":[{"$ref":"#/components/schemas/EventRecord"},{"$ref":"#/components/schemas/SupportCaseFields"}],"description":"The support case with its field values beside id, object and name — not masked by any profile's field permissions."}}},"VisitFields":{"type":"object","title":"Visit fields","description":"A visit's values, by field key. A record made here carries every standard field, an empty one as \"\"; a custom field appears once it has a value. It may also carry keys the system adds as it works (a payment, a signature, a calendar link), which are read-only and not listed. A workspace's custom fields (keys beginning custom_) appear alongside; the workspace description lists them. Fields the caller may not see are left out. A value saved before a field's rules or choices changed is kept as it was until the record is next edited, so what is read can fall outside what may be written.","properties":{"name":{"type":["string","null"],"title":"Visit title","description":"A short title, for example Installation check at Acme Inc. Required."},"company":{"type":["string","null"],"title":"Company / account","description":"The company this record belongs to. Choose one you have already added under Companies. Names a company by its name, as the app offers them to pick; it is not an id. The id of the company it means is in `companyId`."},"contact":{"type":["string","null"],"title":"Contact","description":"The person you are visiting. Names a contact by its name, as the app offers them to pick; it is not an id. The id of the contact it means is in `contactId`."},"visitType":{"type":["string","null"],"enum":["","Customer meeting","Site survey","Installation","Service","Relationship visit",null],"title":"Visit type","description":"The reason for the visit. Defaults to \"Customer meeting\"."},"status":{"type":["string","null"],"enum":["","Planned","Checked in","Completed","Cancelled",null],"title":"Visit status","description":"Planned until you arrive, Checked in while you are there, and Completed when you leave. Defaults to \"Planned\"."},"owner":{"type":["string","null"],"title":"Record owner","description":"The person in your team who looks after this record. It shows in their lists, and they get its reminders. A person in this workspace, by name. Who owns the record is set with ownerId."},"scheduledAt":{"type":["string","null"],"examples":["2026-12-05T10:30"],"title":"Scheduled date & time","description":"The day and time of the visit. Required. A date and time as typed, without a time zone: YYYY-MM-DDTHH:MM."},"duration":{"anyOf":[{"type":"number","minimum":0},{"type":"string","enum":[""]},{"type":"null"}],"title":"Planned duration (minutes)","description":"How long you expect to stay, in minutes. Defaults to 60."},"location":{"type":["string","null"],"title":"Visit location","description":"The address you are visiting."},"latitude":{"anyOf":[{"type":"number","minimum":-90,"maximum":90},{"type":"string","enum":[""]},{"type":"null"}],"title":"Latitude","description":"The map position of the place, as a number, for example 30.2672. You can copy it from a map app."},"longitude":{"anyOf":[{"type":"number","minimum":-180,"maximum":180},{"type":"string","enum":[""]},{"type":"null"}],"title":"Longitude","description":"The map position of the place, as a number, for example -97.7431. You can copy it from a map app."},"checkInAt":{"type":["string","null"],"examples":["2026-12-05T10:30"],"title":"Check-in time","description":"The time you arrived. A date and time as typed, without a time zone: YYYY-MM-DDTHH:MM."},"checkOutAt":{"type":["string","null"],"examples":["2026-12-05T10:30"],"title":"Check-out time","description":"The time you left. A date and time as typed, without a time zone: YYYY-MM-DDTHH:MM."},"outcome":{"type":["string","null"],"title":"Visit outcome","description":"What happened during the visit."},"nextAction":{"type":["string","null"],"title":"Next action","description":"What should happen next, for example Send the quote."},"attachment":{"type":["string","null"],"title":"Visit attachment","description":"A photo or file from the visit, for example a signed form. The file itself is kept as an attachment, which an API key cannot reach; the record holds nothing here."},"tags":{"type":["string","null"],"title":"Tags","description":"Short words that help you group and find records, for example VIP or Trade show. Separate them with commas."},"description":{"type":["string","null"],"title":"Description / notes","description":"Anything else worth knowing. Only people in your workspace can see it."},"companyId":{"type":["string","null"],"title":"Company / account (record id)","description":"The id of the company named in “Company / account”: set when one is picked from the list, and by the server when the name matches exactly one company. Send it to point at one record when names repeat; a name sent without it is matched to the record when exactly one has that name. Refused (422) when it is not a live record of that kind in this workspace; an id alone fills in the name."},"contactId":{"type":["string","null"],"title":"Contact (record id)","description":"The id of the contact named in “Contact”: set when one is picked from the list, and by the server when the name matches exactly one contact. Send it to point at one record when names repeat; a name sent without it is matched to the record when exactly one has that name. Refused (422) when it is not a live record of that kind in this workspace; an id alone fills in the name."}}},"VisitUpdate":{"type":"object","title":"Visit changes","description":"Only the fields to change. A key the object does not have is refused (422 unknown_field); one the system keeps is ignored and listed in rejectedFields. A custom field the workspace has archived is accepted and ignored.","allOf":[{"$ref":"#/components/schemas/VisitFields"}],"properties":{"ownerId":{"type":"string","minLength":1,"description":"Who owns the record: the id of an active person in this workspace. Left out of a create, the record belongs to whoever made it — and a record an API key makes belongs to the person who created the key (failing that, the workspace's owner), so it is not hidden from everyone without View All. Left out of an update, the owner stays as it is."}},"patternProperties":{"^custom_\\w{1,80}$":{"description":"A custom field the workspace added. GET /api/v1/schema/{object} lists them, and the workspace description types them."}},"unevaluatedProperties":false},"VisitCreate":{"type":"object","title":"New visit","description":"The fields of a new visit. `name` and `scheduledAt` are required; the rest take their defaults. Unknown keys are refused as on an update.","allOf":[{"$ref":"#/components/schemas/VisitFields"}],"properties":{"ownerId":{"type":"string","minLength":1,"description":"Who owns the record: the id of an active person in this workspace. Left out of a create, the record belongs to whoever made it — and a record an API key makes belongs to the person who created the key (failing that, the workspace's owner), so it is not hidden from everyone without View All. Left out of an update, the owner stays as it is."}},"patternProperties":{"^custom_\\w{1,80}$":{"description":"A custom field the workspace added. GET /api/v1/schema/{object} lists them, and the workspace description types them."}},"unevaluatedProperties":false,"required":["name","scheduledAt"]},"Visit":{"type":"object","title":"Visit","allOf":[{"$ref":"#/components/schemas/RecordEnvelope"}],"properties":{"object":{"type":"string","const":"visit"},"data":{"$ref":"#/components/schemas/VisitFields"}},"required":["object","data"]},"VisitPage":{"type":"object","title":"A page of visits","required":["data","nextCursor"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Visit"}},"nextCursor":{"type":["string","null"],"description":"Send back as cursor, with the same sort, for the next page; null when this was the last."}}},"VisitDetail":{"type":"object","title":"One visit, with what hangs off it","required":["data","lineItems","activities","fieldHistory"],"properties":{"data":{"$ref":"#/components/schemas/Visit"},"lineItems":{"type":"array","items":{"$ref":"#/components/schemas/LineItem"},"description":"Lines, for the kinds of record that have them; empty here."},"activities":{"type":"array","items":{"$ref":"#/components/schemas/Activity"},"description":"The timeline, newest first, at most 100."},"fieldHistory":{"type":"array","items":{"$ref":"#/components/schemas/FieldChange"},"description":"Value changes, newest first, at most 100 — without the fields the caller may not see."}}},"VisitSaved":{"type":"object","title":"The visit, as saved","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Visit"},"rejectedFields":{"type":"array","items":{"type":"string"},"description":"Fields that were sent but not written: kept by the system, worked out from the lines, or not the caller's to change."},"possibleDuplicates":{"type":"array","items":{"$ref":"#/components/schemas/PossibleDuplicate"},"description":"On a create: records the workspace's duplicate rules matched, where the rule warns rather than blocks."}}},"VisitBulkUpdate":{"type":"object","title":"The same change to many visits","required":["ids","patch"],"properties":{"ids":{"type":"array","items":{"type":"string","minLength":1},"minItems":1,"maxItems":500},"patch":{"$ref":"#/components/schemas/VisitUpdate"}}},"VisitMerge":{"type":"object","title":"Merge two visits","required":["keepId","mergeId"],"properties":{"keepId":{"type":"string","minLength":1,"description":"The record that survives."},"mergeId":{"type":"string","minLength":1,"description":"The record folded into it, then moved to the recycle bin."},"fields":{"type":"object","description":"Which side each field's value comes from. A field left out keeps the survivor's value, or takes the other's where the survivor's is empty.","propertyNames":{"anyOf":[{"enum":["name","company","contact","visitType","status","owner","scheduledAt","duration","location","latitude","longitude","checkInAt","checkOutAt","outcome","nextAction","attachment","tags","description","companyId","contactId"]},{"pattern":"^custom_\\w{1,80}$"}]},"additionalProperties":{"type":"string","enum":["keep","merge"]}},"ownerId":{"type":"string","minLength":1,"description":"Who owns the merged record. Left out, the survivor's owner."}}},"VisitEvent":{"type":"object","title":"A visit event","allOf":[{"$ref":"#/components/schemas/WebhookEvent"}],"properties":{"event":{"type":"string","enum":["visit.created","visit.updated"]},"data":{"allOf":[{"$ref":"#/components/schemas/EventRecord"},{"$ref":"#/components/schemas/VisitFields"}],"description":"The visit with its field values beside id, object and name — not masked by any profile's field permissions."}}},"InventoryItemFields":{"type":"object","title":"Inventory item fields","description":"An inventory item's values, by field key. A record made here carries every standard field, an empty one as \"\"; a custom field appears once it has a value. It may also carry keys the system adds as it works (a payment, a signature, a calendar link), which are read-only and not listed. A workspace's custom fields (keys beginning custom_) appear alongside; the workspace description lists them. Fields the caller may not see are left out. A value saved before a field's rules or choices changed is kept as it was until the record is next edited, so what is read can fall outside what may be written.","properties":{"name":{"type":["string","null"],"title":"Inventory item name","description":"The name of the item you keep in stock. Required."},"sku":{"type":["string","null"],"title":"SKU / stock code","description":"Your own short code for this item, for example CHAIR-BLK. Required."},"status":{"type":["string","null"],"enum":["","Active","Inactive","Discontinued",null],"title":"Item status","description":"Whether you still stock it. Discontinued means you will not order more. Defaults to \"Active\"."},"itemType":{"type":["string","null"],"enum":["","Finished good","Raw material","Service spare","Bundle",null],"title":"Item type","description":"What the item is: something you sell (Finished good), something you make things from (Raw material), a spare part, or a set sold together (Bundle)."},"warehouse":{"type":["string","null"],"title":"Warehouse / location","description":"Where the item is kept."},"onHand":{"anyOf":[{"type":"number","minimum":0},{"type":"string","enum":[""]},{"type":"null"}],"title":"Quantity on hand","description":"How many you have right now. Defaults to 0."},"reserved":{"anyOf":[{"type":"number","minimum":0},{"type":"string","enum":[""]},{"type":"null"}],"title":"Reserved quantity","description":"How many are already promised to customers, so they cannot be sold again. Defaults to 0."},"reorderPoint":{"anyOf":[{"type":"number","minimum":0},{"type":"string","enum":[""]},{"type":"null"}],"title":"Reorder point","description":"When stock falls to this number, it is time to order more."},"reorderQuantity":{"anyOf":[{"type":"number","minimum":0},{"type":"string","enum":[""]},{"type":"null"}],"title":"Reorder quantity","description":"How many to order each time you restock."},"unitCost":{"anyOf":[{"type":"number","minimum":0},{"type":"string","enum":[""]},{"type":"null"}],"title":"Unit cost","description":"What one unit costs you."},"unitPrice":{"anyOf":[{"type":"number","minimum":0},{"type":"string","enum":[""]},{"type":"null"}],"title":"Selling price","description":"What you sell one unit for."},"currency":{"$ref":"#/components/schemas/Currency","title":"Record currency","description":"The currency for the amounts on this record, for example USD or EUR. Defaults to the workspace's own currency."},"supplier":{"type":["string","null"],"title":"Preferred supplier","description":"The vendor you usually buy this item from. Pick one from your Vendors, or type a name. Names a vendor by its name, as the app offers them to pick; it is not an id."},"leadTimeDays":{"anyOf":[{"type":"number","minimum":0},{"type":"string","enum":[""]},{"type":"null"}],"title":"Supplier lead time (days)","description":"How many days the supplier usually takes to deliver."},"hsn":{"type":["string","null"],"pattern":"^(?:[0-9]{4}(?:[ .\\-]?[0-9]{2}){0,2})?$","title":"HSN / SAC code","description":"India only. The HSN code for goods, or the SAC code for services. GST invoices must show it."},"taxRate":{"anyOf":[{"type":"number","minimum":0,"maximum":100},{"type":"string","enum":[""]},{"type":"null"}],"title":"Default tax rate (%)","description":"The usual tax percentage for this item, for example 20 for 20% VAT. You can still change it on each line."},"description":{"type":["string","null"],"title":"Description / notes","description":"Anything else worth knowing. Only people in your workspace can see it."}}},"InventoryItemUpdate":{"type":"object","title":"Inventory item changes","description":"Only the fields to change. A key the object does not have is refused (422 unknown_field); one the system keeps is ignored and listed in rejectedFields. A custom field the workspace has archived is accepted and ignored.","allOf":[{"$ref":"#/components/schemas/InventoryItemFields"}],"properties":{"ownerId":{"type":"string","minLength":1,"description":"Who owns the record: the id of an active person in this workspace. Left out of a create, the record belongs to whoever made it — and a record an API key makes belongs to the person who created the key (failing that, the workspace's owner), so it is not hidden from everyone without View All. Left out of an update, the owner stays as it is."}},"patternProperties":{"^custom_\\w{1,80}$":{"description":"A custom field the workspace added. GET /api/v1/schema/{object} lists them, and the workspace description types them."}},"unevaluatedProperties":false},"InventoryItemCreate":{"type":"object","title":"New inventory item","description":"The fields of a new inventory item. `name` and `sku` are required; the rest take their defaults. Unknown keys are refused as on an update.","allOf":[{"$ref":"#/components/schemas/InventoryItemFields"}],"properties":{"ownerId":{"type":"string","minLength":1,"description":"Who owns the record: the id of an active person in this workspace. Left out of a create, the record belongs to whoever made it — and a record an API key makes belongs to the person who created the key (failing that, the workspace's owner), so it is not hidden from everyone without View All. Left out of an update, the owner stays as it is."}},"patternProperties":{"^custom_\\w{1,80}$":{"description":"A custom field the workspace added. GET /api/v1/schema/{object} lists them, and the workspace description types them."}},"unevaluatedProperties":false,"required":["name","sku"]},"InventoryItem":{"type":"object","title":"Inventory item","allOf":[{"$ref":"#/components/schemas/RecordEnvelope"}],"properties":{"object":{"type":"string","const":"inventory"},"data":{"$ref":"#/components/schemas/InventoryItemFields"}},"required":["object","data"]},"InventoryItemPage":{"type":"object","title":"A page of inventory items","required":["data","nextCursor"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/InventoryItem"}},"nextCursor":{"type":["string","null"],"description":"Send back as cursor, with the same sort, for the next page; null when this was the last."}}},"InventoryItemDetail":{"type":"object","title":"One inventory item, with what hangs off it","required":["data","lineItems","activities","fieldHistory"],"properties":{"data":{"$ref":"#/components/schemas/InventoryItem"},"lineItems":{"type":"array","items":{"$ref":"#/components/schemas/LineItem"},"description":"Lines, for the kinds of record that have them; empty here."},"activities":{"type":"array","items":{"$ref":"#/components/schemas/Activity"},"description":"The timeline, newest first, at most 100."},"fieldHistory":{"type":"array","items":{"$ref":"#/components/schemas/FieldChange"},"description":"Value changes, newest first, at most 100 — without the fields the caller may not see."}}},"InventoryItemSaved":{"type":"object","title":"The inventory item, as saved","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/InventoryItem"},"rejectedFields":{"type":"array","items":{"type":"string"},"description":"Fields that were sent but not written: kept by the system, worked out from the lines, or not the caller's to change."},"possibleDuplicates":{"type":"array","items":{"$ref":"#/components/schemas/PossibleDuplicate"},"description":"On a create: records the workspace's duplicate rules matched, where the rule warns rather than blocks."}}},"InventoryItemBulkUpdate":{"type":"object","title":"The same change to many inventory items","required":["ids","patch"],"properties":{"ids":{"type":"array","items":{"type":"string","minLength":1},"minItems":1,"maxItems":500},"patch":{"$ref":"#/components/schemas/InventoryItemUpdate"}}},"InventoryItemMerge":{"type":"object","title":"Merge two inventory items","required":["keepId","mergeId"],"properties":{"keepId":{"type":"string","minLength":1,"description":"The record that survives."},"mergeId":{"type":"string","minLength":1,"description":"The record folded into it, then moved to the recycle bin."},"fields":{"type":"object","description":"Which side each field's value comes from. A field left out keeps the survivor's value, or takes the other's where the survivor's is empty.","propertyNames":{"anyOf":[{"enum":["name","sku","status","itemType","warehouse","onHand","reserved","reorderPoint","reorderQuantity","unitCost","unitPrice","currency","supplier","leadTimeDays","hsn","taxRate","description"]},{"pattern":"^custom_\\w{1,80}$"}]},"additionalProperties":{"type":"string","enum":["keep","merge"]}},"ownerId":{"type":"string","minLength":1,"description":"Who owns the merged record. Left out, the survivor's owner."}}},"InventoryItemEvent":{"type":"object","title":"An inventory item event","allOf":[{"$ref":"#/components/schemas/WebhookEvent"}],"properties":{"event":{"type":"string","enum":["inventory.created","inventory.updated"]},"data":{"allOf":[{"$ref":"#/components/schemas/EventRecord"},{"$ref":"#/components/schemas/InventoryItemFields"}],"description":"The inventory item with its field values beside id, object and name — not masked by any profile's field permissions."}}},"ProcessFields":{"type":"object","title":"Process fields","description":"A process's values, by field key. A record made here carries every standard field, an empty one as \"\"; a custom field appears once it has a value. It may also carry keys the system adds as it works (a payment, a signature, a calendar link), which are read-only and not listed. A workspace's custom fields (keys beginning custom_) appear alongside; the workspace description lists them. Fields the caller may not see are left out. A value saved before a field's rules or choices changed is kept as it was until the record is next edited, so what is read can fall outside what may be written.","properties":{"name":{"type":["string","null"],"title":"Process name","description":"A name for this process, for example Approve big discounts. Required."},"status":{"type":["string","null"],"enum":["","Draft","Active","Paused","Archived",null],"title":"Process status","description":"Only an Active process runs. Draft, Paused and Archived ones never do. Defaults to \"Draft\"."},"processType":{"type":["string","null"],"enum":["","Sales approval","Customer onboarding","Case escalation","Inventory replenishment","Custom",null],"title":"Process type","description":"What the process is for."},"owner":{"type":["string","null"],"title":"Process owner","description":"The person responsible for this process. Its approvals go to them, and they hear if it runs late. A person in this workspace, by name. Who owns the record is set with ownerId."},"runsOn":{"type":["string","null"],"title":"Runs on"},"startTrigger":{"type":["string","null"],"enum":["","Record created","Field changes","Scheduled","Manual button","Webhook received",null],"title":"Start trigger","description":"What starts the process, for example a new record being created."},"triggerField":{"type":["string","null"],"title":"Field that starts it"},"triggerHour":{"anyOf":[{"type":"number","minimum":0,"maximum":23},{"type":"string","enum":[""]},{"type":"null"}],"title":"Hour it runs each day"},"entryConditions":{"type":["string","null"],"title":"Entry conditions"},"entryMatch":{"type":["string","null"],"enum":["","all","any",null],"title":"Conditions to meet","description":"Defaults to \"all\"."},"processActions":{"type":["string","null"],"title":"Actions"},"slaHours":{"anyOf":[{"type":"number","minimum":0},{"type":"string","enum":[""]},{"type":"null"}],"title":"SLA (hours)","description":"If a run has not finished within this many hours, the process owner is told once."},"approvalRequired":{"type":["boolean","null"],"title":"Require approval","description":"Tick this to have the process owner approve each run before its actions happen."},"hookVersion":{"anyOf":[{"type":"number"},{"type":"string","enum":[""]},{"type":"null"}],"title":"Webhook address version","description":"Kept by the system: a value sent is ignored and listed in rejectedFields. Defaults to 1.","readOnly":true},"conditions":{"type":["string","null"],"title":"Notes from before: entry conditions","description":"What this process said it would check, before processes ran. Kept so nothing is lost. Kept by the system: a value sent is ignored and listed in rejectedFields.","readOnly":true},"actions":{"type":["string","null"],"title":"Notes from before: actions","description":"What this process said it would do, before processes ran. Kept so nothing is lost. Kept by the system: a value sent is ignored and listed in rejectedFields.","readOnly":true},"runbookUrl":{"type":["string","null"],"format":"uri","title":"Runbook URL","description":"A link to written instructions for your team, if you have them. Kept as typed; the server does not check it is a full address."},"description":{"type":["string","null"],"title":"Description / notes","description":"Anything else worth knowing. Only people in your workspace can see it."}}},"ProcessUpdate":{"type":"object","title":"Process changes","description":"Only the fields to change. A key the object does not have is refused (422 unknown_field); one the system keeps is ignored and listed in rejectedFields. A custom field the workspace has archived is accepted and ignored.","allOf":[{"$ref":"#/components/schemas/ProcessFields"}],"properties":{"ownerId":{"type":"string","minLength":1,"description":"Who owns the record: the id of an active person in this workspace. Left out of a create, the record belongs to whoever made it — and a record an API key makes belongs to the person who created the key (failing that, the workspace's owner), so it is not hidden from everyone without View All. Left out of an update, the owner stays as it is."}},"patternProperties":{"^custom_\\w{1,80}$":{"description":"A custom field the workspace added. GET /api/v1/schema/{object} lists them, and the workspace description types them."}},"unevaluatedProperties":false},"ProcessCreate":{"type":"object","title":"New process","description":"The fields of a new process. `name` is required; the rest take their defaults. Unknown keys are refused as on an update.","allOf":[{"$ref":"#/components/schemas/ProcessFields"}],"properties":{"ownerId":{"type":"string","minLength":1,"description":"Who owns the record: the id of an active person in this workspace. Left out of a create, the record belongs to whoever made it — and a record an API key makes belongs to the person who created the key (failing that, the workspace's owner), so it is not hidden from everyone without View All. Left out of an update, the owner stays as it is."}},"patternProperties":{"^custom_\\w{1,80}$":{"description":"A custom field the workspace added. GET /api/v1/schema/{object} lists them, and the workspace description types them."}},"unevaluatedProperties":false,"required":["name"]},"Process":{"type":"object","title":"Process","allOf":[{"$ref":"#/components/schemas/RecordEnvelope"}],"properties":{"object":{"type":"string","const":"process"},"data":{"$ref":"#/components/schemas/ProcessFields"}},"required":["object","data"]},"ProcessPage":{"type":"object","title":"A page of processes","required":["data","nextCursor"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Process"}},"nextCursor":{"type":["string","null"],"description":"Send back as cursor, with the same sort, for the next page; null when this was the last."}}},"ProcessDetail":{"type":"object","title":"One process, with what hangs off it","required":["data","lineItems","activities","fieldHistory"],"properties":{"data":{"$ref":"#/components/schemas/Process"},"lineItems":{"type":"array","items":{"$ref":"#/components/schemas/LineItem"},"description":"Lines, for the kinds of record that have them; empty here."},"activities":{"type":"array","items":{"$ref":"#/components/schemas/Activity"},"description":"The timeline, newest first, at most 100."},"fieldHistory":{"type":"array","items":{"$ref":"#/components/schemas/FieldChange"},"description":"Value changes, newest first, at most 100 — without the fields the caller may not see."}}},"ProcessSaved":{"type":"object","title":"The process, as saved","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Process"},"rejectedFields":{"type":"array","items":{"type":"string"},"description":"Fields that were sent but not written: kept by the system, worked out from the lines, or not the caller's to change."},"possibleDuplicates":{"type":"array","items":{"$ref":"#/components/schemas/PossibleDuplicate"},"description":"On a create: records the workspace's duplicate rules matched, where the rule warns rather than blocks."}}},"ProcessBulkUpdate":{"type":"object","title":"The same change to many processes","required":["ids","patch"],"properties":{"ids":{"type":"array","items":{"type":"string","minLength":1},"minItems":1,"maxItems":500},"patch":{"$ref":"#/components/schemas/ProcessUpdate"}}},"ProcessMerge":{"type":"object","title":"Merge two processes","required":["keepId","mergeId"],"properties":{"keepId":{"type":"string","minLength":1,"description":"The record that survives."},"mergeId":{"type":"string","minLength":1,"description":"The record folded into it, then moved to the recycle bin."},"fields":{"type":"object","description":"Which side each field's value comes from. A field left out keeps the survivor's value, or takes the other's where the survivor's is empty.","propertyNames":{"anyOf":[{"enum":["name","status","processType","owner","runsOn","startTrigger","triggerField","triggerHour","entryConditions","entryMatch","processActions","slaHours","approvalRequired","hookVersion","conditions","actions","runbookUrl","description"]},{"pattern":"^custom_\\w{1,80}$"}]},"additionalProperties":{"type":"string","enum":["keep","merge"]}},"ownerId":{"type":"string","minLength":1,"description":"Who owns the merged record. Left out, the survivor's owner."}}},"ProcessEvent":{"type":"object","title":"A process event","allOf":[{"$ref":"#/components/schemas/WebhookEvent"}],"properties":{"event":{"type":"string","enum":["process.created","process.updated"]},"data":{"allOf":[{"$ref":"#/components/schemas/EventRecord"},{"$ref":"#/components/schemas/ProcessFields"}],"description":"The process with its field values beside id, object and name — not masked by any profile's field permissions."}}},"ForecastFields":{"type":"object","title":"Forecast fields","description":"A forecast's values, by field key. A record made here carries every standard field, an empty one as \"\"; a custom field appears once it has a value. It may also carry keys the system adds as it works (a payment, a signature, a calendar link), which are read-only and not listed. A workspace's custom fields (keys beginning custom_) appear alongside; the workspace description lists them. Fields the caller may not see are left out. A value saved before a field's rules or choices changed is kept as it was until the record is next edited, so what is read can fall outside what may be written.","properties":{"name":{"type":["string","null"],"title":"Forecast name","description":"A name for this forecast, for example Q3 2026 – Sarah. Required."},"forecastPeriod":{"type":["string","null"],"enum":["","This month","This quarter","Next quarter","Annual",null],"title":"Forecast period","description":"The length of time this forecast covers. Defaults to \"This quarter\"."},"startDate":{"type":["string","null"],"format":"date","title":"Period start","description":"The first day of the period."},"endDate":{"type":["string","null"],"format":"date","title":"Period end","description":"The last day of the period."},"target":{"anyOf":[{"type":"number","minimum":0},{"type":"string","enum":[""]},{"type":"null"}],"title":"Revenue target","description":"How much you aim to sell in this period. Required."},"currency":{"$ref":"#/components/schemas/Currency","title":"Record currency","description":"The currency for the amounts on this record, for example USD or EUR. Defaults to the workspace's own currency."},"bestCase":{"anyOf":[{"type":"number","minimum":0},{"type":"string","enum":[""]},{"type":"null"}],"title":"Best-case forecast","description":"The most you could close this period if every open deal goes well. Include deals that might close, not just the sure ones."},"commit":{"anyOf":[{"type":"number","minimum":0},{"type":"string","enum":[""]},{"type":"null"}],"title":"Commit forecast","description":"The amount you are confident you will close this period. Count only the deals you are almost sure of. Later you can compare it with what really closed."},"pipeline":{"anyOf":[{"type":"number","minimum":0},{"type":"string","enum":[""]},{"type":"null"}],"title":"Pipeline forecast","description":"The total value of all open deals that could close this period, even the unlikely ones."},"status":{"type":["string","null"],"enum":["","Draft","Submitted","Approved","Locked",null],"title":"Forecast status","description":"Where the forecast is. Submitted means you sent it to your manager. Locked means it can no longer change. Defaults to \"Draft\"."},"owner":{"type":["string","null"],"title":"Forecast owner","description":"The person this forecast belongs to. A person in this workspace, by name. Who owns the record is set with ownerId."},"assumptions":{"type":["string","null"],"title":"Forecast assumptions","description":"What you are counting on, for example Acme Inc. signs by the 20th."},"description":{"type":["string","null"],"title":"Description / notes","description":"Anything else worth knowing. Only people in your workspace can see it."}}},"ForecastUpdate":{"type":"object","title":"Forecast changes","description":"Only the fields to change. A key the object does not have is refused (422 unknown_field); one the system keeps is ignored and listed in rejectedFields. A custom field the workspace has archived is accepted and ignored.","allOf":[{"$ref":"#/components/schemas/ForecastFields"}],"properties":{"ownerId":{"type":"string","minLength":1,"description":"Who owns the record: the id of an active person in this workspace. Left out of a create, the record belongs to whoever made it — and a record an API key makes belongs to the person who created the key (failing that, the workspace's owner), so it is not hidden from everyone without View All. Left out of an update, the owner stays as it is."}},"patternProperties":{"^custom_\\w{1,80}$":{"description":"A custom field the workspace added. GET /api/v1/schema/{object} lists them, and the workspace description types them."}},"unevaluatedProperties":false},"ForecastCreate":{"type":"object","title":"New forecast","description":"The fields of a new forecast. `name` and `target` are required; the rest take their defaults. Unknown keys are refused as on an update.","allOf":[{"$ref":"#/components/schemas/ForecastFields"}],"properties":{"ownerId":{"type":"string","minLength":1,"description":"Who owns the record: the id of an active person in this workspace. Left out of a create, the record belongs to whoever made it — and a record an API key makes belongs to the person who created the key (failing that, the workspace's owner), so it is not hidden from everyone without View All. Left out of an update, the owner stays as it is."}},"patternProperties":{"^custom_\\w{1,80}$":{"description":"A custom field the workspace added. GET /api/v1/schema/{object} lists them, and the workspace description types them."}},"unevaluatedProperties":false,"required":["name","target"]},"Forecast":{"type":"object","title":"Forecast","allOf":[{"$ref":"#/components/schemas/RecordEnvelope"}],"properties":{"object":{"type":"string","const":"forecast"},"data":{"$ref":"#/components/schemas/ForecastFields"}},"required":["object","data"]},"ForecastPage":{"type":"object","title":"A page of forecasts","required":["data","nextCursor"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Forecast"}},"nextCursor":{"type":["string","null"],"description":"Send back as cursor, with the same sort, for the next page; null when this was the last."}}},"ForecastDetail":{"type":"object","title":"One forecast, with what hangs off it","required":["data","lineItems","activities","fieldHistory"],"properties":{"data":{"$ref":"#/components/schemas/Forecast"},"lineItems":{"type":"array","items":{"$ref":"#/components/schemas/LineItem"},"description":"Lines, for the kinds of record that have them; empty here."},"activities":{"type":"array","items":{"$ref":"#/components/schemas/Activity"},"description":"The timeline, newest first, at most 100."},"fieldHistory":{"type":"array","items":{"$ref":"#/components/schemas/FieldChange"},"description":"Value changes, newest first, at most 100 — without the fields the caller may not see."}}},"ForecastSaved":{"type":"object","title":"The forecast, as saved","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Forecast"},"rejectedFields":{"type":"array","items":{"type":"string"},"description":"Fields that were sent but not written: kept by the system, worked out from the lines, or not the caller's to change."},"possibleDuplicates":{"type":"array","items":{"$ref":"#/components/schemas/PossibleDuplicate"},"description":"On a create: records the workspace's duplicate rules matched, where the rule warns rather than blocks."}}},"ForecastBulkUpdate":{"type":"object","title":"The same change to many forecasts","required":["ids","patch"],"properties":{"ids":{"type":"array","items":{"type":"string","minLength":1},"minItems":1,"maxItems":500},"patch":{"$ref":"#/components/schemas/ForecastUpdate"}}},"ForecastMerge":{"type":"object","title":"Merge two forecasts","required":["keepId","mergeId"],"properties":{"keepId":{"type":"string","minLength":1,"description":"The record that survives."},"mergeId":{"type":"string","minLength":1,"description":"The record folded into it, then moved to the recycle bin."},"fields":{"type":"object","description":"Which side each field's value comes from. A field left out keeps the survivor's value, or takes the other's where the survivor's is empty.","propertyNames":{"anyOf":[{"enum":["name","forecastPeriod","startDate","endDate","target","currency","bestCase","commit","pipeline","status","owner","assumptions","description"]},{"pattern":"^custom_\\w{1,80}$"}]},"additionalProperties":{"type":"string","enum":["keep","merge"]}},"ownerId":{"type":"string","minLength":1,"description":"Who owns the merged record. Left out, the survivor's owner."}}},"ForecastEvent":{"type":"object","title":"A forecast event","allOf":[{"$ref":"#/components/schemas/WebhookEvent"}],"properties":{"event":{"type":"string","enum":["forecast.created","forecast.updated"]},"data":{"allOf":[{"$ref":"#/components/schemas/EventRecord"},{"$ref":"#/components/schemas/ForecastFields"}],"description":"The forecast with its field values beside id, object and name — not masked by any profile's field permissions."}}},"KnowledgeArticleFields":{"type":"object","title":"Knowledge article fields","description":"A knowledge article's values, by field key. A record made here carries every standard field, an empty one as \"\"; a custom field appears once it has a value. It may also carry keys the system adds as it works (a payment, a signature, a calendar link), which are read-only and not listed. A workspace's custom fields (keys beginning custom_) appear alongside; the workspace description lists them. Fields the caller may not see are left out. A value saved before a field's rules or choices changed is kept as it was until the record is next edited, so what is read can fall outside what may be written.","properties":{"name":{"type":["string","null"],"title":"Article title","description":"The title readers see, for example How to reset your password. Required."},"category":{"type":["string","null"],"enum":["","Getting started","How-to","Troubleshooting","Billing","Policy","Release notes",null],"title":"Category","description":"The topic of the article. It helps readers browse. Defaults to \"How-to\"."},"status":{"type":["string","null"],"enum":["","Draft","In review","Published","Archived",null],"title":"Publication status","description":"Draft and In review articles are hidden from readers. Published ones can be read. Defaults to \"Draft\"."},"visibility":{"type":["string","null"],"enum":["","Internal only","Customer portal","Public",null],"title":"Visible to","description":"Who can read this article. If you publish it on the portal or the web, people outside your team can read it. Defaults to \"Internal only\"."},"summary":{"type":["string","null"],"title":"Short summary","description":"A short line shown in search results and article lists."},"body":{"type":["string","null"],"title":"Article body","description":"The full text of the article. Required."},"keywords":{"type":["string","null"],"title":"Search keywords","description":"Words people might search for to find this article. Separate them with commas."},"owner":{"type":["string","null"],"title":"Record owner","description":"The person in your team who looks after this record. It shows in their lists, and they get its reminders. A person in this workspace, by name. Who owns the record is set with ownerId."},"reviewer":{"type":["string","null"],"title":"Reviewer","description":"The person who checks the article before it is published. A person in this workspace, by name. Who owns the record is set with ownerId."},"publishedAt":{"type":["string","null"],"format":"date","title":"Published on","description":"The date the article was published."},"reviewDue":{"type":["string","null"],"format":"date","title":"Next review due","description":"The date to check the article is still correct. Old articles cause support questions, so give every article a review date."},"relatedProduct":{"type":["string","null"],"title":"Related product","description":"The product this article is about, if any. Names a product by its name, as the app offers them to pick; it is not an id."},"views":{"anyOf":[{"type":"number","minimum":0},{"type":"string","enum":[""]},{"type":"null"}],"title":"Views","description":"How many times the article was opened. Counted for you. Kept by the system: a value sent is ignored and listed in rejectedFields. Defaults to 0.","readOnly":true},"helpful":{"anyOf":[{"type":"number","minimum":0},{"type":"string","enum":[""]},{"type":"null"}],"title":"Marked helpful","description":"How many readers said it helped. Counted for you. Kept by the system: a value sent is ignored and listed in rejectedFields. Defaults to 0.","readOnly":true},"notHelpful":{"anyOf":[{"type":"number","minimum":0},{"type":"string","enum":[""]},{"type":"null"}],"title":"Marked not helpful","description":"How many readers said it did not help. Counted for you. Kept by the system: a value sent is ignored and listed in rejectedFields. Defaults to 0.","readOnly":true},"tags":{"type":["string","null"],"title":"Tags","description":"Short words that help you group and find records, for example VIP or Trade show. Separate them with commas."}}},"KnowledgeArticleUpdate":{"type":"object","title":"Knowledge article changes","description":"Only the fields to change. A key the object does not have is refused (422 unknown_field); one the system keeps is ignored and listed in rejectedFields. A custom field the workspace has archived is accepted and ignored.","allOf":[{"$ref":"#/components/schemas/KnowledgeArticleFields"}],"properties":{"ownerId":{"type":"string","minLength":1,"description":"Who owns the record: the id of an active person in this workspace. Left out of a create, the record belongs to whoever made it — and a record an API key makes belongs to the person who created the key (failing that, the workspace's owner), so it is not hidden from everyone without View All. Left out of an update, the owner stays as it is."}},"patternProperties":{"^custom_\\w{1,80}$":{"description":"A custom field the workspace added. GET /api/v1/schema/{object} lists them, and the workspace description types them."}},"unevaluatedProperties":false},"KnowledgeArticleCreate":{"type":"object","title":"New knowledge article","description":"The fields of a new knowledge article. `name` and `body` are required; the rest take their defaults. Unknown keys are refused as on an update.","allOf":[{"$ref":"#/components/schemas/KnowledgeArticleFields"}],"properties":{"ownerId":{"type":"string","minLength":1,"description":"Who owns the record: the id of an active person in this workspace. Left out of a create, the record belongs to whoever made it — and a record an API key makes belongs to the person who created the key (failing that, the workspace's owner), so it is not hidden from everyone without View All. Left out of an update, the owner stays as it is."}},"patternProperties":{"^custom_\\w{1,80}$":{"description":"A custom field the workspace added. GET /api/v1/schema/{object} lists them, and the workspace description types them."}},"unevaluatedProperties":false,"required":["name","body"]},"KnowledgeArticle":{"type":"object","title":"Knowledge article","allOf":[{"$ref":"#/components/schemas/RecordEnvelope"}],"properties":{"object":{"type":"string","const":"article"},"data":{"$ref":"#/components/schemas/KnowledgeArticleFields"}},"required":["object","data"]},"KnowledgeArticlePage":{"type":"object","title":"A page of knowledge articles","required":["data","nextCursor"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/KnowledgeArticle"}},"nextCursor":{"type":["string","null"],"description":"Send back as cursor, with the same sort, for the next page; null when this was the last."}}},"KnowledgeArticleDetail":{"type":"object","title":"One knowledge article, with what hangs off it","required":["data","lineItems","activities","fieldHistory"],"properties":{"data":{"$ref":"#/components/schemas/KnowledgeArticle"},"lineItems":{"type":"array","items":{"$ref":"#/components/schemas/LineItem"},"description":"Lines, for the kinds of record that have them; empty here."},"activities":{"type":"array","items":{"$ref":"#/components/schemas/Activity"},"description":"The timeline, newest first, at most 100."},"fieldHistory":{"type":"array","items":{"$ref":"#/components/schemas/FieldChange"},"description":"Value changes, newest first, at most 100 — without the fields the caller may not see."}}},"KnowledgeArticleSaved":{"type":"object","title":"The knowledge article, as saved","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/KnowledgeArticle"},"rejectedFields":{"type":"array","items":{"type":"string"},"description":"Fields that were sent but not written: kept by the system, worked out from the lines, or not the caller's to change."},"possibleDuplicates":{"type":"array","items":{"$ref":"#/components/schemas/PossibleDuplicate"},"description":"On a create: records the workspace's duplicate rules matched, where the rule warns rather than blocks."}}},"KnowledgeArticleBulkUpdate":{"type":"object","title":"The same change to many knowledge articles","required":["ids","patch"],"properties":{"ids":{"type":"array","items":{"type":"string","minLength":1},"minItems":1,"maxItems":500},"patch":{"$ref":"#/components/schemas/KnowledgeArticleUpdate"}}},"KnowledgeArticleMerge":{"type":"object","title":"Merge two knowledge articles","required":["keepId","mergeId"],"properties":{"keepId":{"type":"string","minLength":1,"description":"The record that survives."},"mergeId":{"type":"string","minLength":1,"description":"The record folded into it, then moved to the recycle bin."},"fields":{"type":"object","description":"Which side each field's value comes from. A field left out keeps the survivor's value, or takes the other's where the survivor's is empty.","propertyNames":{"anyOf":[{"enum":["name","category","status","visibility","summary","body","keywords","owner","reviewer","publishedAt","reviewDue","relatedProduct","views","helpful","notHelpful","tags"]},{"pattern":"^custom_\\w{1,80}$"}]},"additionalProperties":{"type":"string","enum":["keep","merge"]}},"ownerId":{"type":"string","minLength":1,"description":"Who owns the merged record. Left out, the survivor's owner."}}},"KnowledgeArticleEvent":{"type":"object","title":"A knowledge article event","allOf":[{"$ref":"#/components/schemas/WebhookEvent"}],"properties":{"event":{"type":"string","enum":["article.created","article.updated"]},"data":{"allOf":[{"$ref":"#/components/schemas/EventRecord"},{"$ref":"#/components/schemas/KnowledgeArticleFields"}],"description":"The knowledge article with its field values beside id, object and name — not masked by any profile's field permissions."}}},"PriceBookFields":{"type":"object","title":"Price book fields","description":"A price book's values, by field key. A record made here carries every standard field, an empty one as \"\"; a custom field appears once it has a value. It may also carry keys the system adds as it works (a payment, a signature, a calendar link), which are read-only and not listed. A workspace's custom fields (keys beginning custom_) appear alongside; the workspace description lists them. Fields the caller may not see are left out. A value saved before a field's rules or choices changed is kept as it was until the record is next edited, so what is read can fall outside what may be written.","properties":{"name":{"type":["string","null"],"title":"Price book name","description":"A name for this price list, for example Partner prices 2026. Required."},"status":{"type":["string","null"],"enum":["","Draft","Active","Archived",null],"title":"Status","description":"Whether this price list can be used now. Defaults to \"Draft\"."},"bookType":{"type":["string","null"],"enum":["","Standard","Regional","Partner / reseller","Contract","Promotional",null],"title":"Price book type","description":"What the price list is for, for example one region, or your partners. Defaults to \"Regional\"."},"currency":{"$ref":"#/components/schemas/Currency","title":"Record currency","description":"The currency for the amounts on this record, for example USD or EUR. Defaults to the workspace's own currency."},"country":{"$ref":"#/components/schemas/Country","title":"Country","description":"The country this record is in. It decides which tax fields you see. Defaults to the workspace's own country."},"isDefault":{"type":["boolean","null"],"title":"Default for this currency","description":"Tick this to use this price list first for its currency."},"validFrom":{"type":["string","null"],"format":"date","title":"Valid from","description":"The first day these prices apply."},"validTo":{"type":["string","null"],"format":"date","title":"Valid to","description":"The last day these prices apply."},"discountPercent":{"anyOf":[{"type":"number","minimum":0,"maximum":100},{"type":"string","enum":[""]},{"type":"null"}],"title":"Standard discount (%)","description":"The discount on every item in this list, for example 10 for 10% off."},"minimumOrder":{"anyOf":[{"type":"number","minimum":0},{"type":"string","enum":[""]},{"type":"null"}],"title":"Minimum order value","description":"The smallest order total allowed with these prices."},"roundingRule":{"type":["string","null"],"enum":["","No rounding","Nearest whole unit","Nearest 0.05","Psychological (.99)",null],"title":"Rounding rule","description":"How prices are rounded after a discount, for example to a whole number or to end in .99. Defaults to \"No rounding\"."},"owner":{"type":["string","null"],"title":"Record owner","description":"The person in your team who looks after this record. It shows in their lists, and they get its reminders. A person in this workspace, by name. Who owns the record is set with ownerId."},"description":{"type":["string","null"],"title":"Description / notes","description":"Anything else worth knowing. Only people in your workspace can see it."}}},"PriceBookUpdate":{"type":"object","title":"Price book changes","description":"Only the fields to change. A key the object does not have is refused (422 unknown_field); one the system keeps is ignored and listed in rejectedFields. A custom field the workspace has archived is accepted and ignored.","allOf":[{"$ref":"#/components/schemas/PriceBookFields"}],"properties":{"ownerId":{"type":"string","minLength":1,"description":"Who owns the record: the id of an active person in this workspace. Left out of a create, the record belongs to whoever made it — and a record an API key makes belongs to the person who created the key (failing that, the workspace's owner), so it is not hidden from everyone without View All. Left out of an update, the owner stays as it is."}},"patternProperties":{"^custom_\\w{1,80}$":{"description":"A custom field the workspace added. GET /api/v1/schema/{object} lists them, and the workspace description types them."}},"unevaluatedProperties":false},"PriceBookCreate":{"type":"object","title":"New price book","description":"The fields of a new price book. `name` is required; the rest take their defaults. Unknown keys are refused as on an update.","allOf":[{"$ref":"#/components/schemas/PriceBookFields"}],"properties":{"ownerId":{"type":"string","minLength":1,"description":"Who owns the record: the id of an active person in this workspace. Left out of a create, the record belongs to whoever made it — and a record an API key makes belongs to the person who created the key (failing that, the workspace's owner), so it is not hidden from everyone without View All. Left out of an update, the owner stays as it is."}},"patternProperties":{"^custom_\\w{1,80}$":{"description":"A custom field the workspace added. GET /api/v1/schema/{object} lists them, and the workspace description types them."}},"unevaluatedProperties":false,"required":["name"]},"PriceBook":{"type":"object","title":"Price book","allOf":[{"$ref":"#/components/schemas/RecordEnvelope"}],"properties":{"object":{"type":"string","const":"pricebook"},"data":{"$ref":"#/components/schemas/PriceBookFields"}},"required":["object","data"]},"PriceBookPage":{"type":"object","title":"A page of price books","required":["data","nextCursor"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/PriceBook"}},"nextCursor":{"type":["string","null"],"description":"Send back as cursor, with the same sort, for the next page; null when this was the last."}}},"PriceBookDetail":{"type":"object","title":"One price book, with what hangs off it","required":["data","lineItems","activities","fieldHistory"],"properties":{"data":{"$ref":"#/components/schemas/PriceBook"},"lineItems":{"type":"array","items":{"$ref":"#/components/schemas/LineItem"},"description":"Lines, for the kinds of record that have them; empty here."},"activities":{"type":"array","items":{"$ref":"#/components/schemas/Activity"},"description":"The timeline, newest first, at most 100."},"fieldHistory":{"type":"array","items":{"$ref":"#/components/schemas/FieldChange"},"description":"Value changes, newest first, at most 100 — without the fields the caller may not see."}}},"PriceBookSaved":{"type":"object","title":"The price book, as saved","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/PriceBook"},"rejectedFields":{"type":"array","items":{"type":"string"},"description":"Fields that were sent but not written: kept by the system, worked out from the lines, or not the caller's to change."},"possibleDuplicates":{"type":"array","items":{"$ref":"#/components/schemas/PossibleDuplicate"},"description":"On a create: records the workspace's duplicate rules matched, where the rule warns rather than blocks."}}},"PriceBookBulkUpdate":{"type":"object","title":"The same change to many price books","required":["ids","patch"],"properties":{"ids":{"type":"array","items":{"type":"string","minLength":1},"minItems":1,"maxItems":500},"patch":{"$ref":"#/components/schemas/PriceBookUpdate"}}},"PriceBookMerge":{"type":"object","title":"Merge two price books","required":["keepId","mergeId"],"properties":{"keepId":{"type":"string","minLength":1,"description":"The record that survives."},"mergeId":{"type":"string","minLength":1,"description":"The record folded into it, then moved to the recycle bin."},"fields":{"type":"object","description":"Which side each field's value comes from. A field left out keeps the survivor's value, or takes the other's where the survivor's is empty.","propertyNames":{"anyOf":[{"enum":["name","status","bookType","currency","country","isDefault","validFrom","validTo","discountPercent","minimumOrder","roundingRule","owner","description"]},{"pattern":"^custom_\\w{1,80}$"}]},"additionalProperties":{"type":"string","enum":["keep","merge"]}},"ownerId":{"type":"string","minLength":1,"description":"Who owns the merged record. Left out, the survivor's owner."}}},"PriceBookEvent":{"type":"object","title":"A price book event","allOf":[{"$ref":"#/components/schemas/WebhookEvent"}],"properties":{"event":{"type":"string","enum":["pricebook.created","pricebook.updated"]},"data":{"allOf":[{"$ref":"#/components/schemas/EventRecord"},{"$ref":"#/components/schemas/PriceBookFields"}],"description":"The price book with its field values beside id, object and name — not masked by any profile's field permissions."}}},"VendorFields":{"type":"object","title":"Vendor fields","description":"A vendor's values, by field key. A record made here carries every standard field, an empty one as \"\"; a custom field appears once it has a value. It may also carry keys the system adds as it works (a payment, a signature, a calendar link), which are read-only and not listed. A workspace's custom fields (keys beginning custom_) appear alongside; the workspace description lists them. Fields the caller may not see are left out. A value saved before a field's rules or choices changed is kept as it was until the record is next edited, so what is read can fall outside what may be written.","properties":{"name":{"type":["string","null"],"title":"Vendor name","description":"The name of the supplier you buy from. Required."},"email":{"type":["string","null"],"format":"email","pattern":"^(?:\\s*[^\\s@]+@[^\\s@]+\\.[^\\s@]+\\s*)?$","title":"Email","description":"The email address you send orders to."},"phone":{"type":["string","null"],"pattern":"^(?:[\\s.\\(\\)\\-]*\\+?(?:[\\s.\\(\\)\\-]*[0-9]){7,15}[\\s.\\(\\)\\-]*)?$","title":"Phone","description":"Their phone number, with the country code. 7 to 15 digits, with an optional + and any spaces, dots, brackets or hyphens."},"website":{"type":["string","null"],"format":"uri","title":"Website","description":"Their website address. Kept as typed; the server does not check it is a full address."},"contactName":{"type":["string","null"],"title":"Primary contact","description":"The main person you deal with there."},"status":{"type":["string","null"],"enum":["","Active","On hold","Approved","Blacklisted",null],"title":"Vendor status","description":"Whether your team can buy from them. Blacklisted means do not use them. Defaults to \"Active\"."},"category":{"type":["string","null"],"enum":["","Goods","Services","Both",null],"title":"What they supply","description":"What they sell to you: goods, services or both. Defaults to \"Goods\"."},"paymentTerms":{"type":["string","null"],"examples":["Due on receipt","Net 15","Net 30","Net 45","Net 60","Advance","50% advance, balance on delivery","100% advance"],"title":"Payment terms","description":"How long there is to pay. For example, Net 30 means payment is due 30 days after the invoice date. Defaults to \"Net 30\". Usually Due on receipt, Net 15, Net 30, Net 45, Net 60, Advance, 50% advance, balance on delivery or 100% advance; any other text is accepted too."},"leadTimeDays":{"anyOf":[{"type":"number","minimum":0},{"type":"string","enum":[""]},{"type":"null"}],"title":"Typical lead time (days)","description":"How many days they usually take to deliver after you order. Defaults to 7."},"creditLimit":{"anyOf":[{"type":"number","minimum":0},{"type":"string","enum":[""]},{"type":"null"}],"title":"Credit limit","description":"The most you can owe this supplier at one time."},"currency":{"$ref":"#/components/schemas/Currency","title":"Record currency","description":"The currency for the amounts on this record, for example USD or EUR. Defaults to the workspace's own currency."},"country":{"$ref":"#/components/schemas/Country","title":"Country","description":"The country this record is in. It decides which tax fields you see. Defaults to the workspace's own country."},"street":{"type":["string","null"],"title":"Street address","description":"The street address, for example 221 Main Street, Suite 4."},"city":{"type":["string","null"],"title":"City","description":"The city, for example Austin or Leeds."},"state":{"type":["string","null"],"title":"State / province","description":"The state, province or region, for example Texas or Ontario."},"postalCode":{"type":["string","null"],"title":"ZIP / postal code","description":"The ZIP or postal code, for example 78701."},"taxStatus":{"type":["string","null"],"enum":["","Not registered","Registered","Exempt","Unknown",null],"title":"Tax registration status","description":"Whether this business is registered for tax, such as GST or VAT. Choose Unknown if you are not sure. Defaults to \"Not registered\"."},"legalName":{"type":["string","null"],"title":"Registered legal name","description":"The official name on the business's registration papers, for example Acme Holdings LLC. It can differ from the name people use."},"gstin":{"type":["string","null"],"title":"GSTIN","description":"India only. Their 15-character GST number. It prints on invoices. We check that it looks right, but we do not check it with the GST office. Used on records in India, where it must match `^(?:[0-9]{2}[A-Z]{5}[0-9]{4}[A-Z][1-9A-Z]Z[0-9A-Z])$`."},"pan":{"type":["string","null"],"title":"PAN","description":"India only. The 10-character PAN (Permanent Account Number) of the business. Used on records in India, where it must match `^(?:[A-Z]{5}[0-9]{4}[A-Z])$`."},"cin":{"type":["string","null"],"title":"CIN / LLPIN","description":"India only. The company's registration number (CIN), or the LLPIN for a limited liability partnership. Used on records in India."},"gstType":{"type":["string","null"],"enum":["","Regular","Composition","SEZ","Unregistered",null],"title":"GST registration type","description":"India only. The kind of GST registration they have. Most businesses are Regular. Used on records in India."},"gstStateCode":{"type":["string","null"],"title":"GST state code","description":"India only. The two-digit state code. It is also the first two digits of the GSTIN. Used on records in India, where it must match `^(?:[0-9]{2})$`."},"reverseCharge":{"type":["string","null"],"enum":["","No","Yes",null],"title":"Tax payable on reverse charge","description":"India only. Choose Yes if the customer, not you, pays the GST on this sale. The invoice always shows this, because the law asks for it. Used on records in India. Defaults to \"No\"."},"placeOfSupply":{"type":["string","null"],"title":"Place of supply","description":"India only. The state the goods or services go to. Leave it empty when it is the customer's state. Used on records in India."},"trn":{"type":["string","null"],"title":"VAT TRN","description":"UAE only. The 15-digit VAT registration number (TRN). We check the format only. Used on records in United Arab Emirates, where it must match `^(?:[0-9]{15})$`."},"emirate":{"type":["string","null"],"enum":["","Abu Dhabi","Dubai","Sharjah","Ajman","Umm Al Quwain","Ras Al Khaimah","Fujairah",null],"title":"Emirate","description":"UAE only. The emirate where the business is registered. Used on records in United Arab Emirates."},"vatNumber":{"type":["string","null"],"title":"VAT / tax registration number","description":"The business's VAT or tax registration number. It prints on invoices. Used on records in United Kingdom, Saudi Arabia, Bahrain, Oman, Switzerland, Norway, South Africa, Austria, Belgium, Bulgaria, Croatia, Cyprus, Czechia, Denmark, Estonia, Finland, France, Germany, Greece, Hungary, Ireland, Italy, Latvia, Lithuania, Luxembourg, Malta, Netherlands, Poland, Portugal, Romania, Slovakia, Slovenia, Spain, Sweden or Other."},"ein":{"type":["string","null"],"title":"EIN / federal tax ID","description":"United States only. The 9-digit Employer Identification Number from the IRS, for example 12-3456789. Used on records in United States."},"uen":{"type":["string","null"],"title":"UEN / GST registration","description":"Singapore only. The Unique Entity Number. Add the GST number too if they are registered for GST. Used on records in Singapore."},"abn":{"type":["string","null"],"title":"ABN / GST registration","description":"Australia only. The 11-digit Australian Business Number. Used on records in Australia."},"businessNumber":{"type":["string","null"],"title":"Business number / GST-HST","description":"Canada only. The 9-digit Business Number, with the GST/HST account if they have one. Used on records in Canada."},"taxExempt":{"type":["boolean","null"],"title":"Tax-exempt","description":"Tick this if this vendor is exempt from tax, so what you buy from them carries none."},"tradeLicense":{"type":["string","null"],"title":"Trade license number","description":"UAE and the Gulf. The number on the business's trade license. Used on records in United Arab Emirates, Saudi Arabia, Qatar, Kuwait, Bahrain or Oman."},"tradeLicenseAuthority":{"type":["string","null"],"title":"Licensing authority","description":"UAE only. The authority that issued the trade license, as it is named on it. A UAE e-invoice names it beside the number. Used on records in United Arab Emirates."},"licenseExpiry":{"type":["string","null"],"format":"date","title":"Trade license expiry","description":"The date it runs out. A rule under Processes & automation can remind you before then. Used on records in United Arab Emirates, Saudi Arabia, Qatar, Kuwait, Bahrain or Oman."},"incorporatedOn":{"type":["string","null"],"format":"date","title":"Incorporated on","description":"The date the company was legally registered."},"registeredAddress":{"type":["string","null"],"title":"Registered address","description":"The official address on the company's papers, if it is not where they work."},"beneficialOwner":{"type":["string","null"],"title":"Beneficial owner","description":"The person who really owns or controls the company. Banks often ask for this."},"authorisedPerson":{"type":["string","null"],"title":"Authorised signatory","description":"The person who is allowed to sign contracts for this company."},"authorisedRole":{"type":["string","null"],"title":"Their role","description":"The job title of the person who can sign for this company, for example Director."},"authorisedEmail":{"type":["string","null"],"format":"email","pattern":"^(?:\\s*[^\\s@]+@[^\\s@]+\\.[^\\s@]+\\s*)?$","title":"Their email","description":"The email address of the person who can sign for this company."},"authorisedIdType":{"type":["string","null"],"enum":["","Passport","National ID","Emirates ID","Aadhaar","Driving licence","Residence permit","Other",null],"title":"Their identity document","description":"The kind of identity document that person showed, for example a passport."},"authorisedIdNumber":{"type":["string","null"],"title":"Their document number","description":"The number on their identity document. Like every document number here, it never shows in search."},"authorisedIdExpiry":{"type":["string","null"],"format":"date","title":"Their document expires","description":"The date it runs out. A rule under Processes & automation can remind you before then."},"owner":{"type":["string","null"],"title":"Record owner","description":"The person in your team who looks after this record. It shows in their lists, and they get its reminders. A person in this workspace, by name. Who owns the record is set with ownerId."},"description":{"type":["string","null"],"title":"Description / notes","description":"Anything else worth knowing. Only people in your workspace can see it."}}},"VendorUpdate":{"type":"object","title":"Vendor changes","description":"Only the fields to change. A key the object does not have is refused (422 unknown_field); one the system keeps is ignored and listed in rejectedFields. A custom field the workspace has archived is accepted and ignored.","allOf":[{"$ref":"#/components/schemas/VendorFields"}],"properties":{"ownerId":{"type":"string","minLength":1,"description":"Who owns the record: the id of an active person in this workspace. Left out of a create, the record belongs to whoever made it — and a record an API key makes belongs to the person who created the key (failing that, the workspace's owner), so it is not hidden from everyone without View All. Left out of an update, the owner stays as it is."}},"patternProperties":{"^custom_\\w{1,80}$":{"description":"A custom field the workspace added. GET /api/v1/schema/{object} lists them, and the workspace description types them."}},"unevaluatedProperties":false},"VendorCreate":{"type":"object","title":"New vendor","description":"The fields of a new vendor. `name` is required; the rest take their defaults. Unknown keys are refused as on an update.","allOf":[{"$ref":"#/components/schemas/VendorFields"}],"properties":{"ownerId":{"type":"string","minLength":1,"description":"Who owns the record: the id of an active person in this workspace. Left out of a create, the record belongs to whoever made it — and a record an API key makes belongs to the person who created the key (failing that, the workspace's owner), so it is not hidden from everyone without View All. Left out of an update, the owner stays as it is."}},"patternProperties":{"^custom_\\w{1,80}$":{"description":"A custom field the workspace added. GET /api/v1/schema/{object} lists them, and the workspace description types them."}},"unevaluatedProperties":false,"required":["name"]},"Vendor":{"type":"object","title":"Vendor","allOf":[{"$ref":"#/components/schemas/RecordEnvelope"}],"properties":{"object":{"type":"string","const":"vendor"},"data":{"$ref":"#/components/schemas/VendorFields"}},"required":["object","data"]},"VendorPage":{"type":"object","title":"A page of vendors","required":["data","nextCursor"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Vendor"}},"nextCursor":{"type":["string","null"],"description":"Send back as cursor, with the same sort, for the next page; null when this was the last."}}},"VendorDetail":{"type":"object","title":"One vendor, with what hangs off it","required":["data","lineItems","activities","fieldHistory"],"properties":{"data":{"$ref":"#/components/schemas/Vendor"},"lineItems":{"type":"array","items":{"$ref":"#/components/schemas/LineItem"},"description":"Lines, for the kinds of record that have them; empty here."},"activities":{"type":"array","items":{"$ref":"#/components/schemas/Activity"},"description":"The timeline, newest first, at most 100."},"fieldHistory":{"type":"array","items":{"$ref":"#/components/schemas/FieldChange"},"description":"Value changes, newest first, at most 100 — without the fields the caller may not see."}}},"VendorSaved":{"type":"object","title":"The vendor, as saved","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Vendor"},"rejectedFields":{"type":"array","items":{"type":"string"},"description":"Fields that were sent but not written: kept by the system, worked out from the lines, or not the caller's to change."},"possibleDuplicates":{"type":"array","items":{"$ref":"#/components/schemas/PossibleDuplicate"},"description":"On a create: records the workspace's duplicate rules matched, where the rule warns rather than blocks."}}},"VendorBulkUpdate":{"type":"object","title":"The same change to many vendors","required":["ids","patch"],"properties":{"ids":{"type":"array","items":{"type":"string","minLength":1},"minItems":1,"maxItems":500},"patch":{"$ref":"#/components/schemas/VendorUpdate"}}},"VendorMerge":{"type":"object","title":"Merge two vendors","required":["keepId","mergeId"],"properties":{"keepId":{"type":"string","minLength":1,"description":"The record that survives."},"mergeId":{"type":"string","minLength":1,"description":"The record folded into it, then moved to the recycle bin."},"fields":{"type":"object","description":"Which side each field's value comes from. A field left out keeps the survivor's value, or takes the other's where the survivor's is empty.","propertyNames":{"anyOf":[{"enum":["name","email","phone","website","contactName","status","category","paymentTerms","leadTimeDays","creditLimit","currency","country","street","city","state","postalCode","taxStatus","legalName","gstin","pan","cin","gstType","gstStateCode","reverseCharge","placeOfSupply","trn","emirate","vatNumber","ein","uen","abn","businessNumber","taxExempt","tradeLicense","tradeLicenseAuthority","licenseExpiry","incorporatedOn","registeredAddress","beneficialOwner","authorisedPerson","authorisedRole","authorisedEmail","authorisedIdType","authorisedIdNumber","authorisedIdExpiry","owner","description"]},{"pattern":"^custom_\\w{1,80}$"}]},"additionalProperties":{"type":"string","enum":["keep","merge"]}},"ownerId":{"type":"string","minLength":1,"description":"Who owns the merged record. Left out, the survivor's owner."}}},"VendorEvent":{"type":"object","title":"A vendor event","allOf":[{"$ref":"#/components/schemas/WebhookEvent"}],"properties":{"event":{"type":"string","enum":["vendor.created","vendor.updated"]},"data":{"allOf":[{"$ref":"#/components/schemas/EventRecord"},{"$ref":"#/components/schemas/VendorFields"}],"description":"The vendor with its field values beside id, object and name — not masked by any profile's field permissions."}}},"SalesOrderFields":{"type":"object","title":"Sales order fields","description":"A sales order's values, by field key. A record made here carries every standard field, an empty one as \"\"; a custom field appears once it has a value. It may also carry keys the system adds as it works (a payment, a signature, a calendar link), which are read-only and not listed. A workspace's custom fields (keys beginning custom_) appear alongside; the workspace description lists them. Fields the caller may not see are left out. A value saved before a field's rules or choices changed is kept as it was until the record is next edited, so what is read can fall outside what may be written.","properties":{"country":{"$ref":"#/components/schemas/Country","title":"Country","description":"The country this record is in. It decides which tax fields you see. Defaults to the workspace's own country."},"state":{"type":["string","null"],"title":"State / province","description":"The state, province or region, for example Texas or Ontario."},"name":{"type":["string","null"],"title":"Sales order title","description":"A short title for the order, for example Acme Inc. – 20 laptops. Leave it out and the next number in the workspace's sequence is given (Settings › Document numbering). A number another sales order already carries is refused with 409 number_taken."},"orderNumber":{"type":["string","null"],"title":"Sales order number","description":"Given when the order is first saved, from Settings → Document numbering. It prints after No. on the order. Kept by the system: a value sent is ignored and listed in rejectedFields.","readOnly":true},"value":{"anyOf":[{"type":"number","minimum":0},{"type":"string","enum":[""]},{"type":"null"}],"title":"Order amount","description":"Worked out for you by adding up the lines. Worked out from the document's line items once it has some; then a value sent is ignored and listed in rejectedFields. Defaults to 0."},"company":{"type":["string","null"],"title":"Company / account","description":"The company this record belongs to. Choose one you have already added under Companies. Names a company by its name, as the app offers them to pick; it is not an id. The id of the company it means is in `companyId`."},"billingContact":{"type":["string","null"],"title":"Contact","description":"The person who placed the order. Names a contact by its name, as the app offers them to pick; it is not an id. The id of the contact it means is in `billingContactId`."},"email":{"type":["string","null"],"format":"email","pattern":"^(?:\\s*[^\\s@]+@[^\\s@]+\\.[^\\s@]+\\s*)?$","title":"Email","description":"The email address for order updates."},"relatedQuote":{"type":["string","null"],"title":"Raised from quote","description":"The quote this order came from, if any. Names a quote by its name, as the app offers them to pick; it is not an id."},"poNumber":{"type":["string","null"],"title":"Customer PO number","description":"The purchase order number the customer gave you, if they use one. It prints on the invoice so their team can match it."},"status":{"type":["string","null"],"enum":["","Draft","Confirmed","In progress","Delivered","Invoiced","Cancelled",null],"title":"Order status","description":"Where the order is, from Draft to Delivered and Invoiced. Defaults to \"Draft\"."},"orderDate":{"type":["string","null"],"format":"date","title":"Order date","description":"The date the order was placed."},"deliveryDate":{"type":["string","null"],"format":"date","title":"Promised delivery","description":"The date you promised to deliver."},"currency":{"$ref":"#/components/schemas/Currency","title":"Record currency","description":"The currency for the amounts on this record, for example USD or EUR. Defaults to the workspace's own currency."},"priceBook":{"type":["string","null"],"title":"Price book","description":"The price list this document is priced from. A product added to its lines takes that list's price. Names a price book by its name, as the app offers them to pick; it is not an id."},"street":{"type":["string","null"],"title":"Street address","description":"The street address, for example 221 Main Street, Suite 4."},"buildingNumber":{"type":["string","null"],"title":"Building number","description":"From the customer's national address. ZATCA asks for it on a tax invoice. Used on records in Saudi Arabia, where it must match `^(?:[0-9]{4})$`."},"district":{"type":["string","null"],"title":"District","description":"Used on records in Saudi Arabia."},"city":{"type":["string","null"],"title":"City","description":"The city, for example Austin or Leeds."},"postalCode":{"type":["string","null"],"title":"ZIP / postal code","description":"The ZIP or postal code, for example 78701."},"taxStatus":{"type":["string","null"],"enum":["","Not registered","Registered","Exempt","Unknown",null],"title":"Tax registration status","description":"Whether this business is registered for tax, such as GST or VAT. Choose Unknown if you are not sure. Defaults to \"Not registered\"."},"legalName":{"type":["string","null"],"title":"Registered legal name","description":"The official name on the business's registration papers, for example Acme Holdings LLC. It can differ from the name people use."},"gstin":{"type":["string","null"],"title":"GSTIN","description":"India only. Their 15-character GST number. It prints on invoices. We check that it looks right, but we do not check it with the GST office. Used on records in India, where it must match `^(?:[0-9]{2}[A-Z]{5}[0-9]{4}[A-Z][1-9A-Z]Z[0-9A-Z])$`."},"pan":{"type":["string","null"],"title":"PAN","description":"India only. The 10-character PAN (Permanent Account Number) of the business. Used on records in India, where it must match `^(?:[A-Z]{5}[0-9]{4}[A-Z])$`."},"cin":{"type":["string","null"],"title":"CIN / LLPIN","description":"India only. The company's registration number (CIN), or the LLPIN for a limited liability partnership. Used on records in India."},"gstType":{"type":["string","null"],"enum":["","Regular","Composition","SEZ","Unregistered",null],"title":"GST registration type","description":"India only. The kind of GST registration they have. Most businesses are Regular. Used on records in India."},"gstStateCode":{"type":["string","null"],"title":"GST state code","description":"India only. The two-digit state code. It is also the first two digits of the GSTIN. Used on records in India, where it must match `^(?:[0-9]{2})$`."},"reverseCharge":{"type":["string","null"],"enum":["","No","Yes",null],"title":"Tax payable on reverse charge","description":"India only. Choose Yes if the customer, not you, pays the GST on this sale. The invoice always shows this, because the law asks for it. Used on records in India. Defaults to \"No\"."},"placeOfSupply":{"type":["string","null"],"title":"Place of supply","description":"India only. The state the goods or services go to. Leave it empty when it is the customer's state. Used on records in India."},"trn":{"type":["string","null"],"title":"VAT TRN","description":"UAE only. The 15-digit VAT registration number (TRN). We check the format only. Used on records in United Arab Emirates, where it must match `^(?:[0-9]{15})$`."},"emirate":{"type":["string","null"],"enum":["","Abu Dhabi","Dubai","Sharjah","Ajman","Umm Al Quwain","Ras Al Khaimah","Fujairah",null],"title":"Emirate","description":"UAE only. The emirate where the business is registered. Used on records in United Arab Emirates."},"vatNumber":{"type":["string","null"],"title":"VAT / tax registration number","description":"The business's VAT or tax registration number. It prints on invoices. Used on records in United Kingdom, Saudi Arabia, Bahrain, Oman, Switzerland, Norway, South Africa, Austria, Belgium, Bulgaria, Croatia, Cyprus, Czechia, Denmark, Estonia, Finland, France, Germany, Greece, Hungary, Ireland, Italy, Latvia, Lithuania, Luxembourg, Malta, Netherlands, Poland, Portugal, Romania, Slovakia, Slovenia, Spain, Sweden or Other."},"ein":{"type":["string","null"],"title":"EIN / federal tax ID","description":"United States only. The 9-digit Employer Identification Number from the IRS, for example 12-3456789. Used on records in United States."},"uen":{"type":["string","null"],"title":"UEN / GST registration","description":"Singapore only. The Unique Entity Number. Add the GST number too if they are registered for GST. Used on records in Singapore."},"abn":{"type":["string","null"],"title":"ABN / GST registration","description":"Australia only. The 11-digit Australian Business Number. Used on records in Australia."},"businessNumber":{"type":["string","null"],"title":"Business number / GST-HST","description":"Canada only. The 9-digit Business Number, with the GST/HST account if they have one. Used on records in Canada."},"taxExempt":{"type":["boolean","null"],"title":"Tax-exempt customer","description":"Tick this if the customer does not pay tax, for example a charity with an exemption certificate."},"exportTax":{"type":["string","null"],"enum":["","Under LUT, without IGST","With IGST paid",null],"title":"Export / SEZ supply","description":"India only. Under your LUT for the year, no IGST is charged. With IGST paid, it is charged and you claim it back. Empty uses your LUT when there is one for the year. Used only while GST registration type is SEZ, or while the country is not India."},"chargeTaxAbroad":{"type":["boolean","null"],"title":"Charge tax as at home","description":"A sale to a customer in another country carries no tax: it is an export, or a business customer in another EU country accounts for the VAT. Tick this when it is taxed here all the same: a course or event held here, or a service used here. Used only while the country is not the workspace's own."},"owner":{"type":["string","null"],"title":"Record owner","description":"The person in your team who looks after this record. It shows in their lists, and they get its reminders. A person in this workspace, by name. Who owns the record is set with ownerId."},"terms":{"type":["string","null"],"title":"Terms & conditions","description":"The rules of the sale, for example delivery and refunds. They print at the bottom of the document."},"description":{"type":["string","null"],"title":"Description / notes","description":"Anything else worth knowing. Only people in your workspace can see it."},"companyId":{"type":["string","null"],"title":"Company / account (record id)","description":"The id of the company named in “Company / account”: set when one is picked from the list, and by the server when the name matches exactly one company. Send it to point at one record when names repeat; a name sent without it is matched to the record when exactly one has that name. Refused (422) when it is not a live record of that kind in this workspace; an id alone fills in the name."},"billingContactId":{"type":["string","null"],"title":"Contact (record id)","description":"The id of the contact named in “Contact”: set when one is picked from the list, and by the server when the name matches exactly one contact. Send it to point at one record when names repeat; a name sent without it is matched to the record when exactly one has that name. Refused (422) when it is not a live record of that kind in this workspace; an id alone fills in the name."}}},"SalesOrderUpdate":{"type":"object","title":"Sales order changes","description":"Only the fields to change. A key the object does not have is refused (422 unknown_field); one the system keeps is ignored and listed in rejectedFields. A custom field the workspace has archived is accepted and ignored.","allOf":[{"$ref":"#/components/schemas/SalesOrderFields"}],"properties":{"ownerId":{"type":"string","minLength":1,"description":"Who owns the record: the id of an active person in this workspace. Left out of a create, the record belongs to whoever made it — and a record an API key makes belongs to the person who created the key (failing that, the workspace's owner), so it is not hidden from everyone without View All. Left out of an update, the owner stays as it is."}},"patternProperties":{"^custom_\\w{1,80}$":{"description":"A custom field the workspace added. GET /api/v1/schema/{object} lists them, and the workspace description types them."}},"unevaluatedProperties":false},"SalesOrderCreate":{"type":"object","title":"New sales order","description":"The fields of a new sales order; anything left out takes its default. Unknown keys are refused as on an update.","allOf":[{"$ref":"#/components/schemas/SalesOrderFields"}],"properties":{"ownerId":{"type":"string","minLength":1,"description":"Who owns the record: the id of an active person in this workspace. Left out of a create, the record belongs to whoever made it — and a record an API key makes belongs to the person who created the key (failing that, the workspace's owner), so it is not hidden from everyone without View All. Left out of an update, the owner stays as it is."}},"patternProperties":{"^custom_\\w{1,80}$":{"description":"A custom field the workspace added. GET /api/v1/schema/{object} lists them, and the workspace description types them."}},"unevaluatedProperties":false},"SalesOrder":{"type":"object","title":"Sales order","allOf":[{"$ref":"#/components/schemas/RecordEnvelope"}],"properties":{"object":{"type":"string","const":"salesorder"},"data":{"$ref":"#/components/schemas/SalesOrderFields"}},"required":["object","data"]},"SalesOrderPage":{"type":"object","title":"A page of sales orders","required":["data","nextCursor"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/SalesOrder"}},"nextCursor":{"type":["string","null"],"description":"Send back as cursor, with the same sort, for the next page; null when this was the last."}}},"SalesOrderDetail":{"type":"object","title":"One sales order, with what hangs off it","required":["data","lineItems","activities","fieldHistory"],"properties":{"data":{"$ref":"#/components/schemas/SalesOrder"},"lineItems":{"type":"array","items":{"$ref":"#/components/schemas/LineItem"},"description":"The document's lines, in order. They are written in the app; an API key cannot change them."},"activities":{"type":"array","items":{"$ref":"#/components/schemas/Activity"},"description":"The timeline, newest first, at most 100."},"fieldHistory":{"type":"array","items":{"$ref":"#/components/schemas/FieldChange"},"description":"Value changes, newest first, at most 100 — without the fields the caller may not see."}}},"SalesOrderSaved":{"type":"object","title":"The sales order, as saved","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/SalesOrder"},"rejectedFields":{"type":"array","items":{"type":"string"},"description":"Fields that were sent but not written: kept by the system, worked out from the lines, or not the caller's to change."},"possibleDuplicates":{"type":"array","items":{"$ref":"#/components/schemas/PossibleDuplicate"},"description":"On a create: records the workspace's duplicate rules matched, where the rule warns rather than blocks."}}},"SalesOrderBulkUpdate":{"type":"object","title":"The same change to many sales orders","required":["ids","patch"],"properties":{"ids":{"type":"array","items":{"type":"string","minLength":1},"minItems":1,"maxItems":500},"patch":{"$ref":"#/components/schemas/SalesOrderUpdate"}}},"SalesOrderMerge":{"type":"object","title":"Merge two sales orders","required":["keepId","mergeId"],"properties":{"keepId":{"type":"string","minLength":1,"description":"The record that survives."},"mergeId":{"type":"string","minLength":1,"description":"The record folded into it, then moved to the recycle bin."},"fields":{"type":"object","description":"Which side each field's value comes from. A field left out keeps the survivor's value, or takes the other's where the survivor's is empty.","propertyNames":{"anyOf":[{"enum":["country","state","name","orderNumber","value","company","billingContact","email","relatedQuote","poNumber","status","orderDate","deliveryDate","currency","priceBook","street","buildingNumber","district","city","postalCode","taxStatus","legalName","gstin","pan","cin","gstType","gstStateCode","reverseCharge","placeOfSupply","trn","emirate","vatNumber","ein","uen","abn","businessNumber","taxExempt","exportTax","chargeTaxAbroad","owner","terms","description","companyId","billingContactId"]},{"pattern":"^custom_\\w{1,80}$"}]},"additionalProperties":{"type":"string","enum":["keep","merge"]}},"ownerId":{"type":"string","minLength":1,"description":"Who owns the merged record. Left out, the survivor's owner."}}},"SalesOrderEvent":{"type":"object","title":"A sales order event","allOf":[{"$ref":"#/components/schemas/WebhookEvent"}],"properties":{"event":{"type":"string","enum":["salesorder.created","salesorder.updated"]},"data":{"allOf":[{"$ref":"#/components/schemas/EventRecord"},{"$ref":"#/components/schemas/SalesOrderFields"}],"description":"The sales order with its field values beside id, object and name — not masked by any profile's field permissions."}}},"PurchaseOrderFields":{"type":"object","title":"Purchase order fields","description":"A purchase order's values, by field key. A record made here carries every standard field, an empty one as \"\"; a custom field appears once it has a value. It may also carry keys the system adds as it works (a payment, a signature, a calendar link), which are read-only and not listed. A workspace's custom fields (keys beginning custom_) appear alongside; the workspace description lists them. Fields the caller may not see are left out. A value saved before a field's rules or choices changed is kept as it was until the record is next edited, so what is read can fall outside what may be written.","properties":{"name":{"type":["string","null"],"title":"Purchase order title","description":"A short title for what you are buying, for example Office chairs for the new team. Leave it out and the next number in the workspace's sequence is given (Settings › Document numbering). A number another purchase order already carries is refused with 409 number_taken."},"orderNumber":{"type":["string","null"],"title":"Purchase order number","description":"Given when the order is first saved, from Settings → Document numbering. Ask the vendor to quote it on their invoice. Kept by the system: a value sent is ignored and listed in rejectedFields.","readOnly":true},"value":{"anyOf":[{"type":"number","minimum":0},{"type":"string","enum":[""]},{"type":"null"}],"title":"Order amount","description":"Worked out for you by adding up the lines. Worked out from the document's line items once it has some; then a value sent is ignored and listed in rejectedFields. Defaults to 0."},"vendor":{"type":["string","null"],"title":"Vendor","description":"The supplier you are buying from. Names a vendor by its name, as the app offers them to pick; it is not an id."},"vendorContact":{"type":["string","null"],"title":"Vendor contact","description":"The person at the supplier who handles this order."},"email":{"type":["string","null"],"format":"email","pattern":"^(?:\\s*[^\\s@]+@[^\\s@]+\\.[^\\s@]+\\s*)?$","title":"Vendor email","description":"The supplier's email address for this order."},"status":{"type":["string","null"],"enum":["","Draft","Issued","Acknowledged","Partly received","Received","Billed","Cancelled",null],"title":"Order status","description":"Where the order is, from Draft to Delivered. Defaults to \"Draft\"."},"orderDate":{"type":["string","null"],"format":"date","title":"Order date","description":"The date the order was placed."},"expectedDate":{"type":["string","null"],"format":"date","title":"Expected delivery","description":"The date you expect the goods to arrive."},"receivedDate":{"type":["string","null"],"format":"date","title":"Received on","description":"The date the goods arrived."},"paymentTerms":{"type":["string","null"],"examples":["Due on receipt","Net 15","Net 30","Net 45","Net 60","Advance","50% advance, balance on delivery","100% advance"],"title":"Payment terms","description":"How long there is to pay. For example, Net 30 means payment is due 30 days after the invoice date. Defaults to \"Net 30\". Usually Due on receipt, Net 15, Net 30, Net 45, Net 60, Advance, 50% advance, balance on delivery or 100% advance; any other text is accepted too."},"shipTo":{"type":["string","null"],"title":"Deliver to","description":"The address where the goods should be delivered."},"currency":{"$ref":"#/components/schemas/Currency","title":"Record currency","description":"The currency for the amounts on this record, for example USD or EUR. Defaults to the workspace's own currency."},"country":{"$ref":"#/components/schemas/Country","title":"Country","description":"The country this record is in. It decides which tax fields you see. Defaults to the workspace's own country."},"taxStatus":{"type":["string","null"],"enum":["","Not registered","Registered","Exempt","Unknown",null],"title":"Tax registration status","description":"Whether this business is registered for tax, such as GST or VAT. Choose Unknown if you are not sure. Defaults to \"Not registered\"."},"legalName":{"type":["string","null"],"title":"Registered legal name","description":"The official name on the business's registration papers, for example Acme Holdings LLC. It can differ from the name people use."},"gstin":{"type":["string","null"],"title":"GSTIN","description":"India only. Their 15-character GST number. It prints on invoices. We check that it looks right, but we do not check it with the GST office. Used on records in India, where it must match `^(?:[0-9]{2}[A-Z]{5}[0-9]{4}[A-Z][1-9A-Z]Z[0-9A-Z])$`."},"pan":{"type":["string","null"],"title":"PAN","description":"India only. The 10-character PAN (Permanent Account Number) of the business. Used on records in India, where it must match `^(?:[A-Z]{5}[0-9]{4}[A-Z])$`."},"cin":{"type":["string","null"],"title":"CIN / LLPIN","description":"India only. The company's registration number (CIN), or the LLPIN for a limited liability partnership. Used on records in India."},"gstType":{"type":["string","null"],"enum":["","Regular","Composition","SEZ","Unregistered",null],"title":"GST registration type","description":"India only. The kind of GST registration they have. Most businesses are Regular. Used on records in India."},"gstStateCode":{"type":["string","null"],"title":"GST state code","description":"India only. The two-digit state code. It is also the first two digits of the GSTIN. Used on records in India, where it must match `^(?:[0-9]{2})$`."},"reverseCharge":{"type":["string","null"],"enum":["","No","Yes",null],"title":"Tax payable on reverse charge","description":"India only. Choose Yes if the customer, not you, pays the GST on this sale. The invoice always shows this, because the law asks for it. Used on records in India. Defaults to \"No\"."},"placeOfSupply":{"type":["string","null"],"title":"Place of supply","description":"India only. The state the goods or services go to. Leave it empty when it is the customer's state. Used on records in India."},"trn":{"type":["string","null"],"title":"VAT TRN","description":"UAE only. The 15-digit VAT registration number (TRN). We check the format only. Used on records in United Arab Emirates, where it must match `^(?:[0-9]{15})$`."},"emirate":{"type":["string","null"],"enum":["","Abu Dhabi","Dubai","Sharjah","Ajman","Umm Al Quwain","Ras Al Khaimah","Fujairah",null],"title":"Emirate","description":"UAE only. The emirate where the business is registered. Used on records in United Arab Emirates."},"vatNumber":{"type":["string","null"],"title":"VAT / tax registration number","description":"The business's VAT or tax registration number. It prints on invoices. Used on records in United Kingdom, Saudi Arabia, Bahrain, Oman, Switzerland, Norway, South Africa, Austria, Belgium, Bulgaria, Croatia, Cyprus, Czechia, Denmark, Estonia, Finland, France, Germany, Greece, Hungary, Ireland, Italy, Latvia, Lithuania, Luxembourg, Malta, Netherlands, Poland, Portugal, Romania, Slovakia, Slovenia, Spain, Sweden or Other."},"ein":{"type":["string","null"],"title":"EIN / federal tax ID","description":"United States only. The 9-digit Employer Identification Number from the IRS, for example 12-3456789. Used on records in United States."},"uen":{"type":["string","null"],"title":"UEN / GST registration","description":"Singapore only. The Unique Entity Number. Add the GST number too if they are registered for GST. Used on records in Singapore."},"abn":{"type":["string","null"],"title":"ABN / GST registration","description":"Australia only. The 11-digit Australian Business Number. Used on records in Australia."},"businessNumber":{"type":["string","null"],"title":"Business number / GST-HST","description":"Canada only. The 9-digit Business Number, with the GST/HST account if they have one. Used on records in Canada."},"taxExempt":{"type":["boolean","null"],"title":"Tax-exempt","description":"Tick this if this purchase carries no tax, for example because the vendor is exempt."},"owner":{"type":["string","null"],"title":"Record owner","description":"The person in your team who looks after this record. It shows in their lists, and they get its reminders. A person in this workspace, by name. Who owns the record is set with ownerId."},"terms":{"type":["string","null"],"title":"Terms & conditions","description":"The rules of the sale, for example delivery and refunds. They print at the bottom of the document."},"description":{"type":["string","null"],"title":"Description / notes","description":"Anything else worth knowing. Only people in your workspace can see it."}}},"PurchaseOrderUpdate":{"type":"object","title":"Purchase order changes","description":"Only the fields to change. A key the object does not have is refused (422 unknown_field); one the system keeps is ignored and listed in rejectedFields. A custom field the workspace has archived is accepted and ignored.","allOf":[{"$ref":"#/components/schemas/PurchaseOrderFields"}],"properties":{"ownerId":{"type":"string","minLength":1,"description":"Who owns the record: the id of an active person in this workspace. Left out of a create, the record belongs to whoever made it — and a record an API key makes belongs to the person who created the key (failing that, the workspace's owner), so it is not hidden from everyone without View All. Left out of an update, the owner stays as it is."}},"patternProperties":{"^custom_\\w{1,80}$":{"description":"A custom field the workspace added. GET /api/v1/schema/{object} lists them, and the workspace description types them."}},"unevaluatedProperties":false},"PurchaseOrderCreate":{"type":"object","title":"New purchase order","description":"The fields of a new purchase order; anything left out takes its default. Unknown keys are refused as on an update.","allOf":[{"$ref":"#/components/schemas/PurchaseOrderFields"}],"properties":{"ownerId":{"type":"string","minLength":1,"description":"Who owns the record: the id of an active person in this workspace. Left out of a create, the record belongs to whoever made it — and a record an API key makes belongs to the person who created the key (failing that, the workspace's owner), so it is not hidden from everyone without View All. Left out of an update, the owner stays as it is."}},"patternProperties":{"^custom_\\w{1,80}$":{"description":"A custom field the workspace added. GET /api/v1/schema/{object} lists them, and the workspace description types them."}},"unevaluatedProperties":false},"PurchaseOrder":{"type":"object","title":"Purchase order","allOf":[{"$ref":"#/components/schemas/RecordEnvelope"}],"properties":{"object":{"type":"string","const":"purchaseorder"},"data":{"$ref":"#/components/schemas/PurchaseOrderFields"}},"required":["object","data"]},"PurchaseOrderPage":{"type":"object","title":"A page of purchase orders","required":["data","nextCursor"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/PurchaseOrder"}},"nextCursor":{"type":["string","null"],"description":"Send back as cursor, with the same sort, for the next page; null when this was the last."}}},"PurchaseOrderDetail":{"type":"object","title":"One purchase order, with what hangs off it","required":["data","lineItems","activities","fieldHistory"],"properties":{"data":{"$ref":"#/components/schemas/PurchaseOrder"},"lineItems":{"type":"array","items":{"$ref":"#/components/schemas/LineItem"},"description":"The document's lines, in order. They are written in the app; an API key cannot change them."},"activities":{"type":"array","items":{"$ref":"#/components/schemas/Activity"},"description":"The timeline, newest first, at most 100."},"fieldHistory":{"type":"array","items":{"$ref":"#/components/schemas/FieldChange"},"description":"Value changes, newest first, at most 100 — without the fields the caller may not see."}}},"PurchaseOrderSaved":{"type":"object","title":"The purchase order, as saved","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/PurchaseOrder"},"rejectedFields":{"type":"array","items":{"type":"string"},"description":"Fields that were sent but not written: kept by the system, worked out from the lines, or not the caller's to change."},"possibleDuplicates":{"type":"array","items":{"$ref":"#/components/schemas/PossibleDuplicate"},"description":"On a create: records the workspace's duplicate rules matched, where the rule warns rather than blocks."}}},"PurchaseOrderBulkUpdate":{"type":"object","title":"The same change to many purchase orders","required":["ids","patch"],"properties":{"ids":{"type":"array","items":{"type":"string","minLength":1},"minItems":1,"maxItems":500},"patch":{"$ref":"#/components/schemas/PurchaseOrderUpdate"}}},"PurchaseOrderMerge":{"type":"object","title":"Merge two purchase orders","required":["keepId","mergeId"],"properties":{"keepId":{"type":"string","minLength":1,"description":"The record that survives."},"mergeId":{"type":"string","minLength":1,"description":"The record folded into it, then moved to the recycle bin."},"fields":{"type":"object","description":"Which side each field's value comes from. A field left out keeps the survivor's value, or takes the other's where the survivor's is empty.","propertyNames":{"anyOf":[{"enum":["name","orderNumber","value","vendor","vendorContact","email","status","orderDate","expectedDate","receivedDate","paymentTerms","shipTo","currency","country","taxStatus","legalName","gstin","pan","cin","gstType","gstStateCode","reverseCharge","placeOfSupply","trn","emirate","vatNumber","ein","uen","abn","businessNumber","taxExempt","owner","terms","description"]},{"pattern":"^custom_\\w{1,80}$"}]},"additionalProperties":{"type":"string","enum":["keep","merge"]}},"ownerId":{"type":"string","minLength":1,"description":"Who owns the merged record. Left out, the survivor's owner."}}},"PurchaseOrderEvent":{"type":"object","title":"A purchase order event","allOf":[{"$ref":"#/components/schemas/WebhookEvent"}],"properties":{"event":{"type":"string","enum":["purchaseorder.created","purchaseorder.updated"]},"data":{"allOf":[{"$ref":"#/components/schemas/EventRecord"},{"$ref":"#/components/schemas/PurchaseOrderFields"}],"description":"The purchase order with its field values beside id, object and name — not masked by any profile's field permissions."}}}},"responses":{"BadRequest":{"summary":"Not accepted as sent","description":"bad_request: the request was understood but cannot be accepted — an unknown sort, a cursor this list did not give out, a missing id, a record allowance that is full. invalid_json: the body is not JSON.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"},"examples":{"sort":{"summary":"An order that is not offered","dataValue":{"type":"https://api-crm.rootdigit.com/errors/bad_request","title":"The only order offered is sort=newest, newest first.","status":400,"code":"bad_request","instance":"/api/v1/contact?sort=name"}}}}}},"Unauthorized":{"summary":"No valid credentials","description":"unauthorized: the key is missing, malformed, expired or revoked. ip_not_allowed: the workspace takes calls only from its approved networks, and this one is not among them.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"},"examples":{"key":{"summary":"A revoked key","dataValue":{"type":"https://api-crm.rootdigit.com/errors/unauthorized","title":"API key is invalid, expired, or revoked.","status":401,"code":"unauthorized","instance":"/api/v1/contact"}}}}}},"Forbidden":{"summary":"Not allowed","description":"forbidden: the key lacks the scope (named in scope), the profile does not allow the action (object and verb), the record is waiting on an approval, its subject asked for processing to stop or to be erased, or the workspace's plan does not include API access (reason trial during a trial). api_key_scope: the route is not part of the API-key surface. module_not_entitled: the plan does not include the module (named in module). over_plan: the record is older than the newest ones the plan opens. A browser calling from another workspace's address gets wrong_workspace or domain_inactive.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"},"examples":{"scope":{"summary":"A scope the key does not hold","dataValue":{"type":"https://api-crm.rootdigit.com/errors/forbidden","title":"This API key does not have the contacts:write scope.","status":403,"code":"forbidden","instance":"/api/v1/contact","scope":"contacts:write"}},"surface":{"summary":"A route keys cannot reach","dataValue":{"type":"https://api-crm.rootdigit.com/errors/api_key_scope","title":"API keys reach the records API only. Use a signed-in session for workspace administration.","status":403,"code":"api_key_scope","instance":"/api/v1/users","endpoint":"/api/v1/users"}}}}}},"NotFound":{"summary":"Not found","description":"not_found: no such record, or not one this caller may see — the two are answered alike.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"},"examples":{"record":{"summary":"No such record","dataValue":{"type":"https://api-crm.rootdigit.com/errors/not_found","title":"Record not found.","status":404,"code":"not_found","instance":"/api/v1/contact/rec_000000000000000000000000"}}}}}},"Conflict":{"summary":"Conflicts with what is there","description":"conflict: the record changed since If-Match's version (currentVersion), a duplicate rule blocks the save (duplicates), or the lead was converted already (converted). record_settled: an issued document refuses a change to what it charged. number_taken: another document already carries that number.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"},"examples":{"version":{"summary":"Changed since it was read","dataValue":{"type":"https://api-crm.rootdigit.com/errors/conflict","title":"This record changed since you loaded it.","status":409,"code":"conflict","instance":"/api/v1/contact/rec_3f1c9a0b5d2e4f6a7b8c9d0e","currentVersion":4}}}}}},"ValidationFailed":{"summary":"Fields that do not pass","description":"validation: one entry in errors for each field that failed, with a code to branch on and a sentence to show.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"},"examples":{"fields":{"summary":"Two fields refused","dataValue":{"type":"https://api-crm.rootdigit.com/errors/validation","title":"Validation failed.","status":422,"code":"validation","instance":"/api/v1/contact","errors":[{"field":"email","code":"email","detail":"Work email must be a valid email address."},{"field":"nickname","code":"unknown_field","detail":"No field named \"nickname\" on this object."}]}}}}}},"TooManyRequests":{"summary":"Slow down","description":"rate_limited: too many requests in the minute — from the address, from this key, or exports for the workspace; wait Retry-After seconds. plan_quota: the plan's daily allowance is used up until the next day.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"},"examples":{"key":{"summary":"A key over its minute","dataValue":{"type":"https://api-crm.rootdigit.com/errors/rate_limited","title":"Too many requests from this API key — wait 12 seconds and try again.","status":429,"code":"rate_limited","instance":"/api/v1/contact"}}}}}},"ServerError":{"summary":"Our fault","description":"internal: something failed on our side. Nothing about it is in the answer except requestId, which support can trace. A request body over 1 MiB is answered this way too, for now, rather than with 413.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"},"examples":{"internal":{"summary":"An unexpected failure","dataValue":{"type":"https://api-crm.rootdigit.com/errors/internal","title":"Something went wrong on our side.","status":500,"code":"internal","instance":"/api/v1/contact","requestId":"8d6a0e1e-3b0e-4c55-9d43-63b6f1c1f0a2"}}}}}},"Deleted":{"summary":"Moved to the recycle bin","description":"Gone from every list, and restorable until the bin is emptied.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Plan-Calls-Limit":{"$ref":"#/components/headers/PlanCallsLimit"},"X-Plan-Calls-Remaining":{"$ref":"#/components/headers/PlanCallsRemaining"}}},"Restored":{"summary":"Back from the recycle bin","description":"The record is live again.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Plan-Calls-Limit":{"$ref":"#/components/headers/PlanCallsLimit"},"X-Plan-Calls-Remaining":{"$ref":"#/components/headers/PlanCallsRemaining"},"Idempotent-Replay":{"$ref":"#/components/headers/IdempotentReplay"}},"content":{"application/json":{"schema":{"type":"object","required":["restored"],"properties":{"restored":{"type":"boolean","const":true}}}}}},"BulkUpdated":{"summary":"What changed, and what did not","description":"Each record is changed whole or not at all; one refusal does not undo the others.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Plan-Calls-Limit":{"$ref":"#/components/headers/PlanCallsLimit"},"X-Plan-Calls-Remaining":{"$ref":"#/components/headers/PlanCallsRemaining"},"Idempotent-Replay":{"$ref":"#/components/headers/IdempotentReplay"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkResult"}}}},"Merged":{"summary":"Merged","description":"The survivor has the chosen values and everything that hung off the other record; the other is in the recycle bin.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Plan-Calls-Limit":{"$ref":"#/components/headers/PlanCallsLimit"},"X-Plan-Calls-Remaining":{"$ref":"#/components/headers/PlanCallsRemaining"},"Idempotent-Replay":{"$ref":"#/components/headers/IdempotentReplay"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MergeResult"}}}},"MergePreviewed":{"summary":"The two side by side","description":"What differs, what would move, and how many other records name the one that would go.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Plan-Calls-Limit":{"$ref":"#/components/headers/PlanCallsLimit"},"X-Plan-Calls-Remaining":{"$ref":"#/components/headers/PlanCallsRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MergePreview"}}}},"McpUnauthorized":{"summary":"No valid credentials","description":"As unauthorized elsewhere, with WWW-Authenticate pointing an MCP client at how to sign in (RFC 9728).","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"WWW-Authenticate":{"description":"Bearer resource_metadata=\"…/.well-known/oauth-protected-resource/api/v1/mcp\".","schema":{"type":"string"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"},"examples":{"key":{"summary":"No credentials","dataValue":{"type":"https://api-crm.rootdigit.com/errors/unauthorized","title":"Authentication required.","status":401,"code":"unauthorized","instance":"/api/v1/mcp"}}}}}}},"parameters":{"RecordId":{"name":"id","in":"path","required":true,"description":"The record's id.","schema":{"type":"string","minLength":1}},"Limit":{"name":"limit","in":"query","description":"How many records a page holds: 1 to 1,000, 50 when left out. A larger number is treated as 1,000.","schema":{"type":"integer","minimum":1,"maximum":1000,"default":50}},"Cursor":{"name":"cursor","in":"query","description":"nextCursor from the previous page, sent with the same sort. Opaque: do not build one.","schema":{"type":"string"}},"Search":{"name":"q","in":"query","description":"Finds records whose name or values contain this, ignoring case. Identity document numbers are kept out of search. % and _ stand for any text and any one character.","schema":{"type":"string"}},"Sort":{"name":"sort","in":"query","description":"newest lists the newest first. Without it the order is fixed but not by date; any other value is refused (400).","schema":{"type":"string","enum":["newest"]}},"Deleted":{"name":"deleted","in":"query","description":"true lists this object's records in the recycle bin instead of the live ones.","schema":{"type":"boolean"}},"IdempotencyKey":{"name":"Idempotency-Key","in":"header","description":"Makes a retry safe: a successful answer is kept for 24 hours and a repeat with the same key gets it back, with Idempotent-Replay: true, instead of acting twice. Keys are per workspace, not per endpoint — use a fresh one for each request.","schema":{"type":"string","minLength":1}},"IfMatch":{"name":"If-Match","in":"header","description":"The record's version as last read (the number, quoted or not). When the record has changed since, the update is refused with 409 conflict and the problem's currentVersion says what it is now.","schema":{"type":"string","pattern":"^\"?[0-9]+\"?$"}},"KeepId":{"name":"keepId","in":"query","required":true,"description":"The record that would survive.","schema":{"type":"string","minLength":1}},"MergeId":{"name":"mergeId","in":"query","required":true,"description":"The record that would be folded into it.","schema":{"type":"string","minLength":1}},"Oas":{"name":"oas","in":"query","description":"3.1 for the same description as OpenAPI 3.1.2, for tools that do not read 3.2 yet.","schema":{"type":"string","enum":["3.2","3.1"],"default":"3.2"}},"Download":{"name":"download","in":"query","description":"true (or 1) to have it saved as a file rather than shown.","schema":{"type":"boolean"}},"IfNoneMatch":{"name":"If-None-Match","in":"header","description":"The ETag of a copy already held. While it still matches, the answer is 304 with no body.","schema":{"type":"string"}},"EventHeader":{"name":"X-RootDigit-Event","in":"header","required":true,"description":"The event's name, as in the body.","schema":{"type":"string"}},"DeliveryHeader":{"name":"X-RootDigit-Delivery","in":"header","required":true,"description":"The delivery's number. The body's id is evt_ and this number.","schema":{"type":"string","pattern":"^[0-9]+$"}},"SignatureHeader":{"name":"X-RootDigit-Signature","in":"header","required":true,"description":"t=<unix seconds>,v1=<hex>. v1 is the HMAC-SHA256, keyed with the endpoint's signing secret (whsec_…, shown once when the endpoint is added), of t, a full stop and the raw body exactly as received. Compare it in constant time, and refuse a t more than five minutes from now. Each attempt is signed afresh.","schema":{"type":"string","pattern":"^t=[0-9]+,v1=[0-9a-f]{64}$"},"example":"t=1792368000,v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bd"}},"headers":{"RequestId":{"description":"This request's id. Quote it to support.","schema":{"type":"string","format":"uuid"}},"RateLimitLimit":{"description":"Requests allowed per minute from the calling address.","schema":{"type":"integer","minimum":0}},"RateLimitRemaining":{"description":"Requests left this minute from the calling address.","schema":{"type":"integer","minimum":0}},"RateLimitReset":{"description":"Seconds until the minute's allowance starts again.","schema":{"type":"integer","minimum":0,"maximum":60}},"RetryAfter":{"description":"Seconds to wait before trying again.","schema":{"type":"integer","minimum":0}},"PlanCallsLimit":{"description":"The plan's daily allowance this request counted against — a key's reads, or writes — while one applies.","schema":{"type":"integer","minimum":0}},"PlanCallsRemaining":{"description":"What is left of that allowance today.","schema":{"type":"integer","minimum":0}},"IdempotentReplay":{"description":"true when this is the stored answer to an earlier POST with the same Idempotency-Key.","schema":{"type":"string","enum":["true"]}}},"securitySchemes":{"apiKeyBearer":{"type":"http","scheme":"bearer","bearerFormat":"rk_live_… API key","description":"An API key, created by an administrator under Settings › Developer & API access and shown once: `Authorization: Bearer rk_live_…`. A key acts for the workspace, bounded by the scopes it was given; each operation names the ones it needs.\n\n| Scope | Allows |\n| --- | --- |\n| `contacts:read` | Read contacts. |\n| `contacts:write` | Create, change, delete, restore and merge contacts. |\n| `companies:read` | Read companies. |\n| `companies:write` | Create, change, delete, restore and merge companies. |\n| `leads:read` | Read leads. |\n| `leads:write` | Create, change, delete, restore and merge leads. |\n| `deals:read` | Read deals. |\n| `deals:write` | Create, change, delete, restore and merge deals. |\n| `tasks:read` | Read tasks. |\n| `tasks:write` | Create, change, delete, restore and merge tasks. |\n| `events:read` | Read calendar events. |\n| `events:write` | Create, change, delete, restore and merge calendar events. |\n| `campaigns:read` | Read campaigns. |\n| `campaigns:write` | Create, change, delete, restore and merge campaigns. |\n| `invoices:read` | Read invoices. |\n| `invoices:write` | Create, change, delete, restore and merge invoices. |\n| `creditnotes:read` | Read credit notes. |\n| `creditnotes:write` | Create, change, delete, restore and merge credit notes. |\n| `recurring:read` | Read recurring invoices. |\n| `recurring:write` | Create, change, delete, restore and merge recurring invoices. |\n| `products:read` | Read products. |\n| `products:write` | Create, change, delete, restore and merge products. |\n| `quotes:read` | Read quotes. |\n| `quotes:write` | Create, change, delete, restore and merge quotes. |\n| `cases:read` | Read support cases. |\n| `cases:write` | Create, change, delete, restore and merge support cases. |\n| `visits:read` | Read visits. |\n| `visits:write` | Create, change, delete, restore and merge visits. |\n| `inventories:read` | Read inventory items. |\n| `inventories:write` | Create, change, delete, restore and merge inventory items. |\n| `processes:read` | Read processes. |\n| `processes:write` | Create, change, delete, restore and merge processes. |\n| `forecasts:read` | Read forecasts. |\n| `forecasts:write` | Create, change, delete, restore and merge forecasts. |\n| `articles:read` | Read knowledge articles. |\n| `articles:write` | Create, change, delete, restore and merge knowledge articles. |\n| `pricebooks:read` | Read price books. |\n| `pricebooks:write` | Create, change, delete, restore and merge price books. |\n| `vendors:read` | Read vendors. |\n| `vendors:write` | Create, change, delete, restore and merge vendors. |\n| `salesorders:read` | Read sales orders. |\n| `salesorders:write` | Create, change, delete, restore and merge sales orders. |\n| `purchaseorders:read` | Read purchase orders. |\n| `purchaseorders:write` | Create, change, delete, restore and merge purchase orders. |"},"apiKeyHeader":{"type":"http","scheme":"ApiKey","description":"The same key in the form the API first accepted: `Authorization: ApiKey rk_live_…`. Same scopes, same answers."},"signIn":{"type":"oauth2","description":"How AI assistants connect: OAuth 2.1 authorization code with PKCE (S256), for public clients that register themselves (RFC 7591). A person signs in to their workspace and chooses what to allow; the access token (oa_live_…) is sent as a Bearer token and reaches the same endpoints a key does, as that person, within those scopes and their own access. Access tokens last eight hours; refresh tokens ninety days, replaced on every use. Asking for no scope asks for all of them.","flows":{"authorizationCode":{"authorizationUrl":"https://api-crm.rootdigit.com/api/v1/public/oauth/authorize","tokenUrl":"https://api-crm.rootdigit.com/api/v1/public/oauth/token","refreshUrl":"https://api-crm.rootdigit.com/api/v1/public/oauth/token","scopes":{"contacts:read":"Read contacts.","contacts:write":"Create, change, delete, restore and merge contacts.","companies:read":"Read companies.","companies:write":"Create, change, delete, restore and merge companies.","leads:read":"Read leads.","leads:write":"Create, change, delete, restore and merge leads.","deals:read":"Read deals.","deals:write":"Create, change, delete, restore and merge deals.","tasks:read":"Read tasks.","tasks:write":"Create, change, delete, restore and merge tasks.","events:read":"Read calendar events.","events:write":"Create, change, delete, restore and merge calendar events.","campaigns:read":"Read campaigns.","campaigns:write":"Create, change, delete, restore and merge campaigns.","invoices:read":"Read invoices.","invoices:write":"Create, change, delete, restore and merge invoices.","creditnotes:read":"Read credit notes.","creditnotes:write":"Create, change, delete, restore and merge credit notes.","recurring:read":"Read recurring invoices.","recurring:write":"Create, change, delete, restore and merge recurring invoices.","products:read":"Read products.","products:write":"Create, change, delete, restore and merge products.","quotes:read":"Read quotes.","quotes:write":"Create, change, delete, restore and merge quotes.","cases:read":"Read support cases.","cases:write":"Create, change, delete, restore and merge support cases.","visits:read":"Read visits.","visits:write":"Create, change, delete, restore and merge visits.","inventories:read":"Read inventory items.","inventories:write":"Create, change, delete, restore and merge inventory items.","processes:read":"Read processes.","processes:write":"Create, change, delete, restore and merge processes.","forecasts:read":"Read forecasts.","forecasts:write":"Create, change, delete, restore and merge forecasts.","articles:read":"Read knowledge articles.","articles:write":"Create, change, delete, restore and merge knowledge articles.","pricebooks:read":"Read price books.","pricebooks:write":"Create, change, delete, restore and merge price books.","vendors:read":"Read vendors.","vendors:write":"Create, change, delete, restore and merge vendors.","salesorders:read":"Read sales orders.","salesorders:write":"Create, change, delete, restore and merge sales orders.","purchaseorders:read":"Read purchase orders.","purchaseorders:write":"Create, change, delete, restore and merge purchase orders."}}},"oauth2MetadataUrl":"https://api-crm.rootdigit.com/.well-known/oauth-authorization-server"}}},"externalDocs":{"description":"Developer documentation","url":"https://crm.rootdigit.com/developers"}}