swagger: "2.0"

info:
  version: 1.0.0
  title: Orchard ows-analytics Specifications

schemes:
  - https
host: qa-ows-analytics.theorchard.io
paths:
  /hello:
    get:
      summary: Check the health of the application.
      responses:
        200:
          description: 200 OK
          examples:
            application/json: { "status": "ok" }
  /feeds:
    get:
      summary: Returns an object containing available feeds.
      responses:
        200:
          description: HTTP 200 OK
          schema:
            properties:
              feedid:
                type: object
                properties:
                  name:
                    type: string
                  storename:
                    type: string
                  storeid:
                    type: integer
  /top-channel-metrics:
    get:
      summary: Get top channels and their metrics
      description: Returns a list of highest viewed channels.
      parameters:
        - $ref: '#/parameters/orchardProfileType'
        - $ref: '#/parameters/orchardProfileId'
        - $ref: '#/parameters/orchardIdentityId'
        - $ref: '#/parameters/countryCodes'
        - $ref: '#/parameters/globalParticipantIds'
        - $ref: '#/parameters/distributors'
        - $ref: '#/parameters/storeIds'
        - $ref: '#/parameters/labelIds'
        - $ref: '#/parameters/subaccountIds'
        - $ref: '#/parameters/limit'
        - $ref: '#/parameters/offset'
        - $ref: '#/parameters/orderBy'
        - $ref: '#/parameters/orderDir'
      responses:
        200:
          description: 'HTTP 200 OK'
          schema:
            $ref: '#/definitions/topChannelMetrics'
        400:
          examples:
            validation_error:
              code: bad_grass_request_error
              message: 'Missing Grass Headers'
          description: Request missing required grass headers
  /top-video-metrics:
    get:
      summary: Get top videos and their metrics
      description: Returns a list of highest viewed videos.
      parameters:
        - $ref: '#/parameters/orchardProfileType'
        - $ref: '#/parameters/orchardProfileId'
        - $ref: '#/parameters/orchardIdentityId'
        - $ref: '#/parameters/countryCodes'
        - $ref: '#/parameters/globalParticipantIds'
        - $ref: '#/parameters/distributors'
        - $ref: '#/parameters/storeIds'
        - $ref: '#/parameters/labelIds'
        - $ref: '#/parameters/subaccountIds'
        - $ref: '#/parameters/limit'
        - $ref: '#/parameters/offset'
        - $ref: '#/parameters/orderBy'
        - $ref: '#/parameters/orderDir'
      responses:
        200:
          description: 'HTTP 200 OK'
          schema:
            $ref: '#/definitions/topVideoMetrics'
        400:
          examples:
            validation_error:
              code: bad_grass_request_error
              message: 'Missing Grass Headers'
          description: Request missing required grass headers
  /participant-metrics:
    get:
      summary: Get top participants and their metrics
      description: Returns a list of highest streaming participants.
      parameters:
        - $ref: '#/parameters/orchardProfileType'
        - $ref: '#/parameters/orchardProfileId'
        - $ref: '#/parameters/orchardIdentityId'
        - $ref: '#/parameters/countryCodes'
        - $ref: '#/parameters/globalParticipantIds'
        - $ref: '#/parameters/distributors'
        - $ref: '#/parameters/storeIds'
        - $ref: '#/parameters/labelIds'
        - $ref: '#/parameters/subaccountIds'
        - $ref: '#/parameters/limit'
        - $ref: '#/parameters/offset'
        - $ref: '#/parameters/orderBy'
        - $ref: '#/parameters/orderDir'
      responses:
        200:
          description: 'HTTP 200 OK'
          schema:
            $ref: '#/definitions/participantMetrics'
        400:
          examples:
            validation_error:
              code: bad_grass_request_error
              message: 'Missing Grass Headers'
          description: Request missing required grass headers
  /participant/{global_participant_id}/track-streams-all:
    get:
      summary: Get track streams timeseries for a given global participant ID
      description: Returns an object containing product daily track streams information based on a provided GP id.
      parameters:
        - $ref: '#/parameters/globalParticipantId'
        - $ref: '#/parameters/orchardProfileType'
        - $ref: '#/parameters/orchardProfileId'
        - $ref: '#/parameters/orchardIdentityId'
        - $ref: '#/parameters/distributors'
        - $ref: '#/parameters/storeIds'
        - $ref: '#/parameters/countryCodes'
        - $ref: '#/parameters/startDate'
        - $ref: '#/parameters/endDate'
      responses:
        200:
          description: 'HTTP 200 OK'
          schema:
            $ref: '#/definitions/participantTrackStreamsAll'
        400:
          examples:
            validation_error:
              code: bad_grass_request_error
              message: 'Missing Grass Headers'
          description: Request missing required grass headers
  /participant/{global_participant_id}/track-streams-by-store:
    get:
      summary: Get track streams by store timeseries for a given global participant ID
      description: Returns an object containing product daily track streams by store information based on a provided GP id.
      parameters:
        - $ref: '#/parameters/globalParticipantId'
        - $ref: '#/parameters/orchardProfileType'
        - $ref: '#/parameters/orchardProfileId'
        - $ref: '#/parameters/orchardIdentityId'
        - $ref: '#/parameters/distributors'
        - $ref: '#/parameters/storeIds'
        - $ref: '#/parameters/countryCodes'
        - $ref: '#/parameters/startDate'
        - $ref: '#/parameters/endDate'
      responses:
        200:
          description: 'HTTP 200 OK'
          schema:
            $ref: '#/definitions/participantTrackStreamsStore'
        400:
          examples:
            validation_error:
              code: bad_grass_request_error
              message: 'Missing Grass Headers'
          description: Request missing required grass headers
  /product/{productId}:
    get:
      summary: Get product information
      description: Returns an object containing product information based on a provided product id.
      parameters:
        - $ref: '#/parameters/productId'
        - $ref: '#/parameters/orchardProfileType'
        - $ref: '#/parameters/orchardProfileId'
        - $ref: '#/parameters/orchardIdentityId'
      responses:
        200:
          description: 'HTTP 200 OK'
          schema:
            $ref: '#/definitions/product'
        400:
          examples:
            validation_error:
              code: bad_grass_request_error
              message: 'Missing Grass Headers'
          description: Request missing required grass headers
  /product-metrics:
    get:
      summary: Get the top products
      description: Returns a list of highest streaming products for a given distirbutor/country/label/subaccount/artist;
        and the total number of filtered results.
      parameters:
        - $ref: '#/parameters/orchardProfileType'
        - $ref: '#/parameters/orchardProfileId'
        - $ref: '#/parameters/orchardIdentityId'
        - $ref: '#/parameters/labelIds'
        - $ref: '#/parameters/subaccountIds'
        - $ref: '#/parameters/distributors'
        - $ref: '#/parameters/countryCodes'
        - $ref: '#/parameters/globalParticipantIds'
        - $ref: '#/parameters/orderBy'
        - $ref: '#/parameters/orderDir'
        - $ref: '#/parameters/limit'
        - $ref: '#/parameters/offset'
        - $ref: '#/parameters/multiProduct'
      responses:
        200:
          description: 'HTTP 200 OK'
          schema:
            $ref: '#/definitions/productMetrics'
        400:
          examples:
            validation_error:
              code: bad_grass_request_error
              message: 'Missing Grass Headers'
          description: Request missing required grass headers

  /product/{productId}/metadata:
    get:
      summary: Get product metdata
      description: Returns an object containing product metadata based on a provided product id.
      parameters:
        - $ref: '#/parameters/productId'
        - $ref: '#/parameters/orchardProfileType'
        - $ref: '#/parameters/orchardProfileId'
        - $ref: '#/parameters/orchardIdentityId'
      responses:
        200:
          description: 'HTTP 200 OK'
          schema:
            $ref: '#/definitions/productMetadata'
  /product/{productId}/metrics-by-track:
    get:
      summary: Metrics for a product, broken down by track
      description: Returns an object containing 1, 7, 28, all time streams, and percentage change for a product broken down by track
      parameters:
        - $ref: '#/parameters/productId'
        - $ref: '#/parameters/orchardProfileType'
        - $ref: '#/parameters/orchardProfileId'
        - $ref: '#/parameters/orchardIdentityId'
        - $ref: '#/parameters/countryCodes'
        - $ref: '#/parameters/distributors'
        - $ref: '#/parameters/storeIds'
        - $ref: '#/parameters/limit'
        - $ref: '#/parameters/offset'
        - $ref: '#/parameters/orderBy'
        - $ref: '#/parameters/orderDir'
      responses:
        200:
          description: 'HTTP 200 OK'
          schema:
            $ref: '#/definitions/productMetricsByTrack'
  /product/{productId}/aggregate-streams:
    get:
      summary: Aggregate Streams for a Product
      description: Returns an object streams all time and 7-day growth percentage
      parameters:
        - $ref: '#/parameters/productId'
        - $ref: '#/parameters/orchardProfileType'
        - $ref: '#/parameters/orchardProfileId'
        - $ref: '#/parameters/orchardIdentityId'
        - $ref: '#/parameters/distributors'
        - $ref: '#/parameters/multiProduct'
        - $ref: '#/parameters/countryCodes'
      responses:
        200:
          description: 'HTTP 200 OK'
          schema:
            $ref: '#/definitions/productAggregateStreams'
  /top-sound-recordings:
    get:
      summary: Get the top sound recordings for a label/artist
      description: Returns a list of highest streaming sound recordings (by ISRC) for a given label/artist.
      parameters:
        - $ref: '#/parameters/orchardProfileType'
        - $ref: '#/parameters/orchardProfileId'
        - $ref: '#/parameters/orchardIdentityId'
        - $ref: '#/parameters/limit'
        - $ref: '#/parameters/offset'
        - $ref: '#/parameters/countryCodes'
        - $ref: '#/parameters/orderBy'
        - $ref: '#/parameters/distributors'
      responses:
        200:
          description: 'HTTP 200 OK'
          schema:
            $ref: '#/definitions/topSoundRecordings'
        400:
          examples:
            validation_error:
              code: bad_grass_request_error
              message: 'Missing Grass Headers'
          description: Request missing required grass headers
  /top-metrics:
    get:
      summary: Get the top metrics for a label/artist
      description: Returns a list of highest streaming sound recordings for a given label/artist;
        and the total number of filtered results.
      parameters:
        - $ref: '#/parameters/orchardProfileType'
        - $ref: '#/parameters/orchardProfileId'
        - $ref: '#/parameters/orchardIdentityId'
        - $ref: '#/parameters/limit'
        - $ref: '#/parameters/offset'
        - $ref: '#/parameters/countryCodes'
        - $ref: '#/parameters/orderBy'
        - $ref: '#/parameters/orderDir'
        - $ref: '#/parameters/distributors'
        - $ref: '#/parameters/storeIds'
        - $ref: '#/parameters/labelIds'
        - $ref: '#/parameters/subaccountIds'
        - $ref: '#/parameters/artistIds'
        - $ref: '#/parameters/globalParticipantIds'
        - $ref: '#/parameters/upc'
      responses:
        200:
          description: 'HTTP 200 OK'
          schema:
            $ref: '#/definitions/topMetrics'
        400:
          examples:
            validation_error:
              code: bad_grass_request_error
              message: 'Missing Grass Headers'
          description: Request missing required grass headers
  /top-sound-recording-families-ids:
    get:
      summary: Get the top global sound recording families ids.
      description: Returns a list of highest streaming sound recordings family ids for a given label
        and the total number of filtered results. This IDs could be used later in top-sound-recording-families-by-ids query.
      parameters:
        - $ref: '#/parameters/orchardProfileType'
        - $ref: '#/parameters/orchardProfileId'
        - $ref: '#/parameters/orchardIdentityId'
        - $ref: '#/parameters/limit'
        - $ref: '#/parameters/offset'
        - $ref: '#/parameters/orderBy'
        - $ref: '#/parameters/orderDir'
        - $ref: '#/parameters/countryCodes'
        - $ref: '#/parameters/distributors'
        - $ref: '#/parameters/parentCompany'
        - $ref: '#/parameters/companyBrand'
        - $ref: '#/parameters/serviceTier'
        - $ref: '#/parameters/storeIds'
        - $ref: '#/parameters/labelIds'
        - $ref: '#/parameters/globalParticipantIds'
      responses:
        200:
          description: 'HTTP 200 OK'
          schema:
            $ref: '#/definitions/topSoundRecordingFamilies'
        400:
          examples:
            validation_error:
              code: bad_grass_request_error
              message: 'Missing Grass Headers'
          description: Request missing required grass headers
  /top-sound-recording-families-by-ids:
    post:
      summary: Get the top global sound recording families.
      description: Returns a list of highest streaming sound recordings families for a given label
        and the total number of filtered results.
      parameters:
        - $ref: '#/parameters/orchardProfileType'
        - $ref: '#/parameters/orchardProfileId'
        - $ref: '#/parameters/orchardIdentityId'
        - in: body
          name: requestBody
          schema:
            $ref: '#/definitions/topSoundRecordingFamiliesByIdsRequestBody'
      responses:
        200:
          description: 'HTTP 200 OK'
          schema:
            $ref: '#/definitions/topSoundRecordingFamilies'
        400:
          examples:
            validation_error:
              code: bad_grass_request_error
              message: 'Missing Grass Headers'
          description: Request missing required grass headers
  /sound-recording/{isrc}/metadata:
    get:
      summary: Get sound recording metadata
      description: Returns an object containing product metadata based on a provided ISRC.
      parameters:
        - $ref: '#/parameters/isrc'
        - $ref: '#/parameters/orchardProfileType'
        - $ref: '#/parameters/orchardProfileId'
        - $ref: '#/parameters/orchardIdentityId'
      responses:
        200:
          description: 'HTTP 200 OK'
          schema:
            $ref: '#/definitions/soundRecordingMetadata'
  /sound-recording/streams:
    post:
      summary: Get the stream data for a list of sound recording
      parameters:
        - $ref: '#/parameters/isrcs'
        - $ref: '#/parameters/orchardProfileType'
        - $ref: '#/parameters/orchardProfileId'
        - $ref: '#/parameters/orchardIdentityId'
        - $ref: '#/parameters/storeIds'
        - $ref: '#/parameters/countryCodes'
        - $ref: '#/parameters/startDate'
        - $ref: '#/parameters/endDate'
        - $ref: '#/parameters/days'
      responses:
        200:
          description: 'HTTP 200 OK'
          schema:
            $ref: '#/definitions/soundRecordingStreams'
        400:
          examples:
            validation_error:
              code: bad_grass_request_error
              message: 'Missing Grass Headers'
          description: Request missing required grass headers
  /sound-recording/aggregate-streams:
    post:
      summary: Get aggregate streams for a list of ISRCs
      parameters:
        - $ref: '#/parameters/isrcs'
        - $ref: '#/parameters/orchardProfileType'
        - $ref: '#/parameters/orchardProfileId'
        - $ref: '#/parameters/orchardIdentityId'
        - $ref: '#/parameters/storeIds'
        - $ref: '#/parameters/countryCodes'
      responses:
        200:
          description: 'HTTP 200 OK'
          schema:
            $ref: '#/definitions/soundRecordingAggregateStreams'
        400:
          examples:
            validation_error:
              code: bad_grass_request_error
              message: 'Missing Grass Headers'
          description: Request missing required grass headers
  /sound-recording/{isrc}/top-markets:
    get:
      summary: Get top markets information for a sound recording
      parameters:
        - $ref: '#/parameters/isrc'
        - $ref: '#/parameters/orchardProfileType'
        - $ref: '#/parameters/orchardProfileId'
        - $ref: '#/parameters/orchardIdentityId'
        - $ref: '#/parameters/storeIds'
      responses:
        200:
          description: 'HTTP 200 OK'
          schema:
            $ref: '#/definitions/topMarkets'
        400:
          examples:
            validation_error:
              code: bad_grass_request_error
              message: 'Missing Grass Headers'
          description: Request missing required grass headers
  /sound-recording/{isrc}/demographics:
    get:
      summary: Get demographics summary for a sound recording
      parameters:
        - $ref: '#/parameters/isrc'
        - $ref: '#/parameters/orchardProfileType'
        - $ref: '#/parameters/orchardProfileId'
        - $ref: '#/parameters/orchardIdentityId'
        - $ref: '#/parameters/ownerCategories'
        - $ref: '#/parameters/storeIds'
        - $ref: '#/parameters/countryCodes'
        - $ref: '#/parameters/startDate'
        - $ref: '#/parameters/endDate'
        - $ref: '#/parameters/days'
      responses:
        200:
          description: 'HTTP 200 OK'
          schema:
            $ref: '#/definitions/demographics'
  /sound-recording/{isrc}/streams-breakdown:
    get:
      summary: Get subscription data for a sound recording
      description: Returns an object containing subscription information based on a provided ISRC.
      parameters:
        - $ref: '#/parameters/isrc'
        - $ref: '#/parameters/orchardProfileType'
        - $ref: '#/parameters/orchardProfileId'
        - $ref: '#/parameters/orchardIdentityId'
        - $ref: '#/parameters/storeIds'
        - $ref: '#/parameters/countryCodes'
        - $ref: '#/parameters/startDate'
        - $ref: '#/parameters/endDate'
        - $ref: '#/parameters/days'
      responses:
        200:
          description: 'HTTP 200 OK'
          schema:
            $ref: '#/definitions/streamsBreakdown'
        400:
          examples:
            validation_error:
              code: bad_grass_request_error
              message: 'Missing Grass Headers'
          description: Request missing required grass headers
  /sound-recording/{isrc}/streams-by-store:
    get:
      summary: Get timeseries data by store for sound-recording
      parameters:
        - $ref: '#/parameters/isrc'
        - $ref: '#/parameters/orchardProfileType'
        - $ref: '#/parameters/orchardProfileId'
        - $ref: '#/parameters/orchardIdentityId'
        - $ref: '#/parameters/storeIds'
        - $ref: '#/parameters/countryCodes'
        - $ref: '#/parameters/startDate'
        - $ref: '#/parameters/endDate'
      responses:
        200:
          description: 'HTTP 200 OK'
          schema:
            $ref: '#/definitions/streamsByStore'
        400:
          examples:
            validation_error:
              code: bad_grass_request_error
              message: 'Missing Grass Headers'
          description: Request missing required grass headers
  /sound-recording/{isrc}/streams-all:
    get:
      summary: Get timeseries streams data for sound-recording
      parameters:
        - $ref: '#/parameters/isrc'
        - $ref: '#/parameters/orchardProfileType'
        - $ref: '#/parameters/orchardProfileId'
        - $ref: '#/parameters/orchardIdentityId'
        - $ref: '#/parameters/storeIds'
        - $ref: '#/parameters/countryCodes'
        - $ref: '#/parameters/startDate'
        - $ref: '#/parameters/endDate'
      responses:
        200:
          description: 'HTTP 200 OK'
          schema:
            $ref: '#/definitions/streamsAll'
        400:
          examples:
            validation_error:
              code: bad_grass_request_error
              message: 'Missing Grass Headers'
          description: Request missing required grass headers
  /highwatermark:
    get:
      summary: Get the highwatermark date for a particular type.
      description: Returns the highwatermark date for a given type (videos, downloads, streams).
      parameters:
        - $ref: '#/parameters/orchardProfileType'
        - $ref: '#/parameters/orchardProfileId'
        - $ref: '#/parameters/orchardIdentityId'
        - $ref: '#/parameters/type'
      responses:
        200:
          description: 'HTTP 200 OK'
          schema:
            $ref: '#/definitions/highwatermark'
        400:
          examples:
            validation_error:
              code: internal_error
              message: 'bad object_type'
          description: Invalid or missing highwatermarkType parameter
