Create product
Creates a product or component in the Sodtrack catalog from an external system.
/api/integration/productRequest
curl -X POST "https://dev.integration.cl.sodtrack-shared.sodtrack.com/api/integration/product" \
-H "Authorization: Bearer $SODTRACK_TOKEN" \
-H "origin: <your-origin>"Base URL: https://dev.integration.cl.sodtrack-shared.sodtrack.com · other environments
Headers
| Name | Type | Description |
|---|---|---|
origin | string | — |
Responses
{
"id": "326",
"sku": "COMP-0001",
"name": "Oil filter",
"description": "High-flow oil filter",
"category": "Filters",
"brand": "K&N",
"type": "component"
}Error responses for this endpoint follow the shared error reference.
Purpose
Creates a product or component in the Sodtrack catalog from an external system.
The endpoint accepts the core product data plus optional classification (category, brand) and tags. Category, brand, and tags are resolved by name: if they do not already exist in Sodtrack, they are created automatically. The product type lets you create either a standard product or a component.
Authentication
| Header | Required | Description |
|---|---|---|
x-api-key | ✅ | External integration API key provided by Sodtrack. |
Field Definitions
📦 Product
| Field | Type | Required | Description |
|---|---|---|---|
sku | string | ✅ | Unique product/component code. Must not already exist in Sodtrack. |
name | string | ✅ | Display name of the product/component. |
description | string | ❌ | Free-text description. |
category | string | ❌ | Category name. Created automatically if it does not exist. |
brand | string | ❌ | Brand name. Created automatically if it does not exist. |
type | string | ❌ | One of: "product", "component". Defaults to "product" when omitted. |
🏷️ Tags
| Field | Type | Required | Description |
|---|---|---|---|
tags | array | ❌ | Tags to associate with the product. |
tags[].name | string | ✅ when a tag is sent | Tag name. Created automatically if it does not exist. |
tags[].value | string | ✅ when a tag is sent | Value assigned to the tag for this product. |
Example Request
{
"sku": "COMP-0001",
"name": "Oil filter",
"description": "High-flow oil filter",
"category": "Filters",
"brand": "K&N",
"type": "component",
"tags": [
{ "name": "Origin", "value": "Imported" },
{ "name": "Warranty", "value": "12 months" }
]
}
Minimal valid request
{
"sku": "PROD-1001",
"name": "Maintenance kit"
}
Response Example
{
"id": "326",
"sku": "COMP-0001",
"name": "Oil filter",
"description": "High-flow oil filter",
"category": "Filters",
"brand": "K&N",
"type": "component"
}
Response Fields
| Field | Type | Description |
|---|---|---|
id | string | Unique Sodtrack identifier of the created product. |
sku | string | Product/component code. |
name | string | Display name. |
description | string | Description, or null if not provided. |
category | string | Resolved category name, or null. |
brand | string | Resolved brand name, or null. |
type | string | "product" or "component". |
Error Responses
| HTTP Status | Error | Description |
|---|---|---|
400 Bad Request | InvalidParameters | A required field (sku, name) is missing or a field has an invalid value (e.g. unsupported type). |
401 Unauthorized | — | Missing or invalid x-api-key. |
406 Not Acceptable | PRODUCT.SKU_ALREADY_IN_USE | A product with the given sku already exists. |
500 Internal Server Error | — | Unexpected server error. Contact Sodtrack support. |
Business Rules & Constraints
Type resolution
When type is omitted, the product is created as "product". Send "component" to create a component.
Category, brand and tag resolution
category, brand, and each tags[].name are matched by name. If the name does not exist in Sodtrack, it is created automatically and then associated with the product. Existing entities are reused.
SKU uniqueness
sku must be unique. Creating a product with an existing sku is rejected with 406 PRODUCT.SKU_ALREADY_IN_USE.