ANABOX smart
API Guide

Pagination, Errors, and Retries

Handle Memo list responses, validation and authorization errors, and safe retry behavior.

Pagination

List endpoints commonly accept these query parameters:

ParameterMeaning
limitMaximum number of returned items
pageOne-based page number
offsetNumber of items to skip
sortByField and, where supported, sort direction
searchFree-text filter

Resource-specific filters such as organization, patient, name, or role are documented per operation.

List responses commonly use an envelope like this:

{
  "results": [],
  "page": 1,
  "limit": 50,
  "totalPages": 0,
  "totalResults": 0
}

Some operations return a plain array. Write clients against the response shown for the exact endpoint and pin schema changes in your integration tests.

Error responses

Validation and request errors use a JSON object with a numeric code and message:

{
  "code": 400,
  "message": "Validation error"
}

Common statuses are:

StatusMeaningWhat to do
400Invalid ID, query, or bodyCorrect the request; do not retry unchanged
401Missing, expired, or unknown credentialReplace or refresh the credential
403Valid identity without accessCheck role and organization/patient ownership
404Path or record not foundCheck the path and resource ID
405Method is not supportedUse the method shown in the reference
5xxServer-side failureRetry safe reads with backoff; investigate persistent failures

Do not display raw backend messages to end users. Log a request correlation value from your own service and retain only the minimum patient information required to investigate.

Retry policy

  • Retry GET requests only for transient network errors or 5xx responses.
  • Use exponential backoff with jitter and a small retry limit.
  • Do not retry 400, 401, 403, 404, or 405 without changing the request or credentials.
  • Do not automatically retry POST, bake/unbake, reset, reboot, registration, or other device commands. The schema does not advertise idempotency keys.
  • A repeated PATCH may still cause side effects; confirm the operation semantics before retrying.

Timeouts and cancellation

Set a client-side timeout and cancel work when the caller disconnects. A timeout does not prove the server abandoned a write, so reconcile the resource with a read request before attempting the mutation again.