This is the old developer portal

Entur's developer portal has moved to developer.entur.no. Use the new portal for the latest documentation. This old version will be retired once its content has moved, but API changes are still published here for now, under News and Notifications.

Products

Welcome to Products API.

The products API provides endpoints for generating offers, fetching, creating and changing datamanaged objects.

Headers

Authentication

The endpoints concerning datamanaged objects is protected by Auth0, which means that you'll need an API Key to access them. To get an access token from Auth0 you can do as follows:

curl --request POST \
  --url 'https://partner.staging.entur.org/oauth/token' \
  --header 'content-type: application/json' \
  --data '{"grant_type":"client_credentials","client_id": "<clientid>","client_secret": "<clientsecret>","audience": "https://api.staging.entur.io"}

In the output, locate the access_token value.

If you wish to extract the access token directly into a shell variable, do this:

export TOKEN=$(curl --request POST \
  --url 'https://partner.staging.entur.org/oauth/token' \
  --header 'content-type: application/json' \
  --data '{"grant_type":"client_credentials","client_id": "<clientid>","client_secret": "<clientsecret>","audience": "https://api.staging.entur.io"}\
  | jq .access_token | sed -e 's/"//g')

Language code

Most datamanaged objects have a name and description in several languages. It is possible to get it in a certain language by adding "Accept-Language" key in the header with a code for the language. It is not possible to specify multiple languages. However, if none is specified, name and description will appear in all available languages.

Example

DescriptionHeader keyExample value
Language codeAccept-Languagenob
AuthorizationAuthorizationBearer xxxxxxx.yyyyyyyy.zzzzzzzzz