Branch
List Branches
List all branches with pagination and filtering options.
Authorization
default AuthorizationBearer <token>
You can retrieve your token by logging in.
In: header
Query Parameters
page?|
Page number for pagination. Must be at least 1.
per_page?|
Number of items per page. Must be at least 1.
search?|
Search term for filtering branches.
sort?|
Sort column (e.g. created_at, name_en).
key_by?|
Key response by column.
includes*array<>
filter?object
filter.market_id?|
Filter by market ID. The id of an existing record in the markets table.
filter.branches_ids*array<>
The id of an existing record in the branches table.
filter.is_active?|
Filter by active status.
Header Parameters
X-API-Version*string
API contract version to target. See the Changelog for what changed in each version.
Default
"2.0.0"Value in
"2.3.0" | "2.2.0" | "2.1.0" | "2.0.0"Response Body
application/json
application/json
application/json
application/json
application/json
curl -X GET "http://localhost:8000/api/v2/branches?page=1&per_page=20&search=Downtown&sort=created_at&key_by=id&includes=dolores&filter.market_id=uuid&filter.branches_ids=quas&filter.is_active=true" \ -H "X-API-Version: 2.3.0"{
"meta": {
"code": 200,
"status": "success",
"message": "Branches retrieved successfully."
},
"data": {
"current_page": 1,
"current_page_url": "http://localhost:8000/api/v2/branches?page=1",
"data": [
{
"id": "2139a9bd-f380-4b88-9ab6-ed590a79d027",
"market_id": "07928d80-350c-46eb-8786-91a40ca509a0",
"name_en": "Toy-Lemke",
"name_ar": "Toy-Lemke",
"address": "10499 Larkin Hills\nWest Jabari, MT 99342-6654",
"latitude": 41.999308,
"longitude": -86.865274,
"is_active": true,
"created_at": 1782824834305,
"updated_at": 1782824834305,
"deleted_at": null,
"expired_at": null,
"is_online": false
},
{
"id": "370c09a0-a777-4f9d-aab1-796e5b8ce647",
"market_id": "07928d80-350c-46eb-8786-91a40ca509a0",
"name_en": "Krajcik-Wunsch",
"name_ar": "Krajcik-Wunsch",
"address": "555 Beatty Pass Suite 082\nWest Sandy, CO 94238-0868",
"latitude": 70.213047,
"longitude": -36.245717,
"is_active": true,
"created_at": 1782824834305,
"updated_at": 1782824834305,
"deleted_at": null,
"expired_at": null,
"is_online": false
},
{
"id": "089c90b3-947a-411f-bb25-e220497373ca",
"market_id": "07928d80-350c-46eb-8786-91a40ca509a0",
"name_en": "Kertzmann, Nikolaus and Stanton",
"name_ar": "Kertzmann, Nikolaus and Stanton",
"address": "3939 Ernest Bypass\nNorth Tillmanport, ME 51428-4347",
"latitude": 71.325036,
"longitude": -5.321365,
"is_active": true,
"created_at": 1782824834305,
"updated_at": 1782824834305,
"deleted_at": null,
"expired_at": null,
"is_online": false
},
{
"id": "b682ae01-c93f-4703-bc7b-e9f9c697b300",
"market_id": "07928d80-350c-46eb-8786-91a40ca509a0",
"name_en": "Kuphal PLC",
"name_ar": "Kuphal PLC",
"address": "1105 Rowe Shores Suite 607\nNorth Ottisstad, NV 53670",
"latitude": 43.567851,
"longitude": 27.452313,
"is_active": true,
"created_at": 1782824824154,
"updated_at": 1782824824154,
"deleted_at": null,
"expired_at": null,
"is_online": false
},
{
"id": "baf2460b-f254-43d5-9d9a-e951fa9aa0f4",
"market_id": "07928d80-350c-46eb-8786-91a40ca509a0",
"name_en": "Gusikowski LLC",
"name_ar": "Gusikowski LLC",
"address": "96399 Isaac Corner Suite 312\nPacochashire, NM 80645-6436",
"latitude": 54.521857,
"longitude": 143.967115,
"is_active": true,
"created_at": 1782824824154,
"updated_at": 1782824824154,
"deleted_at": null,
"expired_at": null,
"is_online": false
}
],
"first_page_url": "http://localhost:8000/api/v2/branches?page=1",
"from": 1,
"next_page_url": null,
"path": "http://localhost:8000/api/v2/branches",
"per_page": 20,
"prev_page_url": null,
"to": 5
}
}{
"meta": {
"code": 401,
"status": "error",
"message": "Unauthenticated."
},
"data": null
}{
"meta": {
"code": 403,
"status": "error",
"message": "Unauthorized."
},
"data": null
}{
"meta": {
"code": 404,
"status": "error",
"message": "Resource not found."
},
"data": null
}{
"meta": {
"code": 500,
"status": "error",
"message": "Internal server error."
},
"data": null
}