openapi: 3.0.0
info:
  title: Bundled Products
  version: 1.0.0
servers:
  - url: http://{{medusa_backend_url}}
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
tags:
  - name: Admin
  - name: Admin > Auth
  - name: Store
paths:
  /auth/user/emailpass:
    post:
      tags:
        - Admin > Auth
      summary: Login
      requestBody:
        content:
          application/json:
            schema:
              type: object
              example:
                email: admin@gmail.com
                password: supersecret
      responses:
        '200':
          description: Successful response
          content:
            application/json: {}
  /admin/bundled-products:
    get:
      tags:
        - Admin
      summary: List Bundled Products
      security:
        - bearerAuth: []
      responses:
        '200':
          description: Successful response
          content:
            application/json: {}
    post:
      tags:
        - Admin
      summary: Create Bundled Product
      requestBody:
        content:
          application/json:
            schema:
              type: object
              example:
                title: Camera Bundle
                product:
                  title: Camera Bundle
                  options:
                    - title: Default
                      values:
                        - default
                  status: published
                  variants:
                    - title: Camera Bundle
                      prices:
                        - currency_code: eur
                          amount: 10
                      options:
                        Default: default
                      manage_inventory: false
                items:
                  - variant_id: variant_01JSXZ8V4X84HMQR3RCAQM33AE
                    quantity: 1
                  - variant_id: variant_01JSXZACJK3BC5W9XPVV8NW3FD
                    quantity: 1
      security:
        - bearerAuth: []
      responses:
        '200':
          description: Successful response
          content:
            application/json: {}
  /store/carts/{id}/line-item-bundles:
    post:
      tags:
        - Store
      summary: Add Bundle to Cart
      requestBody:
        content: {}
      parameters:
        - name: x-publishable-api-key
          in: header
          schema:
            type: string
          example: '{{MEDUSA_PUBLISHABLE_API_KEY}}'
        - name: id
          in: path
          schema:
            type: string
          required: true
      responses:
        '200':
          description: Successful response
          content:
            application/json: {}
  /store/bundle-products/{id}:
    get:
      tags:
        - Store
      summary: Get Bundle
      parameters:
        - name: x-publishable-api-key
          in: header
          schema:
            type: string
          example: '{{MEDUSA_PUBLISHABLE_API_KEY}}'
        - name: id
          in: path
          schema:
            type: string
          required: true
          example: 01JSXZE0REYNYW0C15ZEWK9SF9
      responses:
        '200':
          description: Successful response
          content:
            application/json: {}
