Skip to content

Get a collection and its items

GET
/collections/{handle}
curl --request GET \
--url 'https://api.sevigram.com/storefront/v1/collections/example?limit=24' \
--header 'Authorization: Bearer <token>'
handle
required
string
>= 1 characters
cursor
string

Opaque cursor from a previous page’s next_cursor.

limit
integer
default: 24 >= 1 <= 100

OK

Media typeapplication/json
object
data
required
object
id
required
string
handle
required
string
title
required
string
description
required
string
image
required
object
url
required
string format: uri
items
required
Array<object>
object
id
required
string
type
required
string
Allowed values: product service
handle
required
string
title
required
string
tagline
required
string
image
required
object
url
required
string format: uri
price_min
required
number
nullable
price_max
required
number
nullable
pricing_model
required
string
Allowed values: fixed-price custom-quote negotiable
next_cursor
required
string
nullable

Example

{
"data": {
"items": [
{
"type": "product",
"pricing_model": "fixed-price"
}
]
}
}
X-Request-Id
required
string

Request correlation id, echoed or generated.

ETag
required
string
/^W/"/

Weak entity tag. Send it back as If-None-Match to get a 304.

Cache-Control
required
string
Allowed values: private, max-age=60

Reads may be cached privately for 60 seconds.

Vary
required
string
Allowed values: Origin, Authorization

Always Origin, Authorization on reads.

The If-None-Match value matches the current ETag. No body.

X-Request-Id
required
string

Request correlation id, echoed or generated.

ETag
required
string
/^W/"/

Weak entity tag. Send it back as If-None-Match to get a 304.

Invalid request. Codes validation_error, invalid_cursor, invalid_buyer_ip.

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: invalid_token origin_not_allowed storefront_disabled demo_shop_read_only private_token_required customer_session_invalid customer_code_invalid checkout_conflict idempotency_key_reused quote_not_respondable return_url_not_allowed not_found validation_error invalid_cursor invalid_buyer_ip rate_limited service_unavailable
message
required
string
details

Optional structured detail (for example per-field validation messages). Omitted when there is none.

nullable
code
required
Allowed values: validation_error invalid_cursor invalid_buyer_ip

Example

{
"error": {
"code": "validation_error"
}
}
X-Request-Id
required
string

Request correlation id, echoed or generated.

Cache-Control
required
string
Allowed values: no-store

Never cached.

Missing or unknown token. Code invalid_token.

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: invalid_token origin_not_allowed storefront_disabled demo_shop_read_only private_token_required customer_session_invalid customer_code_invalid checkout_conflict idempotency_key_reused quote_not_respondable return_url_not_allowed not_found validation_error invalid_cursor invalid_buyer_ip rate_limited service_unavailable
message
required
string
details

Optional structured detail (for example per-field validation messages). Omitted when there is none.

nullable
code
required
Allowed values: invalid_token

Example

{
"error": {
"code": "invalid_token"
}
}
X-Request-Id
required
string

Request correlation id, echoed or generated.

Cache-Control
required
string
Allowed values: no-store

Never cached.

Codes origin_not_allowed, storefront_disabled, demo_shop_read_only, private_token_required.

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: invalid_token origin_not_allowed storefront_disabled demo_shop_read_only private_token_required customer_session_invalid customer_code_invalid checkout_conflict idempotency_key_reused quote_not_respondable return_url_not_allowed not_found validation_error invalid_cursor invalid_buyer_ip rate_limited service_unavailable
message
required
string
details

Optional structured detail (for example per-field validation messages). Omitted when there is none.

nullable
code
required
Allowed values: origin_not_allowed storefront_disabled demo_shop_read_only private_token_required

Example

{
"error": {
"code": "origin_not_allowed"
}
}
X-Request-Id
required
string

Request correlation id, echoed or generated.

Cache-Control
required
string
Allowed values: no-store

Never cached.

Unknown handle, session or order, or one that belongs to another business or the wrong type; also a wrong or missing guest token on GET /orders/{id}. Code not_found.

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: invalid_token origin_not_allowed storefront_disabled demo_shop_read_only private_token_required customer_session_invalid customer_code_invalid checkout_conflict idempotency_key_reused quote_not_respondable return_url_not_allowed not_found validation_error invalid_cursor invalid_buyer_ip rate_limited service_unavailable
message
required
string
details

Optional structured detail (for example per-field validation messages). Omitted when there is none.

nullable
code
required
Allowed values: not_found

Example

{
"error": {
"code": "not_found"
}
}
X-Request-Id
required
string

Request correlation id, echoed or generated.

Cache-Control
required
string
Allowed values: no-store

Never cached.

Too many requests. Code rate_limited.

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: invalid_token origin_not_allowed storefront_disabled demo_shop_read_only private_token_required customer_session_invalid customer_code_invalid checkout_conflict idempotency_key_reused quote_not_respondable return_url_not_allowed not_found validation_error invalid_cursor invalid_buyer_ip rate_limited service_unavailable
message
required
string
details

Optional structured detail (for example per-field validation messages). Omitted when there is none.

nullable
code
required
Allowed values: rate_limited

Example

{
"error": {
"code": "rate_limited"
}
}
X-Request-Id
required
string

Request correlation id, echoed or generated.

Cache-Control
required
string
Allowed values: no-store

Never cached.

Retry-After
required
string
/^[0-9]+$/

Whole seconds to wait, rounded up.

An upstream is unavailable. Code service_unavailable.

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: invalid_token origin_not_allowed storefront_disabled demo_shop_read_only private_token_required customer_session_invalid customer_code_invalid checkout_conflict idempotency_key_reused quote_not_respondable return_url_not_allowed not_found validation_error invalid_cursor invalid_buyer_ip rate_limited service_unavailable
message
required
string
details

Optional structured detail (for example per-field validation messages). Omitted when there is none.

nullable
code
required
Allowed values: service_unavailable

Example

{
"error": {
"code": "service_unavailable"
}
}
X-Request-Id
required
string

Request correlation id, echoed or generated.

Cache-Control
required
string
Allowed values: no-store

Never cached.

Retry-After
required
string
Allowed values: 5

Always 5.