GET /v2/api/entity/{entity}/list/{level}{entity} — the entity key to list (e.g. invoice, client, product). The endpoint works for every listable entity; the enum on the entity path parameter is a representative sample, not the complete set.{level} — the data-detail level: how deeply related records are loaded. It is not a page number. Higher levels return more nested relations.| Level | What is returned |
|---|---|
| -1 | Base record fields only, no related records |
| 0 | Own fields + one-to-one related records |
| 1 | Own fields + one-to-one + belongs-to + one-to-many (one level deep) |
| 2 | Same as level 1 plus one extra level of nested relations (default) |
| 3 | Even deeper nesting |
page and per_page query parameters, not by the URL. The response is a standard paginated envelope (data array + current_page, per_page, total, last_page, page-URL fields).filter[<field>][<operator>]=<value>. Combine conditions with filter[and][...] and filter[or][...] groups. See the filter[<field>][<operator>] parameter for the full list of operators.sort[<field>]=<direction>, where direction is asc or desc. Multiple sort keys are applied in order, e.g. sort[created]=desc&sort[id]=asc.fields[]=<column> (repeat for each column). When omitted, all fields for the requested level are returned.Authorization header.curl --location --globoff 'https://.daftra.com/v2/api/entity/invoice/list/1?mode=api&page=1&per_page=20&fields[]=id&sort[%3Cfield%3E]=desc&filter[%3Cfield%3E][%3Coperator%3E]=&version=2&image_size=&request_branch_id=' \
--header 'lang: en' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer ' \
--header 'apikey: ' \
--header 'Content-Type: application/json'{
"current_page": 1,
"data": [
{}
],
"first_page_url": "string",
"from": 0,
"last_page": 4,
"last_page_url": "string",
"links": [
{}
],
"next_page_url": "string",
"path": "string",
"per_page": 20,
"prev_page_url": "string",
"to": 0,
"total": 68
}