Developer docs menu

Responses, errors & limits

Response format

Every response is JSON with the same envelope. The result is in data.

{
  "success": true,
  "message": "Success",
  "data": { … },
  "timestamp": "2026-10-12T09:30:00Z"
}

Pagination

List endpoints are paginated. Most take page (starting at 1) and pageSize (up to 100) and return:

"data": {
  "items": [ … ],
  "page": 1,
  "pageSize": 20,
  "totalElements": 128,
  "totalPages": 7
}

A few endpoints use page (from 0), size and sort (for example createdAt,desc) instead — the API reference lists the exact query parameters for each endpoint.

Errors

Errors use the same envelope with success: false and a readable message. Authentication errors also carry a machine-readable data.code:

{
  "success": false,
  "message": "The access token does not have the scope Scalar360.invoices.CREATE.",
  "data": { "code": "INVALID_SCOPE" }
}
HTTPCodeMeaning
200Success.
400The request is invalid — for example a missing required field. message explains what to fix.
401INVALID_OAUTHTOKENThe access token is missing, invalid or expired. Refresh it.
401INVALID_SCOPEThe token has no scope for this module and operation.
402SUBSCRIPTION_REQUIREDThe organisation's subscription has ended.
403FORBIDDEN_RESOURCEThis area is never available through the API (sign-in and account security, billing, switching or creating organisations, invitations, AI and developer settings, employee portal).
403The user's role, module permissions or plan don't allow this action in this organisation.
403ORGANIZATION_ACCESS_DENIEDThe user isn't an active member of the requested organization_id (or of the organisation the token was authorised in, when none is given).
400INVALID_ORGANIZATION_IDorganization_id isn't a valid organisation id — use one from GET /api/v1/organizations.
404The record doesn't exist or isn't in the organisation.
409The request conflicts with the record's current state.
429RATE_LIMIT_EXCEEDEDToo many requests — wait for the time in Retry-After.
5xxA problem on our side. Retry with backoff; contact support if it persists.

Rate limits

Each access token can make 100 requests per minute. Every response includes:

HeaderMeaning
X-RateLimit-LimitRequests allowed per minute.
X-RateLimit-RemainingRequests left in the current minute.
X-RateLimit-ResetUnix time when the window resets.
Retry-AfterOn 429 only: seconds to wait.

Good practice

  • Refresh access tokens on 401 INVALID_OAUTHTOKEN and retry once.
  • Back off on 429 and 5xx responses.
  • Keep the Client Secret and refresh tokens on your server; never ship them in a browser or app.
  • Request the narrowest scopes your integration needs.