Retrieve location by ID
curl --request GET \
--url https://api.spirii.com/locations/{id}import requests
url = "https://api.spirii.com/locations/{id}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.spirii.com/locations/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.spirii.com/locations/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.spirii.com/locations/{id}"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.spirii.com/locations/{id}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.spirii.com/locations/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"id": 1158,
"name": "ERWII",
"streetAddress": "Kokbjerg 30",
"zipCode": "6000",
"city": "Kolding",
"country": "Denmark",
"operatorId": 1,
"companyId": 7,
"type": "Parking lot",
"isPublic": true,
"coordinate": {
"lat": 55.53578,
"lon": 9.486323
},
"fuseCapacity": 32,
"chargeBoxes": [
{
"id": 1,
"cpSerialNumber": "CPSN1",
"CBID": "DK.SPI.Z1",
"firstUsageAt": "2021-01-29 06:45:22",
"evses": [
"DK.SPI.Z1*1",
"DK.SPI.Z1*2"
]
},
{
"id": 2,
"cpSerialNumber": "CPSN2",
"CBID": "DK.SPI.Z2",
"firstUsageAt": "2021-01-29 06:45:22",
"evses": [
"DK.SPI.Z2*1",
"DK.SPI.Z2*2"
]
}
],
"appUsers": [],
"orders": [],
"pricing": {
"perKwh": 3,
"currency": "DKK",
"vat": 0.25
}
}{
"error": {
"message": "Querystring parameter `id` is not allowed",
"statusCode": 400,
"code": "QueryParamNotAllowed"
}
}{
"error": {
"message": "Something went wroing, try again later",
"statusCode": 500
}
}Retrieve location by ID
GET
/
locations
/
{id}
Retrieve location by ID
curl --request GET \
--url https://api.spirii.com/locations/{id}import requests
url = "https://api.spirii.com/locations/{id}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.spirii.com/locations/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.spirii.com/locations/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.spirii.com/locations/{id}"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.spirii.com/locations/{id}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.spirii.com/locations/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"id": 1158,
"name": "ERWII",
"streetAddress": "Kokbjerg 30",
"zipCode": "6000",
"city": "Kolding",
"country": "Denmark",
"operatorId": 1,
"companyId": 7,
"type": "Parking lot",
"isPublic": true,
"coordinate": {
"lat": 55.53578,
"lon": 9.486323
},
"fuseCapacity": 32,
"chargeBoxes": [
{
"id": 1,
"cpSerialNumber": "CPSN1",
"CBID": "DK.SPI.Z1",
"firstUsageAt": "2021-01-29 06:45:22",
"evses": [
"DK.SPI.Z1*1",
"DK.SPI.Z1*2"
]
},
{
"id": 2,
"cpSerialNumber": "CPSN2",
"CBID": "DK.SPI.Z2",
"firstUsageAt": "2021-01-29 06:45:22",
"evses": [
"DK.SPI.Z2*1",
"DK.SPI.Z2*2"
]
}
],
"appUsers": [],
"orders": [],
"pricing": {
"perKwh": 3,
"currency": "DKK",
"vat": 0.25
}
}{
"error": {
"message": "Querystring parameter `id` is not allowed",
"statusCode": 400,
"code": "QueryParamNotAllowed"
}
}{
"error": {
"message": "Something went wroing, try again later",
"statusCode": 500
}
}Path Parameters
location ID to retrieve
Example:
1
Response
Location data of specific location
id
Example:
1
name
Example:
"Kokbjerg"
street
Example:
"Kokbjerg 30"
zip code
Example:
"6000"
city
Example:
"Kolding"
country
Example:
"Denmark"
operator id
Example:
1
company id
Example:
1
location type
Example:
"Parking lot"
Public status identifier
Example:
true
Show child attributes
Show child attributes
fuse capacity
Example:
32
ChargeBoxes
Show child attributes
Show child attributes
users id
orders id
Example:
1
Show child attributes
Show child attributes
Was this page helpful?