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
}This method returns a list of 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
}The access token received from the authorization server in the OAuth 2.0 flow.
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.
1 <= x <= 100Which page of results to return. The lowest value is 1.
1 <= x <= 100Sorts the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order.
created_at, -created_at, updated_at, -updated_at, type, -type, code, -code, campaign, -campaign, category, -category 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
The type of the object represented by JSON. This object stores information about product collections.
list Identifies the name of the JSON property that contains the array of product collections.
data A dictionary that contains an array of product collections and their details.
Show child attributes
Product collection ID.
Unique user-defined product collection name.
"All Products"
Describes whether the product collection is dynamic (products come in and leave based on set criteria) or static (manually selected products).
STATIC, AUTO_UPDATE Timestamp representing the date and time when the product collection was created. The value is shown in the ISO 8601 format.
"2021-12-09T12:51:29.898Z"
The type of the object represented by JSON. This object stores information about the static product collection.
products_collection Defines a set of criteria and boundary conditions for an AUTO_UPDATE product collection type.
Show child attributes
Logical Operator Between Filters. Filter by conditions set on the junction parameter indicating how the conditions should be accounted for in the query. An AND is an all-inclusive logical operator, meaning the AND operator displays a record if ALL the conditions separated by AND are TRUE, while an OR operator displays a record if ANY of the conditions separated by OR is TRUE.
and, or Valid keys: id, product_id, source_id, name, price, object, attributes, image_url, SKUs, created_at, updated_at and metadata.*
Show child attributes
Data filters used to narrow down the data records to be returned in the result.
Show child attributes
Defines a set of products for a STATIC product collection type.
Total number of product collections.
Was this page helpful?