# Salaf Commerce API — reference

Version `2026-08`, generated from the [published OpenAPI description](https://www.salafems.com/openapi/public-v1.json). 27 endpoints — 17 reads and 10 writes.

Paths are shown exactly as the server routes them — prefix them with `https://api.salafems.com`. Authenticate with two headers, no handshake:

```http
Authorization: Bearer salaf_sk_YOUR_API_KEY
Accept: application/json
```

A key with `<resource>:write` also satisfies `<resource>:read`; the reverse is never true. Writes take an `Idempotency-Key` — see [Writes & idempotency](https://www.salafems.com/developers/idempotency.md).

## Resources

- **[Products](https://www.salafems.com/developers/reference/products.md)** — 6 endpoints
  - `GET /ext/v1/products` — [List products](https://www.salafems.com/developers/reference/products.md#list-products) · scope `products:read`
  - `POST /ext/v1/products` — [Create a product](https://www.salafems.com/developers/reference/products.md#create-a-product) · scope `products:write`
  - `GET /ext/v1/products/{id}` — [Get a product by id](https://www.salafems.com/developers/reference/products.md#get-a-product-by-id) · scope `products:read`
  - `PATCH /ext/v1/products/{id}` — [Update a product](https://www.salafems.com/developers/reference/products.md#update-a-product) · scope `products:write`
  - `POST /ext/v1/products/{id}/archive` — [Archive a product](https://www.salafems.com/developers/reference/products.md#archive-a-product) · scope `products:write`
  - `GET /ext/v1/variants/{identifier}` — [Get a variant by id, SKU or barcode](https://www.salafems.com/developers/reference/products.md#get-a-variant-by-id-sku-or-barcode) · scope `products:read`
- **[Categories](https://www.salafems.com/developers/reference/categories.md)** — 2 endpoints
  - `GET /ext/v1/categories` — [List categories](https://www.salafems.com/developers/reference/categories.md#list-categories) · scope `products:read`
  - `GET /ext/v1/categories/{id}` — [Get a category by id](https://www.salafems.com/developers/reference/categories.md#get-a-category-by-id) · scope `products:read`
- **[Brands](https://www.salafems.com/developers/reference/brands.md)** — 2 endpoints
  - `GET /ext/v1/brands` — [List brands](https://www.salafems.com/developers/reference/brands.md#list-brands) · scope `products:read`
  - `GET /ext/v1/brands/{id}` — [Get a brand by id](https://www.salafems.com/developers/reference/brands.md#get-a-brand-by-id) · scope `products:read`
- **[Orders](https://www.salafems.com/developers/reference/orders.md)** — 7 endpoints
  - `GET /ext/v1/orders` — [List orders](https://www.salafems.com/developers/reference/orders.md#list-orders) · scope `orders:read`
  - `POST /ext/v1/orders` — [Create an order](https://www.salafems.com/developers/reference/orders.md#create-an-order) · scope `orders:write`
  - `GET /ext/v1/orders/{id}` — [Get an order by id](https://www.salafems.com/developers/reference/orders.md#get-an-order-by-id) · scope `orders:read`
  - `POST /ext/v1/orders/{id}/cancel` — [Cancel an order](https://www.salafems.com/developers/reference/orders.md#cancel-an-order) · scope `orders:write`
  - `GET /ext/v1/orders/{id}/payments` — [List an order's payments](https://www.salafems.com/developers/reference/orders.md#list-an-orders-payments) · scope `payments:read`
  - `POST /ext/v1/orders/{id}/payments` — [Record a payment against an order](https://www.salafems.com/developers/reference/orders.md#record-a-payment-against-an-order) · scope `payments:write`
  - `PATCH /ext/v1/orders/{id}/status` — [Change an order status](https://www.salafems.com/developers/reference/orders.md#change-an-order-status) · scope `orders:write`
- **[Customers](https://www.salafems.com/developers/reference/customers.md)** — 4 endpoints
  - `GET /ext/v1/customers` — [List customers](https://www.salafems.com/developers/reference/customers.md#list-customers) · scope `customers:read`
  - `POST /ext/v1/customers` — [Create a customer](https://www.salafems.com/developers/reference/customers.md#create-a-customer) · scope `customers:write`
  - `GET /ext/v1/customers/{id}` — [Get a customer by id, with their addresses](https://www.salafems.com/developers/reference/customers.md#get-a-customer-by-id-with-their-addresses) · scope `customers:read`
  - `PATCH /ext/v1/customers/{id}` — [Update a customer](https://www.salafems.com/developers/reference/customers.md#update-a-customer) · scope `customers:write`
- **[Inventory](https://www.salafems.com/developers/reference/inventory.md)** — 3 endpoints
  - `POST /ext/v1/inventory/adjustments` — [Adjust stock at a location](https://www.salafems.com/developers/reference/inventory.md#adjust-stock-at-a-location) · scope `inventory:write`
  - `GET /ext/v1/inventory/levels` — [List stock levels (one row per variant per location)](https://www.salafems.com/developers/reference/inventory.md#list-stock-levels-one-row-per-variant-per-location) · scope `inventory:read`
  - `GET /ext/v1/inventory/movements` — [List stock movements (the append-only ledger behind the levels)](https://www.salafems.com/developers/reference/inventory.md#list-stock-movements-the-append-only-ledger-behind-the-levels) · scope `inventory:read`
- **[Locations](https://www.salafems.com/developers/reference/locations.md)** — 2 endpoints
  - `GET /ext/v1/locations` — [List locations](https://www.salafems.com/developers/reference/locations.md#list-locations) · scope `locations:read`
  - `GET /ext/v1/locations/{id}` — [Get a location by id](https://www.salafems.com/developers/reference/locations.md#get-a-location-by-id) · scope `locations:read`
- **[Channels](https://www.salafems.com/developers/reference/channels.md)** — 1 endpoint
  - `GET /ext/v1/channels` — [List sales channels](https://www.salafems.com/developers/reference/channels.md#list-sales-channels) · scope `channels:read`
