components:
  schemas:
    GenericMenuItem:
      type: object
      properties:
        type:
          type: string
          enum:
            - menu
            - dish
            - category
            - option_select
            - option_select_group
            - option_multi_select
            - option_multi_select_group
            - option_counter
            - option_counter_group
            - fee
          description: Menu item type
        name:
          type: array
          description: Menu item name
          example: |
            ```
            [
              {locale: "en-US", value: "Pancakes"}, 
              {locale: "es-ES", value: "Panqueques"}
            ]
            ```
          items:
            $ref: "#/components/schemas/GenericLocalisedField"
        description:
          type: array
          description: Menu item description
          items:
            $ref: "#/components/schemas/GenericLocalisedField"
        children_ids:
          type: array
          description: >-
            Contains the list of child menu item id (e.g. dishes can have option
            groups under them).
          items:
            type: string
        price:
          type: number
          description: >-
            Required for dishes, options and fees. Currency will be specified by Bolt
            Food. Prices will be rounded down to 2 decimal in case they will be
            sent with more than 2 decimals.
        images:
          type: array
          description: >-
            For dishes, you can add images that will be displayed in the client
            app on the menu. Size: the minimum recommended height and width of
            the image is 1200px, up to 10mb.
          items:
            $ref: "#/components/schemas/GenericMenuItemImageInfo"
        timetables:
          type: array
          items:
            $ref: "#/components/schemas/GenericMenuItemTimetable"
        tags:
          type: array
          description: >-
            Optional for dishes or options. The usage of some tags may result in
            side effects regarding the structure of an order, as documented in
            [Menu Integration
            guide](/delivery/main/#tag/Doc-Menu-integration).<br><br>

            The following tags are *deprecated*, please
            use [fees](/delivery/main/#tag/Doc-Menu-integration/Fees) instead:
            `bottle_deposit`, `sup_cup`, `sup_container`.<br><br>

            The `age_restriction_alcohol_pl` is only valid in Poland.
          items:
            type: string
            enum:
              - spicy
              - spicy1
              - spicy2
              - spicy3
              - vegan
              - vegetarian
              - kosher
              - halal
              - gluten_free
              - lactose_free
              - children
              - alco
              - special_offer
              - no_discounts
              - bottle_deposit
              - double_deals
              - donation
              - packaging_fee
              - sup_cup
              - sup_container
              - special_offer_5
              - special_offer_10
              - special_offer_15
              - special_offer_20
              - special_offer_25
              - special_offer_30
              - special_offer_35
              - special_offer_40
              - special_offer_45
              - special_offer_50
              - age_restriction_alcohol_pl
              - bulky
              - combo_special_item
              - energy
              - medical
              - tobacco
              - adult
              - no_targeted_discount
            example: '["vegetarian", "spicy2"]'
        tag_multipliers:
          type: array
          description: >-
            This property is now *deprecated*, please use [fees](/delivery/main/#tag/Doc-Menu-integration/Fees)
            instead. Array used in order to denote how many tag instances are attached to a single item.
            Applies only on SUP directive business tags.
          items:
            $ref: "#/components/schemas/TagMultiplier"
        sku:
          type:
            - string
            - "null"
          description: |
            The SKU (stock keeping unit) must be specified for all options,
            dishes and fees. Needed for integrator to identify the items when order is
            sent.
        constraints:
          $ref: "#/components/schemas/GenericMenuItemConstraint"
        fees:
          type: array
          description: >-
            Array used to define any fees applicable on the current item when being ordered.
            Prices of the attached fee items are shown separately in the Bolt Food application
            within the product page, and are added on top of the price of the item when computing the total
            price of the basket.
          items:
            $ref: "#/components/schemas/GenericMenuItemFee"
        fee_info:
          type: object
          properties:
            fee_type:
              type: string
              enum:
                - deposit
                - sup_cup
                - sup_container
          description: >-
            Additional information specific to menu items with type "fee"
      required:
        - type
        - name
      x-examples:
        example-1:
          type: object
          required:
            - type
            - name
          properties:
            type:
              type: string
              enum:
                - menu
                - dish
                - category
                - option_select
                - option_select_group
                - option_multi_select
                - option_multi_select_group
                - option_counter
                - option_counter_group
                - fee
              description: Menu item type
            name:
              type: array
              description: >-
                Menu item name. e.g. [{locale: "en-US", value: "Pancakes"},
                {locale: "es-ES", value: "Panqueques"}]
              items:
                type: object
                properties:
                  locale:
                    type: string
                    description: >-
                      Available locales depends on country. List will be given
                      by Bolt Food
                  value:
                    type: string
                required:
                  - locale
                  - value
            description:
              type: array
              description: Menu item description
              items:
                type: object
                properties:
                  locale:
                    type: string
                  value:
                    type: string
                required:
                  - locale
                  - value
            children_ids:
              type: array
              description: >-
                Contains the list of child menu item id (e.g. dishes can have
                option groups under them).
              items:
                type: string
            price:
              type: number
              description: >-
                Required for dishes, options and fees. Currency will be specified by
                Bolt Food. Prices will be rounded down to 2 decimal in case they
                will be sent with more than 2 decimals.
            images:
              type: array
              description: >-
                For dishes, you can add images that will be displayed in the
                client app on the menu. Size: the minimum recommended height and
                width of the image is 1200px, up to 10mb.
              items:
                type: object
                properties:
                  source_url:
                    type: string
                required:
                  - source_url
            timetables:
              type: array
              description: >-
                Optional for dishes which require to be visible for certain
                times (e.g. lunch offers).
              items:
                type: object
                properties:
                  from_seconds_from_midnight:
                    type: number
                  to_seconds_from_midnight:
                    type: number
                  weekdays:
                    type: array
                    description: 0 is Sunday
                    items:
                      type: number
                required:
                  - from_seconds_from_midnight
                  - to_seconds_from_midnight
                  - weekdays
            tags:
              type: array
              description: >-
                Optional for dishes or options. The usage of some tags may
                result in side effects regarding the structure of an order,
                Optional for dishes or options. The usage of some tags may
                result in side effects regarding the structure of an order, as
                documented in [Menu Integration
                guide](/delivery/main/#tag/Doc-Menu-integration).
              items:
                type: object
                properties:
                  "":
                    type: string
                    enum:
                      - spicy
                      - spicy1
                      - spicy2
                      - spicy3
                      - vegan
                      - vegetarian
                      - kosher
                      - halal
                      - gluten_free
                      - lactose_free
                      - children
                      - alco
                      - special_offer
                      - no_discounts
                      - bottle_deposit
                      - double_deals
                      - donation
                      - packaging_fee
                      - sup_cup
                      - sup_container
                      - special_offer_5
                      - special_offer_10
                      - special_offer_15
                      - special_offer_20
                      - special_offer_25
                      - special_offer_30
                      - special_offer_35
                      - special_offer_40
                      - special_offer_45
                      - special_offer_50
                      - age_restriction_alcohol_pl
                      - bulky
                      - combo_special_item
                      - energy
                      - medical
                      - tobacco
                      - adult
                      - no_targeted_discount
                    example: '["vegetarian", "spicy"]'
                required:
                  - ""
            sku:
              type: string
              description: >-
                The SKU (stock keeping unit) must be specified for all options,
                dishes and fees. Needed for integrator to identify the items when
                order is sent.
            constraints:
              type: object
              description: >-
                For option groups (OPTION_SELECT_GROUP,
                OPTION_MULTI_SELECT_GROUP, OPTION_COUNTER_GROUP) you will need
                to specify a number of minimum and maximum orders that can be
                selected from that group. For OPTION_COUNTER_GROUP it is
                required to specify how many times a given option can be added
                (max counter).Type of options that are part of an option group
                must match the type of the option group e.g. options that are
                children of an OPTION_SELECT_GROUP must have the type
                OPTION_SELECT
              properties:
                option_group_constraint:
                  type: object
                  required:
                    - min
                    - max
                    - each_max
                  properties:
                    min:
                      type: number
                    max:
                      type: number
                    each_max:
                      type: number
              required:
                - option_group_constraint
    GenericLocalisedField:
      type: object
      title: GenericLocalisedField
      properties:
        locale:
          type: string
          description: >-
            Available locales depends on country. List will be given by Bolt
            Food
        value:
          type: string
      required:
        - locale
        - value
      x-examples:
        example-1:
          locale: en-US
          value: Pancakes
    GenericMenuItemImageInfo:
      type: object
      title: GenericMenuItemImageInfo
      description: >-
        For dishes, you can add images that will be displayed in the client app
        on the menu. Size: the minimum recommended height and width of the image
        is 1200px, up to 10mb. [More detailed guide on
        photos.](https://food.bolt.eu/static/en-us-8da0138573fce6575f4e3bd02d10dfa3.pdf)
      properties:
        source_url:
          type: string
      required:
        - source_url
    GenericMenuItemTimetable:
      type: object
      title: GenericMenuItemTimetable
      description: >-
        Optional for dishes which require to be visible for certain times (e.g.
        lunch offers).
      properties:
        from_seconds_from_midnight:
          type: number
        to_seconds_from_midnight:
          type: number
        weekdays:
          type: array
          description: 0 is Sunday
          items:
            type: number
      required:
        - from_seconds_from_midnight
        - to_seconds_from_midnight
        - weekdays
    GenericMenuItemConstraint:
      type: object
      title: GenericMenuItemConstraint
      description: >-
        For option groups (OPTION_SELECT_GROUP, OPTION_MULTI_SELECT_GROUP,
        OPTION_COUNTER_GROUP) you will need to specify a number of minimum and
        maximum orders that can be selected from that group. For
        OPTION_SELECT_GROUP min must be 1 and max also 1. For
        OPTION_COUNTER_GROUP it is required to specify how many times a given
        option can be added (max counter).Type of options that are part of an
        option group must match the type of the option group e.g. options that
        are children of an OPTION_SELECT_GROUP must have the type OPTION_SELECT
      properties:
        option_group_constraint:
          type: object
          properties:
            min:
              type: number
            max:
              type: number
            each_max:
              type: number
    TagMultiplier:
      type: object
      title: TagMultiplier
      properties:
        tag:
          type: string
          description: >-
            Tag key for which the multiplier is set. Can only be one of the SUP
            Directive related business tags, i.e. `sup_cup` or `sup_container`
        multiplier:
          type: number
          description: Value of the multiplier. Must be an integer greater than 0
      x-examples:
        example-1:
          tag: sup_cup
          multiplier: 2
    GenericMenuItemFee:
      type: object
      title: GenericMenuItemFee
      description: >-
        Specify fees, such as bottle deposits or SUP directive fees, that may be apply to some dish or option items.
      properties:
        fee_id:
          type: string
          description: >-
            The id (key) of the menu item of type "fee" that is applied on the current item.
        multiplier:
          type: number
          description: >-
            Optional, must be greater than 0 and describes how many times the fee will be applied on the item.
            Should be used for items such as six-packs, which contain multiple items on which fees are applied.
      x-examples:
        example-1:
          fee_id: bottle_deposit
          multiplier: 6
