> ## Documentation Index
> Fetch the complete documentation index at: https://api-doc.xmenu.it/llms.txt
> Use this file to discover all available pages before exploring further.

# Dettagli prodotto

> Restituisce i dettagli di un singolo prodotto tramite il suo identificativo univoco.



## OpenAPI

````yaml openapi-it.json GET /menu/product
openapi: 3.1.0
info:
  title: xMenu API
  description: API Pubblica xMenu - Endpoint REST e notifiche webhook
  version: 1.0.0
servers:
  - url: https://app.xmenu.it/api
    description: xMenu API Production
security: []
paths:
  /menu/product:
    get:
      tags:
        - Consultazione menu
      summary: Dettagli prodotto
      description: >-
        Restituisce i dettagli di un singolo prodotto tramite il suo
        identificativo univoco.
      operationId: getProduct
      parameters:
        - name: uid
          in: query
          required: true
          schema:
            type: string
          description: Identificatore univoco prodotto
      responses:
        '200':
          description: Risposta prodotto
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProductResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
      security:
        - apiKey: []
        - clientId: []
          clientSecret: []
        - oauth2: []
components:
  schemas:
    ProductResponse:
      type: object
      required:
        - success
      properties:
        success:
          type: boolean
          description: >-
            Risultato dell'operazione: `true` se ha avuto successo, `false` se
            fallita
        product:
          $ref: '#/components/schemas/MenuProduct'
        error:
          type: string
          description: >-
            Codice errore se l'operazione è fallita. Valori possibili:

            - `PRODUCT_NOT_FOUND` = Prodotto richiesto non trovato


            Vedi [Codici errore](/docs/it/overview/error-codes) per i codici di
            errore generali che possono verificarsi.
        message:
          type: string
          description: Descrizione leggibile dell'errore se l'operazione è fallita
    MenuProduct:
      type: object
      description: Prodotto del menu
      properties:
        uid:
          type: string
          description: Identificatore univoco prodotto
        category_uid:
          type: string
          description: Identificatore categoria genitore
        name:
          type: string
          description: Nome prodotto
        ingredients:
          type: string
          description: Descrizione prodotto o ingredienti
        price:
          type: number
          description: Prezzo base
        prices_table:
          type: object
          description: >-
            Tabella prezzi specifici per locale / metodo consegna, con la
            seguente struttura:

            ```javascript

            {
               "": { // tutti i locali
                  "0": price0, // prezzo ritiro in sede
                  "1": price1, // prezzo consegna a domicilio
                  ... // prezzi eventuali metodi alternativi
               },
               "subrestaurantUid1": { // Locale 1
                  "0": price0,
                  "1": price1,
                  ...
               },
               ...
            }

            ```


            **Codici metodo di consegna:**

            - `"0"` = Ritiro al ristorante

            - `"1"` = Consegna a domicilio

            - `"0t"` = Ordinazione al tavolo

            - `"0mt"` = Menu digitale

            - `"20"` = Ritiro al punto di consegna

            - `"0e-{id}"` = Evento

            - `"dcf-{id}"` = Metodo di consegna personalizzato
          additionalProperties:
            type: object
            additionalProperties:
              type: number
        image:
          type: string
          description: URL immagine
        allergens:
          type: array
          items:
            type: string
          description: |-
            Lista degli allergeni. Valori possibili:
            - `gluten` = 1 - Glutine
            - `crustaceans` = 2 - Crostacei
            - `eggs` = 3 - Uova
            - `fish` = 4 - Pesce
            - `peanuts` = 5 - Arachidi
            - `soya` = 6 - Soia
            - `milk` = 7 - Latte
            - `nuts` = 8 - Frutta a guscio
            - `celery` = 9 - Sedano
            - `mustard` = 10 - Senape
            - `sesame` = 11 - Sesamo
            - `sulphites` = 12 - Solfiti
            - `lupin` = 13 - Lupini
            - `molluscs` = 14 - Molluschi
            - `freezer` = Congelato e surgelato
        symbols:
          type: array
          items:
            type: string
          description: |-
            Lista dei simboli. Valori possibili:
            - `new` = New
            - `bestseller` = Best seller
            - `vegan` = Vegano
            - `vegetarian` = Vegetariano
            - `spicy` = Piccante
            - `pizza` = Pizza
            - `burger` = Panino
            - `chips` = Patatine
            - `icecream` = Gelato
            - `sweets` = Dolci
            - `drink` = Bibita
            - `freshfish` = Pesce fresco
            - `cookedfish` = Pesce cotto
        suggested:
          type: boolean
          description: >-
            Se il prodotto è contrassegnato come consigliato (mostra il badge
            'Consigliato' e mette in risalto il prodotto nel menu)
        price_sale_alert:
          type: boolean
          description: >-
            Se il prodotto è in evidenza (mostrato in risalto quando l'utente
            inizia a comporre il carrello)
        price_sale_badge:
          type: integer
          description: >-
            Testo promozionale mostrato nella scheda prodotto quando
            `price_sale_alert` è `true`. Valori possibili:

            - `0` = In Promozione

            - `1` = Promo del Giorno

            - `2` = Quando ti ricapita di mangiarlo scontato?

            - `3` = Ma perché perderselo?

            - `4` = Quando ti ricapita un'occasione così?

            - `5` = Promo della Settimana

            - `6` = Promo del Mese

            - `7` = Da non crederci!

            - `8` = Speciale Black Friday

            - `9` = L'hai già provato?
        checkout_selling:
          type: boolean
          description: Se il prodotto viene proposto al checkout come cross selling
        url:
          type: string
          description: URL pagina prodotto
        hidden:
          type: boolean
          description: Stato di visibilità
        position:
          type: integer
          description: Posizione di visualizzazione
        subrestaurant_uids:
          type: array
          items:
            type: string
          nullable: true
          description: >-
            Elenco degli UID dei subrestaurant dove questo prodotto è
            disponibile (null = disponibile in tutti i locali)
        ext_id:
          $ref: '#/components/schemas/ExtId'
        inherits_options:
          type: string
          enum:
            - sync
            - 'yes'
            - none
          description: >-
            Modalità di ereditarietà opzioni dalla categoria:

            - `yes` = Ereditarietà completa — il prodotto usa solo le opzioni
            della categoria; il campo `options` è assente nella risposta (usa
            l'endpoint get_category per recuperare le opzioni effettive)

            - `sync` = Ereditarietà parziale — il prodotto mostra sia le opzioni
            della categoria che le proprie opzioni specifiche; `options`
            contiene tutte le opzioni effettive

            - `none` = Nessuna ereditarietà — il prodotto ha solo le proprie
            opzioni specifiche
        options:
          type: array
          description: Opzioni specifiche del prodotto
          items:
            $ref: '#/components/schemas/MenuOption'
    ExtId:
      type: string
      description: >-
        Disponibile in caso di richiesta con autenticazione via API Client: ID
        esterno passato in fase di importazione menu
    MenuOption:
      type: object
      description: Opzione menu di prodotto o categoria
      properties:
        uid:
          type: string
          description: Identificatore univoco opzione
        name:
          type: string
          description: Titolo opzione
        short_name:
          type: string
          description: Titolo abbreviato opzione
        type:
          type: string
          enum:
            - single
            - multiple
          description: |-
            Tipo di selezione:
            - `single` = Scelta singola
            - `multiple` = Scelte multiple consentite
        min_selectable:
          type: integer
          description: Numero minimo di valori selezionabili (solo per tipo `multiple`)
        max_selectable:
          type: integer
          description: Numero massimo di valori selezionabili (solo per tipo `multiple`)
        max_quantity:
          type: integer
          description: Quantità massima per selezione valore (se >1)
        note:
          type: string
          description: Note relative all'opzione
        hidden:
          type: boolean
          description: |-
            Stato di visibilità:
            - `false` = Visibile
            - `true` = Archiviato
        position:
          type: integer
          description: Posizione di visualizzazione (inizia da 1)
        primary:
          type: boolean
          description: |-
            Flag opzione primaria (solo per tipo `single`):
            - `false` = Non primaria
            - `true` = Opzione primaria
        first_default:
          type: boolean
          description: |-
            Comportamento selezione predefinita (solo per tipo `single`):
            - `false` = L'utente deve selezionare
            - `true` = Usa il primo valore come predefinito
        show_caption:
          type: boolean
          description: |-
            Impostazione visualizzazione carrello (solo per tipo `single`):
            - `false` = Nascondi nel carrello
            - `true` = Visualizza nel carrello
        print_caption:
          type: boolean
          description: |-
            Comportamento stampa:
            - `false` = Ometti dalla stampa ordine
            - `true` = Includi nella stampa
        subrestaurant_uids:
          type: array
          items:
            type: string
          nullable: true
          description: >-
            Elenco degli UID dei subrestaurant dove questa opzione è disponibile
            (null = disponibile in tutti i locali)
        ext_id:
          $ref: '#/components/schemas/ExtId'
        option_values:
          type: array
          description: Valori opzione disponibili
          items:
            $ref: '#/components/schemas/MenuOptionValue'
    MenuOptionValue:
      type: object
      description: Valore opzione menu con modificatore di prezzo
      properties:
        uid:
          type: string
          description: Identificatore univoco valore opzione
        name:
          type: string
          description: Nome valore opzione
        short_name:
          type: string
          description: Nome abbreviato valore opzione
        price_operator:
          type: string
          enum:
            - +
            - '-'
            - '*'
            - /
          description: |-
            Operatore modifica prezzo:
            - `+` = Addizione
            - `-` = Sottrazione
            - `*` = Moltiplicazione
            - `/` = Divisione
        price_operand:
          type: number
          description: Valore modifica prezzo
        hidden:
          type: boolean
          description: |-
            Stato di visibilità:
            - `false` = Visibile
            - `true` = Archiviato
        position:
          type: integer
          description: Posizione di visualizzazione (inizia da 1)
        checked_default:
          type: boolean
          description: |-
            Stato di selezione predefinito:
            - `false` = Non preselezionato
            - `true` = Preselezionato di default
        subrestaurant_uids:
          type: array
          items:
            type: string
          nullable: true
          description: >-
            Elenco degli UID dei subrestaurant dove questo valore è disponibile
            (null = disponibile in tutti i locali)
        restrict_to_primary_value_uids:
          type: array
          items:
            type: string
          nullable: true
          description: >-
            UID dei valori dell'opzione principale per cui questo valore è
            disponibile:

            - `null` = Nessuna restrizione (sempre disponibile)

            - `[]` = Restrizione attiva, ma nessun valore principale ammesso
            (mai disponibile)

            - `["uid1", ...]` = Disponibile solo quando è selezionato uno di
            questi valori dell'opzione principale
        ext_id:
          $ref: '#/components/schemas/ExtId'
  responses:
    Unauthorized:
      description: Autenticazione fallita.
      content:
        application/json:
          schema:
            oneOf:
              - type: object
                description: >-
                  Formato errore standard (quando si usa autenticazione API Key
                  o Client ID/Secret)
                required:
                  - success
                  - error
                properties:
                  success:
                    type: boolean
                    enum:
                      - false
                    description: Sempre false per gli errori
                  error:
                    type: string
                    enum:
                      - RESTAURANT_NOT_FOUND
                      - INVALID_KEY
                      - INVALID_AUTH
                    description: Codice errore
                  message:
                    type: string
                    description: Descrizione errore leggibile
              - type: object
                description: >-
                  Formato errore OAuth (quando si usa l'autenticazione Bearer
                  token)
                required:
                  - error
                properties:
                  error:
                    type: string
                    enum:
                      - invalid_token
                      - invalid_request
                    description: Codice errore OAuth (RFC 6749)
                  error_description:
                    type: string
                    description: Descrizione errore leggibile
          examples:
            standard:
              summary: Formato errore standard (API Key / Client ID+Secret)
              value:
                success: false
                error: INVALID_KEY
                message: La chiave API fornita non è valida
            oauth:
              summary: Formato errore OAuth (Bearer token)
              value:
                error: invalid_token
                error_description: Access token non valido o scaduto
    Forbidden:
      description: Autorizzazione fallita - permessi insufficienti o accesso negato.
      content:
        application/json:
          schema:
            oneOf:
              - type: object
                description: >-
                  Formato errore standard (quando si usa autenticazione API Key
                  o Client ID/Secret)
                required:
                  - success
                  - error
                properties:
                  success:
                    type: boolean
                    enum:
                      - false
                    description: Sempre false per gli errori
                  error:
                    type: string
                    enum:
                      - API_DISABLED
                      - INSUFFICIENT_SCOPE
                      - UNAUTHORIZED
                    description: Codice errore
                  message:
                    type: string
                    description: Descrizione errore leggibile
              - type: object
                description: >-
                  Formato errore OAuth (quando si usa l'autenticazione Bearer
                  token)
                required:
                  - error
                properties:
                  error:
                    type: string
                    enum:
                      - insufficient_scope
                      - invalid_request
                    description: Codice errore OAuth (RFC 6749)
                  error_description:
                    type: string
                    description: Descrizione errore leggibile
          examples:
            standard:
              summary: Formato errore standard (API Key / Client ID+Secret)
              value:
                success: false
                error: API_DISABLED
                message: L'accesso API non è abilitato per il ristorante
            oauth:
              summary: Formato errore OAuth (Bearer token)
              value:
                error: insufficient_scope
                error_description: 'Permessi mancanti richiesti: write:orders'
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: X-Api-Key
      description: >-
        Chiave API del ristorante. Può essere ottenuta da Strumenti > Accesso
        API nella dashboard xMenu.
    clientId:
      type: apiKey
      in: header
      name: X-Client-Id
      description: >-
        Client ID per l'autenticazione API Client (deve essere usato insieme al
        Client Secret)
    clientSecret:
      type: apiKey
      in: header
      name: X-Client-Secret
      description: >-
        Client Secret per l'autenticazione API Client (deve essere usato insieme
        al Client ID)
    oauth2:
      type: oauth2
      flows:
        clientCredentials:
          tokenUrl: https://app.xmenu.it/oauth/token
          scopes: {}
      description: >-
        Autenticazione OAuth 2.0 utilizzando il flusso client credentials. Il
        token di accesso deve essere incluso nell'header Authorization come
        Bearer token.

````