Authentication

To successfully interact with the API endpoints, it is essential to include your unique API Token in the request header. This token must be passed using the header field named Ocp-Apim-Subscription-Key. This ensures secure access to the resources and validates that the request is authorized.

For example, when making a GET request to the API, you will need to structure your curl command as follows:

curl -v -X GET "https://apim-public-staging.trapezegroupazure.co.uk/trs/staging/3rdparty/restful/lts/v1/public/locationLookup?query=Edinburgh&excludeStopArea=true" -H "Cache-Control: no-cache" -H "Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY"

In this command:

  • -v enables verbose mode, providing detailed information about the request and response for debugging purposes.

  • -X GET specifies that the request method is GET, indicating that you are retrieving data from the specified URL.

  • The URL https://apim-public-staging.trapezegroupazure.co.uk/trs/staging/3rdparty/restful/lts/v1/public/locationLookup is the endpoint you are accessing. In this case, the query parameter query=Edinburgh is used to look up locations related to the Edinburgh area, while excludeStopArea=true is an additional parameter to refine the search results by excluding stop areas.

  • The Cache-Control: no-cache header prevents the caching of the response, ensuring that fresh data is retrieved with each request.

  • The Ocp-Apim-Subscription-Key header is where you include your actual subscription key, replacing YOUR_SUBSCRIPTION_KEY with the token you received upon registration.

Ensure that the API Token is kept secure and is never exposed in client-side code or shared in an unsecured environment.

Obtaining an API Key

Please use the links provided below to request access for an API key: