Skip to main content

Quick Start

Step 1: Obtain your API keys and your endpoint url#

To use the service, you need an endpoint url and an API key to add to the request headers.

To get your API key, please send a request to techsupport@bankify.io.

Step 2: Create a code and password#

Create a domain for your data in the system by entering a new usercode, password and an organization name.

The usercode must be at least 5 characters long and the password must be alphanumeric and at least 7 characters long.

curl --location --request POST 'yourendpointurlhere/api/v1/organizations/?api_key=yourapikeyhere' \
--header 'Content-Type: application/json' \
--data-raw '{
"code": "testorg",
"name": "Test Organization",
"password": "SuperSecretPassw0rd"
}'

Successful response:

{"name":"Test Organization","code":"testorg"}

Step 3: Log in#

Log in with the usercode and password you created in the previous step.

curl --location --request POST 'yourendpointurlhere/auth/v1/authenticate/?api_key=yourapikeyhere' \
--header 'Content-Type: application/json' \
--data-raw '{
"code": "testorg",
"password": "SuperSecretPassw0rd"
}'

Successful response:

{"token":"eyJhbGciOiJIUzI1...."}

Please note the token your received in the response, as this token is needed in all the subsequent requests.

Step 4: Check that you are logged in#

Make a request to any of the methods requiring logging in. Add the token you received in the previous step to the Authorization header.

curl --location --request GET 'yourendpointurlhere/api/v1/organizations/current?api_key=yourapikeyhere' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1....'

Successful response:

{"name":"Test Organization","code":"testorg"}

That's it!#

Now you can use any endpoints described in the Swagger documentation.

The workflow after logging in is creating vehicles, and then querying the green alternatives, total cost and total carbon emissions for them.

Mass import of vehicle data is also possible, for that please contact techsupport@bankify.io.