Skip to main content
GET
/
v1
/
product-collections
List Product Collections
curl --request GET \
  --url https://{cluster}.voucherify.io/v1/product-collections \
  --header 'Authorization: Bearer <token>' \
  --header 'X-App-Id: <api-key>' \
  --header 'X-App-Token: <api-key>'
{
  "object": "list",
  "data_ref": "data",
  "data": [
    {
      "id": "pc_Dj1qSH7bho4SVh7aSDKjU174",
      "name": "Products in Poland",
      "type": "AUTO_UPDATE",
      "filter": {
        "junction": "and",
        "metadata.product_location": {
          "conditions": {
            "$in_location": [
              "loc_RcYz537sV07e1t5aG5tIH9FD"
            ]
          }
        }
      },
      "created_at": "2022-07-14T16:12:26.377Z",
      "object": "products_collection"
    },
    {
      "id": "pc_FJdBpaQyvK6Gcdul4D2HRChI",
      "name": "Price less than 10",
      "type": "AUTO_UPDATE",
      "filter": {
        "junction": "and",
        "price": {
          "conditions": {
            "$less_than": [
              1000
            ]
          }
        }
      },
      "created_at": "2022-03-17T07:11:25.406Z",
      "object": "products_collection"
    },
    {
      "id": "pc_4ndRXAsTOzwSdHcQcxf489uU",
      "name": "Color is brown",
      "type": "AUTO_UPDATE",
      "filter": {
        "junction": "and",
        "metadata.color": {
          "conditions": {
            "$is": [
              "brown"
            ]
          }
        }
      },
      "created_at": "2022-03-16T14:27:49.612Z",
      "object": "products_collection"
    },
    {
      "id": "pc_BxofAP7pyM9FO7M6iaIzIouy",
      "name": "Color not brown",
      "type": "AUTO_UPDATE",
      "filter": {
        "junction": "and",
        "metadata.color": {
          "conditions": {
            "$is_not": [
              "brown"
            ]
          }
        }
      },
      "created_at": "2022-03-16T13:49:05.697Z",
      "object": "products_collection"
    },
    {
      "id": "pc_uHpM9ipEQH2yEpm3D8aohkBM",
      "name": "Price less than 20",
      "type": "AUTO_UPDATE",
      "filter": {
        "junction": "and",
        "price": {
          "conditions": {
            "$less_than": [
              2000
            ]
          }
        }
      },
      "created_at": "2022-03-16T13:46:01.102Z",
      "object": "products_collection"
    },
    {
      "id": "pc_ZgM25PcZAMp6qItKJRtR2mEi",
      "name": "Name starts with S",
      "type": "AUTO_UPDATE",
      "filter": {
        "junction": "and",
        "name": {
          "conditions": {
            "$starts_with": [
              "S"
            ]
          }
        }
      },
      "created_at": "2022-03-16T13:42:35.917Z",
      "object": "products_collection"
    },
    {
      "id": "pc_41V4DiQQO8YGqj0J2oZD57j4",
      "name": "Ends with baby",
      "type": "AUTO_UPDATE",
      "filter": {
        "junction": "and",
        "source_id": {
          "conditions": {
            "$ends_with": [
              "baby"
            ]
          }
        }
      },
      "created_at": "2022-03-14T12:50:19.885Z",
      "object": "products_collection"
    },
    {
      "id": "pc_0cRX5wAFt1R1R5Ir6WdTowui",
      "name": "C start",
      "type": "AUTO_UPDATE",
      "filter": {
        "junction": "and",
        "name": {
          "conditions": {
            "$starts_with": [
              "C"
            ]
          }
        }
      },
      "created_at": "2022-03-14T12:18:15.588Z",
      "object": "products_collection"
    },
    {
      "id": "pc_bQ2p9TycbEhd3YzwFCR3JQYA",
      "name": "Shirts",
      "type": "STATIC",
      "products": [
        {
          "id": "prod_0a9f9aeddb019a42db",
          "object": "product"
        },
        {
          "id": "prod_0a9f9ab4ab019a42d5",
          "object": "product"
        }
      ],
      "created_at": "2022-02-28T11:42:12.484Z",
      "object": "products_collection"
    }
  ],
  "total": 9
}

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

Response

200 - application/json

Returns a dictionary containing a list of product collections and details about each product collection.

Response body schema for GET v1/product-collections. Schema representing list of product collections

object
enum<string>
default:list
required

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

Available options:
list
data_ref
enum<string>
default:data
required

Identifies the name of the JSON property that contains the array of product collections.

Available options:
data
data
Product Collection Base · object[]
required

A dictionary that contains an array of product collections and their details.

total
integer
required

Total number of product collections.

I