Skip to main content
GET
/
api
/
v3
/
admin
/
gift_card_batches
Spree Admin SDK
import { createAdminClient } from '@spree/admin-sdk'

const client = createAdminClient({
  baseUrl: 'https://your-store.com',
  secretKey: 'sk_xxx',
})

const { data: batches } = await client.giftCardBatches.list({ page: 1, limit: 25 })
{
  "data": [
    {
      "id": "gcb_UkLWZg9DAJ",
      "codes_count": 2,
      "currency": "USD",
      "prefix": "WELCOME",
      "created_at": "2026-05-24T17:36:57.736Z",
      "updated_at": "2026-05-24T17:36:57.736Z",
      "amount": "50.0",
      "expires_at": null,
      "created_by_id": null
    }
  ],
  "meta": {
    "page": 1,
    "limit": 25,
    "count": 1,
    "pages": 1,
    "from": 1,
    "to": 1,
    "in": 1,
    "previous": null,
    "next": null
  }
}

Documentation Index

Fetch the complete documentation index at: https://spreecommerce.org/docs/llms.txt

Use this file to discover all available pages before exploring further.

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

Query Parameters

page
integer

Page number

limit
integer

Records per page

q[prefix_cont]
string

Filter by prefix (contains)

sort
string

Sort by field. Prefix with - for descending.

Response

200 - application/json

gift card batches found

data
object[]
required
meta
object
required