SALAF EMSDevelopers
salafems.com

Products

Products with their variants nested — variants are the commercial unit, since price, SKU and stock all hang off them.

Paste a key and every snippet on this page switches from the placeholder to your key — and the Try it panel under each endpoint is ready to send. It is stored in this browser only and goes nowhere except, if you press Send, straight to the API host you pick there.

List products

GET/ext/v1/productsproducts:read

Variants are nested in each product — they are the commercial unit. Use updated_after to sync only what changed.

Query parameters

NameTypeDescription
limitnumberdefault 25max 100Page size.
starting_afterstringReturn the page AFTER this object id (the previous page's next_cursor).
ending_beforestringReturn the page BEFORE this object id.
sortstringdefault -created_atNewest first by default. Only created_at is sortable — a cursor over a mutable key (like updated_at) cannot page reliably. Use updated_after to sync changes.created_at-created_at
store_idstringRestrict to one store. Required breadth control for company-scoped keys; on a store-scoped key it must match the key's own store.
statusstringFilter to one of the values below.draftactivearchived
category_idstringOnly products in this category.
updated_afterdate-timeOnly products changed since this instant — the sync filter. Pair it with the default -created_at order and page with the cursor.
searchstringMatch on product name or variant SKU.

Request

export SALAF_API_KEY="salaf_sk_YOUR_API_KEY"

curl -sS "https://api.salafems.com/ext/v1/products?limit=25&updated_after=2026-08-01T00%3A00%3A00Z" \
  -H "Authorization: Bearer $SALAF_API_KEY"
Try itruns from your browser
GEThttps://api.salafems.com/ext/v1/products

Stored in this browser only and never sent anywhere except to the API host you picked above — these pages are static files with no server behind them.

Query parameters

Blank fields are left out of the request.

Paste a key above to enable Send.

Responses

  • 200A cursor page of products.
  • 401Missing/invalid API key, revoked or expired key, plan without API access, or a dead store.
  • 403The key's scopes do not cover this endpoint.
  • 422Validation failed — error.fields maps each offending field to its messages.
  • 429Rate limit exceeded for this key. Honor Retry-After and the X-RateLimit-* headers.

Every failure uses the one error envelope — Errors lists each code and what to do with it.

Example 200 response
{
  "data": [
    {
      "id": "5f7d2f60-0d1c-4b3a-9a68-6f4d21f6a001",
      "store_id": "5f7d2f60-0d1c-4b3a-9a68-6f4d21f6a001",
      "name": "Classic Cotton T-Shirt",
      "slug": "classic-cotton-t-shirt",
      "short_description": null,
      "description": null,
      "thumbnail": null,
      "status": "active",
      "delivery_charge": "1250.00",
      "rating_average": "4.50",
      "rating_count": 12,
      "brand": {
        "id": "5f7d2f60-0d1c-4b3a-9a68-6f4d21f6a001",
        "name": "Acme",
        "slug": "acme"
      },
      "categories": [
        {
          "id": "5f7d2f60-0d1c-4b3a-9a68-6f4d21f6a001",
          "name": "T-Shirts",
          "slug": "t-shirts",
          "is_primary": true
        }
      ],
      "images": [
        {
          "url": "https://cdn.example.com/p/1.webp",
          "position": 0
        }
      ],
      "variants": [
        {
          "id": "5f7d2f60-0d1c-4b3a-9a68-6f4d21f6a001",
          "store_id": "5f7d2f60-0d1c-4b3a-9a68-6f4d21f6a001",
          "product_id": "5f7d2f60-0d1c-4b3a-9a68-6f4d21f6a001",
          "sku": "TSHIRT-RED-M",
          "barcode": "0123456789012",
          "name": "Red / M",
          "price": "1250.00",
          "discount_price": "1250.00",
          "weight": "0.25",
          "dimensions": null,
          "low_stock_threshold": 5,
          "status": "active",
          "image": {
            "id": "5f7d2f60-0d1c-4b3a-9a68-6f4d21f6a001",
            "url": "https://cdn.example.com/p/1.webp"
          },
          "created_at": "2026-08-11T10:00:00.000Z",
          "updated_at": "2026-08-11T10:00:00.000Z"
        }
      ],
      "created_at": "2026-08-11T10:00:00.000Z",
      "updated_at": "2026-08-11T10:00:00.000Z"
    }
  ],
  "meta": {
    "has_more": true,
    "next_cursor": "5f7d2f60-0d1c-4b3a-9a68-6f4d21f6a001"
  }
}

Create a product

POST/ext/v1/productsproducts:write

At least one variant (a simple product has exactly one). Slugs auto-generate from the name and auto-suffix when taken; a duplicate SKU is a 409. Media, attribute wiring and initial stock are dashboard concerns — stock enters through POST /v1/inventory/adjustments.

Headers

NameTypeDescription
Idempotency-KeystringOptional, but honored: send it to make retries of this request safe.

Body parameters

NameTypeDescription
store_iduuidTarget store. REQUIRED with a company-scoped key; with a store-scoped key it may only repeat the key's own store.
namerequiredstring
slugstringURL-safe slug. Auto-generated from the name when omitted; auto-suffixed when taken.
brand_iduuid
short_descriptionstring
descriptionstring
statusstringdefault draftdraftactivearchived
delivery_chargenumberPer-product delivery-charge override: 0 = free delivery, N = flat charge; omit for the standard shipping rules.
categoriesProductCategoryLinkDto[]
variantsrequiredProductVariantWriteDto[]

categories[] fields

NameTypeDescription
idrequireduuid
is_primarybooleandefault false

variants[] fields

NameTypeDescription
iduuidUpdate only: patches this existing variant. Omit to create a new one.
skurequiredstring
barcodestring
namerequiredstring
pricerequirednumber
discount_pricenumberSale price — must be strictly below price.
cost_pricenumberWhat the unit costs the store. Write-only (never serialized, Q6); defaults to 0 when omitted.
weightnumber
low_stock_thresholdnumberdefault 0
statusstringdefault activeactiveinactive

Request

export SALAF_API_KEY="salaf_sk_YOUR_API_KEY"

curl -sS -X POST "https://api.salafems.com/ext/v1/products" \
  -H "Authorization: Bearer $SALAF_API_KEY" \
  -H "Idempotency-Key: e7a1…-your-uuid" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "Classic Cotton T-Shirt",
  "status": "active",
  "variants": [
    {
      "sku": "TSHIRT-RED-M",
      "name": "Red / M",
      "price": 1250,
      "cost_price": 850
    }
  ]
}'
Try itruns from your browser
POSThttps://api.salafems.com/ext/v1/products

