> ## Documentation Index
> Fetch the complete documentation index at: https://docs.fooddelivery.cl/llms.txt
> Use this file to discover all available pages before exploring further.

# Obtener el menú

> Devuelve la carta vigente del restaurante: categorías activas con sus productos, modificadores y precios. `available` refleja el inventario: con `location_id` se evalúa esa sucursal; sin él, el producto está disponible si le queda stock en alguna sucursal activa.




## OpenAPI

````yaml /openapi.yaml get /menu
openapi: 3.1.0
info:
  title: FoodDelivery API
  version: '1.0'
  description: |
    API pública de FoodDelivery, v1.
    Lectura con cualquier llave; los endpoints de escritura requieren una
    llave con el permiso de escritura (se define al generarla en el panel).
    Las llaves sandbox (`fd_test_`) usan estos mismos endpoints en modo
    prueba: pedidos marcados PRUEBA, pago simulado y stock/local sin efecto
    real (ver la guía Sandbox).
    Montos en CLP sin decimales; fechas ISO 8601 en horario de Chile
    (America/Santiago).
servers:
  - url: https://app.fooddelivery.cl/api/v1
security:
  - apiKey: []
tags:
  - name: Pedidos
  - name: Menú
  - name: Inventario
  - name: Locales
paths:
  /menu:
    get:
      tags:
        - Menú
      summary: Obtener el menú
      description: >
        Devuelve la carta vigente del restaurante: categorías activas con sus
        productos, modificadores y precios. `available` refleja el inventario:
        con `location_id` se evalúa esa sucursal; sin él, el producto está
        disponible si le queda stock en alguna sucursal activa.
      operationId: getMenu
      parameters:
        - name: location_id
          in: query
          description: Sucursal para resolver la disponibilidad por stock.
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: Menú vigente.
          content:
            application/json:
              schema:
                type: object
                properties:
                  categories:
                    type: array
                    items:
                      $ref: '#/components/schemas/Category'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/RateLimited'
components:
  schemas:
    Category:
      type: object
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
        description:
          type: string
          nullable: true
        products:
          type: array
          items:
            $ref: '#/components/schemas/Product'
    Product:
      type: object
      properties:
        id:
          type: string
          format: uuid
        slug:
          type: string
          nullable: true
        name:
          type: string
        description:
          type: string
          nullable: true
        price:
          type: integer
          description: Precio de lista en CLP.
        offer_price:
          type: integer
          nullable: true
          description: Precio de oferta vigente; si no es null, es el que paga el cliente.
        image_url:
          type: string
          nullable: true
        available:
          type: boolean
          description: false si el producto está agotado (inventario por local).
        modifier_groups:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
                format: uuid
              name:
                type: string
              required:
                type: boolean
              min:
                type: integer
              max:
                type: integer
              options:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: string
                      format: uuid
                    name:
                      type: string
                    price:
                      type: integer
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              enum:
                - invalid_request
                - unauthorized
                - forbidden
                - not_found
                - location_closed
                - location_inactive
                - insufficient_stock
                - illegal_transition
                - managed_by_integrator
                - state_conflict
                - payment_unavailable
                - rate_limited
                - internal_error
            message:
              type: string
  responses:
    Unauthorized:
      description: API key ausente, inválida o revocada.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    NotFound:
      description: El recurso no existe o pertenece a otro restaurante.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    RateLimited:
      description: Límite de peticiones excedido; ver header `Retry-After`.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer
      description: >
        API key del restaurante, generada en el panel de administración
        (Integraciones → API pública): `fd_live_...` para producción o
        `fd_test_...` para sandbox (modo prueba sobre el mismo restaurante).

````