Skip to main content
GET
/
v1
/
products
/
{productId}
/
skus
List SKUs in Product
curl --request GET \
  --url https://{cluster}.voucherify.io/v1/products/{productId}/skus \
  --header 'Authorization: Bearer <token>' \
  --header 'X-App-Id: <api-key>' \
  --header 'X-App-Token: <api-key>'
{
  "object": "list",
  "data_ref": "skus",
  "skus": [
    {
      "id": "sku_0b1621b2f25248b79c",
      "source_id": "sku_source_id_1",
      "product_id": "prod_0b15f6b9f650c16990",
      "sku": "Extra Small Blue Shirt",
      "price": 1300,
      "currency": "USD",
      "attributes": {
        "size": "XS",
        "color": "blue",
        "ranking": 1
      },
      "image_url": "",
      "metadata": {},
      "created_at": "2022-05-17T10:36:30.057Z",
      "updated_at": "2022-07-01T05:34:16.822Z",
      "object": "sku"
    },
    {
      "id": "sku_0b1621b3181248b79d",
      "source_id": "sku_source_id_3",
      "product_id": "prod_0b15f6b9f650c16990",
      "sku": "Medium Yellow Shirt",
      "price": 1450,
      "currency": "USD",
      "attributes": {
        "size": "M",
        "color": "yellow",
        "ranking": 3
      },
      "image_url": "",
      "metadata": {},
      "created_at": "2022-05-17T10:36:30.180Z",
      "updated_at": "2022-07-01T05:34:16.842Z",
      "object": "sku"
    },
    {
      "id": "sku_0b1621b3199248b79e",
      "source_id": "sku_source_id_2",
      "product_id": "prod_0b15f6b9f650c16990",
      "sku": "Small Red Shirt",
      "price": 1400,
      "currency": "USD",
      "attributes": {
        "size": "S",
        "color": "red",
        "ranking": 2
      },
      "image_url": "",
      "metadata": {},
      "created_at": "2022-05-17T10:36:30.183Z",
      "updated_at": "2022-07-01T05:34:16.927Z",
      "object": "sku"
    },
    {
      "id": "sku_0b1621b319d248b79f",
      "source_id": "sku_source_id_4",
      "product_id": "prod_0b15f6b9f650c16990",
      "sku": "Large Pink Shirt -",
      "price": 1700,
      "currency": "USD",
      "attributes": {
        "size": "L",
        "color": "pink",
        "ranking": 4
      },
      "image_url": "",
      "metadata": {},
      "created_at": "2022-05-17T10:36:30.187Z",
      "updated_at": "2022-07-05T08:47:50.680Z",
      "object": "sku"
    }
  ],
  "total": 4
}

Authorizations

X-App-Id
string
header
required
X-App-Token
string
header
required
Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Path Parameters

productId
string
required

A Voucherify <!-- [product](OpenAPI.json/components/schemas/Product) -->product ID or product source ID.

Example:

"prod_3ttSkdxGuAfcv3"

Query Parameters

limit
integer

Limits the number of objects to be returned. The limit can range between 1 and 100 items. If no limit is set, it returns 10 items.

Required range: 1 <= x <= 100
page
integer

Which page of results to return. The lowest value is 1.

Required range: 1 <= x <= 100
order
enum<string>

Sorts the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order.

Available options:
created_at,
-created_at,
updated_at,
-updated_at,
type,
-type,
code,
-code,
campaign,
-campaign,
category,
-category
start_date
string<date-time>

Timestamp representing the date and time which results must end on. Represented in ISO 8601 format.

Example:

"2023-12-22T10:13:06.487Z"

end_date
string<date-time>

Timestamp representing the date and time which results must end on. Represented in ISO 8601 format.

Example:

"2023-12-22T10:13:06.487Z"

Response

Returns a dictionary of SKUs.

Response body schema for GET v1/products/{productId}/skus. Contains information about SKUs.

object
string
default:list
required

The type of the object represented by JSON. This object stores information about SKUs.

data_ref
string
default:data
required

Identifies the name of the JSON property that contains the array of SKUs.

skus
SKU Object · object[]
required

A dictionary that contains an array of SKUs.

total
integer
required

Total number of SKUs in the product.

I