Skip to main content

Overview

The Categories API allows you to manage food menu categories for a tenant’s menu. Categories organize menu items into logical groups (e.g., “Appetizers”, “Main Courses”, “Desserts”). Authentication: All endpoints require authentication via Laravel session. Base Path: /tenant/{tenantId}/food/categories Plan Limits:
  • Plan 1 (ESENCIA): 50 items, 6 photos
  • Plan 2 (IMPULSO): 100 items, 12 photos
  • Plan 3 (VISIÓN): 150 items, 18 photos

List Categories

tenantId
integer
required
The ID of the tenant
GET /tenant/{tenantId}/food/categories
{
  "success": true,
  "categories": [
    {
      "id": "cat-A3K9",
      "nombre": "Entradas",
      "foto": "https://example.com/image.jpg",
      "activo": true,
      "items": [
        {
          "id": "item-B7X2",
          "nombre": "Ensalada César",
          "precio": 8.50,
          "descripcion": "Lechuga romana, crutones, parmesano",
          "image_path": "menu/items/item-B7X2.webp",
          "badge": "Popular",
          "is_featured": true,
          "activo": true
        }
      ]
    }
  ]
}

Create Category

Creates a new category for the tenant’s menu.
tenantId
integer
required
The ID of the tenant
nombre
string
required
Category name (max 120 characters)
foto
string
Category photo URL (max 255 characters)
POST /tenant/{tenantId}/food/categories
Content-Type: application/json

{
  "nombre": "Bebidas",
  "foto": "https://example.com/bebidas.jpg"
}
{
  "success": true,
  "category": {
    "id": "cat-P2M5",
    "nombre": "Bebidas",
    "foto": "https://example.com/bebidas.jpg",
    "items": [],
    "activo": true
  }
}
Photo limits are enforced based on the tenant’s plan. Only categories with a foto value count toward the limit.

Update Category

Updates an existing category. All fields are optional.
tenantId
integer
required
The ID of the tenant
category
string
required
The category ID (e.g., “cat-A3K9”)
nombre
string
Category name (max 120 characters)
foto
string
Category photo URL (max 255 characters). Set to null to remove.
activo
boolean
Whether the category is active/visible
PUT /tenant/{tenantId}/food/categories/{category}
Content-Type: application/json

{
  "nombre": "Bebidas Frías",
  "activo": true
}
{
  "success": true,
  "category": {
    "id": "cat-P2M5",
    "nombre": "Bebidas Frías",
    "foto": "https://example.com/bebidas.jpg",
    "items": [],
    "activo": true
  }
}

Delete Category

Deletes a category and all its items.
tenantId
integer
required
The ID of the tenant
category
string
required
The category ID to delete
DELETE /tenant/{tenantId}/food/categories/{category}
{
  "success": true
}
Deleting a category permanently removes all items within it. This action cannot be undone.

Category Object

FieldTypeDescription
idstringUnique category identifier (e.g., “cat-A3K9”)
nombrestringCategory name
fotostring | nullPhoto URL or null
activobooleanWhether category is active
itemsarrayArray of item objects belonging to this category

Error Codes

CodeHTTP StatusDescription
category_not_found404Category ID does not exist
photo_limit_reached422Tenant has reached photo limit for their plan

Build docs developers (and LLMs) love