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

# Swap, skip or restore a day's lunch

> Writes the day's next choice: a seed dish by its exact name, `skip` (Já temos comida nesse dia) or `proposed` (back to the seed's dish). It supersedes the day's current choice, which `supersedes` must name (`null` only while the day has none); nothing is edited or deleted. An undo is the previous choice, superseding the one undone. `operationId` makes a retry safe.



## OpenAPI

````yaml /openapi.json patch /v1/shopping/menu/days/{date}
openapi: 3.0.0
info:
  title: onosso
  version: 0.0.0
  description: >-
    The household's API: the week, the people and the sessions the web app reads
    and changes.
servers: []
security: []
tags:
  - name: Week
    description: The household's week, day by day.
  - name: People
    description: The people who make up the household.
  - name: Pets
    description: The pets of the house.
  - name: Invites
    description: Links that let someone join.
  - name: Sessions
    description: Where you are signed in.
  - name: Tokens
    description: Your personal API tokens.
  - name: Address
    description: Where the household lives.
  - name: Messages
    description: What each person receives from the product, and when.
  - name: Questions
    description: 'What needs a person: one queue, the same in the app and on WhatsApp.'
  - name: Shopping
    description: 'The household''s one list: places, items and marks.'
  - name: Conversation
    description: >-
      Each person's one conversation with the assistant, the same in the app and
      on WhatsApp.
  - name: MCP
    description: The house for an MCP client such as Claude Desktop, with a personal token.
paths:
  /v1/shopping/menu/days/{date}:
    patch:
      tags:
        - Shopping
      summary: Swap, skip or restore a day's lunch
      description: >-
        Writes the day's next choice: a seed dish by its exact name, `skip` (Já
        temos comida nesse dia) or `proposed` (back to the seed's dish). It
        supersedes the day's current choice, which `supersedes` must name
        (`null` only while the day has none); nothing is edited or deleted. An
        undo is the previous choice, superseding the one undone. `operationId`
        makes a retry safe.
      parameters:
        - schema:
            type: string
            maxLength: 10
          required: true
          name: date
          in: path
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                choice:
                  oneOf:
                    - type: object
                      properties:
                        kind:
                          type: string
                          enum:
                            - dish
                        dish:
                          type: string
                          maxLength: 480
                      required:
                        - kind
                        - dish
                    - type: object
                      properties:
                        kind:
                          type: string
                          enum:
                            - skip
                      required:
                        - kind
                    - type: object
                      properties:
                        kind:
                          type: string
                          enum:
                            - proposed
                      required:
                        - kind
                supersedes:
                  type: string
                  nullable: true
                  maxLength: 64
                operationId:
                  type: string
                  format: uuid
                at:
                  type: string
                  format: date-time
              required:
                - choice
                - supersedes
                - operationId
                - at
      responses:
        '200':
          description: The day's new choice.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MenuChoice'
        '401':
          $ref: '#/components/responses/ShoppingUnauthorized'
        '403':
          $ref: '#/components/responses/ShoppingForbidden'
        '409':
          description: >-
            `supersedes` is not the day's current choice (or `null` while it has
            one).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DomainError'
        '422':
          $ref: '#/components/responses/ShoppingInvalid'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
        '504':
          $ref: '#/components/responses/RequestTimeout'
      security:
        - session: []
components:
  schemas:
    MenuChoice:
      type: object
      properties:
        id:
          type: string
        date:
          type: string
        choice:
          oneOf:
            - type: object
              properties:
                kind:
                  type: string
                  enum:
                    - dish
                dish:
                  type: string
                  maxLength: 480
              required:
                - kind
                - dish
            - type: object
              properties:
                kind:
                  type: string
                  enum:
                    - skip
              required:
                - kind
            - type: object
              properties:
                kind:
                  type: string
                  enum:
                    - proposed
              required:
                - kind
        confidence:
          type: string
          enum:
            - confirmed
            - assumed
        appliedAt:
          type: string
          format: date-time
      required:
        - id
        - date
        - choice
        - confidence
        - appliedAt
    DomainError:
      type: object
      properties:
        code:
          type: string
        details:
          type: object
          additionalProperties:
            nullable: true
      required:
        - code
        - details
    Unauthorized:
      type: object
      properties:
        message:
          type: string
          enum:
            - Unauthorized
        statusCode:
          type: number
          enum:
            - 401
      required:
        - message
        - statusCode
    Forbidden:
      type: object
      properties:
        message:
          type: string
          enum:
            - Forbidden
        statusCode:
          type: number
          enum:
            - 403
      required:
        - message
        - statusCode
    Degraded:
      type: object
      properties:
        code:
          type: string
          enum:
            - request.timeout
            - service.unavailable
        correlationId:
          type: string
      required:
        - code
        - correlationId
  responses:
    ShoppingUnauthorized:
      description: The session is missing or invalid.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Unauthorized'
    ShoppingForbidden:
      description: The request origin is not allowed.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Forbidden'
    ShoppingInvalid:
      description: The body is not valid.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/DomainError'
    ServiceUnavailable:
      description: A dependency is unavailable; retry after Retry-After seconds.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Degraded'
    RequestTimeout:
      description: The request outlived its deadline.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Degraded'
  securitySchemes:
    session:
      type: apiKey
      in: cookie
      name: __Secure-better-auth.session_token
      description: The session cookie set when you sign in to the web app.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.