Organization Service V4

Organization Service


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

Back to API Documentation

GET Organization

/v4/organizations/<org ID>

Description

Retrieves and returns the data for the Organization associated with the org 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 org ID associated with this Organization
services array an array containing zero or more objects representing the Services associated with this Organization

The objects in the services array will contain the following attributes; this object will match the data returned for the GET Service endpoint.

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

The brand object 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": "123",
  "services": [
    {
      "id": "s456",
      "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": "s789",
      "name": "Daily Planet",
      "brand": {
        "displayName": "Daily Planet Productions",
        "logos": [
          {
            "href": "https://media.npr.org/images/stations/logos/dpp.gif",
            "contentType": "image/gif",
            "height": 46,
            "width": 138,
            "aspectRatio": "3:1"
          },
          {
            "href": "https://media.npr.org/images/stations/logos/dpp.png",
            "contentType": "image/png",
            "height": 190,
            "width": 450,
            "aspectRatio": "2.37:1"
          }
        ]
      }
    }
  ]
}