swagger: '2.0'
info:
  title: Images API
  version: 1.0.0
host: qa-ows-images.theorchard.io
basePath: /
schemes:
  - https
paths:
  /image:
    post:
      parameters:
        - in: body
          name: body
          required: true
          schema:
            $ref: '#/definitions/CreateImage'
      description: prepare an image for upload
      responses:
        '200':
          description: Success
  '/image/{import_asset_id}/status':
    get:
      parameters:
        - in: path
          name: import_asset_id
          required: true
          type: string
      responses:
        '200':
          examples:
            default:
              import_asset_id: 1234567
              filename: 8322.jpg
              status: error
              path: null
              result: meta_not_found
          description: |
            HTTP 200 OK
            ---------------
            JSON object representing the image asset's status information.
        '404':
          examples:
            default:
              code: not_found_error
              message: image asset not found
          description: |
            HTTP 404 Not Found
            ---------------------
            Image asset not found
      description: get the status for an image asset
  '/image/{upc}/location':
    get:
      parameters:
        - in: path
          name: upc
          required: true
          type: string
      responses:
        '200':
          examples:
            default:
              path: >-
                https://images.qaorch.com/release/large_cover/123456/789/123456789012.jpg
          description: |
            HTTP 200 OK
            ---------------
            JSON object representing the image asset's path
        '404':
          examples:
            default:
              code: not_found_error
              message: Image asset path not found.
          description: |
            HTTP 404 Not Found
            --------------------------
            Image asset path not found
      description: get the url for a product image from the upc
definitions:
  CreateImage:
    properties:
      filename:
        description: Filename of the image that will be uploaded to the `javabulkuploader`
        maxLength: 255
        type: string
      id:
        description: 'ID the represents that image, it should be the filename.'
        maxLength: 255
        type: string
    required:
      - filename
      - id
    type: object
securityDefinitions: {}
