Organization Service V4

Organization Service


Project maintained by npr Hosted on GitHub Pages — Theme by mattgraham

Back to API Documentation

GET Service

/v4/services/<service ID>

Description

Retrieves and returns the data for the Service associated with the service ID path parameter.

Data Format

A successful retrieval will result in a 200 status code and JSON body with the following attributes:

Attribute Data Type Description
generated string a date and time string indicating when this response was generated
id string the service ID associated with this Service
name string [OPTIONAL] The internally-used name for this Service. This field should not be used for branding content; see the brand object for that purpose.
brand object an object containing branding data for this Service
services array an array of objects representing services associated with this Service if it is a Consortium; see “Consortia” below

Consortia

If this Service is a Consortium, the data returned by this endpoint may contain a services attribute. This attribute’s value will be an array of objects, each containing the following attributes:

Attribute Data Type Description
id string the service ID associated with this Service
name string [OPTIONAL] The internally-used name for this Service. This field should not be used for branding content; see the brand object for that purpose.
brand object an object containing branding data for this Service

brand

The brand object, used in both tables above, will contain the following attributes:

Attribute Data Type Description
displayName string the name to be used when rendering this Service’s data in a client
logos array [OPTIONAL] a list of link objects to logos that should be used to brand this Service’s content

The objects in the logos array will contain the following attributes:

Attribute Data Type Description
href string a URL to the logo image file
contentType string an RGC6838-compliant MIME type indicating the expected filetype of the linked logo (ex: image/png)
height integer the expected height, in pixels, of the linked image file
width integer the expected width, in pixels, of the linked image file
aspectRatio string the expected aspect ratio of the linked image file in the format <WIDTH>:<HEIGHT> (ex: 3:1)

Example Response

{
  "generated": "Mon Nov 15 2021 07:05:01 GMT+0000 (Coordinated Universal Time)",
  "id": "c456",
  "name": "ARNNet",
  "brand": {
    "displayName": "Action Radio News Network",
    "logos": [
      {
        "href": "https://media.npr.org/images/stations/logos/arnn.gif",
        "contentType": "image/gif",
        "height": 46,
        "width": 138,
        "aspectRatio": "3:1"
      },
      {
        "href": "https://media.npr.org/images/stations/logos/arnn.png",
        "contentType": "image/png",
        "height": 190,
        "width": 450,
        "aspectRatio": "2.37:1"
      }
    ]
  },
  "services": [
    {
      "id": "s123",
      "name": "Smallville Radio",
      "brand": {
        "displayName": "Smallville Radio",
        "logos": [
          {
            "href": "https://media.npr.org/images/stations/logos/smallville.gif",
            "contentType": "image/gif",
            "height": 46,
            "width": 138,
            "aspectRatio": "3:1"
          },
          {
            "href": "https://media.npr.org/images/stations/logos/smallville.png",
            "contentType": "image/png",
            "height": 190,
            "width": 450,
            "aspectRatio": "2.37:1"
          }
        ]
      }
    },
    {
      "id": "s456",
      "name": "CC News",
      "brand": {
        "displayName": "Central City News",
        "logos": [
          {
            "href": "https://media.npr.org/images/stations/logos/ccn.gif",
            "contentType": "image/gif",
            "height": 46,
            "width": 138,
            "aspectRatio": "3:1"
          },
          {
            "href": "https://media.npr.org/images/stations/logos/ccn.png",
            "contentType": "image/png",
            "height": 190,
            "width": 450,
            "aspectRatio": "2.37:1"
          }
        ]
      }
    },
    {
      "id": "s777",
      "name": "Gotham Daily",
      "brand": {
        "displayName": "Gotham Daily",
        "logos": [
          {
            "href": "https://media.npr.org/images/stations/logos/gotham.gif",
            "contentType": "image/gif",
            "height": 46,
            "width": 138,
            "aspectRatio": "3:1"
          },
          {
            "href": "https://media.npr.org/images/stations/logos/gotham.png",
            "contentType": "image/png",
            "height": 190,
            "width": 450,
            "aspectRatio": "2.37:1"
          }
        ]
      }
    }
  ]
}