Skip to main content
GET
/
v1
/
product-collections
/
{productCollectionId}
/
products
List Products in Collection
curl --request GET \
  --url https://{cluster}.voucherify.io/v1/product-collections/{productCollectionId}/products \
  --header 'Authorization: Bearer <token>' \
  --header 'X-App-Id: <api-key>' \
  --header 'X-App-Token: <api-key>'
{
  "object": "list",
  "data_ref": "data",
  "data": [
    {
      "id": "prod_0bae45ffc7003ffc52",
      "source_id": "second_product",
      "name": "Samsung Phone 2",
      "price": 230000,
      "attributes": [
        "color",
        "memory",
        "processor"
      ],
      "metadata": {
        "test": true,
        "vendor": "Online Store - 4"
      },
      "image_url": "{{internalVoucherifyURL}}",
      "created_at": "2022-09-12T14:44:13.212Z",
      "updated_at": null,
      "object": "product"
    },
    {
      "id": "sku_0bae3b28f610fd0da1",
      "source_id": "first_product_sku_1",
      "product_id": "prod_0bae2dc5a090fd0184",
      "sku": "Samsung phone 256GB",
      "price": 210000,
      "attributes": {
        "color": "vintage-black",
        "memory": "256",
        "processor": "Intel"
      },
      "image_url": "{{internalVoucherifyURL}}",
      "metadata": {
        "test": false,
        "vendor": "Online Stores",
        "imported": true
      },
      "created_at": "2022-09-12T13:56:51.828Z",
      "updated_at": "2022-09-12T14:09:40.859Z",
      "object": "sku",
      "product": {
        "id": "prod_0bae2dc5a090fd0184",
        "source_id": "first_product",
        "name": "Samsung Phone",
        "price": null,
        "attributes": [],
        "metadata": {},
        "object": "product"
      }
    },
    {
      "id": "prod_0bae2dc5a090fd0184",
      "source_id": "first_product",
      "name": "Samsung Phone 1",
      "price": 220000,
      "attributes": [
        "color",
        "memory",
        "processor"
      ],
      "metadata": {
        "test": true,
        "vendor": "Online Store - 3"
      },
      "image_url": "{{internalVoucherifyURL}}",
      "created_at": "2022-09-12T12:58:22.232Z",
      "updated_at": "2022-09-12T14:44:13.208Z",
      "object": "product"
    },
    {
      "id": "sku_0b7d7dfb090be5c619",
      "source_id": "ComicBook_1",
      "product_id": "prod_0b7d7dfb05cbe5c616",
      "sku": "Comics1",
      "price": 1700,
      "attributes": {},
      "image_url": null,
      "metadata": {
        "color": [
          "golden"
        ],
        "vendor": "islands"
      },
      "created_at": "2022-08-05T17:23:14.084Z",
      "updated_at": "2022-09-09T09:24:43.806Z",
      "object": "sku",
      "product": {
        "id": "prod_0b7d7dfb05cbe5c616",
        "source_id": "Books",
        "name": "Comic Books1",
        "price": null,
        "attributes": [],
        "metadata": {},
        "object": "product"
      }
    },
    {
      "id": "prod_0b7d7dfb05cbe5c616",
      "source_id": "Books",
      "name": "Comic Books1",
      "price": 2100,
      "attributes": [],
      "metadata": {
        "color": [
          "silver"
        ],
        "vendor": "Bookstore1"
      },
      "image_url": "https://www.images.com/image1.png",
      "created_at": "2022-08-05T17:23:14.071Z",
      "updated_at": "2022-09-09T09:24:43.728Z",
      "object": "product"
    },
    {
      "id": "prod_0b7d7c4e814be5c502",
      "source_id": "prod_1",
      "name": "Apple iPhone 12",
      "price": 60000,
      "attributes": [],
      "metadata": {
        "color": [
          "purple"
        ],
        "vendor": "mall"
      },
      "image_url": null,
      "created_at": "2022-08-05T17:15:55.270Z",
      "updated_at": "2022-09-09T09:24:43.704Z",
      "object": "product"
    }
  ],
  "total": 6
}

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

productCollectionId
string
required

Unique product collection ID.

Example:

"pc_41V4DiQQO8YGqj0J2oZD57j4"

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
starting_after
string<date-time>

Timestamp representing the date and time to use in starting_after cursor to get more data. Represented in ISO 8601 format.

Example:

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

Response

Returns a dictionary of products and/or SKUs grouped in the collection with each product's/SKU's details.

Response body schema for GET v1/product-collections/{productCollectionId}/products. Response body schema for GET /product-collections/{productCollectionID}/products.

object
string
default:list
required

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

data_ref
string
default:data
required

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

data
(Product Collections Products List Products Item · object | SKU with parent product. · object)[]
required

A dictionary that contains an array of products and SKUs.

  • Product Collections Products List Products Item
  • SKU with parent product.
total
integer
required

Total number of products & SKUs in the product collection.

I