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
prefix
string
required

Lowercased and prepended to every generated code.

Example:

"WELCOME"

amount
string
required

Decimal amount per card, greater than zero.

Example:

"25.00"

codes_count
integer
required

Number of cards to generate. Capped at gift_card_batch_limit.

Example:

100

currency
string

ISO 4217 currency code. Defaults to the store currency.

Example:

"USD"

expires_at
string | null
Example:

"2030-12-31"

Response

gift card batch created

id
string
required
codes_count
number
required
currency
string | null
required
prefix
string | null
required
created_at
string
required
updated_at
string
required
amount
string | null
required
expires_at
string | null
required
created_by_id
string | null
required