definitions:
  productId:
    type: string
    example: '1486533'
    description: Unique identifier for a product, release_id in releases table
  labelId:
    type: number
    example: 1486533
    description: Unique identifier for a label
  subaccountId:
    type: number
    example: 32312
    description: Unique identifier for a subaccount
  upc:
    type: string
    example: '886443663534'
    description: Universal Product Code, display_upc in releases table
  isrc:
    type: string
    example: 'US53Q1200099'
    description: International Standard Recording Code
  isrcs:
    type: array
    description: International Standard Recording Code
    items:
      type: string
  releaseDate:
    type: string
    description: Release date for the product in YYYY-MM-DD format.
    example: '2018-09-11T00:00:00Z'
  streams:
    type: integer
    example: 2430
    description: Total number of streams for this sound recording
  downloads:
    type: integer
    example: 243
    description: Total number of downloads for this sound recording
  views:
    type: integer
    example: 1000
    description: Views for this channel
  growthPercentage:
    type: number
    example: 12.4
    description: (current streams - past streams) / past streams
  skipRate:
    type: number
    example: 0.5
    description: (skips / (skips + streams_with_skips))
  saves:
    type: integer
    example: 0.5
    description: Number of saves for this sound-recording
  allTime:
    type: integer
    example: 12345
    description: number of streams all the way back
  imageLocation:
    type: string
    example: 'https://images.theorchard.io/product/large_cover/49c461c020422c4ab37860bd29e27c64.jpg'
    description: Url for serving image via orchard images server
  soundRecordingName:
    type: string
    example: 'Frozen Pines'
    description: Title of the track
  artistName:
    type: string
    example: 'Lord Huron'
    description: Primary artist for most recent product relating to the track
  dailyStreams:
    type: array
    description: An array containing daily streams for a period of time
    items:
      type: object
      description: An object describing the number of streams for a given day
      properties:
        date:
          type: string
          example: '2018-06-22T00:00:00Z'
        streams:
          type: integer
          example: 232
  sourceError:
    type: object
    description: An object representing an error with a source's data
    properties:
      code:
        type: string
        description: A known code to describe the type of error that occurred (this can be i18n'd on the frontend)
        enum: [unreliable]
      types:
        type: array
        items:
          type: string
          enum:
            - streams
            - skips_saves
        description: The types of outage that occurred
      message:
        type: string
        example: Data for this source is unavailable due to GDPR compliance complications.
        description: A server-specified error message to be shown on the frontend if an enumerated code is not applicable (this cannot be i18n'd on the frontend)
  user:
    type: object
    description: An Orchard user
    properties:
      accountId:
        type: string
        example: '6971'
        description: The identifier associated with the account.
      accountType:
        type: string
        enum:
          - vendor
          - subaccount
        description: The type of account, either 'vendor' or 'subaccount'.
      userId:
        type: string
        pattern: '^(alw|oa)\:\\d+$'
        example: 'alw:1000'
        description: The identifier for the user.
      imageLocation:
        $ref: '#/definitions/imageLocation'
      name:
        type: string
        description: The name of the user's account
        example: Kitty Wizard Records
      access:
        type: array
        description: An array of constants describing the user's access.
        items:
          type: string
          example: analytics
  streamsTimeseries:
    type: array
    description: An array of objects containing stream, saves & skips timeseries data.
    items:
      type: object
      properties:
        date:
          type: string
          example: '2020-01-20T00:00:00Z'
        streams:
          $ref: '#/definitions/streams'
        skip_rate:
          $ref: '#/definitions/skipRate'
        saves:
          $ref: '#/definitions/saves'
  source:
    type: object
    description: Store ID, name, and potentially an error
    properties:
      id:
        type: integer
        example: 1
        description: Unique identifier for a store
      name:
        type: string
        example: 'Spotify'
        description: The name of a store
  sourceWithError:
    type: object
    properties:
      id:
        type: integer
        example: 1
        description: Unique identifier for a store
      name:
        type: string
        example: 'Spotify'
        description: The name of a store
      error:
        $ref: '#/definitions/sourceError'
  sources:
    type: array
    description: Array of sources providing related data
    items:
      $ref: '#/definitions/sourceWithError'
  sourceBreakdown:
    type: object
    description: Breakdown of stream source by streams, percentage, and percent growth
    properties:
      total:
        type: integer
        description: Number of streams from source
        example: 60000
      value:
        type: number
        description: Percent of overall streams due to source
        example: 0.3333
      growth_percentage:
        type: number
        description: Growth of percent compared to last week
        example: 0.052
  participantMetrics:
    type: object
    properties:
      metrics:
        type: object
        properties:
          id:
            type: string
            description: Global Participant ID
            example: 'f67b0892-f0bc-4575-b23e-59566ccb44bc'
          streams_1_day:
            type: number
            description: The number of streams for the ISRC over the past 1 day
            example: 10
          growth_percentage_1_day:
            type: number
            example: 12.4
            description: (current 1 day streams - past 1 day streams) / past 1 day streams
          streams_7_days:
            type: number
            description: The number of streams for the ISRC over the past 7 days
            example: 50
          growth_percentage_7_days:
            type: number
            example: 12.4
            description: (current 7 day streams - past 7 day streams) / past 7 day streams
          streams_28_days:
            type: number
            description: The number of streams for the ISRC over the past 28 days
            example: 200
          growth_percentage_28_days:
            type: number
            example: 12.4
            description: (current 28 day streams - past 28 day streams) / past 28 day streams
          streams_all_time:
            type: number
            description: The number of all time streams for the ISRC
            example: 1000
      total_participants:
        type: number
        description: The total number of participants without pagination
        example: 500000
  productMetricsByTrack:
    type: object
    properties:
      product_id:
        type: string
      tracks:
        type: array
        items:
          properties:
            track_id:
              type: string
            tuid:
              type: string
            streams_1_day:
              $ref: '#/definitions/streams_1_day'
            growth_percentage_1_day:
              $ref: '#/definitions/growth_percentage_1_day'
            streams_7_days:
              $ref: '#/definitions/streams_7_days'
            growth_percentage_7_days:
              $ref: '#/definitions/growth_percentage_7_days'
            streams_28_days:
              $ref: '#/definitions/streams_28_days'
            growth_percentage_28_days:
              $ref: '#/definitions/growth_percentage_28_days'
            streams_all_time:
              $ref: '#/definitions/streams_all_time'
  productAggregateStreams:
    type: object
    properties:
      product_id:
        type: string
      streams_all_time:
        $ref: '#/definitions/streams_all_time'
      growth_percentage_7_days:
        $ref: '#/definitions/growth_percentage_7_days'
  product:
    type: object
    properties:
      streams:
        type: object
        properties:
          aggregate:
            type: object
            properties:
              growth_percentage:
                $ref: '#/definitions/growthPercentage'
              all_time:
                $ref: '#/definitions/allTime'
      tracks:
        type: object
        properties:
          items:
            type: array
            items:
              type: object
              properties:
                isrc:
                  $ref: '#/definitions/isrc'
                track_number:
                  type: number
                  description: The number of the track on the product
                  example: 1
                streams:
                  type: object
                  properties:
                    aggregate:
                      type: object
                      properties:
                        all_time:
                          $ref: '#/definitions/allTime'
                primary_artists:
                  type: array
                  items:
                    $ref: '#/definitions/artistMetadata'
                version:
                  type: string
                  example: 'Album Version'
                  description: Version of the track
      sources:
        $ref: '#/definitions/sources'
  productMetadata:
    type: object
    properties:
      product_id:
        type: string
        example: '192562490839'
      upc:
        type: string
        example: '192562490837'
      artist_name:
        type: string
        example: 'Future Generations'
      product_name:
        type: string
        example: 'Landscape'
      format:
        type: string
        enum: ['lp']
      version:
        type: string
        description: Text which differentiates this product from other, similar products.
        example: 'Deluxe'
      image_location:
        $ref: '#/definitions/imageLocation'
      subaccount:
        type: string
        description: The name of the subaccount associated with the product.
        example: 'Frenchkiss Records'
      release_date:
        $ref: '#/definitions/releaseDate'
      sales_start_date:
        type: string
        description: Sales date for the product in YYYY-MM-DD format.
        example: '2018-09-11T00:00:00Z'
      tracks:
        type: array
        items:
          $ref: '#/definitions/productTrackMetadata'
      primary_artists:
        type: array
        items:
          $ref: '#/definitions/artistMetadata'
  topSoundRecordings:
    type: object
    properties:
      items:
        type: object
        properties:
          isrc:
            $ref: '#/definitions/isrc'
          streams:
            $ref: '#/definitions/streams'
          growth_percentage:
            $ref: '#/definitions/growthPercentage'
      sources:
        $ref: '#/definitions/sources'
  topChannelMetrics:
    type: object
    properties:
      items:
        type: object
        properties:
          channel_id:
            type: string
            example: 'UCmBA_ab1cde234f6g7h8j9'
          views_1_month_back:
            $ref: '#/definitions/views'
          views_2_month_back:
            $ref: '#/definitions/views'
          views_3_month_back:
            $ref: '#/definitions/views'
          growth_2_to_1_months_back:
            $ref: '#/definitions/growthPercentage'
          growth_3_to_2_months_back:
            $ref: '#/definitions/growthPercentage'
          growth_4_to_3_months_back:
            $ref: '#/definitions/growthPercentage'
          total_estimated_gross_revenue:
            type: number
            description: Total estimated gross revenue for this channel
            example: 350000.15
          average_view_duration_seconds:
            type: number
            description: Average view duration in seconds
            example: 120.5
          total_views:
            type: integer
            description: Total channel views
            example: 1000
          subscriber_count:
            type: integer
            description: The number of subscribers to the channel
            example: 100
      total_results:
        type: number
        description: The top-metrics results count
        example: 8000
      sources:
        $ref: '#/definitions/sources'
      last_available_date:
          type: string
          example: '2020-01-20T00:00:00Z'
  topVideoMetrics:
    type: object
    properties:
      items:
        type: object
        properties:
          video_id:
            type: string
            example: 'abCDEF12ghJ'
          views_1_month_back:
            $ref: '#/definitions/views'
          views_2_month_back:
            $ref: '#/definitions/views'
          views_3_month_back:
            $ref: '#/definitions/views'
          growth_2_to_1_months_back:
            $ref: '#/definitions/growthPercentage'
          growth_3_to_2_months_back:
            $ref: '#/definitions/growthPercentage'
          growth_4_to_3_months_back:
            $ref: '#/definitions/growthPercentage'
          total_estimated_gross_revenue:
            type: number
            description: Total estimated gross revenue for this video
            example: 350000.15
          average_view_duration_seconds:
            type: number
            description: Average view duration in seconds
            example: 120.5
          total_views:
            type: integer
            description: Total video views
            example: 1000
          subscriber_count:
            type: integer
            description: The number of subscribers to the video
            example: 100
      total_results:
        type: number
        description: The top-metrics results count
        example: 8000
      sources:
        $ref: '#/definitions/sources'
      last_available_date:
          type: string
          example: '2020-01-20T00:00:00Z'
  topMetrics:
    type: object
    properties:
      items:
        type: object
        properties:
          isrc:
            $ref: '#/definitions/isrc'
          streams_1_day:
            $ref: '#/definitions/streams_1_day'
          growth_percentage_1_day:
            $ref: '#/definitions/growth_percentage_1_day'
          streams_7_days:
            $ref: '#/definitions/streams_7_days'
          growth_percentage_7_days:
            $ref: '#/definitions/growth_percentage_7_days'
          streams_28_days:
            $ref: '#/definitions/streams_28_days'
          growth_percentage_28_days:
            $ref: '#/definitions/growth_percentage_28_days'
          streams_all_time:
            $ref: '#/definitions/streams_all_time'
      total_results:
        type: number
        description: The top-metrics results count for an account
        example: 8000
      sources:
        $ref: '#/definitions/sources'
  topSoundRecordingFamiliesByIdsRequestBody:
    type: object
    example:
      ids:
        - 382823
        - 238290
      params:
        limit: 50
        offset: 0
        orderBy: "streams_28_days"
        orderDir: "DESC"
        countryCodes: [ "US" ]
        distributors: [ "awal", "theorchard", "sme" ]
        parentCompany: f1594122-7f99-4916-b103-08b0444c7b46
        companyBrand: ae886607-ae74-42f4-b7a7-d33f6a6288f4
        serviceTier: 23
        storeIds: [ 1822 ]
        labelIds: [ "34536" ]
        globalParticipantIds: [ ]

  topSoundRecordingFamilies:
    type: object
    properties:
      items:
        type: object
        properties:
          main_isrc:
            $ref: '#/definitions/main_isrc'
          product_family_id:
            $ref: '#/definitions/product_family_id'
          related_isrcs:
            $ref: '#/definitions/related_isrcs'
          creations_1_day:
            $ref: '#/definitions/creations_1_day'
          creations_28_days:
            $ref: '#/definitions/creations_28_days'
          creations_7_days:
            $ref: '#/definitions/creations_7_days'
          creations_all_time:
            $ref: '#/definitions/creations_all_time'
          creations_growth_percentage_1_day:
            $ref: '#/definitions/creations_growth_percentage_1_day'
          creations_growth_percentage_28_days:
            $ref: '#/definitions/creations_growth_percentage_28_days'
          creations_growth_percentage_7_days:
            $ref: '#/definitions/creations_growth_percentage_7_days'
          growth_percentage_183_days:
            $ref: '#/definitions/growth_percentage_183_days'
          growth_percentage_1_day:
            $ref: '#/definitions/growth_percentage_1_day'
          growth_percentage_28_days:
            $ref: '#/definitions/growth_percentage_28_days'
          growth_percentage_365_days:
            $ref: '#/definitions/growth_percentage_365_days'
          growth_percentage_7_days:
            $ref: '#/definitions/growth_percentage_7_days'
          streams_183_days:
            $ref: '#/definitions/streams_183_days'
          streams_1_day:
            $ref: '#/definitions/streams_1_day'
          streams_28_days:
            $ref: '#/definitions/streams_28_days'
          streams_365_days:
            $ref: '#/definitions/streams_365_days'
          streams_7_days:
            $ref: '#/definitions/streams_7_days'
          streams_all_time:
            $ref: '#/definitions/streams_all_time'
          top5_tiktok_scores_by_country:
            $ref: '#/definitions/top5_tiktok_scores_by_country'
          views_1_day:
            $ref: '#/definitions/views_1_day'
          views_28_days:
            $ref: '#/definitions/views_28_days'
          views_7_days:
            $ref: '#/definitions/views_7_days'
          views_all_time:
            $ref: '#/definitions/views_all_time'
          views_growth_percentage_1_day:
            $ref: '#/definitions/views_growth_percentage_1_day'
          views_growth_percentage_28_days:
            $ref: '#/definitions/views_growth_percentage_28_days'
          views_growth_percentage_7_days:
            $ref: '#/definitions/views_growth_percentage_7_days'
          streams_1_day_prev:
            $ref: '#/definitions/streams_1_day_prev'
          streams_7_days_prev:
            $ref: '#/definitions/streams_7_days_prev'
          streams_28_days_prev:
            $ref: '#/definitions/streams_28_days_prev'
          streams_183_days_prev:
            $ref: '#/definitions/streams_183_days_prev'
          streams_365_days_prev:
            $ref: '#/definitions/streams_365_days_prev'
          views_1_day_prev:
            $ref: '#/definitions/views_1_day_prev'
          views_7_days_prev:
            $ref: '#/definitions/views_7_days_prev'
          views_28_days_prev:
            $ref: '#/definitions/views_28_days_prev'
          creations_1_day_prev:
            $ref: '#/definitions/creations_1_day_prev'
          creations_7_days_prev:
            $ref: '#/definitions/creations_7_days_prev'
          creations_28_days_prev:
            $ref: '#/definitions/creations_28_days_prev'
      total_results:
        type: number
        description: Total count of results
        example: 8000
  recentPlacements:
    type: object
    properties:
      items:
        type: array
        items:
          $ref: '#/definitions/playlistPlacement'
      count:
        type: number
        description: Number of recent placements which match the filter criteria
        example: 1000
      total:
        type: number
        description: The total number of unfiltered recent placements available
        example: 1200
      tracks:
        type: array
        items:
          $ref: '#/definitions/soundRecordingMetadata'
      sources:
        $ref: '#/definitions/sources'
  soundRecordingProductMetadata:
    type: object
    properties:
      product_id:
        type: string
        example: '192562490839'
      upc:
        type: string
        example: '192562490837'
      product_name:
        type: string
        example: 'Landscape'
      format:
        type: string
        enum: ['lp']
      version:
        type: string
        description: Text which differentiates this product from other, similar products.
        example: 'Deluxe'
      image_location:
        $ref: '#/definitions/imageLocation'
      release_date:
        $ref: '#/definitions/releaseDate'
      sale_start_date:
        type: string
        description: Sales date for the product in YYYY-MM-DD format.
        example: '2018-09-11T00:00:00Z'
      subaccount_name:
        type: string
        description: The name of the subaccount associated with the product.
        example: 'Frenchkiss Records'
      subaccount_id:
        type: string
        description: The ID of the subaccount associated with the product.
        example: '192562'
      primary_artists:
        type: array
        items:
          $ref: '#/definitions/artistMetadata'
  productTrackMetadata:
    type: object
    properties:
      track_name:
        $ref: '#/definitions/soundRecordingName'
      version:
        type: string
        example: 'Album Version'
        description: Version of the track
      track_number:
        type: number
        description: The number of the track on the product
        example: 1
      primary_artists:
        type: array
        items:
          $ref: '#/definitions/artistMetadata'
      track_cd:
        type: number
        description: The number of the CD on the product
        example: 1
      isrc:
        $ref: '#/definitions/isrc'
  soundRecordingMetadata:
    type: object
    properties:
      label_id:
        $ref: '#/definitions/labelId'
      subaccount_id:
        $ref: '#/definitions/subaccountId'
      image_location:
        $ref: '#/definitions/imageLocation'
      isrc:
        $ref: '#/definitions/isrc'
      name:
        $ref: '#/definitions/soundRecordingName'
      artist_name:
        $ref: '#/definitions/artistName'
      products:
        type: array
        items:
          $ref: '#/definitions/soundRecordingProductMetadata'
      primary_artists:
        type: array
        items:
          $ref: '#/definitions/artistMetadata'
      version:
        type: string
        example: 'Album Version'
        description: Version of the track
  artistMetadata:
    type: object
    properties:
      artist_name:
        $ref: '#/definitions/artistName'
      type:
        type: string
        example: 'performer'
        description: Artist type 'performer' or 'featuring'
  playlistTracks:
    type: object
    description: An object containing information about tracks related to a playlist.
    properties:
      length:
        type: number
        description: The number of tracks in the playlist
        example: 200
  playlist:
    type: object
    properties:
      source:
        $ref: '#/definitions/source'
      id:
        type: string
        example: 1sPA314hOnCqtZswABdD2z
      uri:
        type: string
        description: The URI of the playlist
        example: 'spotify:playlist:1sPA314hOnCqtZswABdD2z'
      name:
        type: string
        example: Urban Outfitters | Women in Music
      image_location:
        $ref: '#/definitions/imageLocation'
      country:
        type: string
        description: Country associated with the playlist
        example: 'us'
      storefront:
        type: string
        description: The storefront identifier for the playlist
        example: 'us'
      tracks:
        $ref: '#/definitions/playlistTracks'
      followers:
        type: number
        description: The number of followers of the playlist
        example: 234001
      user_display_name:
        type: string
        description: The display user name (full name) of that playlist's author
        example: 'Daniel Ek'
  playlistPlacement:
    type: object
    properties:
      isrc:
        $ref: '#/definitions/isrc'
      position:
        type: number
        description: The position of the provided ISRC on the playlist
        example: 200
      previous_position:
        type: number
        description: The previous position of the provided ISRC on the playlist
        example: 201
      streams:
        type: number
        description: The number of streams for the ISRC on the playlist
        example: 12324
      added:
        type: string
        description: The date on which the ISRC was added to the playlist
        example: '2018-06-22T00:00:00Z'
      playlist:
        $ref: '#/definitions/playlist'
  soundRecordingStreams:
    type: object
    properties:
      isrc:
        $ref: '#/definitions/isrc'
      aggregate:
        type: object
        description: An object representing the aggregate of streaming information for the
        properties:
          growth_percentage:
            $ref: '#/definitions/growthPercentage'
          all_time:
            $ref: '#/definitions/allTime'
          items:
            $ref: '#/definitions/dailyStreams'
      stores:
        type: array
        description: Array of stores with daily store information
        items:
          type: object
          description: Description of a store with its daily streams
          properties:
            id:
              type: integer
              example: 1
              description: Unique identifier for a store
            name:
              type: string
              example: 'Spotify'
              description: The name of a store
            growth_percentage:
              $ref: '#/definitions/growthPercentage'
            all_time:
              $ref: '#/definitions/allTime'
            items:
              $ref: '#/definitions/dailyStreams'
      sources:
        $ref: '#/definitions/sources'
  soundRecordingAggregateStreams:
    type: object
    properties:
      isrc:
        type: object
        description: An object representing aggregate streams info for the ISRC
        properties:
            growth_percentage_7_days:
              $ref: '#/definitions/growthPercentage'
            streams_all_time:
              $ref: '#/definitions/allTime'
  topMarkets:
    type: object
    properties:
      isrc:
        $ref: '#/definitions/isrc'
      items:
        type: array
        description: Array of top markets containing streaming performance by region
        items:
          type: object
          description: Top market streaming performance
          properties:
            country_code:
              type: string
              example: 'US'
              description: The ISO country code in which the top market is located
            region:
              type: string
              example: 'Brooklyn'
              description: The region for the top market
            streams:
              $ref: '#/definitions/streams'
            growth_percentage:
              $ref: '#/definitions/growthPercentage'
      sources:
        $ref: '#/definitions/sources'
  placements:
    type: object
    properties:
      isrc:
        $ref: '#/definitions/isrc'
      items:
        type: array
        items:
          $ref: '#/definitions/playlistPlacement'
      sources:
        $ref: '#/definitions/sources'
  demographics:
    type: object
    properties:
      isrc:
        $ref: '#/definitions/isrc'
      demographics:
        type: array
        items:
          type: object
          properties:
            gender:
              type: object
              properties:
                F:
                  type: integer
                  example: 43
                M:
                  type: integer
                  example: 42
                UG:
                  type: integer
                  example: 5
            age:
              type: object
              properties:
                _17:
                  type: integer
                  example: 32
                _18_22:
                  type: integer
                  example: 51
                _23_27:
                  type: integer
                  example: 76
                _28_34:
                  type: integer
                  example: 50
                _35_44:
                  type: integer
                  example: 30
                _45_59:
                  type: integer
                  example: 15
                _60_:
                  type: integer
                  example: 10
                UA:
                  type: integer
                  example: 4
            store_id:
              type: integer
              example: 286
      sources:
        $ref: '#/definitions/sources'
  streamsBreakdown:
    type: object
    properties:
      isrc:
        $ref: '#/definitions/isrc'
      source_of_streams:
        type: array
        items:
          type: object
          description: Breakdown of source of streams
          properties:
            active:
              description: Statistics for active streams
              $ref: '#/definitions/sourceBreakdown'
            passive:
              description: Statistics for passive streams
              $ref: '#/definitions/sourceBreakdown'
            collection:
              description: Statistics for collection streams
              $ref: '#/definitions/sourceBreakdown'
            unknown:
              description: Statistics for unknown streams
              $ref: '#/definitions/sourceBreakdown'
            sources:
              $ref: '#/definitions/sources'
      streams_by_subscription:
        type: array
        items:
          type: object
          description: Breakdown of subscription type
          properties:
            subscription:
              description: Statistics for subscriptions
              $ref: '#/definitions/sourceBreakdown'
            ad_supported:
              description: Statistics for ad supported subscriptions
              $ref: '#/definitions/sourceBreakdown'
            mid_tier:
              description: Statistics for mid-tier subscriptions
              $ref: '#/definitions/sourceBreakdown'
            sources:
              $ref: '#/definitions/sources'
  streamsByCountry:
    type: object
    properties:
      isrc:
        $ref: '#/definitions/isrc'
      countries:
        type: array
        items:
          type: object
          properties:
            country_code:
              type: string
              example: 'US'
            items:
              $ref: '#/definitions/streamsTimeseries'
  streamsByStore:
    type: object
    properties:
      isrc:
        $ref: '#/definitions/isrc'
      stores:
        type: array
        items:
          type: object
          properties:
            id:
              type: integer
              example: 1
            name:
              type: string
              example: 'Apple Music'
            items:
              $ref: '#/definitions/streamsTimeseries'
  streamsAll:
    type: object
    properties:
      isrc:
        $ref: '#/definitions/isrc'
      items:
        type: array
        items:
          $ref: '#/definitions/streamsTimeseries'

  streams_1_day:
    type: number
    description: The number of streams over the past 24 hours
    example: 33
  growth_percentage_1_day:
    type: number
    example: 12.4
    description: (current 1 day streams - past 1 day streams) / past 1 day streams
  streams_7_days:
    type: number
    description: The number of streams over the past 7 days
    example: 50
  growth_percentage_7_days:
    type: number
    example: 12.4
    description: (current 7 day streams - past 7 day streams) / past 7 day streams
  streams_28_days:
    type: number
    description: The number of streams over the past 28 days
    example: 200
  growth_percentage_28_days:
    type: number
    example: 12.4
    description: (current 28 day streams - past 28 day streams) / past 28 day streams
  streams_all_time:
      type: number
      description: The number of all time streams
      example: 1000
  creations_1_day:
    type: number
    example: 12
    description: creations for 1 day
  creations_28_days:
    type: number
    example: 12
    description: creations for 28 days
  creations_7_days:
    type: number
    example: 12
    description: creations for 7 day
  creations_all_time:
    type: number
    example: 12
    description: creations for all time
  creations_growth_percentage_1_day:
    type: number
    example: 12
    description: (current 1 day creations - past 1 day creations) / past 1 day creations
  creations_growth_percentage_28_days:
    type: number
    example: 12
    description: (current 28 day creations - past 28 day creations) / past 28 day creations
  creations_growth_percentage_7_days:
    type: number
    example: 12
    description: (current 7 day creations - past 7 day creations) / past 7 day creations
  growth_percentage_183_days:
    type: number
    example: 12
    description: (current 183 day streams - past 183 day streams) / past 183 day streams
  growth_percentage_365_days:
    type: number
    example: 12
    description: (current 365 day streams - past 365 day streams) / past 365 day streams
  main_isrc:
    type: string
    example: US53Q1200099
    description: Top 28 days streams ISRC for sound recording family
  product_family_id:
    type: number
    example: 12
    description: GRPS product family id, that was used to group ISRCs into family.
  related_isrcs:
    type: array
    items:
      $ref: '#/definitions/isrc'
    example: ['US53Q1200099', 'US53Q1200010']
    description: ISRCs that are related in one product family. Usually those are different versions of one song title (speed up, instrumental etc).
  streams_183_days:
    type: number
    example: 12
    description: The number of streams over the past 183 days
  streams_365_days:
    type: number
    example: 12
    description: The number of streams over the past 365 days
  top5_tiktok_scores_by_country:
    type: array
    items:
      type: object
      properties:
        country:
          type: string
          example: 'US'
        score:
          type: number
    example: 12
    description: Array of objects containing country code and corresponding score
  views_1_day:
    type: number
    example: 12
    description: The number of views over the past 24 hours
  views_28_days:
    type: number
    example: 12
    description: The number of views over the past 28 days
  views_7_days:
    type: number
    example: 12
    description: The number of views over the past 7 days
  views_all_time:
    type: number
    example: 12
    description: The number of views for all time
  views_growth_percentage_1_day:
    type: number
    example: 12
    description: (current 1 day views - past 1 day views) / past 1 day views
  views_growth_percentage_28_days:
    type: number
    example: 12
    description: (current 28 day views - past 28 day views) / past 28 day views
  views_growth_percentage_7_days:
    type: number
    example: 12
    description: (current 7 day views - past 7 day views) / past 7 day views
  streams_1_day_prev:
    type: number
    example: 20
    description: The number of streams for the previous 1 day before today
  streams_7_days_prev:
    type: number
    example: 20
    description: The number of streams for the previous 7 days
  streams_28_days_prev:
    type: number
    example: 20
    description: The number of streams for the previous 28 days
  streams_183_days_prev:
    type: number
    example: 20
    description: The number of streams for the previous 183 days
  streams_365_days_prev:
    type: number
    example: 20
    description: The number of streams for the previous 365 days
  views_1_day_prev:
    type: number
    example: 20
    description: The number of views for the previous previous 1 day before today
  views_7_days_prev:
    type: number
    example: 20
    description: The number of views for the previous 7 days
  views_28_days_prev:
    type: number
    example: 20
    description: The number of views for the previous 28 days
  creations_1_day_prev:
    type: number
    example: 20
    description: The number of creations for the previous 1 day before today
  creations_7_days_prev:
    type: number
    example: 20
    description: The number of creations for the previous 7 days
  creations_28_days_prev:
    type: number
    example: 20
    description: The number of creations for the previous 28 days

  participantTrackStreamsAll:
    type: object
    properties:
      global_participant_id:
        $ref: '#/definitions/globalParticipantId'
      items:
        type: array
        items:
          $ref: '#/definitions/streamsTimeseries'
  participantTrackStreamsStore:
    type: object
    properties:
      global_participant_id:
        $ref: '#/definitions/globalParticipantId'
      stores:
        type: array
        items:
          type: object
          properties:
            id:
              type: integer
              example: 1
            name:
              type: string
              example: 'Apple Music'
            items:
              $ref: '#/definitions/streamsTimeseries'
  globalParticipantId:
    type: string
    description: The global participant ID for artist filtering
    example: 'f67b0892-f0bc-4575-b23e-59566ccb44bc'
  highwatermark:
    type: string
    description: Highwatermark date for requested type in YYYY-MM-DD format.
    example: '2021-08-10T00:00:00Z'
parameters:
  orchardProfileType:
    name: Orchard-Profile-Type
    description: Orchard profile type. Provided by ows-grass proxy in QA/Prod.
    in: header
    type: string
    required: true
    enum:
      - ArtistProfile
      - LabelProfile
  orchardProfileId:
    name: Orchard-Profile-Id
    description: Orchard profile id. Provided by ows-grass proxy in QA/Prod.
    in: header
    type: integer
    required: true
  orchardIdentityId:
    name: Orchard-Identity-Id
    description: Orchard identity id. Provided by ows-grass proxy in QA/Prod.
    in: header
    type: string
    required: true
  productId:
    name: productId
    description: Uniquely identifies a product
    type: string
    required: true
    in: path
  isrc:
    in: path
    name: isrc
    description: Industry Standard Recording Code
    type: string
    required: true
  isrcs:
    in: body
    name: isrcs
    description: List of Industry Standard Recording Code
    required: true
    schema:
      $ref: '#/definitions/isrcs'
  playlistId:
    name: playlistId
    description: Uniquely identifies a playlist
    type: string
    required: true
    in: path
  storeIds:
    in: query
    name: store_id
    description: Store id values used for global filters
    type: integer
    enum: [1, 286]
  labelIds:
    in: query
    name: label_ids
    description: Label ids to filter by
    type: integer
    enum: [1, 286]
  subaccountIds:
    in: query
    name: subaccount_ids
    description: Sub-account ids to filter by
    type: integer
    enum: [1, 286]
  countryCodes:
    in: query
    name: country_code
    description: Country code values used for global filters. Can be provided multiple times.
    type: array
    items:
      type: string
    collectionFormat: multi
  startDate:
    in: query
    name: start_date
    description: Start date used for global filters
    type: string
    format: '%Y-%m-%d/HIGHWATERMARK_DATE'
  endDate:
    in: query
    name: end_date
    description: Start date used for global filters
    type: string
    format: '%Y-%m-%d'
  days:
    in: query
    name: days
    description: Days back used for global filters
    type: integer
  orderBy:
    in: query
    name: order_by
    description: order by column provided
    type: string
  orderDir:
    in: query
    name: order_dir
    description: order direction provided
    type: string
  ownerCategories:
    in: query
    name: owner_category
    description: Owner category values used for filtering placements
    type: string
    enum: ['CURATOR', 'EDITORIAL', 'USER_GENERATED']
  offset:
    in: query
    name: offset
    type: integer
    description: The number of items to skip before starting to collect the result set
  limit:
    in: query
    name: limit
    type: integer
    description: The numbers of items to return
  distributors:
    in: query
    name: distributors
    type: string
    description: The distributor of a track
  parentCompany:
    in: query
    name: parent_company
    type: string
    description: The parent company
  companyBrand:
    in: query
    name: company_brand
    type: string
    description: The company brand
  serviceTier:
    in: query
    name: service_tier
    type: string
    description: The service tier
  artistIds:
    in: query
    name: artist_ids
    type: string
    description: The global participant ID to do artist filtering
    enum: ['f67b0892-f0bc-4575-b23e-59566ccb44bc']
  globalParticipantIds:
    in: query
    name: global_participant_ids
    type: string
    description: The global participant ID for artist filtering
    enum: ['f67b0892-f0bc-4575-b23e-59566ccb44bc']
  globalParticipantId:
    in: path
    name: global_participant_id
    type: string
    description: The global participant ID for artist filtering
    required: true
  upc:
    in: path
    name: upc
    type: string
    description: If UPC to do product filtering
  multiProduct:
    in: path
    name: multi_product
    type: boolean
    description: Return multi-product data if True
  type:
    name: type
    description: Type for which to get the highwatermark date (videos, downloads, streams)
    type: string
    required: true
    in: query
