Classify products synchronously

Classify one product and return its result without persisting product data.

Use this endpoint to classify exactly one product through the AI Classifier and return the classification result immediately. The product data and classification result are not persisted.

Endpoint

POST /public-api/categorize/sync

Classifies exactly one product through the AI Classifier and returns the classification result without persisting product data.

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"
      }
    }
  ]
}
PropertyTypeRequiredDescription
uniqueIdentifierTypestringYesThe client's configured unique record identifier type.
enableQCBooleanNoWhether the AI Classifier should evaluate qualifying conditions. Default is false.
productsarrayYesMust 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 \
  --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

StatusDescription
400 Bad RequestThe request is invalid. Common reasons include missing uniqueIdentifierType, missing products, or more than one product.
401 UnauthorizedThe bearer token is missing, expired, or invalid.
500 Internal Server ErrorThe classifier or service encountered an unexpected error.
504 Gateway TimeoutThe classifier did not respond within the configured timeout.

Did this page help you?