Home Template Get Started

Get Started

Before You Start

To use the DaaS API you will need the following:

  • An x-api-key – which should be included in the header.
  • A user_id and password – to generate token.

Both are provided by Gatehouse, and you can contact us here

Generate your first token

We will first showcase how to retrieve the token from swagger and how it also can be accomplished by using curl.
Below you see the login for DaaS API using swagger, here we need update the x-api-key and json body with user_id and password values received

Swagger UI for login

Swagger also conveniently generate the equivalent curl. You can copy the curl with the bottom in the lower right corner our swagger UI for DaaS API.

curl command

Using either of those two options will response with 201 HTML status code with a json body shown below.

Response containing token from login POST request.

Now with the token, we can start by retrieving the locodes

Return a list of locodes

Similar to the login we need the x-api-key, but the user_id and password is not need now that we have the token. So lets look at the GET request for locodes.

Request for locodes from swagger UI

In the parameters tab, two variable needs to be set, the first one is for the x-api-key similar to the login request. The second uses the token, it needs a prefix like shown on the image (“Bearer” followed by a white-space and then the token value) Executing this request will response with the following.

#TODO when locodes are up and running

Updated on 08 February, 2024