Retrieve a list of locations
curl --request GET \
--url https://api.spirii.com/locationsimport requests
url = "https://api.spirii.com/locations"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.spirii.com/locations', 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",
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"
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")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.spirii.com/locations")
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{
"data": [
{
"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
}
},
{
"id": 1174,
"name": "EWII (building)",
"streetAddress": "Kokbjerg 30",
"zipCode": "6000",
"city": "Kolding",
"country": "Denmark",
"operatorId": 1,
"companyId": 7,
"type": "Parking lot",
"isPublic": true,
"coordinate": {
"lat": 55.535107,
"lon": 9.486873
},
"fuseCapacity": 50,
"evses": [
"DK.SPI.Z135*1",
"DK.SPI.Z136*1"
],
"appUsers": [],
"orders": [],
"pricing": {
"perKwh": 3,
"currency": "DKK",
"vat": 0.25
}
},
{
"id": 1175,
"name": "EWII (Public parking)",
"streetAddress": "Kokbjerg 30",
"zipCode": "6000",
"city": "Kolding",
"country": "Denmark",
"operatorId": 1,
"companyId": 7,
"type": "Parking lot",
"isPublic": true,
"coordinate": {
"lat": 55.536073,
"lon": 9.487332
},
"fuseCapacity": 20,
"evses": [
"DK.SPI.Z134*1"
],
"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 a list of locations
GET
/
locations
Retrieve a list of locations
curl --request GET \
--url https://api.spirii.com/locationsimport requests
url = "https://api.spirii.com/locations"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.spirii.com/locations', 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",
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"
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")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.spirii.com/locations")
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{
"data": [
{
"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
}
},
{
"id": 1174,
"name": "EWII (building)",
"streetAddress": "Kokbjerg 30",
"zipCode": "6000",
"city": "Kolding",
"country": "Denmark",
"operatorId": 1,
"companyId": 7,
"type": "Parking lot",
"isPublic": true,
"coordinate": {
"lat": 55.535107,
"lon": 9.486873
},
"fuseCapacity": 50,
"evses": [
"DK.SPI.Z135*1",
"DK.SPI.Z136*1"
],
"appUsers": [],
"orders": [],
"pricing": {
"perKwh": 3,
"currency": "DKK",
"vat": 0.25
}
},
{
"id": 1175,
"name": "EWII (Public parking)",
"streetAddress": "Kokbjerg 30",
"zipCode": "6000",
"city": "Kolding",
"country": "Denmark",
"operatorId": 1,
"companyId": 7,
"type": "Parking lot",
"isPublic": true,
"coordinate": {
"lat": 55.536073,
"lon": 9.487332
},
"fuseCapacity": 20,
"evses": [
"DK.SPI.Z134*1"
],
"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
}
}Query Parameters
Only retrieve informations associated with an appUserId
Example:
1
Only retrieve locations associated with a specific orderId
Example:
10
The number of items to skip before starting to collect the result set
Example:
250
Number of record to collect
Required range:
x <= 2000Example:
250
Response
Location Data
Location data
Show child attributes
Show child attributes
Was this page helpful?