Skip to content

Integrating the API#

The best way to customize your experience is to query the Quarter4 APIs from your server side applications.

Authenticating and Querying the APIs#

To call the api endpoints from your application, an api key must be included in each request. Here is an example call to the American Football API using API key authentication:

Common api call
curl -X GET "https://api.quarter4.io/american-football/v2/leagues?api_key={your_api_key}"

You must replace {your_api_key} with your API key.

Danger

The API key is a secret key associated with your account. Do not share it or expose it in public web pages. Doing so would allow anyone to make queries as if they were you. If you think your API key may have been compromised, contact your Quarter4 Account representative immediately to disable your current key and receive a new key.

All API responses use the JSON:API format and accept the standard page, count, sort and filter options. See the specific API documentation for further details.

IDs in the Quarter4 APIs#

Each entity in the Quarter4 API is identified by a unique GUID (Global Unique Identifiers). These are used as a way to directly identify the given entity within the API, across multiple Quarter4 APIs.

GUID IDs follow a specific structure: XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX.

Example Response
{
  "links": {
    "self": "\/american-football\/v2\/leagues"
  },
  "meta": {
    "totalItems": 1,
    "itemsPerPage": 30,
    "currentPage": 1
  },
  "data": [
    {
      "id": "\/american-football\/v2\/leagues\/38344248-9889-11eb-a8ab-0647cdb505d0",
      "type": "League",
      "attributes": {
        "name": "National Football League",
        "abbreviation": "NFL",
        "displayName": "National Football League",
        "uuid": "38344248-9889-11eb-a8ab-0647cdb505d0"
      },
      "relationships": {
        "conferences": {
          "data": [
            {
              "type": "Conference",
              "id": "\/american-football\/v2\/conferences\/3fa26d2a-bb85-431e-ba2d-e31f39520359"
            },
            {
              "type": "Conference",
              "id": "\/american-football\/v2\/conferences\/cae32df8-33fb-4b80-a8ed-0b0c0a6739d4"
            }
          ]
        }
      }
    }
  ]
}

These GUIDs may appear as an id or a uuid in various APIs, or both values may be present. The JSON:API format may also prefix the is with the API call's path, such as:

JAON:API ID
/american-football/v2/leagues/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX

In this case the GUID for the entity is XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX but the unique entity can be retrieved within the API by calling:

Calling an entity endpoint using an id
https://api.quarter4.io/american-football/v2/leagues/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX

Third Party Partner IDS#

If your company and Quarter4 have a relationship with the same third party datasource, it may be possible to include additional identifiers on some entities to make data ID mapping easier. Please contact your account representative to see what additional mappings we offer.