Appearance
List Products
The List Products endpoint allows you to retrieve a list of products with various details such as title, price, category, and status.
Endpoint
GET https://your-org-uuid.canteenweb.com/api/v1/admin/products
Query Parameters
Parameter | Type | Required | Description |
---|---|---|---|
category | string (UUID) | No | Filter products by category UUID. Defaults to all categories. |
is_menu | boolean | No | Filter products that are marked as menu items. Defaults to all products. |
Example Requests
1. List All Active Products (Default)
bash
curl -X GET "https://your-org-uuid.canteenweb.com/api/v1/admin/products" \
-H "Authorization: Bearer your-access-token"
2. List Products by Category
bash
curl -X GET "https://your-org-uuid.canteenweb.com/api/v1/admin/products?category=9e43cdc9-58e5-4374-bf48-2109927d38e0" \
-H "Authorization: Bearer your-access-token"
3. List Inactive Products
bash
curl -X GET "https://your-org-uuid.canteenweb.com/api/v1/admin/products?status=inactive" \
-H "Authorization: Bearer your-access-token"
4. List Menu Products
bash
curl -X GET "https://your-org-uuid.canteenweb.com/api/v1/admin/products?is_menu=true" \
-H "Authorization: Bearer your-access-token"
Response Structure
The API returns an array of product objects, each containing product details, pricing information, and category details.
Example Response:
json
{
"data": [
{
"uuid": "9e48ae62-4428-4126-96ff-4417fc40e651",
"title": "Deluxe Meal Combo",
"description": "A delicious combo of spaghetti with tomato sauce and Caesar salad.",
"image": "https://example.com/images/deluxe-meal-combo.jpg",
"sku": "DMC-001",
"compare_at_price": {
"amount": "20000",
"currency": "ARS",
"formatted": "$ 200"
},
"price": {
"amount": "10000",
"currency": "ARS",
"formatted": "$ 100"
},
"cost": {
"amount": "1000",
"currency": "ARS",
"formatted": "$ 10"
},
"is_menu": true,
"status": {
"label": "Activo",
"value": "active"
},
"category": {
"uuid": "9e43cdc9-58e5-4374-bf48-2109927d38e0",
"title": "Main Courses"
},
"options": [
{
"uuid": "9e4e14c3-274a-45ff-8f82-9e3377aa1cca",
"name": "Spaghetti with Tomato Sauce",
"image": "",
"dates": [
"2025-02-26",
"2025-02-27"
]
},
{
"uuid": "9e4e14c3-2a72-4693-8a41-8a25bc4eb3d8",
"name": "Caesar Salad",
"image": "",
"dates": [
"2025-02-28"
]
}
],
"prices": [
{
"amount": "500.00",
"customer_classes": [
{
"value": "9e43cdc8-87b2-46e7-b9f5-dabb7c785344",
"label": "Kinder"
},
{
"value": "9e43cdc8-8894-4752-aa0e-9f75e6c7d66a",
"label": "1ro - Primaria"
}
]
},
{
"amount": "100.00",
"customer_classes": [
{
"value": "9e43cdc8-895c-4d75-ae36-beb5b8f753d5",
"label": "2do - Primaria"
}
]
}
],
"class_restrictions": [
{
"value": "9e43cdc8-8894-4752-aa0e-9f75e6c7d66a",
"label": "1ro - Primaria"
}
],
"created_at": "2025-02-23T22:33:25.000000Z",
"updated_at": "2025-02-26T14:58:49.000000Z"
}
],
"links": {
"first": "http://9e43cdc5-89bd-4cab-8fd2-110b53e76dc7.canteenweb.test/api/v1/admin/products?page=1",
"last": "http://9e43cdc5-89bd-4cab-8fd2-110b53e76dc7.canteenweb.test/api/v1/admin/products?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"links": [
{
"url": null,
"label": "« Anterior",
"active": false
},
{
"url": "http://9e43cdc5-89bd-4cab-8fd2-110b53e76dc7.canteenweb.test/api/v1/admin/products?page=1",
"label": "1",
"active": true
},
{
"url": null,
"label": "Siguiente »",
"active": false
}
],
"path": "http://9e43cdc5-89bd-4cab-8fd2-110b53e76dc7.canteenweb.test/api/v1/admin/products",
"per_page": 25,
"to": 1,
"total": 1
},
"success": true,
"message": "Request was successful."
}
Response Fields
Product Fields
Field | Type | Description |
---|---|---|
uuid | string | Unique identifier of the product. |
title | string | Title of the product. |
description | string/null | Description of the product. |
image | string | URL of the product image (if available). |
sku | string | SKU (Stock Keeping Unit) of the product. |
compare_at_price | object | Compare at price details (amount, currency, formatted value). |
price | object | Price details (amount, currency, formatted value). |
cost | object | Cost details (amount, currency, formatted value). |
is_menu | boolean | Whether this product is from the menu. |
status | object | The status of the product (contains label and value ). |
created_at | string | The date the product was created (YYYY-MM-DDTHH:MM:SS.ssssssZ / ISO 8601 format). |
updated_at | string | The date the product was updated (YYYY-MM-DDTHH:MM:SS.ssssssZ / ISO 8601 format). |
Category Fields
Field | Type | Description |
---|---|---|
uuid | string | Unique identifier of the category. |
title | string | Title of the category. |
Option Fields
Field | Type | Description |
---|---|---|
uuid | string | Unique identifier of the option. |
name | string | Name of the option. |
image | string | URL of the option image (if available). |
dates | array | Available dates for the option. |
Price Fields
Field | Type | Description |
---|---|---|
amount | string | Price amount. |
customer_classes | array | Customer classes applicable for this price. |
Class Restriction Fields
Field | Type | Description |
---|---|---|
value | string | Unique identifier of the class restriction. |
label | string | Label of the class restriction. |
Notes
- Products can be filtered using the
category
andis_menu
fields. - If no filters are provided, all active products are returned by default.