Skip to main content
POST
Spree Admin SDK

Authorizations

x-spree-api-key
string
header
required

Secret API key for admin access

Authorization
string
header
required

JWT token for admin user authentication

Headers

x-spree-api-key
string
required
Authorization
string
required

Bearer token for admin authentication

Body

application/json
name
string
required
Example:

"On Sale"

description
string

Rich text HTML. Reads come back as this (plain text) plus description_html.

position
integer

1-based position among the store's collections; the server shifts its siblings. The nested products reposition endpoints, unlike this, take 0-based indexes.

meta_title
string
meta_description
string
meta_keywords
string
image_signed_id
string | null

A signed_id from files.upload() for the landscape image, or null to remove it.

square_image_signed_id
string | null

A signed_id from files.upload() for the square image, or null to remove it.

automatic
boolean

When true, membership is materialized from rules instead of curated by hand.

rules_match_policy
enum<string>

Whether a product must match all rules or any of them. Defaults to all.

Available options:
all,
any
sort_order
enum<string>

Default product sort for the storefront listing; a shopper's own sort wins. Defaults to manual.

Available options:
manual,
best_selling,
price asc,
price desc,
available_on desc,
available_on asc,
name asc,
name desc
rules
object[]

The complete desired rule set. Entries with an id update, entries without one are created, and existing rules left out are removed.

custom_fields
object[]

Custom field values, each validated against its definition.

Response

collection created

id
string
required
name
string
required
position
number
required
sort_order
enum<string>
required
Available options:
manual,
best_selling,
price asc,
price desc,
available_on desc,
available_on asc,
name asc,
name desc
meta_title
string | null
required
meta_description
string | null
required
meta_keywords
string | null
required
products_count
number
required
description
string
required
description_html
string
required
image_url
string | null
required
square_image_url
string | null
required
automatic
boolean
required
rules_match_policy
enum<string>
required
Available options:
all,
any
metadata
object
required
created_at
string
required
updated_at
string
required
custom_fields
object[]
translations
object
rules
object[]