SDKs
Type-safe, production-ready clients for the Headless Commerce API.Installation
- TypeScript / Node.js
- Python
Quick Start
- TypeScript
- Python
Usage Examples
List Products
- TypeScript
- Python
Cart Flow
- TypeScript
- Python
Admin Operations
- TypeScript
- Python
Error Handling
- TypeScript
- Python
Webhook Verification
- TypeScript
- Python
Configuration
- TypeScript
- Python
| Option | Type | Required | Description |
|---|---|---|---|
secretKey | string | * | Secret API key for server-side usage |
publishableKey | string | * | Publishable key for client-side usage |
baseUrl | string | No | Custom API base URL (default: https://api.headlesscommerce.io/v1) |
One of
secretKey or publishableKey is required.Resources
All 23 API resources are available:| Resource | Storefront | Admin |
|---|---|---|
products | list, get, get_by_slug | CRUD, images, bundles |
categories | list, tree | CRUD |
collections | list, get | CRUD |
carts | create, get, items, discounts | — |
checkout | create | — |
orders | list, get, lookup | CRUD, confirm, cancel, complete |
customers | me, addresses | CRUD, tokens |
variants | — | CRUD |
inventory | — | get, adjust, set |
fulfillments | — | create, ship, deliver |
discounts | validate | CRUD |
shipping_methods | list | CRUD |
payments | — | record, complete |
returns | request, list, get | CRUD, approve, reject, receive |
refunds | — | create |
regions | — | CRUD, prices, currencies, locales, translations |
webhooks | — | CRUD, test |
api_keys | — | CRUD, rotate |
organization | — | get, update, members |
store | — | get, update |
logs | — | list, get, stats |
dashboard | — | stats |