List
DevelopingGET
/branchesValidation
Field | Type | Rule | Description |
---|---|---|---|
page |
integer |
nullable |
Read more on the Pagination page |
per_page |
integer |
nullable |
Read more on the Pagination page |
search |
string |
nullable |
|
sort |
string |
nullable |
Read more on the Sorting page |
includes |
array |
nullable |
Read more on the Includables page |
filter.market_id |
string |
nullable |
Id from Market model |
filter.is_active |
boolean |
nullable |
Field filter.market_id
required for user with SUBSCRIBER
role
Request
Query Params
page
integer
optional
Nullable
Example:
1
per_page
integer
optional
Nullable | Default : 20
Example:
20
search
string
optional
Nullable
sort
string
optional
Nullable
includes
array[string]
optional
Nullable | From "/api/constant/branch-include"
filter[market_id]
string
optional
Nullable | Required if user role SUBSCRIBER
Example:
b5d70a92-5d2e-4f89-8e52-1827cfbd01f4
filter[is_active]
integer
optional
Nullable | Boolean
Example:
1
Request samples
Responses
OK(200)
HTTP Code: 200
Content Type : JSONapplication/json
Data Schema
meta
object
required
code
integer
required
status
string
required
message
string
required
data
object
required
current_page
integer
required
data
array [object {12}]
required
first_page_url
string
required
from
integer
required
last_page
integer
required
last_page_url
string
required
links
array [object {3}]
required
next_page_url
null
required
path
string
required
per_page
integer
required
prev_page_url
null
required
to
integer
required
total
integer
required
Example
{
"meta": {
"code": 200,
"status": "success",
"message": "Data Loaded Successfully"
},
"data": {
"current_page": 1,
"data": [
{
"id": "1ee6bd1b-8758-4283-8e4a-f48f50606c55",
"market_id": "5d4196d7-355a-48ef-9c50-add58cc440f1",
"name_en": "Thrid Branch",
"name_ar": "Thrid Branch",
"address": "Beverly Hills, Riyadh, Riyadh, Saudi Arabia",
"latitude": 24.774265,
"longitude": 46.738586,
"is_active": false,
"created_at": 1698185575094,
"updated_at": 1698185575094,
"deleted_at": null,
"expired_at": 1698185575098
},
{
"id": "31a60e0c-b602-4942-a33b-06553324fe8c",
"market_id": "5d4196d7-355a-48ef-9c50-add58cc440f1",
"name_en": "Second Branch",
"name_ar": "Second Branch",
"address": "Alahsa, Eastern, Saudi Arabia",
"latitude": 24.261548471224,
"longitude": 48.794584688708,
"is_active": false,
"created_at": 1685620361978,
"updated_at": 1685620361978,
"deleted_at": null,
"expired_at": 1685620361979
},
{
"id": "02510007-93b6-4121-93d7-c1bd79d00d0c",
"market_id": "5d4196d7-355a-48ef-9c50-add58cc440f1",
"name_en": "First Branch",
"name_ar": "First Branch",
"address": "8541 Moore Highway, Tianna Port",
"latitude": -60.8672,
"longitude": -168.4564,
"is_active": true,
"created_at": 1680271006388,
"updated_at": 1682927489279,
"deleted_at": null,
"expired_at": null
}
],
"first_page_url": "http://localhost:8000/api/v2/branches?page=1",
"from": 1,
"last_page": 1,
"last_page_url": "http://localhost:8000/api/v2/branches?page=1",
"links": [
{
"url": null,
"label": "« Previous",
"active": false
},
{
"url": "http://localhost:8000/api/v2/branches?page=1",
"label": "1",
"active": true
},
{
"url": null,
"label": "Next »",
"active": false
}
],
"next_page_url": null,
"path": "http://localhost:8000/api/v2/branches",
"per_page": 20,
"prev_page_url": null,
"to": 3,
"total": 3
}
}
Last modified: 2 months ago