Retrieves locations
curl --request GET \
--url https://api.chargecloud.dev/api/v1/assets/locations \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.chargecloud.dev/api/v1/assets/locations"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.chargecloud.dev/api/v1/assets/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.chargecloud.dev/api/v1/assets/locations",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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.chargecloud.dev/api/v1/assets/locations"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.chargecloud.dev/api/v1/assets/locations")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.chargecloud.dev/api/v1/assets/locations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"locations": [
{
"id": 1,
"created_at": "2023-12-25",
"updated_at": "2023-12-25",
"modification_date": "2023-12-25",
"controllers": [
{
"controller_uuid": "<string>"
}
],
"name": "<string>",
"street": "<string>",
"postal_code": "<string>",
"city": "<string>",
"latitude": "50.946022",
"longitude": "6.942467",
"operator": "<string>",
"operator_id": 1,
"support_hotline": "<string>",
"publish": true,
"identifier": "BUS02",
"house_number": "<string>",
"district": "<string>",
"rural_district": "<string>",
"height": 1,
"directions": "<string>",
"description": "<string>",
"website": "<string>",
"comment": "<string>",
"partner": "<string>",
"accounter": "<string>",
"comment_usage_agreement": "<string>",
"level_measurement": "<string>",
"network_carrier": "<string>",
"available_power": "<string>",
"additional_conditions": "<string>",
"contract_id": 1,
"facility_types": [
{
"id": 123,
"uuid": "<string>",
"name": "<string>"
}
]
}
],
"pagination": {
"page": "1",
"total_pages": "5",
"page_size": "10",
"has_more": "true"
}
}{
"error": "<string>"
}{
"error": "<string>",
"pagination": {
"page": "1",
"total_pages": "5",
"page_size": "10",
"has_more": "true"
}
}{
"error": "<string>"
}{
"errors": [
{
"errorKey": "<string>",
"message": "<string>",
"parameter": "<string>"
}
]
}{
"error": "<string>"
}Locations
Retrieves locations
Retrieves locations. Required permission: assets:location:list
GET
/
api
/
v1
/
assets
/
locations
Retrieves locations
curl --request GET \
--url https://api.chargecloud.dev/api/v1/assets/locations \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.chargecloud.dev/api/v1/assets/locations"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.chargecloud.dev/api/v1/assets/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.chargecloud.dev/api/v1/assets/locations",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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.chargecloud.dev/api/v1/assets/locations"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.chargecloud.dev/api/v1/assets/locations")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.chargecloud.dev/api/v1/assets/locations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"locations": [
{
"id": 1,
"created_at": "2023-12-25",
"updated_at": "2023-12-25",
"modification_date": "2023-12-25",
"controllers": [
{
"controller_uuid": "<string>"
}
],
"name": "<string>",
"street": "<string>",
"postal_code": "<string>",
"city": "<string>",
"latitude": "50.946022",
"longitude": "6.942467",
"operator": "<string>",
"operator_id": 1,
"support_hotline": "<string>",
"publish": true,
"identifier": "BUS02",
"house_number": "<string>",
"district": "<string>",
"rural_district": "<string>",
"height": 1,
"directions": "<string>",
"description": "<string>",
"website": "<string>",
"comment": "<string>",
"partner": "<string>",
"accounter": "<string>",
"comment_usage_agreement": "<string>",
"level_measurement": "<string>",
"network_carrier": "<string>",
"available_power": "<string>",
"additional_conditions": "<string>",
"contract_id": 1,
"facility_types": [
{
"id": 123,
"uuid": "<string>",
"name": "<string>"
}
]
}
],
"pagination": {
"page": "1",
"total_pages": "5",
"page_size": "10",
"has_more": "true"
}
}{
"error": "<string>"
}{
"error": "<string>",
"pagination": {
"page": "1",
"total_pages": "5",
"page_size": "10",
"has_more": "true"
}
}{
"error": "<string>"
}{
"errors": [
{
"errorKey": "<string>",
"message": "<string>",
"parameter": "<string>"
}
]
}{
"error": "<string>"
}Authorizations
OAuth2 Bearer Authorization
Query Parameters
ID of the Contract
Maximum number of items per page. Maximum value is 25.
Required range:
1 <= x <= 25Example:
"10"
Page number to retrieve (starting from 1).
Required range:
x >= 1Example:
"1"
Was this page helpful?
⌘I