Validate API Request (POST)

Validate a JSON request body for the Insurance Quote or Insurance Product Rating API by checking product codes, attributes, instance keys, and required fields against the configured product model.

Use this resource at design time to pre-validate an Insurance Connect API request body before submission. Provide an API path such as insurance/quotes or insurance/product-rating, and a serialized JSON request body. The API verifies product references, hierarchy relationships, instance keys, attribute definitions, and JSON structure, and returns actionable findings for any detected issues.

Validation includes these checks:

  • Product code existence and active status
  • Parent-child hierarchy structure in quoteLineItems / salesTransactionItems and nested childProducts
  • Non-empty instanceKey arrays in instanceKeys entries
  • Attribute code existence and active status against registered AttributeDefinition records
  • JSON parse validation for the request body string

For unsupported API paths, the API returns a valid result with an informational message rather than an error. Supported paths are insurance/quotes and insurance/product-rating.

When validation succeeds, isValid is true and results is empty or contains only informational findings. When validation finds issues, isValid is false and results lists the findings. When required input is missing, errors can include request-level failures such as:

  • SF-INS-DSAV-00041 — the request payload is required. Provide a valid JSON payload and API path. Returned with HTTP status 400 when apiPath or requestBody is missing.

Resource 

1/connect/insurance/design-advisor/api-request-validation

Resource Example 

Replace {yourInstance} with the My Domain name of your Salesforce org.

1https://{yourInstance}.salesforce.com/services/data/v68.0/connect/insurance/design-advisor/api-request-validation

Available Version 

68.0

HTTP Methods 

POST

Request Body for POST 

JSON Example 

1{
2  "apiPath": "insurance/quotes",
3  "requestBody": "{\"quoteLineItems\":[{\"productCode\":\"AUTO_POLICY\",\"attributes\":[{\"attributeCode\":\"DRIVER_AGE\",\"value\":\"25\"},{\"attributeCode\":\"INVALID_ATTR\",\"value\":\"X\"}],\"childProducts\":[{\"productCode\":\"COLLISION_COVERAGE\"}]}]}"
4}

Properties 

NameTypeDescriptionRequired or OptionalAvailable Version
apiPathStringPath of the insurance Connect API request to validate. Supported values are insurance/quotes and insurance/product-rating. Requests for unsupported API paths return a valid response with an informational message.Required68.0
requestBodyStringSerialized JSON string to validate. The API parses the data and checks product codes, attributes, hierarchy, and instance keys against the org’s product model. The string must be valid JSON.Required68.0

Response Body for POST 

Insurance Request Validation Response