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://uat.integration.cl.sodtrack-shared.sodtrack.com/api/integration/product" \
  -H "Authorization: Bearer $SODTRACK_TOKEN" \
  -H "origin: <your-origin>"

Base URL: https://uat.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-key✅External integration API key provided by Sodtrack.

Field Definitions

📦 Product

FieldTypeRequiredDescription
skustring✅Unique product/component code. Must not already exist in Sodtrack.
namestring✅Display name of the product/component.
descriptionstring❌Free-text description.
categorystring❌Category name. Created automatically if it does not exist.
brandstring❌Brand name. Created automatically if it does not exist.
typestring❌One of: "product", "component". Defaults to "product" when omitted.

🏷️ Tags

FieldTypeRequiredDescription
tagsarray❌Tags 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 Unauthorized—Missing or invalid x-api-key.
406 Not AcceptablePRODUCT.SKU_ALREADY_IN_USEA 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.