/v2/api/entity base and authenticated with a Bearer token. Requires the Branches plugin to be enabled on the account.1) is the data level — how deeply related records are loaded — not a page number. /branch/list and /branch/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[status][equal]=1. |
sort[<field>] | Sort by a field, asc or desc, e.g. sort[code]=asc. |
filter[<field>][<operator>]=<value>. The fields intended for filtering:| Field | Type | Example |
|---|---|---|
code | string | filter[code][equal]=00001 |
status | integer (1, 2, 3) | filter[status][equal]=1 |
sort[<field>]=asc|desc, e.g. sort[code]=asc. No field is specifically flagged for sorting; the list will in fact filter and sort on any existing column. When no sort is given the default ordering is newest first (id descending).id, name, status, created, modified, and code. Other branch attributes (phone numbers, address, city, state, country, assigned staff, SMTP account, map location) are not available through this endpoint.status value is one of:| Value | Meaning |
|---|---|
1 | Active |
2 | Inactive |
3 | Suspended |
curl --location --globoff 'https://.daftara.com/v2/api/entity/branch/list/1?page=undefined&per_page=undefined&filter[%3Cfield%3E][%3Coperator%3E]=undefined&sort[%3Cfield%3E]=undefined' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer ' \
--header 'apikey: ' \
--header 'Content-Type: application/json'{
"current_page": 1,
"data": [
{
"id": 0,
"name": "string",
"status": 1,
"created": "string",
"modified": "string",
"code": "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
}