Stored in this browser only and never sent anywhere except to the API host you picked above — these pages are static files with no server behind them.

Valid JSON
Idempotency-Keyoptional
generating…

A new value is generated whenever you edit this request, and kept while you do not — so sending twice without changing anything is a real retry and comes back Idempotent-Replayed: true instead of writing again.

Paste a key above to enable Send.

Responses

  • 201The created product, variants nested.
  • 401Missing/invalid API key, revoked or expired key, plan without API access, or a dead store.
  • 403The key's scopes do not cover this endpoint.
  • 409A variant SKU is already in use in this store.
  • 422Validation failed — error.fields maps each offending field to its messages.
  • 429Rate limit exceeded for this key. Honor Retry-After and the X-RateLimit-* headers.

Every failure uses the one error envelope — Errors lists each code and what to do with it.

Example 200 response
{
  "id": "5f7d2f60-0d1c-4b3a-9a68-6f4d21f6a001",
  "store_id": "5f7d2f60-0d1c-4b3a-9a68-6f4d21f6a001",
  "name": "Classic Cotton T-Shirt",
  "slug": "classic-cotton-t-shirt",
  "short_description": null,
  "description": null,
  "thumbnail": null,
  "status": "active",
  "delivery_charge": "1250.00",
  "rating_average": "4.50",
  "rating_count": 12,
  "brand": {
    "id": "5f7d2f60-0d1c-4b3a-9a68-6f4d21f6a001",
    "name": "Acme",
    "slug": "acme"
  },
  "categories": [
    {
      "id": "5f7d2f60-0d1c-4b3a-9a68-6f4d21f6a001",
      "name": "T-Shirts",
      "slug": "t-shirts",
      "is_primary": true
    }
  ],
  "images": [
    {
      "url": "https://cdn.example.com/p/1.webp",
      "position": 0
    }
  ],
  "variants": [
    {
      "id": "5f7d2f60-0d1c-4b3a-9a68-6f4d21f6a001",
      "store_id": "5f7d2f60-0d1c-4b3a-9a68-6f4d21f6a001",
      "product_id": "5f7d2f60-0d1c-4b3a-9a68-6f4d21f6a001",
      "sku": "TSHIRT-RED-M",
      "barcode": "0123456789012",
      "name": "Red / M",
      "price": "1250.00",
      "discount_price": "1250.00",
      "weight": "0.25",
      "dimensions": null,
      "low_stock_threshold": 5,
      "status": "active",
      "image": {
        "id": "5f7d2f60-0d1c-4b3a-9a68-6f4d21f6a001",
        "url": "https://cdn.example.com/p/1.webp"
      },
      "created_at": "2026-08-11T10:00:00.000Z",
      "updated_at": "2026-08-11T10:00:00.000Z"
    }
  ],
  "created_at": "2026-08-11T10:00:00.000Z",
  "updated_at": "2026-08-11T10:00:00.000Z"
}

