Skip to main content

Endpoint

POST /api/workspace/{workspaceId}/catalogs/{catalogId}/batch/silver
Triggers the Silver normalization stage for a selection of products or the entire catalog. Silver normalizes field values, maps source fields to the Alana schema, validates image URLs, and detects duplicate products.

Path parameters

ParameterTypeRequiredDescription
workspaceIdstringYesYour workspace ID
catalogIdstringYesThe catalog to process

Request body

{
  "productIds": ["prod_abc", "prod_def"],
  "scope": "selection"
}
FieldTypeRequiredDescription
productIdsstring[]NoProduct IDs to process. Required when scope is "selection"
scopestringYes"selection" or "all". When "all", productIds is ignored

Response

{
  "results": [
    {
      "productId": "prod_abc",
      "status": "success",
      "fieldsNormalized": 4,
      "duplicateOf": null,
      "urlsValidated": 3
    },
    {
      "productId": "prod_def",
      "status": "success",
      "fieldsNormalized": 2,
      "duplicateOf": "prod_xyz",
      "urlsValidated": 1
    },
    {
      "productId": "prod_ghi",
      "status": "error",
      "error": "Brand not found: 'AcmeCorp'"
    }
  ],
  "processed": 3,
  "duration_ms": 1240
}

SilverResult fields

FieldTypeDescription
productIdstringThe product that was processed
statusstring"success" or "error"
fieldsNormalizednumberCount of fields that were transformed
duplicateOfstring | nullIf a duplicate was detected, the ID of the canonical product
urlsValidatednumberCount of image/media URLs checked for HTTP 200
errorstringPresent only when status is "error"

Top-level response fields

FieldTypeDescription
resultsSilverResult[]Per-product results
processednumberTotal products processed (success + error)
duration_msnumberTotal processing time in milliseconds

Examples

# Normalize a selection of products
curl -X POST "https://app.alana.shopping/api/workspace/ws_123/catalogs/cat_456/batch/silver" \
  -H "Authorization: Bearer sk_live_your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "productIds": ["prod_abc", "prod_def", "prod_ghi"],
    "scope": "selection"
  }'

Normalize entire catalog

curl -X POST "https://app.alana.shopping/api/workspace/ws_123/catalogs/cat_456/batch/silver" \
  -H "Authorization: Bearer sk_live_your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{"scope": "all"}'

Error responses

HTTP statusCodeDescription
400VALIDATION_ERRORscope is missing or invalid
403INSUFFICIENT_PERMISSIONSAPI key lacks catalogs:write
404CATALOG_NOT_FOUNDCatalog does not exist in workspace
409JOB_ALREADY_RUNNINGA Silver or Gold job is already in progress
429RATE_LIMIT_EXCEEDEDSlow down and retry after the Retry-After header value
Last modified on March 18, 2026