List
DevelopingGET
/product-categoriesValidation
Field | Type | Rule | Description |
---|---|---|---|
page |
integer |
nullable min:1 |
Read more on the Pagination page |
per_page |
integer |
nullable min:1 |
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.sector_id |
integer |
nullable |
Id from Sector model |
filter.market_id |
string |
nullable |
Id from Market model |
filter.branch_id |
string |
nullable |
Id from Branch model |
filter.product_categories_ids |
array |
nullable |
Array of id from ProductCategory model |
Request
Query Params
page
integer
optional
Example:
1
per_page
integer
optional
Example:
20
search
string
optional
sort
string
optional
includes
array[string]
optional
filter[sector_id]
integer
optional
filter[market_id]
string
optional
filter[branch_id]
string
optional
filter[product_categories_ids]
array[string]
optional
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 {8}]
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
string
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": 1,
"icon": "🥤",
"name_en": "Mojito",
"name_ar": "موهيتو",
"deleted_at": null,
"products_count": "19",
"products_active_count": "19",
"products_inactive_count": "0"
},
{
"id": 2,
"icon": "🥩",
"name_en": "Steak",
"name_ar": "ستيك",
"deleted_at": null,
"products_count": "4",
"products_active_count": "4",
"products_inactive_count": "0"
},
{
"id": 3,
"icon": "🌯",
"name_en": "Sandwiches",
"name_ar": "ساندويتشات",
"deleted_at": null,
"products_count": "46",
"products_active_count": "46",
"products_inactive_count": "0"
},
{
"id": 4,
"icon": "☕",
"name_en": "Hot Drinks",
"name_ar": "مشروبات ساخنة",
"deleted_at": null,
"products_count": "145",
"products_active_count": "144",
"products_inactive_count": "1"
},
{
"id": 5,
"icon": "🍱",
"name_en": "Side Dishes",
"name_ar": "اطباق جانبية",
"deleted_at": null,
"products_count": "40",
"products_active_count": "39",
"products_inactive_count": "1"
},
{
"id": 6,
"icon": "🍦",
"name_en": "Ice cream",
"name_ar": "ايس كريم",
"deleted_at": null,
"products_count": "52",
"products_active_count": "52",
"products_inactive_count": "0"
},
{
"id": 7,
"icon": "🧃",
"name_en": "Natural Juices",
"name_ar": "عصائر طبيعية",
"deleted_at": null,
"products_count": "3",
"products_active_count": "2",
"products_inactive_count": "1"
},
{
"id": 8,
"icon": "🫔",
"name_en": "Shawarma",
"name_ar": "شاورما",
"deleted_at": null,
"products_count": "12",
"products_active_count": "9",
"products_inactive_count": "3"
},
{
"id": 9,
"icon": "🍗",
"name_en": "Broasted",
"name_ar": "بروستد",
"deleted_at": null,
"products_count": "0",
"products_active_count": "0",
"products_inactive_count": "0"
},
{
"id": 10,
"icon": "🐑",
"name_en": "Thabiha",
"name_ar": "ذبيحة",
"deleted_at": null,
"products_count": "0",
"products_active_count": "0",
"products_inactive_count": "0"
},
{
"id": 11,
"icon": "🍔",
"name_en": "Burger",
"name_ar": "برغر",
"deleted_at": null,
"products_count": "28",
"products_active_count": "28",
"products_inactive_count": "0"
},
{
"id": 12,
"icon": "🥤",
"name_en": "Cold Drinks",
"name_ar": "مشروبات باردة",
"deleted_at": null,
"products_count": "174",
"products_active_count": "174",
"products_inactive_count": "0"
},
{
"id": 13,
"icon": "🐐",
"name_en": "Goat",
"name_ar": "تيس",
"deleted_at": null,
"products_count": "0",
"products_active_count": "0",
"products_inactive_count": "0"
},
{
"id": 14,
"icon": "🥖",
"name_en": "Pastries",
"name_ar": "معجنات",
"deleted_at": null,
"products_count": "24",
"products_active_count": "24",
"products_inactive_count": "0"
},
{
"id": 15,
"icon": "🍰",
"name_en": "Cake",
"name_ar": "كيك",
"deleted_at": null,
"products_count": "120",
"products_active_count": "120",
"products_inactive_count": "0"
},
{
"id": 16,
"icon": "🥫",
"name_en": "Sauces",
"name_ar": "صلصات",
"deleted_at": null,
"products_count": "17",
"products_active_count": "17",
"products_inactive_count": "0"
},
{
"id": 18,
"icon": "🦐",
"name_en": "Seafood",
"name_ar": "مأكولات بحرية",
"deleted_at": null,
"products_count": "2",
"products_active_count": "2",
"products_inactive_count": "0"
},
{
"id": 19,
"icon": "🍢",
"name_en": "Grills",
"name_ar": "مشاوي",
"deleted_at": null,
"products_count": "0",
"products_active_count": "0",
"products_inactive_count": "0"
},
{
"id": 20,
"icon": "🥜",
"name_en": "Nuts",
"name_ar": "مكسرات",
"deleted_at": null,
"products_count": "20",
"products_active_count": "19",
"products_inactive_count": "1"
},
{
"id": 21,
"icon": "🍽",
"name_en": "Meals",
"name_ar": "وجبات",
"deleted_at": null,
"products_count": "28",
"products_active_count": "28",
"products_inactive_count": "0"
}
],
"first_page_url": "http://localhost:8000/api/v2/product-categories?page=1&per_page=20",
"from": 1,
"last_page": 6,
"last_page_url": "http://localhost:8000/api/v2/product-categories?page=6&per_page=20",
"links": [
{
"url": null,
"label": "« Previous",
"active": false
},
{
"url": "http://localhost:8000/api/v2/product-categories?page=1&per_page=20",
"label": "1",
"active": true
},
{
"url": "http://localhost:8000/api/v2/product-categories?page=2&per_page=20",
"label": "2",
"active": false
},
{
"url": "http://localhost:8000/api/v2/product-categories?page=3&per_page=20",
"label": "3",
"active": false
},
{
"url": "http://localhost:8000/api/v2/product-categories?page=4&per_page=20",
"label": "4",
"active": false
},
{
"url": "http://localhost:8000/api/v2/product-categories?page=5&per_page=20",
"label": "5",
"active": false
},
{
"url": "http://localhost:8000/api/v2/product-categories?page=6&per_page=20",
"label": "6",
"active": false
},
{
"url": "http://localhost:8000/api/v2/product-categories?page=2&per_page=20",
"label": "Next »",
"active": false
}
],
"next_page_url": "http://localhost:8000/api/v2/product-categories?page=2&per_page=20",
"path": "http://localhost:8000/api/v2/product-categories",
"per_page": 20,
"prev_page_url": null,
"to": 20,
"total": 111
}
}
Last modified: a month ago