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

# Marcar opción de modificador como agotada



## OpenAPI

````yaml post /ecommerce/stores/{storeId}/modifier-options/{modifierOptionId}/out-of-stock
openapi: 3.1.0
info:
  title: Justo API
  version: 3.0.0
servers:
  - url: https://api.service.getjusto.com/v3
    description: Production server
security: []
paths:
  /ecommerce/stores/{storeId}/modifier-options/{modifierOptionId}/out-of-stock:
    post:
      summary: Set modifier option out of stock
      parameters:
        - in: path
          name: storeId
          required: true
          schema:
            type: string
          description: ID Justo o ID externo del local.
        - in: path
          name: modifierOptionId
          required: true
          schema:
            type: string
          description: ID Justo o ID externo de la opción de modificador.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - outOfStock
              properties:
                outOfStock:
                  type: boolean
                  description: >-
                    Si es verdadero, marca la opción como agotada. Si es falso,
                    la vuelve a dejar disponible.
                until:
                  type: string
                  enum:
                    - none
                    - tomorrow
                  description: >-
                    Duración predefinida del bloqueo. none (por defecto) no
                    tiene término, salvo que envíes untilDate. tomorrow lo
                    mantiene hasta las 6:00 del día siguiente, hora del local, y
                    reemplaza untilDate.
                untilDate:
                  type: string
                  format: date-time
                  description: Fecha hasta la que la opción permanecerá agotada.
                stock:
                  type: number
                  description: >-
                    Stock disponible. Cuando se consume en pedidos, la opción
                    queda agotada al llegar a 0.
      responses:
        '200':
          description: The OpenAPI spec
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  data:
                    $ref: '#/components/schemas/apiModifierOptionOutOfStock'
        '400':
          description: Errors
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: 'false'
                  error:
                    type: object
                    properties:
                      error:
                        type: string
                        example: error
                      message:
                        type: string
                        example: The request has an error
components:
  schemas:
    apiModifierOptionOutOfStock:
      type: object
      description: Estado de disponibilidad de una opción de modificador en un local.
      properties:
        storeId:
          type: string
          description: ID Justo del local.
        modifierOptionId:
          type: string
          description: ID Justo de la opción de modificador.
        modifierOptionExternalId:
          type: string
          description: ID externo de la opción configurado por la marca.
        outOfStock:
          type: boolean
          description: Indica si la opción quedó marcada como agotada en el local.
        outOfStockItemId:
          type: string
          description: ID del registro de agotado creado por Justo.
        until:
          type: string
          enum:
            - none
            - tomorrow
          description: Duración predefinida del bloqueo de stock.
        untilDate:
          type: string
          format: date-time
          description: Fecha hasta la que la opción permanecerá agotada.
        stock:
          type: number
          description: Stock disponible configurado para la opción.

````

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