Classify and persist products synchronously
Learn how to classify one product synchronously and persist the result so you can retrieve and modify it later.
Endpoint
POST /public-api/categorize/sync/persist
Classifies exactly one product through the AI Classifier, persists the result and related product data, and returns the classification result.
Authentication
All requests require a valid bearer token in the Authorization header.
Authorization: Bearer {ACCESS_TOKEN}Request
{
"uniqueIdentifierType": "GTIN",
"enableQC": false,
"products": [
{
"productUniqueId": "1234567890123",
"productTitle": "Wireless Mouse",
"productDescription": "Ergonomic wireless mouse for laptop use.",
"identifiers": {
"SKU": "WM-101"
}
}
]
}| Property | Type | Required | Description |
|---|---|---|---|
uniqueIdentifierType | string | Yes | The client's configured unique record identifier type. |
enableQC | Boolean | No | Whether the AI Classifier should evaluate qualifying conditions. Default is false. |
products | array | Yes | Must contain exactly one product. |
Exactly one product is required. If you submit more than one product, the request returns
400 Bad Request.
Example
curl --request POST \
--url https://smartcategorization.vertexcloud.com/public-api/categorize/sync/persist \
--header "Authorization: Bearer {ACCESS_TOKEN}" \
--header "Content-Type: application/json" \
--data '{
"uniqueIdentifierType": "GTIN",
"enableQC": false,
"products": [
{
"productUniqueId": "1234567890123",
"productTitle": "Wireless Mouse",
"productDescription": "Ergonomic wireless mouse for laptop use."
}
]
}'Response
[
{
"product_unique_id": "1234567890123",
"product_title": "Wireless Mouse",
"product_description": "Ergonomic wireless mouse for laptop use.",
"category_id": "12345",
"Category": "Computer Accessories",
"confidence": "High",
"status": "approved",
"used_existing_mapping": false
}
]Errors
| Status | Description |
|---|---|
400 Bad Request | The request is invalid. Common reasons include missing uniqueIdentifierType, missing products, or more than one product. |
401 Unauthorized | The bearer token is missing, expired, or invalid. |
500 Internal Server Error | The classifier or service encountered an unexpected error during processing or persistence. |
504 Gateway Timeout | The classifier did not respond within the configured timeout. |
Updated 18 days ago
Did this page help you?
