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

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

// Fetch with the Bearer token, then drive the browser download:
const res = await fetch(exp.download_url, {
  headers: { Authorization: `Bearer ${token}` }
})
const blob = await res.blob()
const url = URL.createObjectURL(blob)
const a = Object.assign(document.createElement('a'), {
  href: url,
  download: exp.filename
})
a.click()
URL.revokeObjectURL(url)

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

Path Parameters

id
string
required

Response

CSV file