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

> ## Agent Instructions
> Documentazione di Gestione Sala. Il testo completo, incluso il riferimento API, è in https://docs.gestionesala.com/llms-full.txt. Per endpoint, campi e codici di errore la fonte di verità è openapi.yaml: non usare endpoint o campi non documentati.

# Aggiorna una voce della lista d'attesa

> Scope: `waitlist:write`. Modifica coperti o fascia oraria. Una voce già richiamata torna in attesa. Una voce convertita o rimossa risponde 409.



## OpenAPI

````yaml /openapi.yaml patch /waitlist/{id}
openapi: 3.1.0
info:
  title: Gestione Sala API
  version: 1.0.0
  description: >-
    Autenticazione: Authorization: Bearer <chiave>. Errori:
    {error:{code,message,details,requestId}}, anche per un percorso che non
    esiste (404 not_found); un metodo che il percorso non ha è un 405 della
    piattaforma, senza corpo. Risorsa singola: {nomeRisorsa: {...}}; lista
    d'attesa: entry. Elenchi: {data,nextCursor}, limit fino a 200. Intervalli di
    giorni: from/to. serviceDate YYYY-MM-DD e time HH:mm nell'ora del locale;
    startsAt/endsAt/updatedAt ISO 8601 UTC; timezone IANA. Un id di percorso
    storto è 404. Ogni risposta porta X-Request-Id; quelle con una chiave
    riconosciuta anche X-RateLimit-Limit/Remaining/Reset (per la chiave pubblica
    del widget, il tetto del tuo indirizzo IP); il 429 anche Retry-After.
    Idempotency-Key: legata a chiave API, operazione e corpo; riusata con un
    altro corpo è 422 idempotency_key_reused, ancora in corso 409
    idempotency_in_progress. Chiavi di prova (gsk_test_, organizzazione di
    prova): ogni risposta JSON porta livemode:false, nessun webhook, messaggio o
    sincronizzazione SQUADD parte. Chiave pubblica del widget (gspk_): solo GET
    /availability, /availability/slots, /availability/days e POST /reservations,
    dai siti ammessi (CORS, header Origin), con un limite per indirizzo IP;
    senza serviceTags né externalRef, e la prenotazione creata torna senza i
    dati dell'ospite. Altrove: 403 forbidden, details.reason publishable_key o
    origin_not_allowed.
servers:
  - url: https://app.gestionesala.com/api/v1
security: []
tags:
  - name: Meta
    description: Identità della chiave, stato del servizio e specifica OpenAPI
  - name: Locali
    description: Locali accessibili alla chiave e relativo `venueId`
  - name: Configurazione del locale
    description: Turni, chiusure, sale, tavoli, piante, regole e stato della sala
  - name: Disponibilità
    description: Disponibilità per orario, per giorno e su un intervallo di giorni
  - name: Prenotazioni
    description: Lettura, creazione, modifica e annullamento delle prenotazioni
  - name: Lista d'attesa
    description: Voci in attesa di un posto, richiamo e conversione in prenotazione
  - name: Ospiti
    description: Rubrica degli ospiti, ricerca per telefono e tag di servizio
  - name: Eventi e report
    description: Storico degli eventi, consuntivi ed export delle prenotazioni
  - name: Webhook
    description: >-
      Consegne, reinvio, evento di prova e rotazione del segreto di firma.
      Firma: X-Gestionesala-Signature = v1=HMAC-SHA256(segreto,
      "v1\n<timestamp>\n<idempotency-key>\n<corpo>"), con
      X-Gestionesala-Timestamp e X-Gestionesala-Idempotency-Key; in una
      rotazione due firme separate da virgola.
  - name: Import
    description: Import di ospiti e prenotazioni da un altro gestionale
