Validate Quote API
Validate a CPQ quote and return any validation errors.
| Required Editions |
|---|
| Available in: Salesforce CPQ Winter ’19 and later |
- Formats
JSON, Apex
- HTTP Method
PATCH
- Authentication
Authorization: Bearer token
REQUEST
- Parameter 1
Name: quote
Type: QuoteModel
Required: Yes
Description: Representation of SBQQ__Quote__c data.
RESPONSE
- Type
String[]
- Description
If the quote is valid, the array is empty. Otherwise, the array contains an item for each validation error.
The request body quoteModel.json file validates a quote. The context value is a JSON formatted string/serialization of a quote, the same as the CPQ Save Quote API.
An example response body after creating the Apex job for generating the quote proposal.
Before saving the Validator example class, make sure that the CPQ model classes are added as individual Apex classes in your org.
Run the following code in anonymous Apex to get Apex job ID for generating and saving the quote proposal.