younifyd
Menu

Retrieve collections

Retrieve collections

GET/v1/collections

Use it in a workflow

  1. Add a step and choose the Constructor connector.
  2. Pick the Retrieve collections action (under Collections).
  3. Fill in the fields below, then reference the result from later steps as {{retrieveCollections.response.data}}.

Request

Query parameters

sectionstring

The section of the index to use. Defaults to `Products`.

idarray<string>

The ID(s) of collections to filter by.

overridden_collection_idstring

When provided, returns only collections that override the specified collection ID.

querystring

A query to narrow the result set when listing collections. Matches on `id` or `display_name`.

num_results_per_pageinteger

The number of results per page to return.

Default 20

pageinteger

The page of results to return.

offsetinteger

The number of results to skip from the beginning. Cannot be used together with `page`.

sort_bystring

The attribute to sort by. Accepted values are 'created_at', 'updated_at', 'display_name', 'start_time', 'end_time'

One ofcreated_atupdated_atdisplay_namestart_timeend_timeDefault "id"

sort_orderany

The order by which results should be sorted. Only valid in conjunction with `sort_by`. Accepted values are 'ascending' and 'descending'.

Default "ascending"

cstring

The ID of the client and version that the request is coming from, such as `cio-js-2.90`.

has_future_itemsboolean

When true, only collections that have future items (items not yet in the catalog) will be returned. When false, only collections that do not have future items will be returned.

Response

Returns 200 with an object. Read it in later steps with {{retrieveCollections.response.data.<field>}}.

collectionsarray<object>
idstringrequired

ID of the collection.

display_namestringrequired

Name of the collection to be displayed to end users.

filter_expressionany

[Filter expression](/reference/shared-filter-expressions) associated with this collection.

dataobject

Object containing additional data, that should be attached to this collection. The maximum size of data object is limited to 200kb.

discoverableboolean

When true, the collection is discoverable in autocomplete and search.

Default false

matchesarray<object>2 fields

A list of terms associated with this collection for matching purposes.

start_timestring (date-time)

ISO-8601 string in UTC defining start time when the collection becomes active. Any specified timezone will be omitted.

end_timestring (date-time)

ISO-8601 string in UTC defining start time when the collection becomes inactive. Any specified timezone will be omitted.

overridden_collection_idstring

The ID of the base collection that this collection overrides. An overriding collection temporarily replaces the content of a base collection during a scheduled time window. Only base collections (collections with `overridden_collection_id` set to `null`) can be overridden.

created_atstring (date-time)required

Collection creation date in ISO 8601 format. Present only for manually added collections.

updated_atstring (date-time)

Last collection update date in ISO 8601 format. Present only for manually added collections.

total_countinteger
json
{
  "collections": [
    {
      "id": "string",
      "display_name": "string",
      "created_at": "2025-01-01T00:00:00Z",
      "filter_expression": null,
      "data": {},
      "discoverable": false,
      "matches": [
        {
          "pattern": "string",
          "match_type": "PHRASE"
        }
      ],
      "start_time": "2025-01-01T00:00:00Z",
      "end_time": "2025-01-01T00:00:00Z",
      "overridden_collection_id": "string",
      "updated_at": "2025-01-01T00:00:00Z"
    }
  ],
  "total_count": 0
}

Need more? See the Constructor guide for connection setup and behaviour shared by every action.