API ReferenceOverview

API Reference

Base URL: https://api.pasera.app

All authenticated endpoints require:

  • Authorization: Bearer <token> header
  • X-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

MethodPathDescription
POST/auth/signupCreate account
POST/auth/loginLog in
POST/auth/magic-linkSend magic link email
POST/auth/magic-link/verifyVerify magic link token
GET/auth/google/urlGet Google OAuth URL
POST/auth/google/callbackExchange Google auth code

Products

MethodPathDescription
GET/brand/productsList products
POST/brand/productsCreate product
GET/brand/products/:idProduct detail with materials
PUT/brand/products/:idUpdate product
DELETE/brand/products/:idDelete product
POST/brand/bulk/productsCSV bulk import

Batches

MethodPathDescription
GET/brand/batchesList batches
POST/brand/batchesCreate batch
GET/brand/batches/:idBatch detail with requests and PEFCR
POST/brand/batches/:id/send-requestSend DPP request to factory
POST/brand/batches/:id/publishApprove and publish DPP
POST/brand/batches/:id/request-changesRequest changes from factory

Suppliers

MethodPathDescription
GET/brand/suppliersList suppliers
POST/brand/suppliers/inviteInvite a supplier
GET/brand/suppliers/:idSupplier detail with catalog

DPPs & QR

MethodPathDescription
GET/brand/dppsList all published DPPs
GET/brand/dpps/by-product/:productIdDPPs for a specific product
GET/brand/dpps/exportExport all DPPs as CSV
GET/brand/qr/:dppIdDownload QR code (SVG)
GET/brand/batches/:id/reportSustainability report (HTML, print to PDF)

Integrations

MethodPathDescription
POST/addons/shopify/connectConnect Shopify store
POST/addons/shopify/syncSync products from Shopify
POST/addons/shopify/push-dpp/:productIdPush DPP URL to Shopify
POST/addons/woocommerce/connectConnect WooCommerce store
POST/addons/woocommerce/syncSync products from WooCommerce

Webhooks

MethodPathDescription
GET/brand/webhooksList webhook configurations
POST/brand/webhooksCreate webhook
DELETE/brand/webhooks/:idDelete webhook

Other

MethodPathDescription
GET/brand/dashboardDashboard stats (KV-cached)
GET/brand/activityActivity feed (recent events)
GET/brand/teamList team members
POST/brand/team/inviteInvite team member
GET/brand/settingsOrganization settings
PUT/brand/settingsUpdate settings
GET/categoriesList product categories