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

Body

application/json
type
string
required

Which dataset to export, as its shorthand: products, orders, customers, product_translations, gift_cards, coupon_codes, newsletter_subscribers, price_list_prices, purchase_orders, or a type an extension registers.

Example:

"products"

record_selection
enum<string>

filtered (the default) keeps search_params; all ignores them and exports every record in scope.

Available options:
filtered,
all
Example:

"filtered"

results_url
string

Absolute URL of your admin exports view; the export-done email uses it as the download button target. Only honored when it matches one of the store's allowed origins.

Example:

"https://admin.example.com/store_abc/exports"

search_params
object

A Ransack query, with the predicates the list endpoint accepts. A price_list_prices export requires price_list_id_eq naming a price list of the current store, and refuses record_selection: "all".

Example:

Response

201 - application/json

export queued