Creates a sales quote from the storefront and submits it to the B2B Edition control panel.
Depending on your store's Quote settings configuration, this can be used anonymously to create a quote as a guest shopper, or authenticated with a B2C storefront customer or B2B Company user account. Quotes created with this endpoint share the same [minimum required fields](/developer/api-reference/rest/b2b/management/quotes#minimum-required-fields) as the Create a Quote endpoint in the Server to Server API.
### Draft Quotes
The Buyer Portal allows buyers to save "draft" quotes" that they can edit further until they are ready to submit the quote to their sales representative. The built-Buyer Portal uses local storage, via the [Redux](https://redux.js.org/) library, to store a draft quote's details. This is different from quotes created within the B2B Edition control panel in Draft status, which is saved to the account itself and is visible to all backend users.
The Create a Quote endpoint should only be used once a quote is ready to submit to a sales representative. Your application must save quote details in its own storage in order to support draft quotes.
Equivalent Storefront GraphQL Mutation: `quoteCreate`.
### Pricing Field Considerations
Note the following considerations related to pricing fields in the request:
* Quotes created with this endpoint undergo a price validation check to prevent invalid prices. If the check fails, a `BigCommerce API Error` will be raised and logged, preventing quote creation.
* To create quotes with custom pricing, use [Create a Quote Form (Server-to-Server)](/developer/api-reference/rest/b2b/management/quotes#create-a-quote-form).
* The `discount` field is present in the request body and the `productList` array; however, the value must be 0, since quote discounts are supplied by the sales rep.
* The `offeredPrice` field on each item in the `productList` array must be provided, but it must equal the `basePrice` value for that product, since it is meant to reflect the quoted price which should not be different at this stage.
* The `subtotal` and `grandTotal` fields must be equal to the sum of each product's `offeredPrice` multiplied by the `quantity`.
Authentication
AuthorizationBearer
### Authentication header
| Header | Argument | Description |
|:-------|:---------|:------------|
|`Authorization`|`Bearer {{B2B_JWT_TOKEN}}`| You can obtain this token using the steps described in the [REST Storefront API](/developer/docs/b2b-edition/getting-started/authentication#rest-storefront-api) section[...]
Request
This endpoint expects an object.
bcCustomerIdintegerOptional
The unique ID for the customer account.
channelIdintegerOptional
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.
companyIddoubleOptional
The unique identifier for the Company account associated with the quote. This field is required when creating a quote for a Company account.
contactInfoobjectOptional
currencyobjectOptional
discountdoubleOptional
The total value of discounts applied to the quote. This is presented as a fixed value instead of a percentage.
expiredAtstringOptional
Use ‘%m/%d/%Y’ format when entering the expiration date.
grandTotaldoubleOptional
The quoted total after discounts, shipping, and tax are applied.
isBackendUserenumOptional
Indicates whether the quote was created by a frontend user like a buyer or Super Admin, or it was created by a backend user like Sales Staff.
Allowed values:
legalTermsstringOptional
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.
notesstringOptional
The quote’s buyer-facing notes. Use the newline character to separate each line of text.
productListobjectOptional
quoteTitlestringOptional
The external title given to the quote.
referenceNumberstringOptional
An identifier for the quote that can be supplied by the sales rep or the buyer, such as a Purchase Order number.
shippingAddressobjectOptional
storeHashstringOptional
The unique store hash for the BigCommerce store.
subtotaldoubleOptional
The quoted total after discounts and before shipping and tax.
userEmailstringOptionalformat: "email"
The email address of the buyer associated with the quote.
Response
OK
codeintegerDefaults to 200
HTTP Response Code
dataobject
messagestringDefaults to SUCCESS
Errors
400
Bad Request Error
Creates a sales quote from the storefront and submits it to the B2B Edition control panel.
Depending on your store’s Quote settings configuration, this can be used anonymously to create a quote as a guest shopper, or authenticated with a B2C storefront customer or B2B Company user account. Quotes created with this endpoint share the same minimum required fields as the Create a Quote endpoint in the Server to Server API.
Draft Quotes
The Buyer Portal allows buyers to save “draft” quotes” that they can edit further until they are ready to submit the quote to their sales representative. The built-Buyer Portal uses local storage, via the Redux library, to store a draft quote’s details. This is different from quotes created within the B2B Edition control panel in Draft status, which is saved to the account itself and is visible to all backend users.
The Create a Quote endpoint should only be used once a quote is ready to submit to a sales representative. Your application must save quote details in its own storage in order to support draft quotes.
Note the following considerations related to pricing fields in the request:
Quotes created with this endpoint undergo a price validation check to prevent invalid prices. If the check fails, a BigCommerce API Error will be raised and logged, preventing quote creation.
The discount field is present in the request body and the productList array; however, the value must be 0, since quote discounts are supplied by the sales rep.
The offeredPrice field on each item in the productList array must be provided, but it must equal the basePrice value for that product, since it is meant to reflect the quoted price which should not be different at this stage.
The subtotal and grandTotal fields must be equal to the sum of each product’s offeredPrice multiplied by the quantity.
Authentication header
Header
Argument
Description
Authorization
Bearer {{B2B_JWT_TOKEN}}
You can obtain this token using the steps described in the REST Storefront API section[…]