Ingredient
List Ingredients
List all ingredients with pagination and filtering options.
Authorization
default AuthorizationBearer <token>
You can retrieve your token by logging in.
In: header
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"Request Body
application/json
page?|
Must be at least 1.
per_page?|
Must be at least 1.
search?|
sort?|
key_by?|
includes*array<>
filter?
Response Body
application/json
application/json
application/json
application/json
application/json
curl -X GET "http://localhost:8000/api/v2/ingredients" \ -H "X-API-Version: 2.3.0" \ -H "Content-Type: application/json" \ -d '{ "includes": [ "adipisci" ] }'{
"meta": {
"code": 200,
"status": "success",
"message": "Ingredients retrieved successfully."
},
"data": {
"current_page": 1,
"data": [
{
"id": "d5e361b2-55ca-4bb5-a1d3-f3306a9176d1",
"name_en": "Aut est",
"name_ar": "qui",
"deleted_at": null,
"market_id": "07928d80-350c-46eb-8786-91a40ca509a0",
"source_unit": "pcs",
"target_unit": "pcs",
"source_rate": "90.82",
"target_rate": "11.61",
"minimum": "44.06",
"created_at": 1782824836563,
"updated_at": 1782824836563,
"maximum": "413.35",
"stock": null,
"status": "OUT_OF_STOCK",
"percent": "0.0000000000"
},
{
"id": "d35df023-4404-4d8b-9045-3f28c892d249",
"name_en": "Dolorum eligendi",
"name_ar": "amet",
"deleted_at": null,
"market_id": "07928d80-350c-46eb-8786-91a40ca509a0",
"source_unit": "g",
"target_unit": "kg",
"source_rate": "50.38",
"target_rate": "66.69",
"minimum": "11.31",
"created_at": 1782824836563,
"updated_at": 1782824836563,
"maximum": "255.05",
"stock": null,
"status": "OUT_OF_STOCK",
"percent": "0.0000000000"
},
{
"id": "2a99bf59-550a-4d2b-9d82-6bb52c161ce4",
"name_en": "Omnis ut",
"name_ar": "quam",
"deleted_at": null,
"market_id": "07928d80-350c-46eb-8786-91a40ca509a0",
"source_unit": "g",
"target_unit": "ml",
"source_rate": "6.01",
"target_rate": "5.45",
"minimum": "8.31",
"created_at": 1782824836563,
"updated_at": 1782824836563,
"maximum": "312.62",
"stock": null,
"status": "OUT_OF_STOCK",
"percent": "0.0000000000"
},
{
"id": "46ad0474-8bad-40f4-a884-d49c7c634fce",
"name_en": "Qui adipisci",
"name_ar": "non",
"deleted_at": null,
"market_id": "07928d80-350c-46eb-8786-91a40ca509a0",
"source_unit": "kg",
"target_unit": "kg",
"source_rate": "19.16",
"target_rate": "17.36",
"minimum": "26.05",
"created_at": 1782824836563,
"updated_at": 1782824836563,
"maximum": "224.73",
"stock": null,
"status": "OUT_OF_STOCK",
"percent": "0.0000000000"
},
{
"id": "184e831c-3375-4fa9-99ad-960c86345347",
"name_en": "Sunt sed",
"name_ar": "dolores",
"deleted_at": null,
"market_id": "07928d80-350c-46eb-8786-91a40ca509a0",
"source_unit": "g",
"target_unit": "ml",
"source_rate": "13.86",
"target_rate": "49.15",
"minimum": "48.05",
"created_at": 1782824836563,
"updated_at": 1782824836563,
"maximum": "465.00",
"stock": null,
"status": "OUT_OF_STOCK",
"percent": "0.0000000000"
}
],
"first_page_url": "http://localhost:8000/api/v2/ingredients?page=1",
"from": 1,
"last_page": 1,
"last_page_url": "http://localhost:8000/api/v2/ingredients?page=1",
"links": [
{
"url": null,
"label": "« Previous",
"page": null,
"active": false
},
{
"url": "http://localhost:8000/api/v2/ingredients?page=1",
"label": "1",
"page": 1,
"active": true
},
{
"url": null,
"label": "Next »",
"page": null,
"active": false
}
],
"next_page_url": null,
"path": "http://localhost:8000/api/v2/ingredients",
"per_page": 20,
"prev_page_url": null,
"to": 5,
"total": 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
}