API Reference

Retrieve on-demand content using its unique ID

/ondemand/{odIds}

Returns information about on-demand content, using its odId.

It is possible to retrieve up to five items of on-demand content by requesting them using their on-demand id values in a comma separated list.

Endpoint

Base URL: https://api.radioplayer.org/v2/ondemand/{odIds}

Request Parameters

Header Fields

To find out how to correctly construct authentication headers for the Radioplayer Partner API (WRAPI) please see the Authentication guide.

Path Parameters

Path Parameters

Look up on demand item

/v2/ondemand/?37224%3Aodp%3A%2Fcrid%3A%2F%2Fwww%2Eclassichits%2Eie%2F%3FrpAodUrl%3Dhttps%3A%2F%2Fwww%2Eclassichits%2Eie%2Fpodcasts%2Fniall%2Dboylan%2F1632%2Emp3
PATH PARAMETER VALUE
{odIds} Required. The {odIds} of up to five specific on-demand items.

Response

When successful, the HTTP status code in the response header is 200 OK.

content-type: application/json; charset=utf-8
x-ratelimit-limit: 300000
x-ratelimit-remaining: 285030
x-ratelimit-reset: 1585699200

The specified on-demand items are returned in JSON format

If there is an error, the header returns an error status code. error status code.

The WRAPI also includes information about your monthly request quota in the returned header:

This includes information on:

  • Your total monthly quota
  • How many requests you have remaining for the month
  • When the quota will be reset, given as a UNIX timestamp

The returned response body consists of a meta and data object.

Sample response

{
  "data": [
    {
      "data": [
        {
          "id": "37224:odp:/crid://www.classichits.ie/?rpAodUrl=https://www.classichits.ie/podcasts/niall-boylan/1632.mp3",
          "multimedia": [
            {
              "url": "https://mm.aiircdn.com/528/5bed4a110b44c.png",
              "language": "en",
              "type": "logo_unrestricted",
              "width": 1400,
              "height": 1400,
              "index": 0
            }
          ],
          "onDemandStreams": [
            {
              "streamSource": {
                "url": "https://www.classichits.ie/podcasts/niall-boylan/1632.mp3",
                "mimeValue": "audio/mpeg"
              },
              "bitRate": {
                "target": 196000
              },
              "availableStart": "2020-03-27T15:45:46Z",
              "availableStop": "2020-03-28T18:00:59Z"
            }
          ],
          "series": {
            "id": "theniallboylanshow:wehearyourgoodnewsstories!"
          },
          "description": "On the second part of Fridays show, Niall Boylan asked to hear your good news stories! He spoke to Richard who witnessed something lovely, Carol, who just met her new grandson through the window due to social distancing rules and Gary Cunnigham lead us into the weekend with a lovely poem The Niall Boylan Show is broadcast every day on Classic Hits from 12pm-2pm and from 9pm-1am Monday to Thursday. ",
          "name": "The Niall Boylan Show: We hear your good news stories!",
          "rpuid": "37224",
          "country": "372"
        }
      ],
      "meta": {
        "country": "372",
        "rpuid": "37224",
        "paginated": false,
        "nesting": false,
        "fromCache": false,
        "cacheExpiresAt": 1585339627788,
        "count": 1
      }
    }
  ],
  "meta": {
    "nesting": true,
    "dataType": "ondemand",
    "count": 1,
    "fromCache": false,
    "cacheExpiresAt": 1585335607791,
    "paginated": false
  }
}

The possible meta field values for this endpoint are:

FIELD VALUE
paginated Optional, Boolean. Sets how or if results are grouped into pages.

In this endpoint, paginated is set to false by default.

For more information on pagination, see the API Documentation index.
nesting Optional, Boolean. Indicates whether full data objects are nested within other objects.

In this endpoint, nesting is set to true. The items are returned in a nested list.

For more information on nesting, see the API Documentation index.
dataType Object type returned by the request. In this case it is ondemand.
count Optional, string. A number describing how many items are in the data set.
fromCache Optional, Boolean. Indicates whether this data came from cached data.

For more information on caching, please see the API Documentation index.
cacheExpiresAt Optional. UNIX timestamp indicating when the cache will expire.

For more information on caching, please see the API Documentation index.

The expected data field values for this endpoint are:

FIELD VALUE
id String. Unique identifier for the request on-demand item.
multimedia Object. Specifying the available image assets
↳ url URL. The URL of the visual asset.
↳ language String. Language of the image asset. Useful for image that may display lines of text
↳ type String, constant. This is always logo_unrestricted as per the DAB-EPG spec
↳ width Integer. The number of pixels representing the width of the image.
↳ height Integer. The number of pixels representing the height of the image.
↳ index Integer. Where multiple images of the same size are offered, the index indicates the order to try each resource with 0 being the most preferred asset.
onDemandStreams Object. Describes the available audio streams for the on-demand content
streamSource Object. One or multiple objects which describe the available streams
↳ url String. The URL for the available audio stream
↳ mimeValue String. MIME type of the audio stream
bitrate
↳ target
Integer. The quoted bitrate of the stream in bits per second
↳ availableStart RFC Timestamp. The date and time (in GMT) of when the audio stream can be made available to the public.
↳ availableStop RFC Timestamp. The date and time (in GMT) of when the audio stream must be withdrawn from public access
series Object. Where an on-demand episode is part of a series, this object provides additional information.
↳ id String. An identifier of the parent series to which this episode relates
description String. A short textual description of the programme
name String. The name of the episode.
rpuid Integer. A unique identifier relating to the radio station that published the OD content
country Integer. ISO numeric country code of the station that published the OD content.