Skip to main content

Response Structure

Envelope Shape

All list endpoints return a consistent envelope:

{
"count": 150,
"results": [
{ "id": 1, "name": "..." },
{ "id": 2, "name": "..." }
]
}
FieldTypeDescription
countintegerTotal number of matching records across all pages
resultsarrayThe items on the current page

count is the total across all pages — not just the page you received. Use it to calculate how many pages exist.

Single-Resource Responses

Single-resource endpoints (for example, GET /recitations/{id}/) return the object directly with no envelope:

{
"id": 7,
"name": "Hafs an Asim",
"description": "Complete recitation in the Hafs narration.",
"publisher": { "id": 3, "name": "Itqan" },
"reciter": { "id": 12, "name": "Mishary Rashid Alafasy" },
"riwayah": { "id": 1, "name": "Hafs" }
}

See also: Pagination · Design Principles · Error Handling