Create a quote

Operation ID: createQuote

Group: CRM › Quotes

Open in the interactive reference

POST /crm/quotes

Retry-safe: A write that accepts Idempotency-Key: repeating a request with the same key replays the stored answer instead of executing twice.

Creates a quote on an opportunity, with its subscriptions and products. The body has the shape GET crm/quotes/:id returns, minus what the server owns: ids, numbers, names, status, approvalStatus, currency and every computed total. Each quote product line names a catalog productLineId, and its line type comes from that catalog line. The quote starts in status 'created' with approvalStatus 'pendingSubmission', exactly as one created on the quote page, and every amount is in the opportunity's currency. The quote is validated as the quote page validates it: dates, prices against the opportunity's price book, and the allowed line-type, price-model and invoice-frequency combinations. A failure of those rules returns VALIDATION_FAILED naming the rule. Sending isPrimary true makes this the opportunity's primary quote and unsets the previous one. A quote of type 'changeOrder' names a salesArrangementId instead of opportunityId, billToAddressId and soldToAddressId, and the server derives those three as QuoteApiV7 does: the customer's default bill-to and sold-to addresses, and the arrangement's open change-order opportunity, or a new one named 'Change Order - <arrangement number>' on the price book of the arrangement's sales order when none is open. A line's pricing is reconciled as the sales order endpoints reconcile it: unitPrice wins over discountAmount, which wins over discountPercentage, and the other two are derived against listPrice (tiered, volume, stairstep and rateCard lines excepted). discountPercentage is sent on a 0-100 scale, as the sales order endpoints take it, and stored and returned by GET crm/quotes/:id as a 0-1 fraction. The response contains only the id; read the stored quote with GET crm/quotes/:id.

Parameters

Name In Type Required Description
Api-Version header string · v1 yes The API version this request targets, named by its public identifier. Required on every request; omitting it, or naming a version this company does not have, is answered with 400. This document describes version v1.
Idempotency-Key header string no An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with 400 IDEMPOTENCY_NOT_SUPPORTED rather than silently ignored.

Request body

Required, application/json: createQuoteInput.

