Skip to main content

Overview

The Items API manages individual menu items nested under categories. Items represent products on the menu with pricing, descriptions, images, and optional customization options. Authentication: All endpoints require authentication via Laravel session. Base Path: /tenant/{tenantId}/food/categories/{category}/items Item Limits:
  • Plan 1 (ESENCIA): 50 items total
  • Plan 2 (IMPULSO): 100 items total
  • Plan 3 (VISIÓN): 150 items total

List Items

Returns all items within a specific category.
tenantId
integer
required
The ID of the tenant
category
string
required
The category ID (e.g., “cat-A3K9”)
GET /tenant/{tenantId}/food/categories/{category}/items
{
  "success": true,
  "items": [
    {
      "id": "item-B7X2",
      "nombre": "Hamburguesa Clásica",
      "precio": 12.50,
      "descripcion": "Carne 100% res, queso cheddar, lechuga, tomate",
      "image_path": "menu/items/item-B7X2.webp",
      "badge": "Popular",
      "is_featured": true,
      "activo": true,
      "options": [
        {
          "id": "opt_67890",
          "label": "Extra queso",
          "price_add": 2.00
        }
      ]
    }
  ]
}

Create Item

Creates a new menu item within a category.
tenantId
integer
required
The ID of the tenant
category
string
required
The category ID where the item will be created
nombre
string
required
Item name (max 200 characters)
precio
number
required
Item price (min: 0)
descripcion
string
Item description (max 200 characters)
badge
string
Badge text like “Popular”, “New”, “Spicy” (max 50 characters)
Whether to feature this item prominently. Default: false
imagen
file
Image file (jpg, jpeg, png, webp, max 2MB). Processed to WebP format.
options
string
JSON string of customization options (max 8 options). Each option has:
  • id (string): Unique identifier
  • label (string): Option name (max 80 chars)
  • price_add (number): Additional price (0-50)
POST /tenant/{tenantId}/food/categories/{category}/items
Content-Type: multipart/form-data

nombre=Pizza Margherita
precio=15.00
descripcion=Salsa de tomate, mozzarella, albahaca fresca
badge=Chef's Special
is_featured=true
[email protected]
options=[{"id":"opt_1","label":"Extra queso","price_add":2.5},{"id":"opt_2","label":"Borde relleno","price_add":3.0}]
{
  "success": true,
  "item": {
    "id": "item-K9P3",
    "nombre": "Pizza Margherita",
    "precio": 15.00,
    "descripcion": "Salsa de tomate, mozzarella, albahaca fresca",
    "image_path": "menu/items/item-K9P3.webp",
    "badge": "Chef's Special",
    "is_featured": true,
    "activo": true,
    "options": [
      {
        "id": "opt_1",
        "label": "Extra queso",
        "price_add": 2.5
      },
      {
        "id": "opt_2",
        "label": "Borde relleno",
        "price_add": 3.0
      }
    ]
  }
}
Images are automatically processed to WebP format (800px max width) and stored as menu/items/{itemId}.webp.

Update Item

Updates an existing menu item. All fields are optional.
tenantId
integer
required
The ID of the tenant
category
string
required
The category ID
item
string
required
The item ID to update
nombre
string
Item name (max 200 characters)
precio
number
Item price (min: 0)
descripcion
string
Item description (max 200 characters)
badge
string
Badge text (max 50 characters). Set to null to remove.
Whether to feature this item
activo
boolean
Whether the item is active/visible
imagen
file
New image file (replaces existing)
remove_image
boolean
Set to true to remove the current image
options
string
JSON string to replace all options (max 8)
PUT /tenant/{tenantId}/food/categories/{category}/items/{item}
Content-Type: multipart/form-data

precio=16.50
badge=Best Seller
activo=true
{
  "success": true,
  "item": {
    "id": "item-K9P3",
    "nombre": "Pizza Margherita",
    "precio": 16.50,
    "descripcion": "Salsa de tomate, mozzarella, albahaca fresca",
    "image_path": "menu/items/item-K9P3.webp",
    "badge": "Best Seller",
    "is_featured": true,
    "activo": true,
    "options": [...]
  }
}

Delete Item

Deletes a menu item and its associated image.
tenantId
integer
required
The ID of the tenant
category
string
required
The category ID
item
string
required
The item ID to delete
DELETE /tenant/{tenantId}/food/categories/{category}/items/{item}
{
  "success": true
}

Item Object

FieldTypeDescription
idstringUnique item identifier (e.g., “item-K9P3”)
nombrestringItem name
precionumberItem price
descripcionstring | nullItem description
image_pathstring | nullRelative path to item image
badgestring | nullBadge text
is_featuredbooleanWhether item is featured
activobooleanWhether item is active
optionsarray | nullArray of customization options

Option Object

FieldTypeDescription
idstringUnique option identifier
labelstringOption name (max 80 chars)
price_addnumberAdditional price (0-50)

Validation Rules

Options Validation

  • Maximum 8 options per item
  • Each option label: max 80 characters
  • Each price_add: 0-50 range
  • Invalid options are silently filtered out

Image Processing

  • Accepted formats: JPG, JPEG, PNG, WebP
  • Max file size: 2MB
  • Processed to: 800px width, WebP format
  • Stored at: storage/app/public/tenants/{tenantId}/menu/items/{itemId}.webp

Error Codes

CodeHTTP StatusDescription
category_not_found404Parent category does not exist
item_not_found404Item ID does not exist in the category
item_limit_reached422Tenant has reached item limit for their plan

Build docs developers (and LLMs) love