Updated: 2026-11-10

Finding SKU ids

Some endpoints identify a SKU by its UUID, sku_id, for example POST /orders/{orderType}/{orderId}/inbound/lots. Your own system usually knows the SKU code instead. Look up the sku_id from the SKU code with GET /skus.

Prerequisites

Reference

Find the id of one SKU

Endpoint

1
GET /skus

Request parameters (query)

key value type description
sku_code[eq] 1001 string The SKU with exactly this SKU code

Notice use sku_code[eq], not sku_code[ct]. ct matches any SKU code that contains the value, so sku_code[ct]=100 also returns 0100, 1001, 1002, 1003 and so on.

eq compares the SKU code exactly, including leading zeros. sku_code[eq]=100 does not return 0100.

SKU codes are unique within your company, so data holds at most one SKU. An empty data array means no SKU has that code.

SKU example curl request

1
2
3
4
curl -X 'GET' \
  'https://app.tracezilla.com/api/v1/example-company/skus?sku_code%5Beq%5D=1001' \
  -H 'accept: application/json' \
  -H 'Authorization: Bearer {yourBearerToken}'

GET /skus response sample:

1
2
3
4
5
6
7
8
9
{
  "data": [
    {
      "id": "be3233c4-c0a2-4f47-a62a-303492c20ba6",
      "sku_code": "1001",
      "category": "traded_good",
      "global_name": "Example product",
      "active": true,
      ...

Extract "id" for sku_id

Find the ids of several SKUs

Look up several SKU codes in one request with sku_code[in] and a comma separated list of SKU codes.

Request parameters (query)

key value type description
sku_code[in] 1001,1002,1003 Comma separated strings The SKUs with any one of these SKU codes
perPage 100 integer Defaults to 25. Set it to at least the number of SKU codes you look up, or read the next pages

The SKUs are not returned in the order of your list. Match each SKU to your list by "sku_code". SKU codes that don’t exist are left out of the response.

Several SKUs example curl request

1
2
3
4
curl -X 'GET' \
  'https://app.tracezilla.com/api/v1/example-company/skus?sku_code%5Bin%5D=1001%2C1002%2C1003&perPage=100' \
  -H 'accept: application/json' \
  -H 'Authorization: Bearer {yourBearerToken}'

GET /skus response sample:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
{
  "data": [
    {
      "id": "be3233c4-c0a2-4f47-a62a-303492c20ba6",
      "sku_code": "1001",
      ...
    },
    {
      "id": "4f0d2c8e-91b7-4a3e-8c55-6e2f1a9b7d04",
      "sku_code": "1002",
      ...
    },
    {
      "id": "a7c3e5f1-2b4d-4e6a-9f8c-0d1b3a5c7e92",
      "sku_code": "1003",
      ...
    }
  ],
  ...

The id of a SKU doesn’t change, so you can store the SKU code to sku_id mapping in your system and skip the lookup next time.