{"openapi":"3.1.0","info":{"title":"OpsVara Developer API","version":"1.0.0","description":"Read your OpsVara company's customers, sites, jobs, quotes, contracts, invoices, inventory and leads. Authenticate with an API key from Settings → Integrations → Developer API: `Authorization: Bearer ovk_live_…`. Keys are for servers: never put one in a web page or an app a customer downloads. Each key has scopes and a role; every response is scoped to the key's company and follows its Roles & Access settings. Amounts are US dollars. Calendar dates are YYYY-MM-DD; times are ISO 8601 UTC."},"servers":[{"url":"https://api.opsvara.com/api/ext/v1"}],"security":[{"apiKey":[]}],"components":{"securitySchemes":{"apiKey":{"type":"http","scheme":"bearer","description":"An OpsVara API key (ovk_live_…)."}},"schemas":{"Error":{"type":"object","properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","description":"A stable code to branch on. Codes in this version: UNAUTHORIZED, API_KEY_INVALID, ADDON_NOT_ENABLED, FEATURE_NOT_ENABLED, SUBSCRIPTION_ENDED, TRIAL_ENDED, CARD_REQUIRED, SUBSCRIPTION_PAYMENT_LOCKED, TENANT_SUSPENDED, FORBIDDEN, API_KEY_SCOPE, ROLE_ACCESS, NOT_FOUND, METHOD_NOT_ALLOWED, UNKNOWN_PARAMETER, INVALID_PARAMETER, INVALID_LIMIT, INVALID_CURSOR, INVALID_DATE, INVALID_ID, INVALID_STATUS, INVALID_FILTER, INVALID_BODY, RATE_LIMITED, MONTHLY_LIMIT, STARTING_UP, INTERNAL, ERROR. More may be added; treat an unknown one by its HTTP status."},"message":{"type":"string","description":"A sentence for a person. Do not parse it."},"missing":{"type":"array","items":{"type":"string"},"description":"API_KEY_SCOPE: the scopes the key lacks."},"addon":{"type":"string","description":"ADDON_NOT_ENABLED: which add-on (developer_api, or crm_core for leads)."},"upgradeUrl":{"type":"string","format":"uri","description":"ADDON_NOT_ENABLED: where a company admin can turn it on."}},"additionalProperties":true}},"required":["error"]},"PageMeta":{"type":"object","properties":{"nextCursor":{"type":["string","null"],"description":"Pass as cursor, with the same other parameters, for the next page. Null on the last page."},"limit":{"type":"number"},"order":{"type":"string","enum":["updated_desc","updated_asc"],"description":"Most recently changed first, or with updatedSince, oldest change first."},"serverTime":{"type":"string","format":"date-time","description":"When the server read the page."}},"required":["nextCursor","limit","order","serverTime"]},"Me":{"type":"object","properties":{"company":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"vertical":{"type":["string","null"]},"timeZone":{"type":["string","null"]},"plan":{"type":"string","description":"Plan code: launch, starter (Crew), professional (Fleet), enterprise, trial."},"planName":{"type":"string","description":"The plan's name as the app shows it: Launch, Crew, Fleet, Enterprise."}},"required":["id","name","vertical","timeZone","plan","planName"]},"auth":{"type":"object","required":["kind"],"description":"An API key (keyId, name, scopes, role), a connected assistant that signed in (connectionId, app, name, scopes, role), or a signed-in session (userId, roles).","properties":{"kind":{"type":"string","enum":["api_key","session","connection"]},"keyId":{"type":"string"},"name":{"type":"string"},"scopes":{"type":"array","items":{"type":"string"}},"role":{"type":["string","null"]},"userId":{"type":"string"},"roles":{"type":"array","items":{"type":"string"}},"connectionId":{"type":"string","description":"For a connection: its id, as Settings → Integrations → Connected Assistants lists it."},"app":{"type":"string","description":"For a connection: the assistant that signed in (Claude, ChatGPT, Claude Code)."}}}},"required":["company","auth"]},"Glossary":{"type":"object","properties":{"vertical":{"type":["object","null"],"properties":{"key":{"type":"string"},"name":{"type":"string"},"industry":{"type":"string"}},"required":["key","name","industry"]},"terminology":{"type":["object","null"],"additionalProperties":{"type":"string"}},"workTypes":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"}},"required":["key","label"]}},"jobStatuses":{"type":"array","items":{"type":"string"}},"quoteStatuses":{"type":"array","items":{"type":"string"}},"contractStatuses":{"type":"array","items":{"type":"string"}},"invoiceStatuses":{"type":"array","items":{"type":"string"}},"leadStatuses":{"type":"array","items":{"type":"string"}},"money":{"type":"string"},"dates":{"type":"string"}},"required":["vertical","terminology","workTypes","jobStatuses","quoteStatuses","contractStatuses","invoiceStatuses","leadStatuses","money","dates"]},"Customer":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"type":{"type":["string","null"]},"lifecycleStage":{"type":["string","null"]},"isActive":{"type":"boolean"},"tags":{"type":"array","items":{"type":"string"}},"primaryAddress":{"type":["object","null"],"properties":{"street":{"type":["string","null"]},"city":{"type":["string","null"]},"state":{"type":["string","null"]},"zip":{"type":["string","null"]},"country":{"type":["string","null"]}},"required":["street","city","state","zip","country"]},"billingAddress":{"type":["object","null"],"properties":{"street":{"type":["string","null"]},"city":{"type":["string","null"]},"state":{"type":["string","null"]},"zip":{"type":["string","null"]},"country":{"type":["string","null"]}},"required":["street","city","state","zip","country"]},"contacts":{"type":"array","items":{"type":"object","properties":{"firstName":{"type":"string"},"lastName":{"type":"string"},"businessName":{"type":["string","null"]},"email":{"type":["string","null"]},"phone":{"type":["string","null"]},"isPrimary":{"type":"boolean"}},"required":["firstName","lastName","businessName","email","phone","isPrimary"]}},"customerSince":{"type":["string","null"],"format":"date","description":"As the customer header shows it: the date the office entered, else the day the account was created."},"lastCompletedJobAt":{"type":["string","null"],"format":"date-time"},"autopayEnabled":{"type":"boolean"},"autopayPaused":{"type":"boolean","description":"Autopay is on, but no card is charged while the company takes no online payments."},"createdAt":{"type":["string","null"],"format":"date-time"},"updatedAt":{"type":["string","null"],"format":"date-time"}},"required":["id","name","type","lifecycleStage","isActive","tags","primaryAddress","billingAddress","contacts","customerSince","lastCompletedJobAt","autopayEnabled","autopayPaused","createdAt","updatedAt"]},"Site":{"type":"object","properties":{"id":{"type":"string"},"customerId":{"type":["string","null"]},"name":{"type":"string"},"kind":{"type":["string","null"],"description":"A pool's kind (inground, above_ground, spa, commercial, other), the site kind the company set, or the water body type (lake, pond, fountain_site, other)."},"address":{"type":["object","null"],"properties":{"street":{"type":["string","null"]},"city":{"type":["string","null"]},"state":{"type":["string","null"]},"zip":{"type":["string","null"]},"country":{"type":["string","null"]}},"required":["street","city","state","zip","country"]},"coordinates":{"type":["object","null"],"properties":{"lat":{"type":"number"},"lng":{"type":"number"}},"required":["lat","lng"]},"isActive":{"type":"boolean"},"tags":{"type":"array","items":{"type":"string"}},"lastVisitDate":{"type":["string","null"],"format":"date","description":"The site's last visit as the site page shows it: the last completed job, or the date the office entered if later. Comes from jobs: completing a visit does not change the site's updatedAt, so a sync of /sites alone does not see it move. Sync /jobs (each has siteId) or re-read the site."},"lastVisitJobId":{"type":["string","null"],"description":"The completed job lastVisitDate comes from, when it does."},"createdAt":{"type":["string","null"],"format":"date-time"},"updatedAt":{"type":["string","null"],"format":"date-time"}},"required":["id","customerId","name","kind","address","coordinates","isActive","tags","lastVisitDate","lastVisitJobId","createdAt","updatedAt"]},"Job":{"type":"object","properties":{"id":{"type":"string"},"jobNumber":{"type":["string","null"]},"type":{"type":["string","null"],"description":"Work type key. GET /glossary lists this company's work types."},"status":{"type":["string","null"],"enum":["scheduled","scheduled_delayed","in_progress","completed","cancelled",null]},"customerId":{"type":["string","null"]},"siteId":{"type":["string","null"]},"contractId":{"type":["string","null"]},"scheduledDate":{"type":["string","null"],"format":"date-time"},"scheduledDay":{"type":["string","null"],"format":"date","description":"The company-calendar day of scheduledDate: the day the schedule shows the visit on."},"scheduledEndDate":{"type":["string","null"],"format":"date-time"},"routeStopOrder":{"type":["number","null"],"description":"Position on its worker's route that day, when one was set."},"assignedCrewIds":{"type":"array","items":{"type":"string"}},"primaryCrewUserId":{"type":["string","null"],"description":"Whose route the visit is on."},"plannedMinutes":{"type":["number","null"],"description":"Planned visit length, resolved as the schedule does (job, site, then work type)."},"actualMinutes":{"type":["number","null"],"description":"Recorded time on a completed visit."},"description":{"type":["string","null"]},"checkInTime":{"type":["string","null"],"format":"date-time"},"checkOutTime":{"type":["string","null"],"format":"date-time"},"completionNotes":{"type":["string","null"]},"createdAt":{"type":["string","null"],"format":"date-time"},"updatedAt":{"type":["string","null"],"format":"date-time"}},"required":["id","jobNumber","type","status","customerId","siteId","contractId","scheduledDate","scheduledDay","scheduledEndDate","routeStopOrder","assignedCrewIds","primaryCrewUserId","plannedMinutes","actualMinutes","description","checkInTime","checkOutTime","completionNotes","createdAt","updatedAt"]},"VisitSummary":{"allOf":[{"$ref":"#/components/schemas/Job"},{"type":"object","properties":{"productsApplied":{"type":"array","description":"What the visit applied, one entry per product and unit, as the customer's visit summary states it.","items":{"type":"object","properties":{"product":{"type":["string","null"]},"amount":{"type":["number","null"]},"unit":{"type":["string","null"]},"appliedAt":{"type":["string","null"],"format":"date-time"}},"required":["product","amount","unit","appliedAt"]}}},"required":["productsApplied"]}]},"Quote":{"type":"object","properties":{"id":{"type":"string"},"quoteNumber":{"type":["string","null"]},"status":{"type":["string","null"],"enum":["draft","sent","approving","approved","declined","expired","void",null]},"customerId":{"type":["string","null"]},"siteIds":{"type":"array","items":{"type":"string"}},"workType":{"type":["string","null"]},"lineItems":{"type":"array","items":{"type":"object","properties":{"description":{"type":"string"},"siteId":{"type":["string","null"]},"quantity":{"type":"number"},"unit":{"type":["string","null"]},"unitPrice":{"type":"number"},"total":{"type":"number","description":"For a per_visit or per_billing_period line, one visit or one period. See totalInQuote for its amount in the quote total."},"priceBasis":{"type":"string","enum":["term_total","per_visit","per_billing_period"],"description":"term_total: priced once for the whole quote. per_visit / per_billing_period: a recurring rate."},"selection":{"type":"string","enum":["fixed","required","optional"]},"defaultSelected":{"type":"boolean","description":"For an Optional line: whether it starts ticked."},"countedInTotal":{"type":"boolean","description":"Whether the line is in the quote total. An Optional line that starts unticked is not, until the customer approves."},"totalInQuote":{"type":["number","null"],"description":"What the line adds to the quote total (a season for a rate), before the quote discount and tax. Null when not counted."}},"required":["description","siteId","quantity","unit","unitPrice","total","priceBasis","selection","defaultSelected","countedInTotal","totalInQuote"]}},"subtotal":{"type":"number","description":"Counted lines after line and quote discounts. subtotal + taxAmount = total."},"discount":{"type":"number","description":"The quote discount, already taken off subtotal."},"taxAmount":{"type":"number"},"total":{"type":"number","description":"The total the app and the customer see: a season for a quote priced per visit or period, and only lines selected by default."},"validUntil":{"type":["string","null"],"format":"date","description":"YYYY-MM-DD, in the company's calendar."},"contractStart":{"type":["string","null"],"format":"date","description":"YYYY-MM-DD, in the company's calendar."},"contractEnd":{"type":["string","null"],"format":"date","description":"YYYY-MM-DD, in the company's calendar."},"sentAt":{"type":["string","null"],"format":"date-time"},"firstViewedAt":{"type":["string","null"],"format":"date-time"},"acceptedAt":{"type":["string","null"],"format":"date-time"},"createdAt":{"type":["string","null"],"format":"date-time"},"updatedAt":{"type":["string","null"],"format":"date-time"}},"required":["id","quoteNumber","status","customerId","siteIds","workType","lineItems","subtotal","discount","taxAmount","total","validUntil","contractStart","contractEnd","sentAt","firstViewedAt","acceptedAt","createdAt","updatedAt"]},"Contract":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"status":{"type":["string","null"],"enum":["active","paused","cancelled","expired","completed","archived",null]},"customerId":{"type":["string","null"]},"siteIds":{"type":"array","items":{"type":"string"}},"workType":{"type":["string","null"]},"season":{"type":["number","null"]},"termType":{"type":["string","null"]},"startDate":{"type":["string","null"],"format":"date","description":"YYYY-MM-DD, in the company's calendar."},"endDate":{"type":["string","null"],"format":"date","description":"YYYY-MM-DD, in the company's calendar."},"nextVisitDate":{"type":["string","null"],"format":"date","description":"The Next Visit the contract page shows: the next open job, or the next date the schedule set if sooner and not past. Comes from jobs: booking a visit does not change the contract's updatedAt; sync /jobs (each has contractId) to follow it."},"monthlyRate":{"type":"number"},"annualTotal":{"type":"number","description":"The agreed price."},"contractTotal":{"type":"number","description":"The \"Contract total\" the contract page and its invoices show: the live billing plan plus permit fees kept off it; the agreed price when the plan has no amounts."},"billingCycle":{"type":["string","null"]},"createdAt":{"type":["string","null"],"format":"date-time"},"updatedAt":{"type":["string","null"],"format":"date-time"}},"required":["id","name","status","customerId","siteIds","workType","season","termType","startDate","endDate","nextVisitDate","monthlyRate","annualTotal","contractTotal","billingCycle","createdAt","updatedAt"]},"Invoice":{"type":"object","properties":{"id":{"type":"string"},"invoiceNumber":{"type":["string","null"]},"status":{"type":["string","null"],"enum":["draft","sent","paid","past_due","void","rejected",null],"description":"past_due is set only when the company runs invoice aging. To find overdue invoices, use overdue=true. Null on a record that never had one."},"customerId":{"type":["string","null"]},"jobId":{"type":["string","null"]},"contractId":{"type":["string","null"]},"siteIds":{"type":"array","items":{"type":"string"}},"lineItems":{"type":"array","items":{"type":"object","properties":{"description":{"type":"string"},"siteId":{"type":["string","null"]},"quantity":{"type":"number"},"unit":{"type":["string","null"]},"unitPrice":{"type":"number"},"total":{"type":"number"}},"required":["description","siteId","quantity","unit","unitPrice","total"]}},"subtotal":{"type":"number"},"driveAndLaborCharges":{"type":"number"},"billableExpenses":{"type":"number"},"feesAndDiscounts":{"type":"number"},"feesAndDiscountsLabel":{"type":["string","null"]},"creditCardFee":{"type":"number"},"creditApplied":{"type":"number"},"taxAmount":{"type":"number"},"total":{"type":"number"},"amountPaid":{"type":"number"},"amountDue":{"type":"number"},"invoiceDate":{"type":["string","null"],"format":"date","description":"YYYY-MM-DD, in the company's calendar."},"dueDate":{"type":["string","null"],"format":"date","description":"YYYY-MM-DD, in the company's calendar."},"sentAt":{"type":["string","null"],"format":"date-time"},"paidAt":{"type":["string","null"],"format":"date-time","description":"When it was paid in full."},"onlinePaymentFee":{"type":"number","description":"The processing fee charged with online payments, as the invoice page's Payment block shows it."},"payments":{"type":"array","description":"Each payment against the invoice, as the customer's receipt lists it, plus one row (method other) for older online money the ledger has no row for, so the rows add up to amountPaid.","items":{"type":"object","properties":{"date":{"type":["string","null"],"format":"date","description":"YYYY-MM-DD, in the company's calendar."},"source":{"type":"string","enum":["manual","online"],"description":"manual: recorded by the office (check, cash, ACH). online: paid by card or bank."},"method":{"type":"string"},"amount":{"type":"number"},"surchargeAmount":{"type":"number","description":"A card fee charged on top of amount."}},"required":["date","source","method","amount","surchargeAmount"]}},"createdAt":{"type":["string","null"],"format":"date-time"},"updatedAt":{"type":["string","null"],"format":"date-time"}},"required":["id","invoiceNumber","status","customerId","jobId","contractId","siteIds","lineItems","subtotal","driveAndLaborCharges","billableExpenses","feesAndDiscounts","feesAndDiscountsLabel","creditCardFee","creditApplied","taxAmount","total","amountPaid","amountDue","invoiceDate","dueDate","sentAt","paidAt","onlinePaymentFee","payments","createdAt","updatedAt"]},"InventoryItem":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"sku":{"type":["string","null"]},"barcode":{"type":["string","null"]},"category":{"type":["string","null"]},"unit":{"type":["string","null"]},"currentStock":{"type":"number"},"reorderThreshold":{"type":"number"},"reorderQty":{"type":"number"},"lowStock":{"type":"boolean","description":"At or under the reorder point (including out of stock)."},"stockStatus":{"type":"string","enum":["ok","low","out"],"description":"As the Inventory overview counts it: out is at or under zero, low is at or under the reorder point."},"isActive":{"type":"boolean"},"unitCost":{"type":"number","description":"Only for roles that see money in the app: office roles, or a field role the company gave Sales and Billing."},"vendorPartNumbers":{"type":"array","items":{"type":"object","properties":{"vendorName":{"type":["string","null"]},"partNumber":{"type":["string","null"]}},"required":["vendorName","partNumber"]}},"updatedAt":{"type":["string","null"],"format":"date-time"}},"required":["id","name","sku","barcode","category","unit","currentStock","reorderThreshold","reorderQty","lowStock","stockStatus","isActive","vendorPartNumbers","updatedAt"]},"Lead":{"type":"object","properties":{"id":{"type":"string"},"firstName":{"type":"string"},"lastName":{"type":"string"},"businessName":{"type":["string","null"]},"email":{"type":["string","null"]},"phone":{"type":["string","null"]},"city":{"type":["string","null"]},"state":{"type":["string","null"]},"zip":{"type":["string","null"]},"interest":{"type":["string","null"]},"description":{"type":["string","null"]},"source":{"type":["string","null"]},"status":{"type":["string","null"],"enum":["new","contacted","qualified","quoted","custom_1","custom_2","converted","lost","spam","for_later",null]},"assignedToUserId":{"type":["string","null"]},"estimatedValue":{"type":["number","null"]},"tags":{"type":"array","items":{"type":"string"}},"archivedAt":{"type":["string","null"],"format":"date-time"},"lastActivityAt":{"type":["string","null"],"format":"date-time"},"createdAt":{"type":["string","null"],"format":"date-time"},"updatedAt":{"type":["string","null"],"format":"date-time"}},"required":["id","firstName","lastName","businessName","email","phone","city","state","zip","interest","description","source","status","assignedToUserId","estimatedValue","tags","archivedAt","lastActivityAt","createdAt","updatedAt"]}}},"paths":{"/me":{"get":{"operationId":"getMe","summary":"The company and the key or session making the request.","responses":{"200":{"description":"OK","headers":{"RateLimit-Limit":{"description":"Requests allowed per minute for this key (300).","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left this minute.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the minute starts over.","schema":{"type":"integer"}},"X-Monthly-Request-Limit":{"description":"The company's requests per calendar month (UTC). Not sent on Enterprise, which has no cap.","schema":{"type":"integer"}},"X-Monthly-Requests-Remaining":{"description":"What is left of it this month.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Me"}},"required":["data"]}}}},"400":{"description":"A parameter is not valid, not known, repeated or empty (UNKNOWN_PARAMETER, INVALID_PARAMETER, INVALID_LIMIT, INVALID_CURSOR, INVALID_DATE, INVALID_ID, INVALID_STATUS, INVALID_FILTER), or a body that is not JSON (INVALID_BODY).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, revoked or expired key, or its creator no longer has access (API_KEY_INVALID).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not on this plan or the subscription lapsed: the Developer API add-on (ADDON_NOT_ENABLED), Sales Pipeline for leads (ADDON_NOT_ENABLED, addon crm_core), Inventory (FEATURE_NOT_ENABLED), or SUBSCRIPTION_ENDED, TRIAL_ENDED, CARD_REQUIRED, SUBSCRIPTION_PAYMENT_LOCKED.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks a scope (API_KEY_SCOPE), its role cannot read this (FORBIDDEN), the company's Roles & Access settings do not give its role this area (ROLE_ACCESS), or the account is suspended (TENANT_SUSPENDED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"405":{"description":"This version is read-only (METHOD_NOT_ALLOWED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"A request body too large (INVALID_BODY). This API reads no body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"A request body in an unsupported encoding (INVALID_BODY). This API reads no body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests (RATE_LIMITED) or the monthly limit is used up (MONTHLY_LIMIT).","headers":{"Retry-After":{"description":"Seconds until a request can succeed: the next minute for RATE_LIMITED, the first of next month (UTC) for MONTHLY_LIMIT.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Something went wrong on our side (INTERNAL).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The API is starting up and its indexes are still building (STARTING_UP). Retry after the Retry-After header.","headers":{"Retry-After":{"description":"Seconds to wait before trying again.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/glossary":{"get":{"operationId":"getGlossary","summary":"This company's vertical, terminology, work types and status values.","responses":{"200":{"description":"OK","headers":{"RateLimit-Limit":{"description":"Requests allowed per minute for this key (300).","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left this minute.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the minute starts over.","schema":{"type":"integer"}},"X-Monthly-Request-Limit":{"description":"The company's requests per calendar month (UTC). Not sent on Enterprise, which has no cap.","schema":{"type":"integer"}},"X-Monthly-Requests-Remaining":{"description":"What is left of it this month.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Glossary"}},"required":["data"]}}}},"400":{"description":"A parameter is not valid, not known, repeated or empty (UNKNOWN_PARAMETER, INVALID_PARAMETER, INVALID_LIMIT, INVALID_CURSOR, INVALID_DATE, INVALID_ID, INVALID_STATUS, INVALID_FILTER), or a body that is not JSON (INVALID_BODY).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, revoked or expired key, or its creator no longer has access (API_KEY_INVALID).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not on this plan or the subscription lapsed: the Developer API add-on (ADDON_NOT_ENABLED), Sales Pipeline for leads (ADDON_NOT_ENABLED, addon crm_core), Inventory (FEATURE_NOT_ENABLED), or SUBSCRIPTION_ENDED, TRIAL_ENDED, CARD_REQUIRED, SUBSCRIPTION_PAYMENT_LOCKED.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks a scope (API_KEY_SCOPE), its role cannot read this (FORBIDDEN), the company's Roles & Access settings do not give its role this area (ROLE_ACCESS), or the account is suspended (TENANT_SUSPENDED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"405":{"description":"This version is read-only (METHOD_NOT_ALLOWED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"A request body too large (INVALID_BODY). This API reads no body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"A request body in an unsupported encoding (INVALID_BODY). This API reads no body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests (RATE_LIMITED) or the monthly limit is used up (MONTHLY_LIMIT).","headers":{"Retry-After":{"description":"Seconds until a request can succeed: the next minute for RATE_LIMITED, the first of next month (UTC) for MONTHLY_LIMIT.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Something went wrong on our side (INTERNAL).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The API is starting up and its indexes are still building (STARTING_UP). Retry after the Retry-After header.","headers":{"Retry-After":{"description":"Seconds to wait before trying again.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/openapi.json":{"get":{"operationId":"getOpenApi","summary":"This document. Public; no key needed.","security":[],"responses":{"200":{"description":"OK"}}}},"/customers":{"get":{"operationId":"listCustomers","summary":"List customers.","x-scope":"customers:read","parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":200,"default":50},"description":"A whole number 1–200; anything else is a 400."},{"name":"cursor","in":"query","schema":{"type":"string"},"description":"meta.nextCursor from the previous page. Send the same other parameters with it; a cursor from another list is a 400."},{"name":"updatedSince","in":"query","schema":{"type":"string"},"description":"Only rows changed at or after this time, oldest change first (sync order): YYYY-MM-DD (start of that day in your company time zone) or an ISO 8601 time with a zone. 1970-01-01 or earlier lists everything, including old records with no change time (first). Follow nextCursor to the end, then next time ask from a few minutes before the newest updatedAt you received (or meta.serverTime, if that is earlier) and skip rows you already have at that updatedAt: a save that takes a moment can land just behind one you already read. Also lists what the app hides by default (archived leads, deactivated items). Deleted records are not reported."},{"name":"search","in":"query","schema":{"type":"string"},"description":"Matches the customer name."},{"name":"isActive","in":"query","schema":{"type":"string","enum":["true","false"]},"description":"true: active only. false: archived only. Leave out for both."}],"responses":{"200":{"description":"A page of results: most recently changed first, or with updatedSince, oldest change first.","headers":{"RateLimit-Limit":{"description":"Requests allowed per minute for this key (300).","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left this minute.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the minute starts over.","schema":{"type":"integer"}},"X-Monthly-Request-Limit":{"description":"The company's requests per calendar month (UTC). Not sent on Enterprise, which has no cap.","schema":{"type":"integer"}},"X-Monthly-Requests-Remaining":{"description":"What is left of it this month.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Customer"}},"meta":{"$ref":"#/components/schemas/PageMeta"}},"required":["data","meta"]}}}},"400":{"description":"A parameter is not valid, not known, repeated or empty (UNKNOWN_PARAMETER, INVALID_PARAMETER, INVALID_LIMIT, INVALID_CURSOR, INVALID_DATE, INVALID_ID, INVALID_STATUS, INVALID_FILTER), or a body that is not JSON (INVALID_BODY).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, revoked or expired key, or its creator no longer has access (API_KEY_INVALID).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not on this plan or the subscription lapsed: the Developer API add-on (ADDON_NOT_ENABLED), Sales Pipeline for leads (ADDON_NOT_ENABLED, addon crm_core), Inventory (FEATURE_NOT_ENABLED), or SUBSCRIPTION_ENDED, TRIAL_ENDED, CARD_REQUIRED, SUBSCRIPTION_PAYMENT_LOCKED.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks a scope (API_KEY_SCOPE), its role cannot read this (FORBIDDEN), the company's Roles & Access settings do not give its role this area (ROLE_ACCESS), or the account is suspended (TENANT_SUSPENDED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"405":{"description":"This version is read-only (METHOD_NOT_ALLOWED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"A request body too large (INVALID_BODY). This API reads no body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"A request body in an unsupported encoding (INVALID_BODY). This API reads no body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests (RATE_LIMITED) or the monthly limit is used up (MONTHLY_LIMIT).","headers":{"Retry-After":{"description":"Seconds until a request can succeed: the next minute for RATE_LIMITED, the first of next month (UTC) for MONTHLY_LIMIT.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Something went wrong on our side (INTERNAL).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The API is starting up and its indexes are still building (STARTING_UP). Retry after the Retry-After header.","headers":{"Retry-After":{"description":"Seconds to wait before trying again.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/customers/{id}":{"get":{"operationId":"getCustomer","summary":"Get a customer.","x-scope":"customers:read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The record.","headers":{"RateLimit-Limit":{"description":"Requests allowed per minute for this key (300).","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left this minute.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the minute starts over.","schema":{"type":"integer"}},"X-Monthly-Request-Limit":{"description":"The company's requests per calendar month (UTC). Not sent on Enterprise, which has no cap.","schema":{"type":"integer"}},"X-Monthly-Requests-Remaining":{"description":"What is left of it this month.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Customer"}},"required":["data"]}}}},"400":{"description":"A parameter is not valid, not known, repeated or empty (UNKNOWN_PARAMETER, INVALID_PARAMETER, INVALID_LIMIT, INVALID_CURSOR, INVALID_DATE, INVALID_ID, INVALID_STATUS, INVALID_FILTER), or a body that is not JSON (INVALID_BODY).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, revoked or expired key, or its creator no longer has access (API_KEY_INVALID).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not on this plan or the subscription lapsed: the Developer API add-on (ADDON_NOT_ENABLED), Sales Pipeline for leads (ADDON_NOT_ENABLED, addon crm_core), Inventory (FEATURE_NOT_ENABLED), or SUBSCRIPTION_ENDED, TRIAL_ENDED, CARD_REQUIRED, SUBSCRIPTION_PAYMENT_LOCKED.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks a scope (API_KEY_SCOPE), its role cannot read this (FORBIDDEN), the company's Roles & Access settings do not give its role this area (ROLE_ACCESS), or the account is suspended (TENANT_SUSPENDED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this company.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"405":{"description":"This version is read-only (METHOD_NOT_ALLOWED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"A request body too large (INVALID_BODY). This API reads no body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"A request body in an unsupported encoding (INVALID_BODY). This API reads no body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests (RATE_LIMITED) or the monthly limit is used up (MONTHLY_LIMIT).","headers":{"Retry-After":{"description":"Seconds until a request can succeed: the next minute for RATE_LIMITED, the first of next month (UTC) for MONTHLY_LIMIT.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Something went wrong on our side (INTERNAL).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The API is starting up and its indexes are still building (STARTING_UP). Retry after the Retry-After header.","headers":{"Retry-After":{"description":"Seconds to wait before trying again.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/customers/{id}/sites":{"get":{"operationId":"listCustomerSites","summary":"List a customer's sites.","x-scope":"sites:read","parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":200,"default":50},"description":"A whole number 1–200; anything else is a 400."},{"name":"cursor","in":"query","schema":{"type":"string"},"description":"meta.nextCursor from the previous page. Send the same other parameters with it; a cursor from another list is a 400."},{"name":"updatedSince","in":"query","schema":{"type":"string"},"description":"Only rows changed at or after this time, oldest change first (sync order): YYYY-MM-DD (start of that day in your company time zone) or an ISO 8601 time with a zone. 1970-01-01 or earlier lists everything, including old records with no change time (first). Follow nextCursor to the end, then next time ask from a few minutes before the newest updatedAt you received (or meta.serverTime, if that is earlier) and skip rows you already have at that updatedAt: a save that takes a moment can land just behind one you already read. Also lists what the app hides by default (archived leads, deactivated items). Deleted records are not reported."},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"A page of results: most recently changed first, or with updatedSince, oldest change first.","headers":{"RateLimit-Limit":{"description":"Requests allowed per minute for this key (300).","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left this minute.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the minute starts over.","schema":{"type":"integer"}},"X-Monthly-Request-Limit":{"description":"The company's requests per calendar month (UTC). Not sent on Enterprise, which has no cap.","schema":{"type":"integer"}},"X-Monthly-Requests-Remaining":{"description":"What is left of it this month.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Site"}},"meta":{"$ref":"#/components/schemas/PageMeta"}},"required":["data","meta"]}}}},"400":{"description":"A parameter is not valid, not known, repeated or empty (UNKNOWN_PARAMETER, INVALID_PARAMETER, INVALID_LIMIT, INVALID_CURSOR, INVALID_DATE, INVALID_ID, INVALID_STATUS, INVALID_FILTER), or a body that is not JSON (INVALID_BODY).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, revoked or expired key, or its creator no longer has access (API_KEY_INVALID).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not on this plan or the subscription lapsed: the Developer API add-on (ADDON_NOT_ENABLED), Sales Pipeline for leads (ADDON_NOT_ENABLED, addon crm_core), Inventory (FEATURE_NOT_ENABLED), or SUBSCRIPTION_ENDED, TRIAL_ENDED, CARD_REQUIRED, SUBSCRIPTION_PAYMENT_LOCKED.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks a scope (API_KEY_SCOPE), its role cannot read this (FORBIDDEN), the company's Roles & Access settings do not give its role this area (ROLE_ACCESS), or the account is suspended (TENANT_SUSPENDED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this company.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"405":{"description":"This version is read-only (METHOD_NOT_ALLOWED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"A request body too large (INVALID_BODY). This API reads no body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"A request body in an unsupported encoding (INVALID_BODY). This API reads no body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests (RATE_LIMITED) or the monthly limit is used up (MONTHLY_LIMIT).","headers":{"Retry-After":{"description":"Seconds until a request can succeed: the next minute for RATE_LIMITED, the first of next month (UTC) for MONTHLY_LIMIT.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Something went wrong on our side (INTERNAL).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The API is starting up and its indexes are still building (STARTING_UP). Retry after the Retry-After header.","headers":{"Retry-After":{"description":"Seconds to wait before trying again.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/sites":{"get":{"operationId":"listSites","summary":"List sites.","x-scope":"sites:read","parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":200,"default":50},"description":"A whole number 1–200; anything else is a 400."},{"name":"cursor","in":"query","schema":{"type":"string"},"description":"meta.nextCursor from the previous page. Send the same other parameters with it; a cursor from another list is a 400."},{"name":"updatedSince","in":"query","schema":{"type":"string"},"description":"Only rows changed at or after this time, oldest change first (sync order): YYYY-MM-DD (start of that day in your company time zone) or an ISO 8601 time with a zone. 1970-01-01 or earlier lists everything, including old records with no change time (first). Follow nextCursor to the end, then next time ask from a few minutes before the newest updatedAt you received (or meta.serverTime, if that is earlier) and skip rows you already have at that updatedAt: a save that takes a moment can land just behind one you already read. Also lists what the app hides by default (archived leads, deactivated items). Deleted records are not reported."},{"name":"customerId","in":"query","schema":{"type":"string"}},{"name":"isActive","in":"query","schema":{"type":"string","enum":["true","false"]},"description":"true: active only. false: archived only. Leave out for both."}],"responses":{"200":{"description":"A page of results: most recently changed first, or with updatedSince, oldest change first.","headers":{"RateLimit-Limit":{"description":"Requests allowed per minute for this key (300).","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left this minute.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the minute starts over.","schema":{"type":"integer"}},"X-Monthly-Request-Limit":{"description":"The company's requests per calendar month (UTC). Not sent on Enterprise, which has no cap.","schema":{"type":"integer"}},"X-Monthly-Requests-Remaining":{"description":"What is left of it this month.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Site"}},"meta":{"$ref":"#/components/schemas/PageMeta"}},"required":["data","meta"]}}}},"400":{"description":"A parameter is not valid, not known, repeated or empty (UNKNOWN_PARAMETER, INVALID_PARAMETER, INVALID_LIMIT, INVALID_CURSOR, INVALID_DATE, INVALID_ID, INVALID_STATUS, INVALID_FILTER), or a body that is not JSON (INVALID_BODY).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, revoked or expired key, or its creator no longer has access (API_KEY_INVALID).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not on this plan or the subscription lapsed: the Developer API add-on (ADDON_NOT_ENABLED), Sales Pipeline for leads (ADDON_NOT_ENABLED, addon crm_core), Inventory (FEATURE_NOT_ENABLED), or SUBSCRIPTION_ENDED, TRIAL_ENDED, CARD_REQUIRED, SUBSCRIPTION_PAYMENT_LOCKED.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks a scope (API_KEY_SCOPE), its role cannot read this (FORBIDDEN), the company's Roles & Access settings do not give its role this area (ROLE_ACCESS), or the account is suspended (TENANT_SUSPENDED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"405":{"description":"This version is read-only (METHOD_NOT_ALLOWED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"A request body too large (INVALID_BODY). This API reads no body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"A request body in an unsupported encoding (INVALID_BODY). This API reads no body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests (RATE_LIMITED) or the monthly limit is used up (MONTHLY_LIMIT).","headers":{"Retry-After":{"description":"Seconds until a request can succeed: the next minute for RATE_LIMITED, the first of next month (UTC) for MONTHLY_LIMIT.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Something went wrong on our side (INTERNAL).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The API is starting up and its indexes are still building (STARTING_UP). Retry after the Retry-After header.","headers":{"Retry-After":{"description":"Seconds to wait before trying again.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/sites/{id}":{"get":{"operationId":"getSite","summary":"Get a site.","x-scope":"sites:read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The record.","headers":{"RateLimit-Limit":{"description":"Requests allowed per minute for this key (300).","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left this minute.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the minute starts over.","schema":{"type":"integer"}},"X-Monthly-Request-Limit":{"description":"The company's requests per calendar month (UTC). Not sent on Enterprise, which has no cap.","schema":{"type":"integer"}},"X-Monthly-Requests-Remaining":{"description":"What is left of it this month.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Site"}},"required":["data"]}}}},"400":{"description":"A parameter is not valid, not known, repeated or empty (UNKNOWN_PARAMETER, INVALID_PARAMETER, INVALID_LIMIT, INVALID_CURSOR, INVALID_DATE, INVALID_ID, INVALID_STATUS, INVALID_FILTER), or a body that is not JSON (INVALID_BODY).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, revoked or expired key, or its creator no longer has access (API_KEY_INVALID).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not on this plan or the subscription lapsed: the Developer API add-on (ADDON_NOT_ENABLED), Sales Pipeline for leads (ADDON_NOT_ENABLED, addon crm_core), Inventory (FEATURE_NOT_ENABLED), or SUBSCRIPTION_ENDED, TRIAL_ENDED, CARD_REQUIRED, SUBSCRIPTION_PAYMENT_LOCKED.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks a scope (API_KEY_SCOPE), its role cannot read this (FORBIDDEN), the company's Roles & Access settings do not give its role this area (ROLE_ACCESS), or the account is suspended (TENANT_SUSPENDED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this company.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"405":{"description":"This version is read-only (METHOD_NOT_ALLOWED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"A request body too large (INVALID_BODY). This API reads no body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"A request body in an unsupported encoding (INVALID_BODY). This API reads no body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests (RATE_LIMITED) or the monthly limit is used up (MONTHLY_LIMIT).","headers":{"Retry-After":{"description":"Seconds until a request can succeed: the next minute for RATE_LIMITED, the first of next month (UTC) for MONTHLY_LIMIT.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Something went wrong on our side (INTERNAL).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The API is starting up and its indexes are still building (STARTING_UP). Retry after the Retry-After header.","headers":{"Retry-After":{"description":"Seconds to wait before trying again.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/jobs":{"get":{"operationId":"listJobs","summary":"List jobs. Jobs on archived sites are left out, as in the app (GET /jobs/{id} still returns them).","x-scope":"jobs:read","parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":200,"default":50},"description":"A whole number 1–200; anything else is a 400."},{"name":"cursor","in":"query","schema":{"type":"string"},"description":"meta.nextCursor from the previous page. Send the same other parameters with it; a cursor from another list is a 400."},{"name":"updatedSince","in":"query","schema":{"type":"string"},"description":"Only rows changed at or after this time, oldest change first (sync order): YYYY-MM-DD (start of that day in your company time zone) or an ISO 8601 time with a zone. 1970-01-01 or earlier lists everything, including old records with no change time (first). Follow nextCursor to the end, then next time ask from a few minutes before the newest updatedAt you received (or meta.serverTime, if that is earlier) and skip rows you already have at that updatedAt: a save that takes a moment can land just behind one you already read. Also lists what the app hides by default (archived leads, deactivated items). Deleted records are not reported."},{"name":"from","in":"query","schema":{"type":"string"},"description":"Scheduled on or after: YYYY-MM-DD (company time zone) or an ISO 8601 time with a zone."},{"name":"to","in":"query","schema":{"type":"string"},"description":"Scheduled on or before: YYYY-MM-DD (end of that day, company time zone) or an ISO 8601 time with a zone."},{"name":"status","in":"query","schema":{"type":"string"},"description":"One or more of scheduled, scheduled_delayed, in_progress, completed, cancelled, separated by commas. An unknown value is a 400."},{"name":"customerId","in":"query","schema":{"type":"string"}},{"name":"siteId","in":"query","schema":{"type":"string"}},{"name":"assignedTo","in":"query","schema":{"type":"string"},"description":"A worker's user id: visits on their route or with them on the crew."}],"responses":{"200":{"description":"A page of results: most recently changed first, or with updatedSince, oldest change first.","headers":{"RateLimit-Limit":{"description":"Requests allowed per minute for this key (300).","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left this minute.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the minute starts over.","schema":{"type":"integer"}},"X-Monthly-Request-Limit":{"description":"The company's requests per calendar month (UTC). Not sent on Enterprise, which has no cap.","schema":{"type":"integer"}},"X-Monthly-Requests-Remaining":{"description":"What is left of it this month.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Job"}},"meta":{"$ref":"#/components/schemas/PageMeta"}},"required":["data","meta"]}}}},"400":{"description":"A parameter is not valid, not known, repeated or empty (UNKNOWN_PARAMETER, INVALID_PARAMETER, INVALID_LIMIT, INVALID_CURSOR, INVALID_DATE, INVALID_ID, INVALID_STATUS, INVALID_FILTER), or a body that is not JSON (INVALID_BODY).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, revoked or expired key, or its creator no longer has access (API_KEY_INVALID).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not on this plan or the subscription lapsed: the Developer API add-on (ADDON_NOT_ENABLED), Sales Pipeline for leads (ADDON_NOT_ENABLED, addon crm_core), Inventory (FEATURE_NOT_ENABLED), or SUBSCRIPTION_ENDED, TRIAL_ENDED, CARD_REQUIRED, SUBSCRIPTION_PAYMENT_LOCKED.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks a scope (API_KEY_SCOPE), its role cannot read this (FORBIDDEN), the company's Roles & Access settings do not give its role this area (ROLE_ACCESS), or the account is suspended (TENANT_SUSPENDED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"405":{"description":"This version is read-only (METHOD_NOT_ALLOWED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"A request body too large (INVALID_BODY). This API reads no body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"A request body in an unsupported encoding (INVALID_BODY). This API reads no body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests (RATE_LIMITED) or the monthly limit is used up (MONTHLY_LIMIT).","headers":{"Retry-After":{"description":"Seconds until a request can succeed: the next minute for RATE_LIMITED, the first of next month (UTC) for MONTHLY_LIMIT.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Something went wrong on our side (INTERNAL).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The API is starting up and its indexes are still building (STARTING_UP). Retry after the Retry-After header.","headers":{"Retry-After":{"description":"Seconds to wait before trying again.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/jobs/{id}":{"get":{"operationId":"getJob","summary":"Get a job.","x-scope":"jobs:read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The record.","headers":{"RateLimit-Limit":{"description":"Requests allowed per minute for this key (300).","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left this minute.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the minute starts over.","schema":{"type":"integer"}},"X-Monthly-Request-Limit":{"description":"The company's requests per calendar month (UTC). Not sent on Enterprise, which has no cap.","schema":{"type":"integer"}},"X-Monthly-Requests-Remaining":{"description":"What is left of it this month.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Job"}},"required":["data"]}}}},"400":{"description":"A parameter is not valid, not known, repeated or empty (UNKNOWN_PARAMETER, INVALID_PARAMETER, INVALID_LIMIT, INVALID_CURSOR, INVALID_DATE, INVALID_ID, INVALID_STATUS, INVALID_FILTER), or a body that is not JSON (INVALID_BODY).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, revoked or expired key, or its creator no longer has access (API_KEY_INVALID).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not on this plan or the subscription lapsed: the Developer API add-on (ADDON_NOT_ENABLED), Sales Pipeline for leads (ADDON_NOT_ENABLED, addon crm_core), Inventory (FEATURE_NOT_ENABLED), or SUBSCRIPTION_ENDED, TRIAL_ENDED, CARD_REQUIRED, SUBSCRIPTION_PAYMENT_LOCKED.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks a scope (API_KEY_SCOPE), its role cannot read this (FORBIDDEN), the company's Roles & Access settings do not give its role this area (ROLE_ACCESS), or the account is suspended (TENANT_SUSPENDED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this company.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"405":{"description":"This version is read-only (METHOD_NOT_ALLOWED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"A request body too large (INVALID_BODY). This API reads no body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"A request body in an unsupported encoding (INVALID_BODY). This API reads no body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests (RATE_LIMITED) or the monthly limit is used up (MONTHLY_LIMIT).","headers":{"Retry-After":{"description":"Seconds until a request can succeed: the next minute for RATE_LIMITED, the first of next month (UTC) for MONTHLY_LIMIT.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Something went wrong on our side (INTERNAL).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The API is starting up and its indexes are still building (STARTING_UP). Retry after the Retry-After header.","headers":{"Retry-After":{"description":"Seconds to wait before trying again.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/jobs/{id}/visit-summary":{"get":{"operationId":"getJobVisitSummary","summary":"A job with what the visit applied.","x-scope":"jobs:read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The record.","headers":{"RateLimit-Limit":{"description":"Requests allowed per minute for this key (300).","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left this minute.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the minute starts over.","schema":{"type":"integer"}},"X-Monthly-Request-Limit":{"description":"The company's requests per calendar month (UTC). Not sent on Enterprise, which has no cap.","schema":{"type":"integer"}},"X-Monthly-Requests-Remaining":{"description":"What is left of it this month.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/VisitSummary"}},"required":["data"]}}}},"400":{"description":"A parameter is not valid, not known, repeated or empty (UNKNOWN_PARAMETER, INVALID_PARAMETER, INVALID_LIMIT, INVALID_CURSOR, INVALID_DATE, INVALID_ID, INVALID_STATUS, INVALID_FILTER), or a body that is not JSON (INVALID_BODY).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, revoked or expired key, or its creator no longer has access (API_KEY_INVALID).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not on this plan or the subscription lapsed: the Developer API add-on (ADDON_NOT_ENABLED), Sales Pipeline for leads (ADDON_NOT_ENABLED, addon crm_core), Inventory (FEATURE_NOT_ENABLED), or SUBSCRIPTION_ENDED, TRIAL_ENDED, CARD_REQUIRED, SUBSCRIPTION_PAYMENT_LOCKED.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks a scope (API_KEY_SCOPE), its role cannot read this (FORBIDDEN), the company's Roles & Access settings do not give its role this area (ROLE_ACCESS), or the account is suspended (TENANT_SUSPENDED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this company.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"405":{"description":"This version is read-only (METHOD_NOT_ALLOWED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"A request body too large (INVALID_BODY). This API reads no body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"A request body in an unsupported encoding (INVALID_BODY). This API reads no body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests (RATE_LIMITED) or the monthly limit is used up (MONTHLY_LIMIT).","headers":{"Retry-After":{"description":"Seconds until a request can succeed: the next minute for RATE_LIMITED, the first of next month (UTC) for MONTHLY_LIMIT.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Something went wrong on our side (INTERNAL).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The API is starting up and its indexes are still building (STARTING_UP). Retry after the Retry-After header.","headers":{"Retry-After":{"description":"Seconds to wait before trying again.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/schedule/day":{"get":{"operationId":"getScheduleDay","summary":"One day's visits as the route planner orders them. With workerId, that worker's day in route order; without, each worker's stops together, unassigned last. Needs the Jobs bundle, and an office role or the Dispatch bundle.","x-scope":"jobs:read","parameters":[{"name":"date","in":"query","required":true,"schema":{"type":"string"},"description":"A real calendar date, YYYY-MM-DD, in the company time zone."},{"name":"workerId","in":"query","schema":{"type":"string"},"description":"One worker's route: visits on their route or with them on the crew."},{"name":"status","in":"query","schema":{"type":"string"},"description":"Default: every status but cancelled. The route planner shows open visits: scheduled,scheduled_delayed,in_progress."}],"responses":{"200":{"description":"OK","headers":{"RateLimit-Limit":{"description":"Requests allowed per minute for this key (300).","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left this minute.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the minute starts over.","schema":{"type":"integer"}},"X-Monthly-Request-Limit":{"description":"The company's requests per calendar month (UTC). Not sent on Enterprise, which has no cap.","schema":{"type":"integer"}},"X-Monthly-Requests-Remaining":{"description":"What is left of it this month.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Job"}},"meta":{"type":"object","properties":{"date":{"type":"string"},"count":{"type":"number"},"truncated":{"type":"boolean","description":"True past 1,000 visits in a day."}},"required":["date","count","truncated"]}},"required":["data","meta"]}}}},"400":{"description":"A parameter is not valid, not known, repeated or empty (UNKNOWN_PARAMETER, INVALID_PARAMETER, INVALID_LIMIT, INVALID_CURSOR, INVALID_DATE, INVALID_ID, INVALID_STATUS, INVALID_FILTER), or a body that is not JSON (INVALID_BODY).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, revoked or expired key, or its creator no longer has access (API_KEY_INVALID).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not on this plan or the subscription lapsed: the Developer API add-on (ADDON_NOT_ENABLED), Sales Pipeline for leads (ADDON_NOT_ENABLED, addon crm_core), Inventory (FEATURE_NOT_ENABLED), or SUBSCRIPTION_ENDED, TRIAL_ENDED, CARD_REQUIRED, SUBSCRIPTION_PAYMENT_LOCKED.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks a scope (API_KEY_SCOPE), its role cannot read this (FORBIDDEN), the company's Roles & Access settings do not give its role this area (ROLE_ACCESS), or the account is suspended (TENANT_SUSPENDED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"405":{"description":"This version is read-only (METHOD_NOT_ALLOWED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"A request body too large (INVALID_BODY). This API reads no body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"A request body in an unsupported encoding (INVALID_BODY). This API reads no body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests (RATE_LIMITED) or the monthly limit is used up (MONTHLY_LIMIT).","headers":{"Retry-After":{"description":"Seconds until a request can succeed: the next minute for RATE_LIMITED, the first of next month (UTC) for MONTHLY_LIMIT.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Something went wrong on our side (INTERNAL).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The API is starting up and its indexes are still building (STARTING_UP). Retry after the Retry-After header.","headers":{"Retry-After":{"description":"Seconds to wait before trying again.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/quotes":{"get":{"operationId":"listQuotes","summary":"List quotes. Office roles.","x-scope":"quotes:read","parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":200,"default":50},"description":"A whole number 1–200; anything else is a 400."},{"name":"cursor","in":"query","schema":{"type":"string"},"description":"meta.nextCursor from the previous page. Send the same other parameters with it; a cursor from another list is a 400."},{"name":"updatedSince","in":"query","schema":{"type":"string"},"description":"Only rows changed at or after this time, oldest change first (sync order): YYYY-MM-DD (start of that day in your company time zone) or an ISO 8601 time with a zone. 1970-01-01 or earlier lists everything, including old records with no change time (first). Follow nextCursor to the end, then next time ask from a few minutes before the newest updatedAt you received (or meta.serverTime, if that is earlier) and skip rows you already have at that updatedAt: a save that takes a moment can land just behind one you already read. Also lists what the app hides by default (archived leads, deactivated items). Deleted records are not reported."},{"name":"customerId","in":"query","schema":{"type":"string"}},{"name":"status","in":"query","schema":{"type":"string"},"description":"One or more of draft, sent, approving, approved, declined, expired, void, separated by commas. An unknown value is a 400."}],"responses":{"200":{"description":"A page of results: most recently changed first, or with updatedSince, oldest change first.","headers":{"RateLimit-Limit":{"description":"Requests allowed per minute for this key (300).","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left this minute.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the minute starts over.","schema":{"type":"integer"}},"X-Monthly-Request-Limit":{"description":"The company's requests per calendar month (UTC). Not sent on Enterprise, which has no cap.","schema":{"type":"integer"}},"X-Monthly-Requests-Remaining":{"description":"What is left of it this month.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Quote"}},"meta":{"$ref":"#/components/schemas/PageMeta"}},"required":["data","meta"]}}}},"400":{"description":"A parameter is not valid, not known, repeated or empty (UNKNOWN_PARAMETER, INVALID_PARAMETER, INVALID_LIMIT, INVALID_CURSOR, INVALID_DATE, INVALID_ID, INVALID_STATUS, INVALID_FILTER), or a body that is not JSON (INVALID_BODY).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, revoked or expired key, or its creator no longer has access (API_KEY_INVALID).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not on this plan or the subscription lapsed: the Developer API add-on (ADDON_NOT_ENABLED), Sales Pipeline for leads (ADDON_NOT_ENABLED, addon crm_core), Inventory (FEATURE_NOT_ENABLED), or SUBSCRIPTION_ENDED, TRIAL_ENDED, CARD_REQUIRED, SUBSCRIPTION_PAYMENT_LOCKED.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks a scope (API_KEY_SCOPE), its role cannot read this (FORBIDDEN), the company's Roles & Access settings do not give its role this area (ROLE_ACCESS), or the account is suspended (TENANT_SUSPENDED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"405":{"description":"This version is read-only (METHOD_NOT_ALLOWED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"A request body too large (INVALID_BODY). This API reads no body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"A request body in an unsupported encoding (INVALID_BODY). This API reads no body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests (RATE_LIMITED) or the monthly limit is used up (MONTHLY_LIMIT).","headers":{"Retry-After":{"description":"Seconds until a request can succeed: the next minute for RATE_LIMITED, the first of next month (UTC) for MONTHLY_LIMIT.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Something went wrong on our side (INTERNAL).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The API is starting up and its indexes are still building (STARTING_UP). Retry after the Retry-After header.","headers":{"Retry-After":{"description":"Seconds to wait before trying again.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/quotes/{id}":{"get":{"operationId":"getQuote","summary":"Get a quote. Office roles.","x-scope":"quotes:read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The record.","headers":{"RateLimit-Limit":{"description":"Requests allowed per minute for this key (300).","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left this minute.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the minute starts over.","schema":{"type":"integer"}},"X-Monthly-Request-Limit":{"description":"The company's requests per calendar month (UTC). Not sent on Enterprise, which has no cap.","schema":{"type":"integer"}},"X-Monthly-Requests-Remaining":{"description":"What is left of it this month.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Quote"}},"required":["data"]}}}},"400":{"description":"A parameter is not valid, not known, repeated or empty (UNKNOWN_PARAMETER, INVALID_PARAMETER, INVALID_LIMIT, INVALID_CURSOR, INVALID_DATE, INVALID_ID, INVALID_STATUS, INVALID_FILTER), or a body that is not JSON (INVALID_BODY).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, revoked or expired key, or its creator no longer has access (API_KEY_INVALID).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not on this plan or the subscription lapsed: the Developer API add-on (ADDON_NOT_ENABLED), Sales Pipeline for leads (ADDON_NOT_ENABLED, addon crm_core), Inventory (FEATURE_NOT_ENABLED), or SUBSCRIPTION_ENDED, TRIAL_ENDED, CARD_REQUIRED, SUBSCRIPTION_PAYMENT_LOCKED.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks a scope (API_KEY_SCOPE), its role cannot read this (FORBIDDEN), the company's Roles & Access settings do not give its role this area (ROLE_ACCESS), or the account is suspended (TENANT_SUSPENDED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this company.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"405":{"description":"This version is read-only (METHOD_NOT_ALLOWED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"A request body too large (INVALID_BODY). This API reads no body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"A request body in an unsupported encoding (INVALID_BODY). This API reads no body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests (RATE_LIMITED) or the monthly limit is used up (MONTHLY_LIMIT).","headers":{"Retry-After":{"description":"Seconds until a request can succeed: the next minute for RATE_LIMITED, the first of next month (UTC) for MONTHLY_LIMIT.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Something went wrong on our side (INTERNAL).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The API is starting up and its indexes are still building (STARTING_UP). Retry after the Retry-After header.","headers":{"Retry-After":{"description":"Seconds to wait before trying again.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/contracts":{"get":{"operationId":"listContracts","summary":"List service contracts. Roles with Sales and Billing.","x-scope":"contracts:read","parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":200,"default":50},"description":"A whole number 1–200; anything else is a 400."},{"name":"cursor","in":"query","schema":{"type":"string"},"description":"meta.nextCursor from the previous page. Send the same other parameters with it; a cursor from another list is a 400."},{"name":"updatedSince","in":"query","schema":{"type":"string"},"description":"Only rows changed at or after this time, oldest change first (sync order): YYYY-MM-DD (start of that day in your company time zone) or an ISO 8601 time with a zone. 1970-01-01 or earlier lists everything, including old records with no change time (first). Follow nextCursor to the end, then next time ask from a few minutes before the newest updatedAt you received (or meta.serverTime, if that is earlier) and skip rows you already have at that updatedAt: a save that takes a moment can land just behind one you already read. Also lists what the app hides by default (archived leads, deactivated items). Deleted records are not reported."},{"name":"customerId","in":"query","schema":{"type":"string"}},{"name":"status","in":"query","schema":{"type":"string"},"description":"One or more of active, paused, cancelled, expired, completed, archived, separated by commas. An unknown value is a 400."}],"responses":{"200":{"description":"A page of results: most recently changed first, or with updatedSince, oldest change first.","headers":{"RateLimit-Limit":{"description":"Requests allowed per minute for this key (300).","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left this minute.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the minute starts over.","schema":{"type":"integer"}},"X-Monthly-Request-Limit":{"description":"The company's requests per calendar month (UTC). Not sent on Enterprise, which has no cap.","schema":{"type":"integer"}},"X-Monthly-Requests-Remaining":{"description":"What is left of it this month.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Contract"}},"meta":{"$ref":"#/components/schemas/PageMeta"}},"required":["data","meta"]}}}},"400":{"description":"A parameter is not valid, not known, repeated or empty (UNKNOWN_PARAMETER, INVALID_PARAMETER, INVALID_LIMIT, INVALID_CURSOR, INVALID_DATE, INVALID_ID, INVALID_STATUS, INVALID_FILTER), or a body that is not JSON (INVALID_BODY).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, revoked or expired key, or its creator no longer has access (API_KEY_INVALID).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not on this plan or the subscription lapsed: the Developer API add-on (ADDON_NOT_ENABLED), Sales Pipeline for leads (ADDON_NOT_ENABLED, addon crm_core), Inventory (FEATURE_NOT_ENABLED), or SUBSCRIPTION_ENDED, TRIAL_ENDED, CARD_REQUIRED, SUBSCRIPTION_PAYMENT_LOCKED.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks a scope (API_KEY_SCOPE), its role cannot read this (FORBIDDEN), the company's Roles & Access settings do not give its role this area (ROLE_ACCESS), or the account is suspended (TENANT_SUSPENDED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"405":{"description":"This version is read-only (METHOD_NOT_ALLOWED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"A request body too large (INVALID_BODY). This API reads no body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"A request body in an unsupported encoding (INVALID_BODY). This API reads no body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests (RATE_LIMITED) or the monthly limit is used up (MONTHLY_LIMIT).","headers":{"Retry-After":{"description":"Seconds until a request can succeed: the next minute for RATE_LIMITED, the first of next month (UTC) for MONTHLY_LIMIT.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Something went wrong on our side (INTERNAL).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The API is starting up and its indexes are still building (STARTING_UP). Retry after the Retry-After header.","headers":{"Retry-After":{"description":"Seconds to wait before trying again.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/contracts/{id}":{"get":{"operationId":"getContract","summary":"Get a service contract. Roles with Sales and Billing.","x-scope":"contracts:read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The record.","headers":{"RateLimit-Limit":{"description":"Requests allowed per minute for this key (300).","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left this minute.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the minute starts over.","schema":{"type":"integer"}},"X-Monthly-Request-Limit":{"description":"The company's requests per calendar month (UTC). Not sent on Enterprise, which has no cap.","schema":{"type":"integer"}},"X-Monthly-Requests-Remaining":{"description":"What is left of it this month.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Contract"}},"required":["data"]}}}},"400":{"description":"A parameter is not valid, not known, repeated or empty (UNKNOWN_PARAMETER, INVALID_PARAMETER, INVALID_LIMIT, INVALID_CURSOR, INVALID_DATE, INVALID_ID, INVALID_STATUS, INVALID_FILTER), or a body that is not JSON (INVALID_BODY).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, revoked or expired key, or its creator no longer has access (API_KEY_INVALID).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not on this plan or the subscription lapsed: the Developer API add-on (ADDON_NOT_ENABLED), Sales Pipeline for leads (ADDON_NOT_ENABLED, addon crm_core), Inventory (FEATURE_NOT_ENABLED), or SUBSCRIPTION_ENDED, TRIAL_ENDED, CARD_REQUIRED, SUBSCRIPTION_PAYMENT_LOCKED.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks a scope (API_KEY_SCOPE), its role cannot read this (FORBIDDEN), the company's Roles & Access settings do not give its role this area (ROLE_ACCESS), or the account is suspended (TENANT_SUSPENDED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this company.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"405":{"description":"This version is read-only (METHOD_NOT_ALLOWED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"A request body too large (INVALID_BODY). This API reads no body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"A request body in an unsupported encoding (INVALID_BODY). This API reads no body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests (RATE_LIMITED) or the monthly limit is used up (MONTHLY_LIMIT).","headers":{"Retry-After":{"description":"Seconds until a request can succeed: the next minute for RATE_LIMITED, the first of next month (UTC) for MONTHLY_LIMIT.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Something went wrong on our side (INTERNAL).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The API is starting up and its indexes are still building (STARTING_UP). Retry after the Retry-After header.","headers":{"Retry-After":{"description":"Seconds to wait before trying again.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/invoices":{"get":{"operationId":"listInvoices","summary":"List invoices. Roles with Sales and Billing.","x-scope":"invoices:read","parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":200,"default":50},"description":"A whole number 1–200; anything else is a 400."},{"name":"cursor","in":"query","schema":{"type":"string"},"description":"meta.nextCursor from the previous page. Send the same other parameters with it; a cursor from another list is a 400."},{"name":"updatedSince","in":"query","schema":{"type":"string"},"description":"Only rows changed at or after this time, oldest change first (sync order): YYYY-MM-DD (start of that day in your company time zone) or an ISO 8601 time with a zone. 1970-01-01 or earlier lists everything, including old records with no change time (first). Follow nextCursor to the end, then next time ask from a few minutes before the newest updatedAt you received (or meta.serverTime, if that is earlier) and skip rows you already have at that updatedAt: a save that takes a moment can land just behind one you already read. Also lists what the app hides by default (archived leads, deactivated items). Deleted records are not reported."},{"name":"customerId","in":"query","schema":{"type":"string"}},{"name":"status","in":"query","schema":{"type":"string"},"description":"One or more of draft, sent, paid, past_due, void, rejected, separated by commas. An unknown value is a 400."},{"name":"overdue","in":"query","schema":{"type":"string","enum":["true","false"]},"description":"true: sent (or past due), money owed, and the due date is before today in your company's calendar. false: everything else."}],"responses":{"200":{"description":"A page of results: most recently changed first, or with updatedSince, oldest change first.","headers":{"RateLimit-Limit":{"description":"Requests allowed per minute for this key (300).","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left this minute.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the minute starts over.","schema":{"type":"integer"}},"X-Monthly-Request-Limit":{"description":"The company's requests per calendar month (UTC). Not sent on Enterprise, which has no cap.","schema":{"type":"integer"}},"X-Monthly-Requests-Remaining":{"description":"What is left of it this month.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Invoice"}},"meta":{"$ref":"#/components/schemas/PageMeta"}},"required":["data","meta"]}}}},"400":{"description":"A parameter is not valid, not known, repeated or empty (UNKNOWN_PARAMETER, INVALID_PARAMETER, INVALID_LIMIT, INVALID_CURSOR, INVALID_DATE, INVALID_ID, INVALID_STATUS, INVALID_FILTER), or a body that is not JSON (INVALID_BODY).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, revoked or expired key, or its creator no longer has access (API_KEY_INVALID).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not on this plan or the subscription lapsed: the Developer API add-on (ADDON_NOT_ENABLED), Sales Pipeline for leads (ADDON_NOT_ENABLED, addon crm_core), Inventory (FEATURE_NOT_ENABLED), or SUBSCRIPTION_ENDED, TRIAL_ENDED, CARD_REQUIRED, SUBSCRIPTION_PAYMENT_LOCKED.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks a scope (API_KEY_SCOPE), its role cannot read this (FORBIDDEN), the company's Roles & Access settings do not give its role this area (ROLE_ACCESS), or the account is suspended (TENANT_SUSPENDED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"405":{"description":"This version is read-only (METHOD_NOT_ALLOWED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"A request body too large (INVALID_BODY). This API reads no body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"A request body in an unsupported encoding (INVALID_BODY). This API reads no body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests (RATE_LIMITED) or the monthly limit is used up (MONTHLY_LIMIT).","headers":{"Retry-After":{"description":"Seconds until a request can succeed: the next minute for RATE_LIMITED, the first of next month (UTC) for MONTHLY_LIMIT.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Something went wrong on our side (INTERNAL).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The API is starting up and its indexes are still building (STARTING_UP). Retry after the Retry-After header.","headers":{"Retry-After":{"description":"Seconds to wait before trying again.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/invoices/{id}":{"get":{"operationId":"getInvoice","summary":"Get an invoice. Roles with Sales and Billing.","x-scope":"invoices:read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The record.","headers":{"RateLimit-Limit":{"description":"Requests allowed per minute for this key (300).","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left this minute.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the minute starts over.","schema":{"type":"integer"}},"X-Monthly-Request-Limit":{"description":"The company's requests per calendar month (UTC). Not sent on Enterprise, which has no cap.","schema":{"type":"integer"}},"X-Monthly-Requests-Remaining":{"description":"What is left of it this month.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Invoice"}},"required":["data"]}}}},"400":{"description":"A parameter is not valid, not known, repeated or empty (UNKNOWN_PARAMETER, INVALID_PARAMETER, INVALID_LIMIT, INVALID_CURSOR, INVALID_DATE, INVALID_ID, INVALID_STATUS, INVALID_FILTER), or a body that is not JSON (INVALID_BODY).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, revoked or expired key, or its creator no longer has access (API_KEY_INVALID).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not on this plan or the subscription lapsed: the Developer API add-on (ADDON_NOT_ENABLED), Sales Pipeline for leads (ADDON_NOT_ENABLED, addon crm_core), Inventory (FEATURE_NOT_ENABLED), or SUBSCRIPTION_ENDED, TRIAL_ENDED, CARD_REQUIRED, SUBSCRIPTION_PAYMENT_LOCKED.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks a scope (API_KEY_SCOPE), its role cannot read this (FORBIDDEN), the company's Roles & Access settings do not give its role this area (ROLE_ACCESS), or the account is suspended (TENANT_SUSPENDED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this company.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"405":{"description":"This version is read-only (METHOD_NOT_ALLOWED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"A request body too large (INVALID_BODY). This API reads no body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"A request body in an unsupported encoding (INVALID_BODY). This API reads no body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests (RATE_LIMITED) or the monthly limit is used up (MONTHLY_LIMIT).","headers":{"Retry-After":{"description":"Seconds until a request can succeed: the next minute for RATE_LIMITED, the first of next month (UTC) for MONTHLY_LIMIT.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Something went wrong on our side (INTERNAL).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The API is starting up and its indexes are still building (STARTING_UP). Retry after the Retry-After header.","headers":{"Retry-After":{"description":"Seconds to wait before trying again.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/inventory/items":{"get":{"operationId":"listInventoryItems","summary":"List inventory items. Needs Inventory on the plan.","x-scope":"inventory:read","parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":200,"default":50},"description":"A whole number 1–200; anything else is a 400."},{"name":"cursor","in":"query","schema":{"type":"string"},"description":"meta.nextCursor from the previous page. Send the same other parameters with it; a cursor from another list is a 400."},{"name":"updatedSince","in":"query","schema":{"type":"string"},"description":"Only rows changed at or after this time, oldest change first (sync order): YYYY-MM-DD (start of that day in your company time zone) or an ISO 8601 time with a zone. 1970-01-01 or earlier lists everything, including old records with no change time (first). Follow nextCursor to the end, then next time ask from a few minutes before the newest updatedAt you received (or meta.serverTime, if that is earlier) and skip rows you already have at that updatedAt: a save that takes a moment can land just behind one you already read. Also lists what the app hides by default (archived leads, deactivated items). Deleted records are not reported."},{"name":"lowStock","in":"query","schema":{"type":"string","enum":["true","false"]},"description":"true: at or under the reorder point. false: above it."},{"name":"includeInactive","in":"query","schema":{"type":"string","enum":["true","false"]},"description":"Include deactivated items. Default: false, or true with updatedSince."}],"responses":{"200":{"description":"A page of results: most recently changed first, or with updatedSince, oldest change first.","headers":{"RateLimit-Limit":{"description":"Requests allowed per minute for this key (300).","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left this minute.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the minute starts over.","schema":{"type":"integer"}},"X-Monthly-Request-Limit":{"description":"The company's requests per calendar month (UTC). Not sent on Enterprise, which has no cap.","schema":{"type":"integer"}},"X-Monthly-Requests-Remaining":{"description":"What is left of it this month.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/InventoryItem"}},"meta":{"$ref":"#/components/schemas/PageMeta"}},"required":["data","meta"]}}}},"400":{"description":"A parameter is not valid, not known, repeated or empty (UNKNOWN_PARAMETER, INVALID_PARAMETER, INVALID_LIMIT, INVALID_CURSOR, INVALID_DATE, INVALID_ID, INVALID_STATUS, INVALID_FILTER), or a body that is not JSON (INVALID_BODY).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, revoked or expired key, or its creator no longer has access (API_KEY_INVALID).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not on this plan or the subscription lapsed: the Developer API add-on (ADDON_NOT_ENABLED), Sales Pipeline for leads (ADDON_NOT_ENABLED, addon crm_core), Inventory (FEATURE_NOT_ENABLED), or SUBSCRIPTION_ENDED, TRIAL_ENDED, CARD_REQUIRED, SUBSCRIPTION_PAYMENT_LOCKED.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks a scope (API_KEY_SCOPE), its role cannot read this (FORBIDDEN), the company's Roles & Access settings do not give its role this area (ROLE_ACCESS), or the account is suspended (TENANT_SUSPENDED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"405":{"description":"This version is read-only (METHOD_NOT_ALLOWED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"A request body too large (INVALID_BODY). This API reads no body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"A request body in an unsupported encoding (INVALID_BODY). This API reads no body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests (RATE_LIMITED) or the monthly limit is used up (MONTHLY_LIMIT).","headers":{"Retry-After":{"description":"Seconds until a request can succeed: the next minute for RATE_LIMITED, the first of next month (UTC) for MONTHLY_LIMIT.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Something went wrong on our side (INTERNAL).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The API is starting up and its indexes are still building (STARTING_UP). Retry after the Retry-After header.","headers":{"Retry-After":{"description":"Seconds to wait before trying again.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/inventory/items/{id}":{"get":{"operationId":"getInventoryItem","summary":"Get an inventory item.","x-scope":"inventory:read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The record.","headers":{"RateLimit-Limit":{"description":"Requests allowed per minute for this key (300).","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left this minute.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the minute starts over.","schema":{"type":"integer"}},"X-Monthly-Request-Limit":{"description":"The company's requests per calendar month (UTC). Not sent on Enterprise, which has no cap.","schema":{"type":"integer"}},"X-Monthly-Requests-Remaining":{"description":"What is left of it this month.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/InventoryItem"}},"required":["data"]}}}},"400":{"description":"A parameter is not valid, not known, repeated or empty (UNKNOWN_PARAMETER, INVALID_PARAMETER, INVALID_LIMIT, INVALID_CURSOR, INVALID_DATE, INVALID_ID, INVALID_STATUS, INVALID_FILTER), or a body that is not JSON (INVALID_BODY).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, revoked or expired key, or its creator no longer has access (API_KEY_INVALID).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not on this plan or the subscription lapsed: the Developer API add-on (ADDON_NOT_ENABLED), Sales Pipeline for leads (ADDON_NOT_ENABLED, addon crm_core), Inventory (FEATURE_NOT_ENABLED), or SUBSCRIPTION_ENDED, TRIAL_ENDED, CARD_REQUIRED, SUBSCRIPTION_PAYMENT_LOCKED.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks a scope (API_KEY_SCOPE), its role cannot read this (FORBIDDEN), the company's Roles & Access settings do not give its role this area (ROLE_ACCESS), or the account is suspended (TENANT_SUSPENDED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this company.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"405":{"description":"This version is read-only (METHOD_NOT_ALLOWED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"A request body too large (INVALID_BODY). This API reads no body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"A request body in an unsupported encoding (INVALID_BODY). This API reads no body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests (RATE_LIMITED) or the monthly limit is used up (MONTHLY_LIMIT).","headers":{"Retry-After":{"description":"Seconds until a request can succeed: the next minute for RATE_LIMITED, the first of next month (UTC) for MONTHLY_LIMIT.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Something went wrong on our side (INTERNAL).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The API is starting up and its indexes are still building (STARTING_UP). Retry after the Retry-After header.","headers":{"Retry-After":{"description":"Seconds to wait before trying again.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/leads":{"get":{"operationId":"listLeads","summary":"List leads. Needs Sales Pipeline; office roles.","x-scope":"leads:read","parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":200,"default":50},"description":"A whole number 1–200; anything else is a 400."},{"name":"cursor","in":"query","schema":{"type":"string"},"description":"meta.nextCursor from the previous page. Send the same other parameters with it; a cursor from another list is a 400."},{"name":"updatedSince","in":"query","schema":{"type":"string"},"description":"Only rows changed at or after this time, oldest change first (sync order): YYYY-MM-DD (start of that day in your company time zone) or an ISO 8601 time with a zone. 1970-01-01 or earlier lists everything, including old records with no change time (first). Follow nextCursor to the end, then next time ask from a few minutes before the newest updatedAt you received (or meta.serverTime, if that is earlier) and skip rows you already have at that updatedAt: a save that takes a moment can land just behind one you already read. Also lists what the app hides by default (archived leads, deactivated items). Deleted records are not reported."},{"name":"status","in":"query","schema":{"type":"string"},"description":"One or more of new, contacted, qualified, quoted, custom_1, custom_2, converted, lost, spam, for_later, separated by commas. An unknown value is a 400."},{"name":"archived","in":"query","schema":{"type":"string","enum":["active","archived","all"]},"description":"Default: active, or all with updatedSince."}],"responses":{"200":{"description":"A page of results: most recently changed first, or with updatedSince, oldest change first.","headers":{"RateLimit-Limit":{"description":"Requests allowed per minute for this key (300).","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left this minute.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the minute starts over.","schema":{"type":"integer"}},"X-Monthly-Request-Limit":{"description":"The company's requests per calendar month (UTC). Not sent on Enterprise, which has no cap.","schema":{"type":"integer"}},"X-Monthly-Requests-Remaining":{"description":"What is left of it this month.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Lead"}},"meta":{"$ref":"#/components/schemas/PageMeta"}},"required":["data","meta"]}}}},"400":{"description":"A parameter is not valid, not known, repeated or empty (UNKNOWN_PARAMETER, INVALID_PARAMETER, INVALID_LIMIT, INVALID_CURSOR, INVALID_DATE, INVALID_ID, INVALID_STATUS, INVALID_FILTER), or a body that is not JSON (INVALID_BODY).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, revoked or expired key, or its creator no longer has access (API_KEY_INVALID).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not on this plan or the subscription lapsed: the Developer API add-on (ADDON_NOT_ENABLED), Sales Pipeline for leads (ADDON_NOT_ENABLED, addon crm_core), Inventory (FEATURE_NOT_ENABLED), or SUBSCRIPTION_ENDED, TRIAL_ENDED, CARD_REQUIRED, SUBSCRIPTION_PAYMENT_LOCKED.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks a scope (API_KEY_SCOPE), its role cannot read this (FORBIDDEN), the company's Roles & Access settings do not give its role this area (ROLE_ACCESS), or the account is suspended (TENANT_SUSPENDED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"405":{"description":"This version is read-only (METHOD_NOT_ALLOWED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"A request body too large (INVALID_BODY). This API reads no body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"A request body in an unsupported encoding (INVALID_BODY). This API reads no body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests (RATE_LIMITED) or the monthly limit is used up (MONTHLY_LIMIT).","headers":{"Retry-After":{"description":"Seconds until a request can succeed: the next minute for RATE_LIMITED, the first of next month (UTC) for MONTHLY_LIMIT.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Something went wrong on our side (INTERNAL).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The API is starting up and its indexes are still building (STARTING_UP). Retry after the Retry-After header.","headers":{"Retry-After":{"description":"Seconds to wait before trying again.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/leads/{id}":{"get":{"operationId":"getLead","summary":"Get a lead. Needs Sales Pipeline; office roles.","x-scope":"leads:read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The record.","headers":{"RateLimit-Limit":{"description":"Requests allowed per minute for this key (300).","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left this minute.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the minute starts over.","schema":{"type":"integer"}},"X-Monthly-Request-Limit":{"description":"The company's requests per calendar month (UTC). Not sent on Enterprise, which has no cap.","schema":{"type":"integer"}},"X-Monthly-Requests-Remaining":{"description":"What is left of it this month.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Lead"}},"required":["data"]}}}},"400":{"description":"A parameter is not valid, not known, repeated or empty (UNKNOWN_PARAMETER, INVALID_PARAMETER, INVALID_LIMIT, INVALID_CURSOR, INVALID_DATE, INVALID_ID, INVALID_STATUS, INVALID_FILTER), or a body that is not JSON (INVALID_BODY).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, revoked or expired key, or its creator no longer has access (API_KEY_INVALID).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not on this plan or the subscription lapsed: the Developer API add-on (ADDON_NOT_ENABLED), Sales Pipeline for leads (ADDON_NOT_ENABLED, addon crm_core), Inventory (FEATURE_NOT_ENABLED), or SUBSCRIPTION_ENDED, TRIAL_ENDED, CARD_REQUIRED, SUBSCRIPTION_PAYMENT_LOCKED.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks a scope (API_KEY_SCOPE), its role cannot read this (FORBIDDEN), the company's Roles & Access settings do not give its role this area (ROLE_ACCESS), or the account is suspended (TENANT_SUSPENDED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this company.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"405":{"description":"This version is read-only (METHOD_NOT_ALLOWED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"A request body too large (INVALID_BODY). This API reads no body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"A request body in an unsupported encoding (INVALID_BODY). This API reads no body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests (RATE_LIMITED) or the monthly limit is used up (MONTHLY_LIMIT).","headers":{"Retry-After":{"description":"Seconds until a request can succeed: the next minute for RATE_LIMITED, the first of next month (UTC) for MONTHLY_LIMIT.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Something went wrong on our side (INTERNAL).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The API is starting up and its indexes are still building (STARTING_UP). Retry after the Retry-After header.","headers":{"Retry-After":{"description":"Seconds to wait before trying again.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"x-mcp":{"url":"https://api.opsvara.com/mcp"},"x-webhooks":{"events":["job.scheduled","job.completed","invoice.sent","invoice.paid","quote.approved","lead.created"],"testEvent":"ping","signatureHeader":"OpsVara-Signature","timeoutSeconds":10,"retryDelaysSeconds":[60,300,1800,7200,43200,86400,86400],"maxAttempts":8,"autoDisableAfterDays":7,"autoDisableMinFailedDeliveries":5,"maxDeliveriesPerMinute":600,"maxInFlightPerEndpoint":2,"pauseAfterFailures":5,"pauseSeconds":60,"sameEventWindowSeconds":10,"maxEndpoints":10},"x-oauth":{"url":"https://api.opsvara.com/mcp","issuer":"https://api.opsvara.com","metadataUrl":"https://api.opsvara.com/.well-known/oauth-authorization-server","apps":["Claude","ChatGPT","Claude Code"],"scopes":["customers:read","sites:read","jobs:read","quotes:read","contracts:read","invoices:read","inventory:read","leads:read"],"accessTokenSeconds":3600,"connectionDays":90,"idleDays":30}}