Get a product by id

GET/ext/v1/products/{id}products:read

The full product object, variants nested.

Path parameters

NameTypeDescription
idrequireduuidThe product id.

Query parameters

NameTypeDescription
store_iduuidRestrict the lookup to one store. Breadth control for company-scoped keys; on a store-scoped key it must match the key's own store.

Request

export SALAF_API_KEY="salaf_sk_YOUR_API_KEY"

curl -sS "https://api.salafems.com/ext/v1/products/REPLACE_WITH_ID" \
  -H "Authorization: Bearer $SALAF_API_KEY"
Try itruns from your browser
GEThttps://api.salafems.com/ext/v1/products/5f7d2f60-0d1c-4b3a-9a68-6f4d21f6a001

Stored in this browser only and never sent anywhere except to the API host you picked above — these pages are static files with no server behind them.

Path parameters

Query parameters

Blank fields are left out of the request.

Paste a key above to enable Send.

Responses

  • 200The product.
  • 401Missing/invalid API key, revoked or expired key, plan without API access, or a dead store.
  • 403The key's scopes do not cover this endpoint.
  • 404Product not found.
  • 422Validation failed — error.fields maps each offending field to its messages.
  • 429Rate limit exceeded for this key. Honor Retry-After and the X-RateLimit-* headers.

Every failure uses the one error envelope — Errors lists each code and what to do with it.

Example 200 response
{
  "id": "5f7d2f60-0d1c-4b3a-9a68-6f4d21f6a001",
  "store_id": "5f7d2f60-0d1c-4b3a-9a68-6f4d21f6a001",
  "name": "Classic Cotton T-Shirt",
  "slug": "classic-cotton-t-shirt",
  "short_description": null,
  "description": null,
  "thumbnail": null,
  "status": "active",
  "delivery_charge": "1250.00",
  "rating_average": "4.50",
  "rating_count": 12,
  "brand": {
    "id": "5f7d2f60-0d1c-4b3a-9a68-6f4d21f6a001",
    "name": "Acme",
    "slug": "acme"
  },
  "categories": [
    {
      "id": "5f7d2f60-0d1c-4b3a-9a68-6f4d21f6a001",
      "name": "T-Shirts",
      "slug": "t-shirts",
      "is_primary": true
    }
  ],
  "images": [
    {
      "url": "https://cdn.example.com/p/1.webp",
      "position": 0
    }
  ],
  "variants": [
    {
      "id": "5f7d2f60-0d1c-4b3a-9a68-6f4d21f6a001",
      "store_id": "5f7d2f60-0d1c-4b3a-9a68-6f4d21f6a001",
      "product_id": "5f7d2f60-0d1c-4b3a-9a68-6f4d21f6a001",
      "sku": "TSHIRT-RED-M",
      "barcode": "0123456789012",
      "name": "Red / M",
      "price": "1250.00",
      "discount_price": "1250.00",
      "weight": "0.25",
      "dimensions": null,
      "low_stock_threshold": 5,
      "status": "active",
      "image": {
        "id": "5f7d2f60-0d1c-4b3a-9a68-6f4d21f6a001",
        "url": "https://cdn.example.com/p/1.webp"
      },
      "created_at": "2026-08-11T10:00:00.000Z",
      "updated_at": "2026-08-11T10:00:00.000Z"
    }
  ],
  "created_at": "2026-08-11T10:00:00.000Z",
  "updated_at": "2026-08-11T10:00:00.000Z"
}

Update a product

PATCH/ext/v1/products/{id}products:write

Partial update of the product fields. categories (when present) replaces the link set; variants (when present) reconciles the FULL variant set — patch by id, create without one, delete the rest unless stock history forbids it. Same semantics as the dashboard.

Path parameters

NameTypeDescription
idrequireduuidThe product id.

Headers

NameTypeDescription
Idempotency-KeystringOptional, but honored: send it to make retries of this request safe.

Body parameters

