Update Quote
Updates an existing quote based on the details provided in the request body.
Before using this endpoint to update a quote, review the following considerations:
- None of the fields in the body are required for a successful response. This means that you can use this endpoint to update a single field or a subset of fields.
- When adding or updating line items, you must include all existing line items that you want to keep in the quote. Omitting existing line items from a quote will remove them from the quote when you send the request.
- If you change line items, you must also update the
subtotalandgrandTotalfields to reflect the new pricing. If you change discounts, you must also update thegrandTotalfield. The optionaltotalAmountfield defaults tograndTotalwhen omitted. - You cannot use this endpoint to change the sales rep or Company account assigned to an existing quote.
- To update a quote’s shipping rate, use the Select a Shipping Rate for a Quote endpoint.
See Create a Quote for experience- and setting-specific requirements related to adding custom shipping or non-purchasable products to a quote.
Archiving a quote
You can use this endpoint to archive a quote by including "status": "archived" in the request body. Archiving hides the quote from the Buyer Portal and prevents it from being purchased.
- A quote in any status can be archived.
- Archiving closes the quote to further activity. An archived quote is left out of Get All Quotes responses unless you filter for status
6, and it can’t be checked out or ordered. - Archiving returns the full quote object instead of
quoteIdandquoteUrl, so the response confirms the archived state in the same request. For the response shape, see Response for archive requests. - An archive request is processed on its own. Any other fields you send in the same request body are ignored, so update the quote first and archive it in a separate request.
- Only
"archived"is accepted as a value forstatus. Other values, such as2, are ignored and the request is processed as a standard update.
Response for archive requests
The response body depends on whether the request archives the quote:
- Standard update, when
statusis omitted or set to a value other than"archived":datacontainsquoteIdandquoteUrl. - Archive, when
statusis"archived":datacontains the full quote object, in the same shape as Get Quote Details, withstatusset to6(Archived). The object is identified byquoteNumber, notquoteId.
Authentication
For example requests and more information about authenticating BigCommerce APIs, see Authentication and Example Requests.
For more about BigCommerce OAuth scopes, see our Guide to API Accounts.
For a list of API status codes, see API Status Codes.
Path parameters
Request
The total of the line items at list price before quote discounts, excluding shipping and tax. This is the sum of basePrice * quantity for all line items, so do not subtract the discount from this value. If you are updating the line items on a quote, you must also update the subtotal to reflect the new pricing.
The storefront channel ID associated with the quote. This is required if your store has multiple storefront channels. Use 1 for your store’s default storefront channel.
The quote’s buyer-facing notes. Use the newline character to separate each line of text.
The quote-level discount amount in the quote’s currency. How this value is used depends on discountType. For per line item (0) and total percentage (1) discounts, line pricing comes from each line item’s offeredPrice, and this value is informational. For a fixed amount discount (2), set this to the same amount as discountValue.
The type of discount applied to the quote. If you omit this field, the quote uses 0.
0: Per line item. Each line item’sofferedPriceis the quoted price, and itsdiscountis a percentage for display.1: Total percentage.discountValueis the percentage, but the API does not distribute it across line items. Send discountedofferedPricevalues for each line item.2: Fixed amount.discountValueis the amount subtracted from the quote total.
The quote-level discount value, interpreted according to discountType. For a total percentage discount (1), this is the percentage. For a fixed amount discount (2), this is the currency amount. This field is not used for per line item discounts (0).
The quoted total after discounts, before shipping and tax. For discountType 0 and 1, this value must equal the sum of offeredPrice * quantity across productList, or the request returns a 422 error. For a fixed amount discount (2), send the total after subtracting the discount. If you are updating the line items or discounts on a quote, you must also update the grand total to reflect the new pricing.
The quote’s terms and conditions. Use the newline character to separate each line of text. Omitting this field or leaving it blank does not add your store’s default terms and conditions to the quote. Instead, the quote will not display any terms.
Contact information for the buyer on the quote. Display-only metadata; not used to resolve or validate the linked customer or Company record.
The quoted total after discounts, shipping, and tax. Optional on create and update; defaults to grandTotal. BigCommerce recalculates it when a shipping rate is selected.
A message sent to the buyer via the in-quote messaging system.
The email address of the quote’s sales rep. Any user email found within the B2B Edition System Users menu is considered a valid value for this field.
This field is optional. If left blank, it will default to the store owner’s email address as shown in the B2B Edition System Users menu.
The date when the buyer can no longer purchase the quote. Use ‘%m/%d/%Y’ format when entering the expiration date.
Set to "archived" to archive the quote. This is the only writable status value. Any other value is ignored and the request is processed as a standard update.
Response
OK
Archive requests return the full quote object instead of quoteId and quoteUrl. For the response shape, see Response for archive requests.