/v2/api/entity base and authenticated with a Bearer token.1) is the data level — how deeply related records are loaded — not a page number. /credit_usage/list and /credit_usage/list/1 return the same result. Pagination is controlled by the page and per_page query parameters.| Parameter | Purpose |
|---|---|
page | Page number (default 1). |
per_page | Items per page (default 20). |
filter[<field>][<operator>] | Filter rows by a field's value, e.g. filter[client_id][equal]=8. |
sort[<field>] | Sort by a field, asc or desc, e.g. sort[usage_date]=desc. |
| Field | Type | Example |
|---|---|---|
client_id | integer (client) | filter[client_id][equal]=8 |
credit_type_id | integer (credit type) | filter[credit_type_id][equal]=1 |
usage_date | date | filter[usage_date][greater_than_equal]=2025-01-01 |
sort is given the default ordering is newest first (id descending).data is a flat credit-usage record.curl --location --globoff 'https://.daftara.com/v2/api/entity/credit_usage/list/1?page=undefined&per_page=undefined&filter[%3Cfield%3E][%3Coperator%3E]=undefined&sort[%3Cfield%3E]=undefined' \
--header 'Accept: application/json' \
--header 'apikey: ' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json'{
"current_page": 1,
"data": [
{
"id": 0,
"client_id": 0,
"credit_type_id": 0,
"usage_date": "string",
"description": "string",
"created": "string",
"modified": "string",
"deleted_at": "string"
}
],
"first_page_url": "string",
"from": 0,
"last_page": 0,
"last_page_url": "string",
"links": [
{
"url": "string",
"label": "string",
"page": 0,
"active": true
}
],
"next_page_url": "string",
"path": "string",
"per_page": 20,
"prev_page_url": "string",
"to": 0,
"total": 0
}