NameTypeDescription
store_iduuidTarget store. REQUIRED with a company-scoped key; with a store-scoped key it may only repeat the key's own store.
namestring
slugstring
brand_iduuidSet null to detach the brand.
short_descriptionstring
descriptionstring
statusstringdraftactivearchived
delivery_chargeobjectSet null to return to the standard shipping rules.
categoriesProductCategoryLinkDto[]When present, REPLACES the product's category links.
variantsProductVariantWriteDto[]When present, reconciles the FULL variant set in one transaction — entries with an id are patched, entries without one are created, and existing variants missing from the list are removed (refused when they carry stock history). Same semantics as the dashboard.

categories[] fields

NameTypeDescription
idrequireduuid
is_primarybooleandefault false

variants[] fields

NameTypeDescription
iduuidUpdate only: patches this existing variant. Omit to create a new one.
skurequiredstring
barcodestring
namerequiredstring
pricerequirednumber
discount_pricenumberSale price — must be strictly below price.
cost_pricenumberWhat the unit costs the store. Write-only (never serialized, Q6); defaults to 0 when omitted.
weightnumber
low_stock_thresholdnumberdefault 0
statusstringdefault activeactiveinactive

Request

export SALAF_API_KEY="salaf_sk_YOUR_API_KEY"

curl -sS -X PATCH "https://api.salafems.com/ext/v1/products/REPLACE_WITH_ID" \
  -H "Authorization: Bearer $SALAF_API_KEY" \
  -H "Idempotency-Key: e7a1…-your-uuid" \
  -H "Content-Type: application/json" \
  -d '{
  "status": "active"
}'
Try itruns from your browser
PATCHhttps://api.salafems.com/ext/v1/products/5f7d2f60-0d1c-4b3a-9a68-6f4d21f6a001

Stored in this browser only and never sent anywhere except to the API host you picked above — these pages are static files with no server behind them.

Path parameters

Valid JSON
Idempotency-Keyoptional
generating…

A new value is generated whenever you edit this request, and kept while you do not — so sending twice without changing anything is a real retry and comes back Idempotent-Replayed: true instead of writing again.

Paste a key above to enable Send.

Responses

  • 200The updated product, variants nested.
  • 401Missing/invalid API key, revoked or expired key, plan without API access, or a dead store.
  • 403The key's scopes do not cover this endpoint.
  • 404Product not found.
  • 409A variant SKU is already in use in this store.
  • 422Validation failed — error.fields maps each offending field to its messages.
  • 429Rate limit exceeded for this key. Honor Retry-After and the X-RateLimit-* headers.

Every failure uses the one error envelope — Errors lists each code and what to do with it.

Example 200 response
{
  "id": "5f7d2f60-0d1c-4b3a-9a68-6f4d21f6a001",
  "store_id": "5f7d2f60-0d1c-4b3a-9a68-6f4d21f6a001",
  "name": "Classic Cotton T-Shirt",
  "slug": "classic-cotton-t-shirt",
  "short_description": null,
  "description": null,
  "thumbnail": null,
  "status": "active",
  "delivery_charge": "1250.00",
  "rating_average": "4.50",
  "rating_count": 12,
  "brand": {
    "id": "5f7d2f60-0d1c-4b3a-9a68-6f4d21f6a001",
    "name": "Acme",
    "slug": "acme"
  },
  "categories": [
    {
      "id": "5f7d2f60-0d1c-4b3a-9a68-6f4d21f6a001",
      "name": "T-Shirts",
      "slug": "t-shirts",
      "is_primary": true
    }
  ],
  "images": [
    {
      "url": "https://cdn.example.com/p/1.webp",
      "position": 0
    }
  ],
  "variants": [
    {
      "id": "5f7d2f60-0d1c-4b3a-9a68-6f4d21f6a001",
      "store_id": "5f7d2f60-0d1c-4b3a-9a68-6f4d21f6a001",
      "product_id": "5f7d2f60-0d1c-4b3a-9a68-6f4d21f6a001",
      "sku": "TSHIRT-RED-M",
      "barcode": "0123456789012",
      "name": "Red / M",
      "price": "1250.00",
      "discount_price": "1250.00",
      "weight": "0.25",
      "dimensions": null,
      "low_stock_threshold": 5,
      "status": "active",
      "image": {
        "id": "5f7d2f60-0d1c-4b3a-9a68-6f4d21f6a001",
        "url": "https://cdn.example.com/p/1.webp"
      },
      "created_at": "2026-08-11T10:00:00.000Z",
      "updated_at": "2026-08-11T10:00:00.000Z"
    }
  ],
  "created_at": "2026-08-11T10:00:00.000Z",
  "updated_at": "2026-08-11T10:00:00.000Z"
}

