> ## Documentation Index
> Fetch the complete documentation index at: https://docs.anbyan.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Response body shapes and conventions

> Response body conventions for Anbyan tenant APIs, including single-resource data wrappers, paginated list envelopes, and shared field naming.

Anbyan tenant APIs return a small set of response body shapes. These shapes are reflected in the OpenAPI schemas generated from the frontend TypeScript contracts.

## Single resources

Single-resource endpoints usually return a `data` wrapper.

```json theme={null}
{
  "data": {
    "id": "card_123",
    "status": "active",
    "createdAt": "2026-07-11T12:00:00Z"
  }
}
```

Customer card detail and card action endpoints use this pattern.

## Paginated lists

List endpoints return pagination metadata with a `data` array.

```json theme={null}
{
  "current_page": 1,
  "data": [],
  "from": 1,
  "nextPage_url": null,
  "path": "https://tenant.example.com/api/v1/customer/accounts",
  "perPage": 15,
  "prevPage_url": null,
  "to": 15,
  "total": 30
}
```

Customer accounts, customer cards, customer statements, customer transactions, staff ledger transactions, and deposit lists follow this pattern.

## Binary documents

Statement preview and download endpoints return document streams instead of JSON.

```http theme={null}
Content-Type: application/pdf
Content-Disposition: inline; filename="statement.pdf"
```

Browser-facing applications should treat these endpoints as document responses.

## Errors

Validation and not-found responses use a message and optional field-level errors.

```json theme={null}
{
  "message": "The given data was invalid.",
  "errors": {
    "email": ["The email field is required."]
  }
}
```

## Casing

Application responses use camelCase. Older paginated endpoints may retain compatibility fields such as `current_page`, `nextPage_url`, and `prevPage_url`; the endpoint schema shows the exact response shape.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.