The Product Catalog API validates incoming data before and during processing. Validation helps identify invalid requests and provides feedback about accepted, skipped, or failed data.
Validation process
Validation consists of two stages.
Validation stage | Purpose |
|---|---|
Initial validation | Performs synchronous validation before the request is accepted for processing. |
Final validation | Performs asynchronous validation during later processing stages. |
Initial validation
Initial validation is performed synchronously when the API request is received.
Critical errors
If a critical validation error occurs:
The request is rejected immediately.
A detailed error message is returned in the HTTP response.
If no critical error is detected:
The request is accepted for processing.
A
201 Createdresponse is returned.A unique
event_idis assigned to the request.
The event_id uniquely identifies the request throughout its processing lifecycle and can be used for troubleshooting, support requests, and correlating processing results.
Partial update validation
PATCH operations perform additional validation for incoming attributes, including:
Attribute existence
Attribute data type validation
Attribute-specific validation rules as described in the attribute definition documentation
If an attribute fails validation:
The invalid attribute is skipped.
Valid attributes continue processing.
The response indicates which attributes were accepted and which were skipped.
Final validation
Final validation is performed asynchronously during later processing stages.
Examples include:
Validation of mandatory attributes
Additional business rule validation
If validation fails during asynchronous processing:
The failure is logged internally.
The associated
event_idis included in the feedback.A webhook notification can be sent to configured callback URLs.
Event identifiers
Successful requests return a unique event_id.
Store this identifier whenever possible. It can be used to:
Trace processing results
Investigate failures
Correlate webhook notifications with API requests
Support troubleshooting activities
Validation feedback in responses
Responses can contain information about accepted and skipped data.
Response field | Description |
|---|---|
| Attributes accepted for processing. |
| Attributes skipped during processing. |
| Unique identifier assigned to the request event. |
| Identifier assigned to bulk operations. |