Skip to main content
GET
/
v1
/
products
List Products
curl --request GET \
  --url https://{cluster}.voucherify.io/v1/products \
  --header 'Authorization: Bearer <token>' \
  --header 'X-App-Id: <api-key>' \
  --header 'X-App-Token: <api-key>'
{
  "object": "list",
  "data_ref": "products",
  "products": [
    {
      "id": "prod_f1r5Tpr0DuC7",
      "source_id": "test_prod_id_1",
      "name": "Apple iPhone 8",
      "price": null,
      "attributes": [
        "color",
        "memory"
      ],
      "metadata": {
        "test": true,
        "vendor": "Cortland"
      },
      "image_url": null,
      "created_at": "2021-12-03T06:33:46.101Z",
      "updated_at": null,
      "object": "product",
      "skus": {
        "data": [
          {
            "id": "sku_0a417bd1d9952f9d6f",
            "source_id": "test_iphone_8_silver_256gb",
            "product_id": "prod_f1r5Tpr0DuC7",
            "sku": "iPhone 8 Silver 256GB",
            "price": null,
            "currency": null,
            "attributes": {
              "color": "silver",
              "memory": "256"
            },
            "image_url": null,
            "metadata": {},
            "created_at": "2021-12-03T06:33:46.599097+00:00",
            "updated_at": null,
            "object": "sku"
          },
          {
            "id": "sku_0a417bd1d9952f9d6e",
            "source_id": "test_iphone_8_silver_64gb",
            "product_id": "prod_f1r5Tpr0DuC7",
            "sku": "iPhone 8 Silver 64GB",
            "price": null,
            "currency": null,
            "attributes": {
              "color": "silver",
              "memory": "64"
            },
            "image_url": null,
            "metadata": {},
            "created_at": "2021-12-03T06:33:46.598595+00:00",
            "updated_at": null,
            "object": "sku"
          }
        ],
        "total": 2
      }
    },
    {
      "id": "prod_0ac67e1bb8072eec48",
      "source_id": "test_volleyball",
      "name": "VolleyBall",
      "price": 1100,
      "attributes": [],
      "metadata": {
        "color": [
          "white"
        ],
        "label": true,
        "origin": "PL"
      },
      "image_url": null,
      "created_at": "2022-03-16T14:01:45.459Z",
      "updated_at": "2022-04-26T12:51:35.500Z",
      "object": "product",
      "skus": {
        "data": [
          {
            "id": "sku_0ac768973f5c4ea0d0",
            "source_id": "test_volleyball_pl",
            "product_id": "prod_0ac67e1bb8072eec48",
            "sku": "PL",
            "price": 500,
            "currency": "USD",
            "attributes": {},
            "image_url": null,
            "metadata": {
              "color": [
                "red"
              ]
            },
            "created_at": "2022-03-17T07:06:13.629918+00:00",
            "updated_at": null,
            "object": "sku"
          },
          {
            "id": "sku_0ac7689713072e1df6",
            "source_id": "test_volleyball_us",
            "product_id": "prod_0ac67e1bb8072eec48",
            "sku": "US",
            "price": 1500,
            "currency": "USD",
            "attributes": {},
            "image_url": null,
            "metadata": {
              "color": [
                "yellow"
              ]
            },
            "created_at": "2022-03-17T07:06:13.452532+00:00",
            "updated_at": null,
            "object": "sku"
          }
        ],
        "total": 2
      }
    }
  ],
  "total": 2
}

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.

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

200 - application/json

Returns a dictionary with product objects. The products are returned sorted by creation date by default, with the most recent products appearing last, unless you specify another sequence using the order query parameter.

Response body schema for GET v1/products.

object
string
default:list
required

The type of the object represented by JSON. This object stores information about products in a dictionary.

data_ref
string
default:products
required

Identifies the name of the attribute that contains the array of product objects.

products
Product · object[]
required

Contains array of product objects.

total
integer
required

Total number of product objects.

I