swagger: '2.0'
info:
  description: Get all data needed for releases.theorchard.com
  version: '2.1.0'
  title: New Release Data
host: new-release-data.theorchard.io
basePath: /
schemes:
  - https
produces:
  - application/json
definitions:
  Artist:
    type: object
    additionalProperties: false
    required:
      - artist_id
      - name
      - bio
      - website_url
      - facebook_url
      - twitter_url
      - youtube_channel_url
      - instagram_url
      - soundcloud_url
      - bandsintown_url
      - for_fans_of
      - home_market
    properties:
      artist_id:
        type: integer
      name:
        type: string
      bio:
        type: string
        x-nullable: true
      website_url:
        type: string
        x-nullable: true
      facebook_url:
        type: string
        x-nullable: true
      twitter_url:
        type: string
        x-nullable: true
      youtube_channel_url:
        type: string
        x-nullable: true
      instagram_url:
        type: string
        x-nullable: true
      soundcloud_url:
        type: string
        x-nullable: true
      bandsintown_url:
        type: string
        x-nullable: true
      for_fans_of:
        type: array
        x-nullable: true
        items:
          type: string
      home_market:
        type: string
        x-nullable: true
  Product:
    type: object
    additionalProperties: false
    required:
      - product_id
      - product_code
      - version
      - sales_dt
      - order_due_dt
      - release_dt
      - price_code
      - upc
      - box_lot
      - returnable
      - config
      - config_group
      - highlights
      - marketing_highlights
      - artist
      - title
      - cover_art_img_url
      - cover_art_img_url_2000
      - genre
      - subgenre
      - tracks
      - country_of_origin
    properties:
      product_id:
        type: integer
      product_code:
        type: string
      version:
        type: string
        x-nullable: true
      sales_dt:
        type: string
        format: date
      order_due_dt:
        type: string
        format: date
      release_dt:
        type: string
        format: date
      price_code:
        type: string
        x-nullable: true
      upc:
        type: string
      box_lot:
        type: integer
        x-nullable: true
      returnable:
        type: boolean
      config:
        type: string
      config_group:
        type: string
        enum:
          - Blu-Ray
          - Book
          - Cassette
          - CD
          - Digital
          - DVD
          - Merch
          - Music Video
          - Other
          - USB
          - VHS
          - Vinyl
      highlights:
        type: string
        x-nullable: true
      marketing_highlights:
        type: string
        x-nullable: true
      artist:
        type: string
      title:
        type: string
      cover_art_img_url:
        type: string
        x-nullable: true
      cover_art_img_url_2000:
        type: string
        x-nullable: true
      genre:
        type: string
      subgenre:
        type: string
      tracks:
        type: array
        x-nullable: true
        items:
          $ref: '#/definitions/Track'
      country_of_origin:
        type: integer
        x-nullable: true
  Project:
    type: object
    additionalProperties: false
    required:
      - project_id
      - name
      - type
      - book_dates
      - book_order
      - description
      - highlights
      - video_urls
      - label_contact
      - label_nm
      - parent_label_nm
      - theme
      - background_color
      - font_color
      - artist
      - products
    properties:
      project_id:
        type: integer
      name:
        type: string
      type:
        type: string
        enum:
          - Stak
      book_dates:
        type: array
        minItems: 1
        items:
          type: string
          format: date
      book_order:
        type: integer
      description:
        type: string
        x-nullable: true
      highlights:
        type: string
        x-nullable: true
      video_urls:
        type: array
        x-nullable: true
        items:
          type: string
      label_contact:
        type: string
      label_nm:
        type: string
      parent_label_nm:
        type: string
        x-nullable: true
      theme:
        type: string
        enum:
          - Dark
      background_color:
        type: string
        enum:
          - '131313'
      font_color:
        type: string
        enum:
          - FFFFFF
      artist:
        $ref: '#/definitions/Artist'
      products:
        type: array
        minItems: 1
        items:
          $ref: '#/definitions/Product'
  ReleasesResponse:
    type: object
    additionalProperties: false
    required:
      - projects
      - last_modified
    properties:
      projects:
        minItems: 1
        items:
          $ref: '#/definitions/Project'
      last_modified:
        type: string
        format: date-time
  Track:
    type: object
    additionalProperties: false
    required:
      - track_id
      - disc
      - track_number
      - track_name
    properties:
      track_id:
        type: integer
      disc:
        type: integer
      side:
        type: string
      track_number:
        type: integer
      track_name:
        type: string
      performer:
        type: string
        x-nullable: true
paths:
  /releases:
    get:
      produces:
        - application/json
      responses:
        '200':
          description: Get all data needed for releases.theorchard.com
          schema:
            $ref: '#/definitions/ReleasesResponse'
