List collections
GET
/api/v1/commerce/collections
const url = 'https://digize.com/api/v1/commerce/collections';const options = {method: 'GET', headers: {'x-api-key': '<x-api-key>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://digize.com/api/v1/commerce/collections \ --header 'x-api-key: <x-api-key>'Collections with the products in each: picked by hand, or matched by rules now.
Needs the commerce:read permission.
Authorizations
Section titled “Authorizations”Responses
Section titled “Responses”Done
Media typeapplication/json
object
rows
required
Array<object>
object
id
required
string
title
required
string
handle
required
string
description
required
string
kind
required
string
match
required
string
rules
required
Array<object>
object
field
required
string
operator
required
string
value
required
Text, or for price and stock a number: price in minor units.
string
productIds
required
Array<string>
sort
required
string
published
required
boolean
color
required
string
updatedAt
required
string format: date-time
total
required
number
Example
{ "rows": [ { "kind": "manual", "match": "all", "rules": [ { "field": "category", "operator": "is" } ], "sort": "best_selling", "color": "primary" } ]}What was sent isn’t valid (invalid).
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
details
object
key
additional properties
any
Example
{ "error": { "code": "invalid" }}No key, or one that’s unknown, off or expired.
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
details
object
key
additional properties
any
Example
{ "error": { "code": "invalid" }}The key doesn’t have the permission this needs.
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
details
object
key
additional properties
any
Example
{ "error": { "code": "invalid" }}Nothing has that id (not_found).
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
details
object
key
additional properties
any
Example
{ "error": { "code": "invalid" }}Over the rate limit; see retry-after.
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
details
object
key
additional properties
any
Example
{ "error": { "code": "invalid" }}