Archive a product

POST/ext/v1/products/{id}/archiveproducts:write

Non-destructive: variants, images and inventory survive with their status parked, and the dashboard can restore. Archived products drop out of GET /v1/products.

Path parameters

NameTypeDescription
idrequireduuidThe product id.

Headers

NameTypeDescription
Idempotency-KeystringOptional, but honored: send it to make retries of this request safe.

Body parameters

NameTypeDescription
store_iduuidTarget store. REQUIRED with a company-scoped key; with a store-scoped key it may only repeat the key's own store.

Request

export SALAF_API_KEY="salaf_sk_YOUR_API_KEY"

curl -sS -X POST "https://api.salafems.com/ext/v1/products/REPLACE_WITH_ID/archive" \
  -H "Authorization: Bearer $SALAF_API_KEY" \
  -H "Idempotency-Key: e7a1…-your-uuid" \
  -H "Content-Type: application/json" \
  -d '{}'
Try itruns from your browser
POSThttps://api.salafems.com/ext/v1/products/5f7d2f60-0d1c-4b3a-9a68-6f4d21f6a001/archive

Stored in this browser only and never sent anywhere except to the API host you picked above — these pages are static files with no server behind them.

Path parameters

Valid JSON
Idempotency-Keyoptional
generating…

A new value is generated whenever you edit this request, and kept while you do not — so sending twice without changing anything is a real retry and comes back Idempotent-Replayed: true instead of writing again.

Paste a key above to enable Send.

Responses

  • 201Archival confirmed.
  • 401Missing/invalid API key, revoked or expired key, plan without API access, or a dead store.
  • 403The key's scopes do not cover this endpoint.
  • 404Product not found.
  • 422Validation failed — error.fields maps each offending field to its messages.
  • 429Rate limit exceeded for this key. Honor Retry-After and the X-RateLimit-* headers.

Every failure uses the one error envelope — Errors lists each code and what to do with it.

Example 200 response
{
  "id": "5f7d2f60-0d1c-4b3a-9a68-6f4d21f6a001",
  "archived": true
}

Get a variant by id, SKU or barcode

GET/ext/v1/variants/{identifier}products:read

Answers "what is this thing in my hand?" for a scanned barcode or a SKU from a spreadsheet.

Path parameters

NameTypeDescription
identifierrequiredstringA variant id, SKU or barcode. All three resolve here.

Query parameters

NameTypeDescription
store_iduuidRestrict the lookup to one store. Breadth control for company-scoped keys; on a store-scoped key it must match the key's own store.

Request

export SALAF_API_KEY="salaf_sk_YOUR_API_KEY"

curl -sS "https://api.salafems.com/ext/v1/variants/SKU-001" \
  -H "Authorization: Bearer $SALAF_API_KEY"
Try itruns from your browser
GEThttps://api.salafems.com/ext/v1/variants/TSHIRT-RED-M

Stored in this browser only and never sent anywhere except to the API host you picked above — these pages are static files with no server behind them.

Path parameters

Query parameters

Blank fields are left out of the request.

Paste a key above to enable Send.

Responses

  • 200The variant.
  • 401Missing/invalid API key, revoked or expired key, plan without API access, or a dead store.
  • 403The key's scopes do not cover this endpoint.
  • 404Variant not found.
  • 422Validation failed — error.fields maps each offending field to its messages.
  • 429Rate limit exceeded for this key. Honor Retry-After and the X-RateLimit-* headers.

Every failure uses the one error envelope — Errors lists each code and what to do with it.

Example 200 response
{
  "id": "5f7d2f60-0d1c-4b3a-9a68-6f4d21f6a001",
  "store_id": "5f7d2f60-0d1c-4b3a-9a68-6f4d21f6a001",
  "product_id": "5f7d2f60-0d1c-4b3a-9a68-6f4d21f6a001",
  "sku": "TSHIRT-RED-M",
  "barcode": "0123456789012",
  "name": "Red / M",
  "price": "1250.00",
  "discount_price": "1250.00",
  "weight": "0.25",
  "dimensions": null,
  "low_stock_threshold": 5,
  "status": "active",
  "image": {
    "id": "5f7d2f60-0d1c-4b3a-9a68-6f4d21f6a001",
    "url": "https://cdn.example.com/p/1.webp"
  },
  "created_at": "2026-08-11T10:00:00.000Z",
  "updated_at": "2026-08-11T10:00:00.000Z"
}