Skip to content

Getting started!

Prerequisites

flinkey box which is not yet assigned to a car and having a valid service

flinkey-API-Key (value can be found at the Developer page of the flinkey Portal)

API Manager credentials - The credentials will be given to you via Email once the Portalmanager adds you as an API Manager

Step-by-Step Guide

1. Download Postman collection

Our Step-by-Step Guide is provided as Postman collection. Please download and install Postman firstly if you haven't done it yet. Then click on the following button to get your copy of the flinkey API Postman collection:

Postman

After getting your copy of the flinkey API Postman collection set the Postman environment to

flinkey API v3 Step-by-Step Guide.

1.1. Placeholder texts

The placeholder texts of the requests in the Postman collection which need to be changed by you in the next steps of this Step-by-Step Guide are always given in the following format:

{Your sample placeholder changes here}
Please note:

  1. Only text enclose by curly braces is a placeholder text.
  2. If you replace a placeholder text, also remove the curly braces.

2. Authentication

The second thing we need to do is getting an authentication token. In your Postman collection copy of the flinkey API: expand the Authentication API folder and then select the request Get token. Please fill in all given parameters in the Body tab of the request that only contain placeholder texts. Also set the CURRENT VALUE of the field Your-flinkey-API-Key of the Postman environment flinkey API v3 Step-by-Step Guide. Then click Send in Postman. You should receive a response like this:

Response

200 OK

{
  "token_type": "Bearer",
  "expires_in": "3600",
  "access_token": "eyJ0eXAiOiJ..."
}

3. Get customers

The third step is getting the customers of the API Manager you received a token for in the previous step. In your Postman collection copy of the flinkey API: expand the Customer API folder and then select the request Get customers. Then click Send in Postman. You should receive a response as follows:

Response

200 OK

[
  {
    "id": 1,
    "name": "TestName"
  }
]

The response is the list of customers your API Manager account is assigned to. Normally, there is only one customer in the array.

4. Create user

The fourth step is creating the user. In your Postman collection copy of the flinkey API: expand the User API folder and then select the request Create user. Please fill in the e-mail address parameter in the Body tab of the request. Also fill in the optional parameters in the Body tab as you wish that only contain placeholder texts. Remove the other optional parameters in the Body tab you didn't fill in. Then click Send in Postman. You should receive a response as this:

Response

201 CREATED

[
  {
  "id": 2143,
  "password": "SamplePassword"
  }
]

The property id of the JSON response is the ID of the newly created user. The property password of the JSON response is the password of the newly created user.

5. Assign user to car

The fifth step is assigning the user to the car. In your Postman collection copy of the flinkey API: expand the Car API folder and then select the request Assign user to car. Please fill in the placeholders in the Body tab. Please note that they will be processed in the flinkey API in UTC timezone with the format: yyyy-MM-ddTHH:mm:ssZ. You could also let the end parameter be empty in the Body tab to create an unrestricted assignment. Then click Send in Postman. You should receive a response like this:

Response

204 NO CONTENT

6. Finish

Now you are good to go! The user you created in this Step-by-Step Guide is able to opclose the car you also created previously in this tutorial. Just download the flinkey app and have a test.