Skip to main content

Endpoints

GET  /api/workspace/{workspaceId}/settings/pipeline
PUT  /api/workspace/{workspaceId}/settings/pipeline
Read and update workspace-level pipeline configuration, including Silver field mappings, Gold scoring weights, auto-trigger behavior, and preview mode.

Path parameters

ParameterTypeRequiredDescription
workspaceIdstringYesYour workspace ID

GET — Read settings

Returns the current pipeline configuration for the workspace.

Response

{
  "silverMappings": [
    {
      "sourceField": "product_name",
      "targetField": "title",
      "transform": "trim"
    },
    {
      "sourceField": "item_code",
      "targetField": "sku"
    }
  ],
  "goldWeights": {
    "identity": 20,
    "taxonomy": 15,
    "content": 25,
    "media": 20,
    "pricing": 10,
    "attributes": 5,
    "seo": 5
  },
  "autoTriggerSilver": false,
  "autoTriggerGold": false,
  "previewMode": false,
  "updatedAt": "2026-03-15T10:30:00Z",
  "updatedBy": "user_abc"
}

PUT — Update settings

Updates pipeline configuration. All fields are optional — only include fields you want to change.

Request body

{
  "silverMappings": [
    {
      "sourceField": "product_name",
      "targetField": "title",
      "transform": "trim"
    },
    {
      "sourceField": "item_code",
      "targetField": "sku"
    },
    {
      "sourceField": "cat",
      "targetField": "categoryPath",
      "transform": "prefix:Apparel > "
    }
  ],
  "goldWeights": {
    "identity": 20,
    "taxonomy": 15,
    "content": 25,
    "media": 20,
    "pricing": 10,
    "attributes": 5,
    "seo": 5
  },
  "autoTriggerSilver": true,
  "autoTriggerGold": false,
  "previewMode": false
}

FieldMapping object

FieldTypeRequiredDescription
sourceFieldstringYesSource column name as it appears in the import file
targetFieldstringYesTarget Alana schema field
transformstringNoOptional transformation: "trim", "uppercase", "lowercase", "prefix:X", "suffix:X"

ScoringWeights object

FieldTypeDescription
identitynumberWeight for SKU, GTIN, brand (default: 20)
taxonomynumberWeight for category depth (default: 15)
contentnumberWeight for title, description, bullets (default: 25)
medianumberWeight for images and video (default: 20)
pricingnumberWeight for price, currency, original price (default: 10)
attributesnumberWeight for category-specific attributes (default: 5)
seonumberWeight for slug, meta, keywords (default: 5)
All goldWeights values must sum to exactly 100. A 422 error is returned if the sum is incorrect.

Behavior flags

FieldTypeDefaultDescription
autoTriggerSilverbooleanfalseRun Silver automatically after every Bronze ingest
autoTriggerGoldbooleanfalseRun Gold automatically after Silver completes
previewModebooleanfalseSimulate pipeline changes without writing to products

Examples

Read current settings

curl "https://app.alana.shopping/api/workspace/ws_123/settings/pipeline" \
  -H "Authorization: Bearer sk_live_your_api_key_here"

Update Silver mappings

curl -X PUT "https://app.alana.shopping/api/workspace/ws_123/settings/pipeline" \
  -H "Authorization: Bearer sk_live_your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "silverMappings": [
      { "sourceField": "product_name", "targetField": "title", "transform": "trim" },
      { "sourceField": "item_code", "targetField": "sku" },
      { "sourceField": "vendor", "targetField": "brand" }
    ]
  }'

Update Gold weights for media-heavy catalog

curl -X PUT "https://app.alana.shopping/api/workspace/ws_123/settings/pipeline" \
  -H "Authorization: Bearer sk_live_your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "goldWeights": {
      "identity": 15,
      "taxonomy": 10,
      "content": 20,
      "media": 35,
      "pricing": 10,
      "attributes": 5,
      "seo": 5
    }
  }'

Error responses

HTTP statusCodeDescription
403INSUFFICIENT_PERMISSIONSAPI key lacks settings:write
404WORKSPACE_NOT_FOUNDWorkspace ID not found
422WEIGHTS_SUM_INVALIDGold weights do not sum to 100
422VALIDATION_ERRORInvalid field mapping or transform value
Last modified on March 18, 2026