Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
36 lines (22 sloc) 2.46 KB

Activity list references

Using the OpenActive Activity List

In order to allow your data to be easily searchable across a wide range of applications, it must contain references to the OpenActive Activity List, taking the id and prefLabel from the list and using an inScheme of "https://openactive.io/activity-list", as shown below:

"activity": [
  {
    "type": "Concept",
    "id": "https://openactive.io/activity-list#5e78bcbe-36db-425a-9064-bf96d09cc351",
    "prefLabel": "Bodypump™",
    "inScheme": "https://openactive.io/activity-list"
  }
]

A JSON-LD definition of the OpenActive Activity List controlled vocabulary is available for live integration into applications.

This controlled vocabulary SHOULD be retrieved live within an application using an HTTP GET, to ensure that the most up-to-date version is displayed to the user. To access this controlled vocabulary the application MUST GET the URL "https://openactive.io/activity-list/activity-list.jsonld" (note there is no www in the URL) which does not require a specific Accept header, and is cached via CDN. The controlled vocabulary is also available via a GET of the URL "https://openactive.io/activity-list" using an Accept header of application/ld+json, for completeness, however this shorter URL MUST NOT be used in production.

Storing references to the OpenActive Activity List

Within your application, it is advisable to store the full id of an OpenActive Activity List Concept against each opportunity in your database, as the prefLabel and other properties are likely to change over time.

Your application may also store the prefLabel alongside the id at the point of the associating an OpenActive Activity List Concept with an opportunity, to remove the need to reference the activity list while outputting open data. It is the responsibility of the data user to use the latest prefLabel when rendering the open data it receives.

Rendering the OpenActive Activity List with SKOS.js

We recommend using SKOS.js to implement any activity list client-side rendering, to allow your users to select an activity from the hierarchical activity list to associate with an Event.

Activity List Dropdown Example

{% embed url="https://jsfiddle.net/nickevansuk/246d5s79/" caption="" %}

You can’t perform that action at this time.