Request & Response Conventions

Envelope structure

  • Collection: { "data": [...], "meta": { "page", "per_page", "total", "total_pages" } }
  • Resource: { "data": { ... } }
  • Error: { "errors": [{ "code", "message" }] }

Error codes

Code HTTP Meaning
unauthorized401Missing or invalid API token
not_found404Resource does not exist
insufficient_stock422Requested quantity exceeds available
invalid_status422Action not valid for current status
rate_limited429Request throttle exceeded
internal_error500Server error — retry with backoff

Pagination

Use ?page= and ?per_page= (max 100).

Rate limits

  • /api/v1/*: 300 req / 5 min (by token)
  • /integrations/webhooks/*: 120 req / min (by IP)
  • /api/ai/*: 20 req / min