Errors & Pagination

Conventions that apply across every endpoint: the trailing-slash rule, how errors are shaped, and how list responses are paginated.

Trailing slash required

Every route ends in / (e.g. /api/v1/subscriptions/).

  • A GET without the slash 301-redirects to the slashed URL.
  • A POST / write without the slash fails — the redirect can't preserve the request body.

Always include the trailing slash.

Error format

Field-specific validation errors return an object keyed by field name, with an array (or string) message:

{
  "field_name": ["Error message."]
}

General errors (auth failures, not found) return a detail key:

{
  "detail": "Error message."
}

Authentication and KYC errors are documented on Authentication; per-endpoint 400 errors are listed on each endpoint's page.

Pagination

All list endpoints use page-number pagination via query parameters:

ParameterDefaultDescription
page1Page number (1-indexed)
page_size20Results per page (max 100)
GET /api/v1/subscriptions/?page=2&page_size=50

Response envelope

{
  "count": 150,
  "next": "https://be.suqo.ai/api/v1/subscriptions/?page=2",
  "previous": null,
  "results": [
    // Array of objects
  ]
}

Some endpoints extend this envelope — for example Subscriptions adds status counts (total_subscriptions, active_subscriptions, etc.).