Authentication
All API endpoints require authentication using API keys. You can generate API keys from your Pocketsflow dashboard under Settings > API Keys.API Key Format
- Live mode:
pk_live_... - Test mode:
pk_test_...
Using API Keys
Include your API key in theAuthorization header:
Products
List all products
Get a product
Create a product
Update a product
Delete a product
Product Variants
Create a variant
Delete a variant
Orders
List orders
| Parameter | Type | Description |
|---|---|---|
startDate | string | Filter orders from this date (ISO 8601) |
endDate | string | Filter orders until this date (ISO 8601) |
productId | string | Filter by product ID |
page | number | Page number (default: 1) |
pageSize | number | Items per page (default: 20) |
Get a single order
Customers
List customers
| Parameter | Type | Description |
|---|---|---|
productId | string | Filter by product ID |
sortBy | string | Sort field: email, country, numberOfOrders, createdAt |
sortOrder | string | Sort direction: asc or desc |
Get a customer
Reviews
List all reviews
Get reviews for a product (Public)
Discounts
List discounts
Get a discount
Create a discount
Update a discount
Delete a discount
Upsells
List upsells
Get an upsell
Create an upsell
Update an upsell
Delete an upsell
User Settings
Get current user
Update user settings
Subscriptions
List subscription customers
Get subscription details
Cancel a subscription
Refund a subscription
Error Handling
All endpoints return standard HTTP status codes:| Status | Description |
|---|---|
200 | Success |
400 | Bad request (invalid parameters) |
401 | Unauthorized (invalid or missing API key) |
404 | Resource not found |
500 | Internal server error |
Rate Limiting
The API enforces rate limiting of 200 requests per minute per IP address. If you exceed this limit, you’ll receive a429 Too Many Requests response.
Test Mode vs Live Mode
Your API key determines whether you’re operating in test mode or live mode:- Test mode (
pk_test_...): Access test data only - Live mode (
pk_live_...): Access real production data