API Reference
Base URL: https://api.pasera.app
All authenticated endpoints require:
Authorization: Bearer <token>headerX-Organization-Id: <org_id>header
Authentication
See Authentication for how to obtain tokens.
Rate limits
- Auth endpoints: 30 requests per 15 minutes per IP
- All other endpoints: no hard limit (fair use)
Response format
All responses are JSON. Successful responses return the data directly or wrapped in a { data: [...] } envelope for lists. Error responses include an error field:
{
"error": "Description of what went wrong"
}Endpoints overview
Auth
| Method | Path | Description |
|---|---|---|
| POST | /auth/signup | Create account |
| POST | /auth/login | Log in |
| POST | /auth/magic-link | Send magic link email |
| POST | /auth/magic-link/verify | Verify magic link token |
| GET | /auth/google/url | Get Google OAuth URL |
| POST | /auth/google/callback | Exchange Google auth code |
Products
| Method | Path | Description |
|---|---|---|
| GET | /brand/products | List products |
| POST | /brand/products | Create product |
| GET | /brand/products/:id | Product detail with materials |
| PUT | /brand/products/:id | Update product |
| DELETE | /brand/products/:id | Delete product |
| POST | /brand/bulk/products | CSV bulk import |
Batches
| Method | Path | Description |
|---|---|---|
| GET | /brand/batches | List batches |
| POST | /brand/batches | Create batch |
| GET | /brand/batches/:id | Batch detail with requests and PEFCR |
| POST | /brand/batches/:id/send-request | Send DPP request to factory |
| POST | /brand/batches/:id/publish | Approve and publish DPP |
| POST | /brand/batches/:id/request-changes | Request changes from factory |
Suppliers
| Method | Path | Description |
|---|---|---|
| GET | /brand/suppliers | List suppliers |
| POST | /brand/suppliers/invite | Invite a supplier |
| GET | /brand/suppliers/:id | Supplier detail with catalog |
DPPs & QR
| Method | Path | Description |
|---|---|---|
| GET | /brand/dpps | List all published DPPs |
| GET | /brand/dpps/by-product/:productId | DPPs for a specific product |
| GET | /brand/dpps/export | Export all DPPs as CSV |
| GET | /brand/qr/:dppId | Download QR code (SVG) |
| GET | /brand/batches/:id/report | Sustainability report (HTML, print to PDF) |
Integrations
| Method | Path | Description |
|---|---|---|
| POST | /addons/shopify/connect | Connect Shopify store |
| POST | /addons/shopify/sync | Sync products from Shopify |
| POST | /addons/shopify/push-dpp/:productId | Push DPP URL to Shopify |
| POST | /addons/woocommerce/connect | Connect WooCommerce store |
| POST | /addons/woocommerce/sync | Sync products from WooCommerce |
Webhooks
| Method | Path | Description |
|---|---|---|
| GET | /brand/webhooks | List webhook configurations |
| POST | /brand/webhooks | Create webhook |
| DELETE | /brand/webhooks/:id | Delete webhook |
Other
| Method | Path | Description |
|---|---|---|
| GET | /brand/dashboard | Dashboard stats (KV-cached) |
| GET | /brand/activity | Activity feed (recent events) |
| GET | /brand/team | List team members |
| POST | /brand/team/invite | Invite team member |
| GET | /brand/settings | Organization settings |
| PUT | /brand/settings | Update settings |
| GET | /categories | List product categories |