Setting up an API call
The goal of this page is to give examples on how to set up an API call in your application.

Setting up a call in the following applications

Anchor link to the article.

Performing a request in Reqbin.com

Go to Reqbin.com and add the endpoint URL in the URL-box. Depending on the API, select a POST or GET request. Be sure to select "DE" or "EXT" as the server for faster processed requests. Add the message / request in the Content tab. Add the x-api-key header for authentication to the Headers tab.
Press "send" to perform the request.
Curl/Bash
1
#!/bin/bash
2
3
curl -X POST https://api.altum.ai/sandbox/avm -H "x-api-key: m2ipzWVV3e9yPU9TduqpY4oZTbcEHCGj31GLVLYB" -H "Content-Type: application/json" --data-binary @- <<DATA
4
{
5
"postcode" : "1234AB",
6
"housenumber" : "1"
7
}
8
DATA
Copied!

Performing a request in Insomnia

Download and install the free program Insomnia. Create a new 'Request collection'. Add a 'New Request' (CTRL + N) and gives this request a name. Select POST or GET depending on the API and use JSON for the Body Text when Posting.
Add the endpoint URL of the API behind the POST/GET function into the endpoint URL box. Then add the JSON message to the JSON entry field. Lastly, configure the headers to include the Content-Type and the x-api-key for authentication and press "Send".
Message
1
curl --request POST \
2
--url https://api.altum.ai/sustainability \
3
--header 'Content-Type: application/json' \
4
--header 'x-api-key: m2ipzWVV3e9yPU9TduqpY4oZTbcEHCGj31GLVLYB' \
5
--data '{
6
"data": {
7
"lock_measures": {
8
"lock": [
9
"wall_insulation"
10
]
11
},
12
"max_investment": 20000,
13
"gas_usage": 3000,
14
"post_code": "2771DS",
15
"house_number": "87",
16
"target_label": "A",
17
"inner_surface_area": 130,
18
"inhabitants": 3,
19
"replace_boiler": true,
20
"heat_pump_allowed": true,
21
"search_criteria": 1,
22
"search_options": 2,
23
"house-type": 1,
24
"natural_gas": 0,
25
"solar_panels_surface": 1,
26
"watt_panels": true,
27
"wall_insulation": 1,
28
"roof_insulation": 1,
29
"floor_insulation": 1,
30
"living_room_windows": 1,
31
"bedroom_windows": 1,
32
"installation": 4,
33
"shower": 0,
34
"ventilation": 0,
35
"solar_panels": 10
36
}
37
}'
Copied!

Performing a request in Postman

Download the Postman app. Create a new HTTP Request. Select the method GET or POST depending on the API and add the endpoint URL. Set authorization to No Auth.
Add the x-api-key header and API key for authentication. Set the Body to raw and JSON when performing a POST request. Press "Send"
Request
Headers
Body
Last modified 6d ago