openapi: 3.0.0
info:
  title: Quote Management
  version: 1.0.0
servers:
  - url: http://{{backend_url}}
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
tags:
  - name: Admin
  - name: Admin > Auth
  - name: Store
  - name: Store > Auth
  - name: Store > Cart
paths:
  /auth/user/emailpass:
    post:
      tags:
        - Admin > Auth
      summary: Login
      requestBody:
        content:
          application/json:
            schema:
              type: object
              example:
                email: admin@medusajs.com
                password: supersecret
      responses:
        '200':
          description: Successful response
          content:
            application/json: {}
  /admin/quotes:
    get:
      tags:
        - Admin
      summary: List Quotes
      security:
        - bearerAuth: []
      responses:
        '200':
          description: Successful response
          content:
            application/json: {}
  /admin/quotes/01JNDVFQ2XW2KKQKDMW6GEVPY4:
    get:
      tags:
        - Admin
      summary: Get Quote
      security:
        - bearerAuth: []
      responses:
        '200':
          description: Successful response
          content:
            application/json: {}
  /admin/quotes/01JNDVFQ2XW2KKQKDMW6GEVPY4/reject:
    post:
      tags:
        - Admin
      summary: Reject Quote
      requestBody:
        content: {}
      security:
        - bearerAuth: []
      responses:
        '200':
          description: Successful response
          content:
            application/json: {}
  /admin/quotes/01JNE48YXWB806FP433JYHY97C/send:
    post:
      tags:
        - Admin
      summary: Send Quote
      requestBody:
        content: {}
      security:
        - bearerAuth: []
      responses:
        '200':
          description: Successful response
          content:
            application/json: {}
  /auth/customer/emailpass:
    post:
      tags:
        - Store > Auth
      summary: Get JWT / Login
      requestBody:
        content:
          application/json:
            schema:
              type: object
              example:
                email: customer@gmail.com
                password: supersecret
      responses:
        '200':
          description: Successful response
          content:
            application/json: {}
  /store/customers:
    post:
      tags:
        - Store > Auth
      summary: Register Customer
      requestBody:
        content:
          application/json:
            schema:
              type: object
              example:
                email: customer@gmail.com
                first_name: Customer
                last_name: Example
      security:
        - bearerAuth: []
      responses:
        '200':
          description: Successful response
          content:
            application/json: {}
  /auth/customer/emailpass/register:
    post:
      tags:
        - Store > Auth
      summary: Get Register Token
      requestBody:
        content:
          application/json:
            schema:
              type: object
              example:
                email: customer@gmail.com
                password: supersecret
      responses:
        '200':
          description: Successful response
          content:
            application/json: {}
  /store/carts:
    post:
      tags:
        - Store > Cart
      summary: Create Cart
      requestBody:
        content:
          application/json:
            schema:
              type: object
              example:
                region_id: reg_01JNDE54NVVE51NKWKSPA1VQGY
      security:
        - bearerAuth: []
      parameters:
        - name: x-publishable-api-key
          in: header
          schema:
            type: string
          example: '{{MEDUSA_PUBLISHABLE_API_KEY}}'
      responses:
        '200':
          description: Successful response
          content:
            application/json: {}
  /store/carts/cart_01JNJWMY3SYEY76NX5S2048Q0N/line-items:
    post:
      tags:
        - Store > Cart
      summary: Add Item to Cart
      requestBody:
        content:
          application/json:
            schema:
              type: object
              example:
                variant_id: variant_01JNDE54TY330ZVSC7P6PNW4Y7
                quantity: 1
      security:
        - bearerAuth: []
      parameters:
        - name: x-publishable-api-key
          in: header
          schema:
            type: string
          example: '{{MEDUSA_PUBLISHABLE_API_KEY}}'
      responses:
        '200':
          description: Successful response
          content:
            application/json: {}
  /store/customers/me/quotes:
    post:
      tags:
        - Store
      summary: Create Quote
      requestBody:
        content:
          application/json:
            schema:
              type: object
              example:
                cart_id: cart_01JNJWMY3SYEY76NX5S2048Q0N
      security:
        - bearerAuth: []
      parameters:
        - name: x-publishable-api-key
          in: header
          schema:
            type: string
          example: '{{MEDUSA_PUBLISHABLE_API_KEY}}'
      responses:
        '200':
          description: Successful response
          content:
            application/json: {}
  /store/customers/me/quotes/01JNDVFQ2XW2KKQKDMW6GEVPY4/preview:
    get:
      tags:
        - Store
      summary: Preview Order
      security:
        - bearerAuth: []
      parameters:
        - name: x-publishable-api-key
          in: header
          schema:
            type: string
          example: '{{MEDUSA_PUBLISHABLE_API_KEY}}'
      responses:
        '200':
          description: Successful response
          content:
            application/json: {}
  /store/customers/me/quotes/01JNE44YRMS0AQB8SYT0N6F6F3/reject:
    post:
      tags:
        - Store
      summary: Reject Quote
      requestBody:
        content: {}
      security:
        - bearerAuth: []
      parameters:
        - name: x-publishable-api-key
          in: header
          schema:
            type: string
          example: '{{MEDUSA_PUBLISHABLE_API_KEY}}'
      responses:
        '200':
          description: Successful response
          content:
            application/json: {}
  /store/customers/me/quotes/01JNJN5K05QXXWD818T1HD2P5Y/accept:
    post:
      tags:
        - Store
      summary: Accept Quote
      requestBody:
        content: {}
      security:
        - bearerAuth: []
      parameters:
        - name: x-publishable-api-key
          in: header
          schema:
            type: string
          example: '{{MEDUSA_PUBLISHABLE_API_KEY}}'
      responses:
        '200':
          description: Successful response
          content:
            application/json: {}
