Create product

Creates a product or component in the Sodtrack catalog from an external system.

POST/api/integration/product

Request

cURL
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

NameTypeDescription
originstring

Responses

Create product
{
  "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

HeaderRequiredDescription
x-api-keyExternal integration API key provided by Sodtrack.

Field Definitions

📦 Product

FieldTypeRequiredDescription
skustringUnique product/component code. Must not already exist in Sodtrack.
namestringDisplay name of the product/component.
descriptionstringFree-text description.
categorystringCategory name. Created automatically if it does not exist.
brandstringBrand name. Created automatically if it does not exist.
typestringOne of: "product", "component". Defaults to "product" when omitted.

🏷️ Tags

FieldTypeRequiredDescription
tagsarrayTags to associate with the product.
tags[].namestring✅ when a tag is sentTag name. Created automatically if it does not exist.
tags[].valuestring✅ when a tag is sentValue assigned to the tag for this product.

Example Request

json
{
  "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

json
{
  "sku": "PROD-1001",
  "name": "Maintenance kit"
}

Response Example

json
{
  "id": "326",
  "sku": "COMP-0001",
  "name": "Oil filter",
  "description": "High-flow oil filter",
  "category": "Filters",
  "brand": "K&N",
  "type": "component"
}

Response Fields

FieldTypeDescription
idstringUnique Sodtrack identifier of the created product.
skustringProduct/component code.
namestringDisplay name.
descriptionstringDescription, or null if not provided.
categorystringResolved category name, or null.
brandstringResolved brand name, or null.
typestring"product" or "component".

Error Responses

HTTP StatusErrorDescription
400 Bad RequestInvalidParametersA required field (sku, name) is missing or a field has an invalid value (e.g. unsupported type).
401 UnauthorizedMissing or invalid x-api-key.
406 Not AcceptablePRODUCT.SKU_ALREADY_IN_USEA product with the given sku already exists.
500 Internal Server ErrorUnexpected 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.