A quote is a priced proposal for one customer, tied to one CRM opportunity. Your systems create it as a draft; sending it emails the customer a link to review and accept it. Acceptance generates the customer agreement, and from then on the deal is reported to you through webhook events.
A quote past its expiresAt keeps its status, but its link tells the customer the proposal has expired and it can no longer be accepted. Revise it in the platform to give it a new expiry.
POST /quotes
Scope quotes:write. Creates a draft quote and, unless customer.accountId names an existing account in the programme, a new account. A refused request leaves nothing behind. Send an Idempotency-Key.
The deal
| Field | Type | |
|---|---|---|
customer | object, required | Who the quote is for. See The customer. |
opportunityUrl | string, required | The CRM opportunity this deal is: an https Salesforce opportunity link, in Lightning (/lightning/r/Opportunity/006…/view) or Classic (/006…) form. Quotes are matched on the opportunity id, so either form finds the same deal. A programme may accept links from its own Salesforce org only. |
ownerEmail | string | The account executive who owns the deal and is emailed as it moves. Must be an active sales user in the platform; otherwise the quote is created unowned and a warning says so. |
currency | usd or cad | Optional with a document that states one. |
billingStarts | on_install or on_date | When billing starts: when installation is recorded, or on startDate. Defaults to the programme's setting. |
startDate | YYYY-MM-DD | The date billing starts, with on_date. |
termMonths | integer, 1–120 | The term. Defaults to 12. |
expiresInDays | integer, 1–365 | Days from creation until the proposal expires (expiresAt). Defaults to 30. |
title | string, up to 200 | The proposal's title. Defaults to the programme's. |
intro | string, up to 2,000 | An opening note printed on the proposal. |
resellerDiscountPercent | number, 0–99.99 | Your own figure for the deal, kept on the quote and echoed back. It is never what the customer pays. |
lines | array, 1–200 | What is being sold. Send lines or document, exactly one of the two. |
document | object | Your own quote document instead of lines. See From your quote document. |
The customer
customer names either an existing account or a new one, and always the person who receives the proposal and signs.
| Field | Type | |
|---|---|---|
accountId | acc_… | An existing account in the programme. Leave out name and the rest to quote it. |
name | string, up to 200 | The new account's name. Required without accountId. |
legalName | string, up to 200 | The legal name for the agreement. Defaults to name. |
email | string | The account's billing email. Defaults to the contact's. |
phone | string, up to 50 | |
address | object | line1, line2, city, region, postalCode, country (two letters, US by default). The service address. |
contact | object, required | name and email (both required) and title: who receives the proposal and signs. |
A quote cannot be sent until its account has a service address, because the agreement names the site it covers. Where the programme charges sales tax, a quote cannot be sent until its account has a complete service address: street, city, state, ZIP code and country, with a two-letter state and a 5- or 9-digit ZIP code in the US. Send it on create and the quote can go straight out.
Lines
| Field | Type | |
|---|---|---|
supplierCode | string, up to 64 | Your code for the product, as on your price list. |
sku | string, up to 64 | The programme's catalogue code. Each line needs supplierCode or sku. |
quantity | integer, 1–10,000 | |
agreedUnitPrice | integer cents | What the customer agreed to pay for one unit. It can only lower a recurring line. |
Lines are matched to the catalogue exactly: your code, our code, or either with punctuation ignored. Nothing fuzzier: an unmatched line is reported, never guessed.
Prices are always the catalogue's. Every line is priced from the programme's catalogue in the quote's currency. When the programme prices its subscription by tier, the subscription line is not taken from the request: the configuration and quantities choose it, and if you named a different tier, the disagreement goes to review. agreedUnitPrice can only lower a recurring line (one above list is refused with 400) and is folded into the quote's single negotiated monthly figure. One-time lines are charged at list, and an agreed price on one comes back as a warning.
Configuration fields
A programme whose catalogue prices its subscription by tier takes the configuration that picks the tier. The fields are defined by the programme's catalogue. In the video-security illustration on these pages they are:
| Field | Type | |
|---|---|---|
resolution | string | The recording resolution. Required with lines; read from a document otherwise. |
retentionDays | integer, 1–3,650 | Days of recording kept. Required with lines; read from a document otherwise. |
sdResolution, sdRetentionDays | string, integer | An optional second recording stream. |
statedCameras | integer | Cameras on site, when the quote does not sell them all. The tier covers the larger of this and the cameras sold. |
customSubscriptionCents | integer cents | The monthly subscription for a configuration the catalogue's tiers do not cover. Required then, and ignored when a tier covers it. |
Needs review
Lines that match nothing come back in needsReview, and the quote is created with the rest. It stays a draft: POST /quotes/:id/send answers 409 until someone resolves the lines in the platform.
line counts from 1, in the order you sent the lines.
From your quote document
Instead of lines, send your quote as a PDF, or a PNG, JPEG or WebP image of it, up to 20 MB. It goes through the same pipeline staff use: the document is read, its lines matched to the catalogue, and its configuration and quantities taken from it.
How it is priced is the programme's choice:
- Priced from the catalogue. Fields in the request override what the document says, and prices come from the catalogue, as for
lines. - Priced from the document. Every line the document charges for is on the quote, at a price set from the document's own price by the programme's pricing rule. The document must be in the programme's billing currency (otherwise
422), and the quote's lines, configuration and prices cannot be changed afterwards. Only a line whose price or kind the document does not state goes to review.
As base64 in JSON:
contentType is application/pdf (the default), image/png, image/jpeg or image/webp.
Or as multipart, with the JSON body in a data field and the file in file:
Anything the reading flagged for a person to check is returned in warnings. A document that cannot be read answers 502; a programme without document reading answers 503. Either way, sending lines works.
Response
201 with the quote, plus warnings: a list of sentences about anything that was adjusted rather than refused (an unknown ownerEmail, an agreed price on a one-time line, a tier that differs from the one you named).
The quote
| Field | |
|---|---|
status | draft, sent, viewed, accepted or declined. Quotes made before quote versions existed may also read expired or superseded. |
version | Goes up each time a sent quote is revised in the platform. The customer's link always opens the latest, and earlier versions are kept. |
pricing.listMonthlyCents | The monthly total at catalogue prices. |
pricing.monthlyAmountCents | What the customer pays each month: the list figure, or the negotiated one when agreed prices lowered it. |
pricing.oneTimeTotalCents | The one-time charges, at list. |
lines[].kind | recurring or one_time. subscription marks the subscription line. |
quoteUrl | The customer's acceptance link, once the quote has been sent. Anyone holding it can accept, so treat it like a credential. |
contract | { "id": "con_…", "status": "…" } once the customer accepts. The status is draft, sent, viewed, signed (by the customer), executed (by both parties), cancelled or expired. |
configuration | The programme's configuration fields; the ones shown are the video-security illustration. |
GET /quotes/:id
Scope quotes:read. The quote. 404 if it is not in the programme.
GET /quotes
Scope quotes:read. The programme's quotes, newest first, as { "data": [ … ] }.
| Query | |
|---|---|
opportunityUrl | Only that opportunity's quotes, matched on the opportunity id, so a Lightning link finds quotes created from a Classic one. |
limit | 1–200, 50 by default. |
POST /quotes/:id/send
Scope quotes:write. Emails the proposal to the quote's contact and returns the quote with emailSent (boolean) and emailError (a message, or null). Sending again resends the same link, so a customer who already has it is not cut off.
Refused with:
409while lines need review, and for a quote already accepted or declined;400when the quote has no contact email, when the account has no service address (the agreement names the site it covers), or when that address is incomplete where the programme charges sales tax.
GET /quotes/:id/pdf
Scope quotes:read. The proposal as a PDF (Content-Type: application/pdf, downloaded as <quote number>.pdf), rendered from the quote: never the document you sent.