---
schema_version: "1"
id: 9fc988970a73c72ad19cab12c3639c09f17daba07730e183ea3c090f8aa4c75b
title: Salesforce Commerce Product Quotes API
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/commerce-cloud/salesforce-commerce/references/generated-api-specs/comm-product-quotes-ref.md
canonical_url: https://developer.salesforce.com/docs/commerce/salesforce-commerce/references/comm-product-quotes-ref
source_site: developer.salesforce.com
content_type: documentation
content_hash: 04f939c8fd70054fff59e062f835309521c1639234756aaa1c004a6d34393765
products:
  - B2B Commerce Developer Guide
  - Salesforce APIs
---
Salesforce Commerce Product Quotes API

# Salesforce Commerce Product Quotes API

Creates a quote from a product by leveraging a secondary cart, enabling buyers to request quotes for specific products with configurable selling models, quantities, and subscription terms. To access this API, users must have the following licenses and permissions:

*   B2B Commerce
*   Revenue Lifecycle Management

**Version:** v67.0

## Servers

*   `https://api.salesforce.com/services/data/{version}`
    *   `version (default v67.0)`

## Operations

### POST Create a quote from a product.

`POST /commerce/webstores/{webstoreId}/products/{productId}/quotes`

Operation ID: `createQuoteFromProduct`.

This API creates a new quote from a product on the Product Display Pages (PDP) in a B2B storefront.

It creates a temporary (secondary) cart to process the request. It converts the product details into quote line items based on the specified product ID and quantity. After processing, the secondary cart is deleted, regardless of whether the API call succeeds or fails.

Supported product types by license:

*   Simple products: Supported with B2B Commerce Only or B2B Commerce and Revenue Cloud licenses.
*   Static bundles: Supported only with the B2B Commerce and Revenue Cloud licenses.

#### Parameters

*   `webstoreId` (path, string (Id), required) The ID of the webstore
    
    The ID of the quote record to be retrieved.
    
*   `productId` (path, string (Id), required) The ID of the product to create a quote for
    
    The ID of the product to be converted to a quote.
    
*   `effectiveAccountId` (query, string (Id)) ID of the account for which the request is made. If null, the context user's account is used.
    
    The ID of the user account associated with the quote.
    

#### Request body (required)

Input parameters for creating a quote from the product.

Media type: `application/json`. Schema: `sfdc.commerce.product.connect.api.input.CreateQuoteFromProductInputRepresentation`.

_Example: basicQuote_ Basic quote request

```
{
  "quantity": "10"
}
```

_Example: fullQuote_ Full quote request with all options

```
{
  "productSellingModelId": "01txx0000000003AAA",
  "quantity": "100",
  "subscriptionTerm": 24,
  "comments": "Bulk order for enterprise deployment",
  "additionalFields": {
    "ExpirationDate": "2024-12-31",
    "BuyerEmail__c": "procurement@company.com"
  }
}
```

#### Responses

*   **200** Quote created successfully from product.
    
    Media type: `application/json`. Schema: `sfdc.commerce.product.connect.api.output.CreateQuoteFromProductOutputRepresentation`.
    
    _Example: success_ Successful quote creation
    
    ```
    {
      "quoteId": "0Q0xx0000000001AAA",
      "errors": []
    }
    ```
    
*   **400** Invalid input parameters or request data.
    
    Media type: `application/json`. Schema: `sfdc.commerce.product.connect.api.output.CreateQuoteFromProductOutputRepresentation`.
    
    _Example: invalidInput_ Invalid input error
    
    ```
    {
      "quoteId": null,
      "errors": [
        {
          "code": "INVALID_INPUT",
          "message": "The provided parameter is invalid or malformed."
        }
      ]
    }
    ```
    
    _Example: invalidCustomFields_ Invalid custom fields error
    
    ```
    {
      "quoteId": null,
      "errors": [
        {
          "code": "INVALID_CUSTOM_FIELDS",
          "message": "One or more custom field values are invalid."
        }
      ]
    }
    ```
    
*   **404** Requested resource doesn't exist.
    
    Media type: `application/json`. Schema: `sfdc.commerce.product.connect.api.output.CreateQuoteFromProductOutputRepresentation`.
    
    _Example: productNotFound_ Product not found error
    
    ```
    {
      "quoteId": null,
      "errors": [
        {
          "code": "PRODUCT_NOT_FOUND",
          "message": "The specified product doesn't exist."
        }
      ]
    }
    ```
    
    _Example: webstoreNotFound_ Web store not found error
    
    ```
    {
      "quoteId": null,
      "errors": [
        {
          "code": "WEBSTORE_NOT_FOUND",
          "message": "The specified web store doesn't exist."
        }
      ]
    }
    ```
    
*   **500** Unexpected system error occurred.
    
    Media type: `application/json`. Schema: `sfdc.commerce.product.connect.api.output.CreateQuoteFromProductOutputRepresentation`.
    
    _Example: internalError_ Internal server error
    
    ```
    {
      "quoteId": null,
      "errors": [
        {
          "code": "INTERNAL_SERVER_ERROR",
          "message": "An unexpected error occurred while processing the request."
        }
      ]
    }
    ```
    

## Schemas

### sfdc.commerce.product.connect.api.input.CreateQuoteFromProductInputRepresentation

Input representation for creating a quote from a product.

*   `quantity` (_string_, required) The quantity of the product to be included in the quote.  
    Example: `10`.
*   `comments` (_string_) The buyer-provided comments when requesting a quote, including special requests, bulk pricing inquiries, or additional notes.  
    Example: `Provide bulk pricing for 100+ units.`.
*   `additionalFields` (_object_) The key-value pairs for quote entity fields, including both standard and custom fields, used to set additional quote properties during creation.
    
    Additional properties: `string`.
    
    _Example_
    
    ```
    {
      "ExpirationDate": "2024-12-31",
      "BuyerEmail__c": "buyer@company.com"
    }
    ```
    

### sfdc.commerce.product.connect.api.output.CreateQuoteFromProductOutputRepresentation

Output representation for the create quote from product operation.

*   `quoteId` (_string (Id)_, nullable) The ID of the quote created upon a successful request.  
    Example: `0Q0xx0000000001AAA`.
*   `errors` (_array of sfdc.commerce.product.connect.api.output.ErrorOutputRepresentation_) List of errors encountered during cart creation. Returns an empty array on success.

### sfdc.commerce.product.connect.api.output.ErrorOutputRepresentation

Represents an error that occurred during the operation.

*   `code` (_string_) Error code identifying the error type.  
    Example: `INVALID_INPUT`.
*   `message` (_string_) Human-readable error message.  
    Example: `The provided parameter is invalid or malformed.`.