swagger: '2.0'

info:
  version: 1.0.0
  title: API Specifications

schemes:
  - https
host: qa-ows-delivery-history.theorchard.io
basePath: /
paths:
  /hello/:
    get:
      responses:
        '200':
          description: |
            200 OK
      description: |
        Check the health of the application.
  /masters:
    post:
      parameters:
        - in: header
          name: Content-Type
          pattern: ^application/json$
          required: true
          type: string
        - description: UUID
          in: header
          name: Correlation-Id
          required: true
          type: string
        - in: body
          name: body
          required: true
      responses:
        '200':
          description: |
            200 OK
        '400':
          description: |
            Request parameter/header validation failure
        '500':
          description: |
            500 Server error
      description: |
        Save delivery history records.
  '/masters/{partner_id}':
    get:
      parameters:
        - in: path
          name: partner_id
          required: true
          type: string
        - description: comma-separated list of ISRCs
          in: query
          name: isrcs
          type: string
        - description: UUID
          in: header
          name: Correlation-Id
          required: true
          type: string
      responses:
        '200':
          description: >
            HTTP 200 OK

            -----------

            If the project and product ids are valid: JSON object representing
            the product.
        '400':
          description: |
            Request parameter/header validation failure.
        '500':
          description: |
            500 Server error
      description: |
        Get delivery history for given partner and ISRCs
  '/delivered_stores_count':
    get:
      parameters:
        - description: comma-separated list of UPCs
          in: query
          name: upcs
          type: string
        - description: UUID
          in: header
          name: Correlation-Id
          required: true
          type: string
      responses:
        200:
          description: |
            A list of delivered stores count
          schema:
            type: object
            properties:
              'items':
                type: array
                items:
                  type: object
                  properties:
                    product_id:
                      type: number
                    display_upc:
                      type: string
                    stores_count:
                      type: number
        '400':
          description: |
            Request parameter/header validation failure.
        '500':
          description: |
            500 Server error
      description: |
        Get delivered stores count for given list of UPCs
definitions: {}
securityDefinitions: {}