paths:
  /waitlist/{id}:
    patch:
      tags:
        - Lista d'attesa
      summary: Aggiorna una voce della lista d'attesa
      description: >-
        Scope: `waitlist:write`. Modifica coperti o fascia oraria. Una voce già
        richiamata torna in attesa. Una voce convertita o rimossa risponde 409.
      operationId: updateWaitlistEntry
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: If-Match
          in: header
          required: false
          description: 'L''updatedAt letto: la modifica passa solo se nessuno ha scritto dopo'
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                partySize:
                  type: integer
                  minimum: 1
                earliestTime:
                  type: string
                  description: Ora locale del locale, HH:mm
                  pattern: ^([01]\d|2[0-3]):[0-5]\d$
                latestTime:
                  type: string
                  description: Ora locale del locale, HH:mm
                  pattern: ^([01]\d|2[0-3]):[0-5]\d$
                version:
                  type: string
                  description: 'In alternativa a If-Match: l''updatedAt letto'
                  format: date-time
              required: []
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  entry:
                    $ref: '#/components/schemas/WaitlistEntry'
                required:
                  - entry
        '400':
          description: invalid_request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: unauthenticated, api_key_invalid, api_key_revoked
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: forbidden, insufficient_scope
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: not_found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: rate_limited
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - apiKey: []
components:
  schemas:
    WaitlistEntry:
      type: object
      properties:
        id:
          type: string
          format: uuid
        venueId:
          type: string
          format: uuid
        serviceDate:
          type: string
          description: Giorno di servizio, YYYY-MM-DD
          format: date
        partySize:
          type: integer
        earliestTime:
          type: string
          description: Ora locale del locale, HH:mm
          pattern: ^([01]\d|2[0-3]):[0-5]\d$
        latestTime:
          type: string
          description: Ora locale del locale, HH:mm
          pattern: ^([01]\d|2[0-3]):[0-5]\d$
        status:
          type: string
          enum:
            - waiting
            - called
            - converted
            - cancelled
        guestId:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
        reservationId:
          anyOf:
            - type: string
              description: La prenotazione nata dalla conversione
              format: uuid
            - type: 'null'
        createdAt:
          type: string
          description: Istante ISO 8601 con fuso
          format: date-time
        updatedAt:
          type: string
          description: Anche la versione, per If-Match
          format: date-time
        guest:
          anyOf:
            - type: object
              properties:
                name:
                  anyOf:
                    - type: string
                    - type: 'null'
                phone:
                  type: string
              required:
                - name
                - phone
            - type: 'null'
      required:
        - id
        - venueId
        - serviceDate
        - partySize
        - earliestTime
        - latestTime
        - status
        - guestId
        - reservationId
        - createdAt
        - updatedAt
        - guest
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              description: Il codice su cui ramificare
            message:
              type: string
              description: Per chi legge i log
            details:
              type: object
              description: >-
                Cosa serve per correggere o riprovare: fields (i campi storti),
                requiredScope, reason; per no_availability anche alternatives,
                gli orari vicini nella forma di GET /availability
              properties:
                fields:
                  type: array
                  items:
                    type: string
                requiredScope:
                  type: string
                reason:
                  type: string
                alternatives:
                  type: array
                  items:
                    $ref: '#/components/schemas/Proposal'
            requestId:
              type: string
              description: Lo stesso valore dell'header X-Request-Id
          required:
            - code
            - message
            - details
      required:
        - error
    Proposal:
      type: object
      properties:
        time:
          type: string
          description: Ora locale del locale, HH:mm
          pattern: ^([01]\d|2[0-3]):[0-5]\d$
        startsAt:
          type: string
          description: Istante ISO 8601 con fuso
          format: date-time
        endsAt:
          type: string
          description: Istante ISO 8601 con fuso
          format: date-time
        turnTimeMinutes:
          type: integer
        seats:
          type: integer
        overflowsShift:
          type: boolean
      required:
        - time
        - startsAt
        - endsAt
        - turnTimeMinutes
        - seats
        - overflowsShift
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer
      bearerFormat: gsk_... | gsk_test_... | gspk_...

````