Field Type Required Description
quoteType any no The type of quote. A 'new' quote sells to an opportunity; a 'changeOrder' quote amends the sales arrangement named by salesArrangementId. Defaults to 'new'. One of: "new", "changeOrder".
opportunityId string no The opportunity the quote belongs to. Its currency governs every amount below. See id on GET crm/opportunities/:id. Required on a 'new' quote, not accepted on a 'changeOrder' one. Example: "a1c4d7e0-5b62-4c19-8e73-9f0d2a6b4c88".
salesArrangementId string no The sales arrangement a 'changeOrder' quote amends. See salesArrangementId on GET accounting/sales-orders/:id. Required on a 'changeOrder' quote, not accepted on a 'new' one. Every amount below is then in the arrangement's currency.
quoteDate date yes The date the quote is drawn up. Format YYYY-MM-DD. Product prices are validated against the opportunity's price book as of this date. Example: "2026-08-01".
serviceStartDate date yes The first date products or services on this quote are delivered. Format YYYY-MM-DD. No subscription may start before it. Example: "2026-09-01".
paymentTerm string yes The code of the payment term for invoices created from this quote. See code on GET accounting/payment-terms. Example: "NET30".
billToAddressId string no The address to bill. The quote stores its own copy of it. Required on a 'new' quote; a 'changeOrder' quote takes the customer's default bill-to address. Example: "6f9a2b1c-33d4-4a55-9e21-0b7c8d4e1f02".
soldToAddressId string no The address the products are sold to. The quote stores its own copy of it. Required on a 'new' quote; a 'changeOrder' quote takes the customer's default sold-to address. Example: "6f9a2b1c-33d4-4a55-9e21-0b7c8d4e1f02".
isPrimary boolean no Whether this becomes the primary quote of its opportunity, replacing the current one. Defaults to false. Example: true.
memo string no A free-text memo for the quote. Example: "Two-year platform subscription.".
signDate date no The date the quote was signed. Format YYYY-MM-DD.
oneTimeDiscountAmount decimal no A one-time discount on the whole quote, in the opportunity's currency. Requires oneTimeDiscountAllocation.
oneTimeDiscountAllocation any no How oneTimeDiscountAmount is spread across the quote's invoices. One of: "firstInvoice", "alignToInvoiceFrequency", "custom".
billableTimeCappedPrice decimal no The ceiling on the total of the quote's billable-time lines, in the opportunity's currency. Only allowed when the quote has a billable-time line.
subscriptions array<object> yes The subscriptions on the quote, each with the products under it. Send an empty array for none. Example: [{"termType":"termed","serviceStartDate":"2026-09-01","serviceEndDate":"2028-08-31","autoRenew":true,"renewalTerm":12,"quoteProducts":[{"productId":"e5a3b2c9-4d78-4f16-9c03-2b8e1f7d6a49","quoteProductLines":[{"productLineId":"a7c5d4e1-6f90-4b38-9e25-4d0a3b9f8c61","quantity":"100","listPrice":"480.00","unitPrice":"400.00","discountAmount":"80.00","discountPercentage":"16.6667","invoiceFrequency":"annually","priceModel":"perUnit","pricingTerm":"annually","unitOfMeasure":"seat","serviceStartDate":"2026-09-01","serviceEndDate":"2028-08-31"}]}]}].
subscriptions[].termType any yes Whether the subscription runs to a fixed end date or renews indefinitely. One of: "termed", "evergreen".
subscriptions[].serviceStartDate date yes The first date the subscription delivers service. Format YYYY-MM-DD.
subscriptions[].serviceEndDate date no The last date the subscription delivers service. Format YYYY-MM-DD. Required on a termed subscription.
subscriptions[].autoRenew boolean no Whether the subscription renews automatically at the end of its term.
subscriptions[].renewalTerm number no The renewal term in months.
subscriptions[].quoteProducts array<object> yes The products in this subscription. Each must carry only subscription line types.
subscriptions[].quoteProducts[].productId string yes The catalog product. See id on GET accounting/products/:id.
subscriptions[].quoteProducts[].isRampDeal boolean no Whether this product is priced as a ramp deal.
subscriptions[].quoteProducts[].rampInterval any no How the ramp steps. Only with isRampDeal. One of: "annually", "specificDates".
subscriptions[].quoteProducts[].rampInvoiceTiming any no How a ramp deal is invoiced. Only with isRampDeal. One of: "allAtOnce", "perInterval".
subscriptions[].quoteProducts[].quoteProductLines array<object> yes The priced lines of this quote product, at least one.
subscriptions[].quoteProducts[].quoteProductLines[].productLineId string yes The catalog product line to price. It must belong to productId. See id on GET accounting/product-lines/:id.
subscriptions[].quoteProducts[].quoteProductLines[].quantity decimal no The quantity, as a count, not an amount.
subscriptions[].quoteProducts[].quoteProductLines[].listPrice decimal no The per-unit list price before discount, in the opportunity's currency.
subscriptions[].quoteProducts[].quoteProductLines[].unitPrice decimal no The per-unit price after discount, in the opportunity's currency.
subscriptions[].quoteProducts[].quoteProductLines[].discountAmount decimal no The per-unit discount, in the opportunity's currency.
subscriptions[].quoteProducts[].quoteProductLines[].discountPercentage decimal no The per-unit discount off the list price on a 0-100 scale, so 10 means ten percent. Stored as a 0-1 fraction, which is what GET crm/quotes/:id returns. Used only when neither unitPrice nor discountAmount is sent.
subscriptions[].quoteProducts[].quoteProductLines[].cappedPrice decimal no The ceiling on what this line may total, in the opportunity's currency. Billable-time and travel-expense lines only.
subscriptions[].quoteProducts[].quoteProductLines[].invoiceFrequency any no How often this line is invoiced. One of: "monthly", "biMonthly", "quarterly", "semiAnnually", "annually", "once", "custom", "template", "milestone", "allAtOnce", "termEnd".
subscriptions[].quoteProducts[].quoteProductLines[].priceModel any no How the price is derived from quantity. Tiered and volume models need lineTiers, rateCard needs rateCardEntries. One of: "flat", "perUnit", "tiered", "volume", "stairstep", "rateCard", "thresholdBased".
subscriptions[].quoteProducts[].quoteProductLines[].pricingTerm any no The period the unit price is quoted for. One of: "monthly", "biMonthly", "once", "quarterly", "semiAnnually", "annually".
subscriptions[].quoteProducts[].quoteProductLines[].unitOfMeasure any no The unit the quantity is counted in. One of: "instance", "gigabyte", "terabyte", "user", "seat", "minute", "hour", "day", "month", "each", "license", "activeUser", "megabyte", "message", "text", "platform", "employee", "personnel", "credit", "currency", "package", "case", "word", "record".
subscriptions[].quoteProducts[].quoteProductLines[].overConsumptionBehavior any no What happens when consumption exceeds a prepaid balance. Prepaid lines only. One of: "allowNegative", "overage".
subscriptions[].quoteProducts[].quoteProductLines[].rolloverAtRenewal boolean no Whether an unused prepaid balance carries forward at renewal. Prepaid lines only.
subscriptions[].quoteProducts[].quoteProductLines[].serviceStartDate date no The first date this line delivers service. Format YYYY-MM-DD.
subscriptions[].quoteProducts[].quoteProductLines[].serviceEndDate date no The last date this line delivers service. Format YYYY-MM-DD.
subscriptions[].quoteProducts[].quoteProductLines[].orderIndex number no The position of this line within its quote product, for display ordering.
subscriptions[].quoteProducts[].quoteProductLines[].lineTiers array<object> no The pricing bands of a tiered, volume or stairstep line, from quantity zero up to an open-ended top band.
subscriptions[].quoteProducts[].quoteProductLines[].lineTiers[].fromQuantity decimal yes The lower bound of the band, inclusive. A quantity, not an amount.
subscriptions[].quoteProducts[].quoteProductLines[].lineTiers[].toQuantity decimal no The upper bound of the band, inclusive. Omit on the top band.
subscriptions[].quoteProducts[].quoteProductLines[].lineTiers[].priceModel any yes How this band prices. One of: "flat", "perUnit", "tiered", "volume", "stairstep", "rateCard", "thresholdBased".
subscriptions[].quoteProducts[].quoteProductLines[].lineTiers[].unitPrice decimal no The per-unit price for this band after discount, in the opportunity's currency.
subscriptions[].quoteProducts[].quoteProductLines[].lineTiers[].listPrice decimal no The per-unit list price for this band before discount, in the opportunity's currency.
subscriptions[].quoteProducts[].quoteProductLines[].rateCardEntries array<object> no The rate-card pricing of a rateCard line, one entry per billable component.
subscriptions[].quoteProducts[].quoteProductLines[].rateCardEntries[].billableComponentId string no The billable component this entry prices. There is no endpoint for it.
subscriptions[].quoteProducts[].quoteProductLines[].rateCardEntries[].description string no A label that distinguishes entries that otherwise have the same data.
subscriptions[].quoteProducts[].quoteProductLines[].rateCardEntries[].unitPrice decimal no The per-unit price after discount, in the opportunity's currency.
subscriptions[].quoteProducts[].quoteProductLines[].rateCardEntries[].listPrice decimal no The per-unit list price before discount, in the opportunity's currency.
subscriptions[].quoteProducts[].quoteProductLines[].rateCardEntries[].unitOfMeasure any yes The unit the price is quoted per. One of: "instance", "gigabyte", "terabyte", "user", "seat", "minute", "hour", "day", "month", "each", "license", "activeUser", "megabyte", "message", "text", "platform", "employee", "personnel", "credit", "currency", "package", "case", "word", "record".
subscriptions[].quoteProducts[].quoteProductLines[].rateCardEntries[].quantity decimal no The quantity of billable units, as a count, not an amount.
subscriptions[].quoteProducts[].quoteProductLines[].rateCardEntries[].usageType any no What the usage represents. One of: "consumption", "overage", "thresholdCounter", "payg".
subscriptions[].quoteProducts[].quoteProductLines[].rateCardEntries[].conversion decimal no The factor that converts usage units to billable units. A ratio, not an amount.
subscriptions[].quoteProducts[].quoteProductLines[].rateCardEntries[].billableUnitOfMeasure any no The unit the entry is billed in, when it differs from unitOfMeasure. One of: "instance", "gigabyte", "terabyte", "user", "seat", "minute", "hour", "day", "month", "each", "license", "activeUser", "megabyte", "message", "text", "platform", "employee", "personnel", "credit", "currency", "package", "case", "word", "record".
subscriptions[].quoteProducts[].quoteProductLines[].invoiceMilestones array<object> no The invoice milestones of a line invoiced by milestone. Their totals must add up to the line total.
subscriptions[].quoteProducts[].quoteProductLines[].invoiceMilestones[].description string no What the milestone covers.
subscriptions[].quoteProducts[].quoteProductLines[].invoiceMilestones[].totalPrice decimal no The amount invoiced at this milestone, in the opportunity's currency.
subscriptions[].quoteProducts[].quoteProductLines[].invoiceMilestones[].percentage decimal no The share of the line total this milestone invoices.
subscriptions[].quoteProducts[].quoteProductLines[].invoiceMilestones[].projectedDate date no The date the milestone is expected to be reached. Format YYYY-MM-DD.
nonRecurringProducts array<object> yes The products that belong to no subscription, such as one-time charges and billable time. Send an empty array for none. Example: [].
nonRecurringProducts[].productId string yes The catalog product. See id on GET accounting/products/:id.
nonRecurringProducts[].quoteProductLines array<object> yes The priced lines of this quote product, at least one. Each must carry a non-subscription line type.
nonRecurringProducts[].quoteProductLines[].productLineId string yes The catalog product line to price. It must belong to productId. See id on GET accounting/product-lines/:id.
nonRecurringProducts[].quoteProductLines[].quantity decimal no The quantity, as a count, not an amount.
nonRecurringProducts[].quoteProductLines[].listPrice decimal no The per-unit list price before discount, in the opportunity's currency.
nonRecurringProducts[].quoteProductLines[].unitPrice decimal no The per-unit price after discount, in the opportunity's currency.
nonRecurringProducts[].quoteProductLines[].discountAmount decimal no The per-unit discount, in the opportunity's currency.
nonRecurringProducts[].quoteProductLines[].discountPercentage decimal no The per-unit discount off the list price on a 0-100 scale, so 10 means ten percent. Stored as a 0-1 fraction, which is what GET crm/quotes/:id returns. Used only when neither unitPrice nor discountAmount is sent.
nonRecurringProducts[].quoteProductLines[].cappedPrice decimal no The ceiling on what this line may total, in the opportunity's currency. Billable-time and travel-expense lines only.
nonRecurringProducts[].quoteProductLines[].invoiceFrequency any no How often this line is invoiced. One of: "monthly", "biMonthly", "quarterly", "semiAnnually", "annually", "once", "custom", "template", "milestone", "allAtOnce", "termEnd".
nonRecurringProducts[].quoteProductLines[].priceModel any no How the price is derived from quantity. Tiered and volume models need lineTiers, rateCard needs rateCardEntries. One of: "flat", "perUnit", "tiered", "volume", "stairstep", "rateCard", "thresholdBased".
nonRecurringProducts[].quoteProductLines[].pricingTerm any no The period the unit price is quoted for. One of: "monthly", "biMonthly", "once", "quarterly", "semiAnnually", "annually".
nonRecurringProducts[].quoteProductLines[].unitOfMeasure any no The unit the quantity is counted in. One of: "instance", "gigabyte", "terabyte", "user", "seat", "minute", "hour", "day", "month", "each", "license", "activeUser", "megabyte", "message", "text", "platform", "employee", "personnel", "credit", "currency", "package", "case", "word", "record".
nonRecurringProducts[].quoteProductLines[].overConsumptionBehavior any no What happens when consumption exceeds a prepaid balance. Prepaid lines only. One of: "allowNegative", "overage".
nonRecurringProducts[].quoteProductLines[].rolloverAtRenewal boolean no Whether an unused prepaid balance carries forward at renewal. Prepaid lines only.
nonRecurringProducts[].quoteProductLines[].serviceStartDate date no The first date this line delivers service. Format YYYY-MM-DD.
nonRecurringProducts[].quoteProductLines[].serviceEndDate date no The last date this line delivers service. Format YYYY-MM-DD.
nonRecurringProducts[].quoteProductLines[].orderIndex number no The position of this line within its quote product, for display ordering.
nonRecurringProducts[].quoteProductLines[].lineTiers array<object> no The pricing bands of a tiered, volume or stairstep line, from quantity zero up to an open-ended top band.
nonRecurringProducts[].quoteProductLines[].lineTiers[].fromQuantity decimal yes The lower bound of the band, inclusive. A quantity, not an amount.
nonRecurringProducts[].quoteProductLines[].lineTiers[].toQuantity decimal no The upper bound of the band, inclusive. Omit on the top band.
nonRecurringProducts[].quoteProductLines[].lineTiers[].priceModel any yes How this band prices. One of: "flat", "perUnit", "tiered", "volume", "stairstep", "rateCard", "thresholdBased".
nonRecurringProducts[].quoteProductLines[].lineTiers[].unitPrice decimal no The per-unit price for this band after discount, in the opportunity's currency.
nonRecurringProducts[].quoteProductLines[].lineTiers[].listPrice decimal no The per-unit list price for this band before discount, in the opportunity's currency.
nonRecurringProducts[].quoteProductLines[].rateCardEntries array<object> no The rate-card pricing of a rateCard line, one entry per billable component.
nonRecurringProducts[].quoteProductLines[].rateCardEntries[].billableComponentId string no The billable component this entry prices. There is no endpoint for it.
nonRecurringProducts[].quoteProductLines[].rateCardEntries[].description string no A label that distinguishes entries that otherwise have the same data.
nonRecurringProducts[].quoteProductLines[].rateCardEntries[].unitPrice decimal no The per-unit price after discount, in the opportunity's currency.
nonRecurringProducts[].quoteProductLines[].rateCardEntries[].listPrice decimal no The per-unit list price before discount, in the opportunity's currency.
nonRecurringProducts[].quoteProductLines[].rateCardEntries[].unitOfMeasure any yes The unit the price is quoted per. One of: "instance", "gigabyte", "terabyte", "user", "seat", "minute", "hour", "day", "month", "each", "license", "activeUser", "megabyte", "message", "text", "platform", "employee", "personnel", "credit", "currency", "package", "case", "word", "record".
nonRecurringProducts[].quoteProductLines[].rateCardEntries[].quantity decimal no The quantity of billable units, as a count, not an amount.
nonRecurringProducts[].quoteProductLines[].rateCardEntries[].usageType any no What the usage represents. One of: "consumption", "overage", "thresholdCounter", "payg".
nonRecurringProducts[].quoteProductLines[].rateCardEntries[].conversion decimal no The factor that converts usage units to billable units. A ratio, not an amount.
nonRecurringProducts[].quoteProductLines[].rateCardEntries[].billableUnitOfMeasure any no The unit the entry is billed in, when it differs from unitOfMeasure. One of: "instance", "gigabyte", "terabyte", "user", "seat", "minute", "hour", "day", "month", "each", "license", "activeUser", "megabyte", "message", "text", "platform", "employee", "personnel", "credit", "currency", "package", "case", "word", "record".
nonRecurringProducts[].quoteProductLines[].invoiceMilestones array<object> no The invoice milestones of a line invoiced by milestone. Their totals must add up to the line total.
nonRecurringProducts[].quoteProductLines[].invoiceMilestones[].description string no What the milestone covers.
nonRecurringProducts[].quoteProductLines[].invoiceMilestones[].totalPrice decimal no The amount invoiced at this milestone, in the opportunity's currency.
nonRecurringProducts[].quoteProductLines[].invoiceMilestones[].percentage decimal no The share of the line total this milestone invoices.
nonRecurringProducts[].quoteProductLines[].invoiceMilestones[].projectedDate date no The date the milestone is expected to be reached. Format YYYY-MM-DD.
{
  "quoteType": "new",
  "opportunityId": "a1c4d7e0-5b62-4c19-8e73-9f0d2a6b4c88",
  "salesArrangementId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "quoteDate": "2026-08-01",
  "serviceStartDate": "2026-09-01",
  "paymentTerm": "NET30",
  "billToAddressId": "6f9a2b1c-33d4-4a55-9e21-0b7c8d4e1f02",
  "soldToAddressId": "6f9a2b1c-33d4-4a55-9e21-0b7c8d4e1f02",
  "isPrimary": true,
  "memo": "Two-year platform subscription.",
  "signDate": "2026-01-15",
  "oneTimeDiscountAmount": "19.99",
  "oneTimeDiscountAllocation": "firstInvoice",
  "billableTimeCappedPrice": "19.99",
  "subscriptions": [
    {
      "termType": "termed",
      "serviceStartDate": "2026-09-01",
      "serviceEndDate": "2028-08-31",
      "autoRenew": true,
      "renewalTerm": 12,
      "quoteProducts": [
        {
          "productId": "e5a3b2c9-4d78-4f16-9c03-2b8e1f7d6a49",
          "quoteProductLines": [
            {
              "productLineId": "a7c5d4e1-6f90-4b38-9e25-4d0a3b9f8c61",
              "quantity": "100",
              "listPrice": "480.00",
              "unitPrice": "400.00",
              "discountAmount": "80.00",
              "discountPercentage": "16.6667",
              "invoiceFrequency": "annually",
              "priceModel": "perUnit",
              "pricingTerm": "annually",
              "unitOfMeasure": "seat",
              "serviceStartDate": "2026-09-01",
              "serviceEndDate": "2028-08-31"
            }
          ]
        }
      ]
    }
  ],
  "nonRecurringProducts": []
}

Response

200 Success

Under data (createQuoteOutput):

Field Type Required Description
id string yes The identifier of the created quote. See id on GET crm/quotes/:id. Example: "3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45".
{
  "data": {
    "id": "3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45"
  },
  "diagnostics": [
    {
      "code": "<code>",
      "message": "<message>",
      "severity": "error",
      "path": [
        "<path>"
      ],
      "details": "<details>"
    }
  ]
}

Response headers

Errors

Code Status
REFERENCE_NOT_FOUND 400
INVALID_PRODUCT_LINE 400
PRICE_REQUIRED 400
QUOTE_TYPE_MISMATCH 400
CHANGE_ORDER_SOURCE_INCOMPLETE 400
VALIDATION_FAILED 400
IDEMPOTENCY_KEY_CONFLICT 409
IDEMPOTENCY_PAYLOAD_MISMATCH 422

Statuses