Retrieve list of collections
  • 15 Nov 2024
  • 2 Minutes to read
  • Contributors
  • Dark
    Light

Retrieve list of collections

  • Dark
    Light

Article summary

Get
/collections

Retrieve list of product collections, using a cursor based pagination scheme.

Security
HTTP
Type bearer
Query parameters
ids
array of

List of IDs to filter results by

Example?ids=1,2,3
cursor
string

Cursor to start the results from

page_size
number

Number of items to return up to in the response

Responses
200

Paginated list of collections

Expand All
object

An object that encapsulates the return of multiple Collection objects in a paginated result

items
Array of object (Collection)
object
id
string

The unique identifier for the collection

title
string

The title of the collection

description
string

The description of the collection

createdAt
string

The date and time the collection was created, in ISO 8601 format

updatedAt
string

The date and time the collection was last updated, in ISO 8601 format

products
Array of object (Product)
object
id
string

The unique identifier for the product

title
string

The title of the product

description
string

The description of the product

thumbnail
object (Image)
url
string

The URL to the image

altText
string

The alt text for the image

listPrice
integer

The price of the product, in the currency of the merchant's account and in minor denomination (e.g. pence, cents, etc.)

sku
string

The Stock Keeping Unit (SKU) for the product

createdAt
string

The date and time the product was created, in ISO 8601 format

updatedAt
string

The date and time the product was last updated, in ISO 8601 format

meta
object (MetadataBlock)

Block that allows for the arbitary passing of metadata alongside an entity

property*

Can be any value - string, number, boolean, array or object

meta
object (MetadataBlock)

Block that allows for the arbitary passing of metadata alongside an entity

property*

Can be any value - string, number, boolean, array or object

pagination
object (PaginationBlock1)

Provide information to help with paginating through a set of results

moreResults
boolean

Defines whether more results are available from the endpoint

totalNumber
integer

The number of items within the result

cursor
string

The cursor used to access the current set of results, starting with the same entity within the results to enable stable pagination.

nextCursor
string

The cursor needed to access the next set of results

400

Invalid request

Expand All
object

Response body, based upon RFC-9457 specification, for 400 error codes

title
string
status
number
Valid values[ "401" ]
errors
Array of object

Array contain the reason(s) for why the request being invalid

object
title
string

Short human readable explaination for the violation

detail
string

JSON string containing a human-readable explanation specific to this occurrence of the problem.

Consumers should not parse this property to extract information, but instead should rely on extension properties.

401

Invalid authentication token

object

Response body, based upon RFC-9457 specification, for 401 error codes

title
string
Valid values[ "No authorisation token provided", "Unauthorised token provided" ]
status
number
Valid values[ "401" ]
403

Invalid authorization permissions

object

Response body, based upon RFC-9457 specification, for 403 error codes

title
string
Valid values[ "Invalid permissions for request" ]
status
number
Valid values[ "403" ]
500

Internal server error

object

Error response body, as defined in RFC-9457. Please refer to the specification for more detail on each of the properties.

Other properties can be provided, Extensions, to provide more detailed information for consumers, such as balance in a credit based error.

status
number

HTTP status code generated by the origin server.

This value, if provided, should match the HTTP status code sent by the server. But this disagree on the consumer, due to intermediaries such as proxies and caches.

title
string

Short, human-readable summary of the problem type

detail
string

JSON string containing a human-readable explanation specific to this occurrence of the problem.

Consumers should not parse this property to extract information, but instead should rely on extension properties.

instance
string (uri)

JSON string containing a URI reference that identifies the specific occurrence of the problem.


Was this article helpful?