Skip to content

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

ParameterTypeRequiredDescription
categorystring (UUID)NoFilter products by category UUID. Defaults to all categories.
is_menubooleanNoFilter 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

FieldTypeDescription
uuidstringUnique identifier of the product.
titlestringTitle of the product.
descriptionstring/nullDescription of the product.
imagestringURL of the product image (if available).
skustringSKU (Stock Keeping Unit) of the product.
compare_at_priceobjectCompare at price details (amount, currency, formatted value).
priceobjectPrice details (amount, currency, formatted value).
costobjectCost details (amount, currency, formatted value).
is_menubooleanWhether this product is from the menu.
statusobjectThe status of the product (contains label and value).
created_atstringThe date the product was created (YYYY-MM-DDTHH:MM:SS.ssssssZ / ISO 8601 format).
updated_atstringThe date the product was updated (YYYY-MM-DDTHH:MM:SS.ssssssZ / ISO 8601 format).

Category Fields

FieldTypeDescription
uuidstringUnique identifier of the category.
titlestringTitle of the category.

Option Fields

FieldTypeDescription
uuidstringUnique identifier of the option.
namestringName of the option.
imagestringURL of the option image (if available).
datesarrayAvailable dates for the option.

Price Fields

FieldTypeDescription
amountstringPrice amount.
customer_classesarrayCustomer classes applicable for this price.

Class Restriction Fields

FieldTypeDescription
valuestringUnique identifier of the class restriction.
labelstringLabel of the class restriction.

Notes

  • Products can be filtered using the category and is_menu fields.
  • If no filters are provided, all active products are returned by default.

This is a private API. All rights reserved.