Add Location
curl --request POST \
--url https://api.connectedfleet.michelin.com/fleet-management/public/v1/customer/{customerId}/location \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json;charset=UTF-8' \
--data '
{
"name": "<string>",
"categoryName": "<string>",
"id": "<string>",
"radius": 123,
"polygon": [
{
"longitude": 123,
"latitude": 123
}
],
"reference": "<string>",
"phoneNumber": "<string>",
"contact": "<string>",
"email": "<string>",
"notes": "<string>"
}
'import requests
url = "https://api.connectedfleet.michelin.com/fleet-management/public/v1/customer/{customerId}/location"
payload = {
"name": "<string>",
"categoryName": "<string>",
"id": "<string>",
"radius": 123,
"polygon": [
{
"longitude": 123,
"latitude": 123
}
],
"reference": "<string>",
"phoneNumber": "<string>",
"contact": "<string>",
"email": "<string>",
"notes": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json;charset=UTF-8"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
Authorization: 'Bearer <token>',
'Content-Type': 'application/json;charset=UTF-8'
},
body: JSON.stringify({
name: '<string>',
categoryName: '<string>',
id: '<string>',
radius: 123,
polygon: [{longitude: 123, latitude: 123}],
reference: '<string>',
phoneNumber: '<string>',
contact: '<string>',
email: '<string>',
notes: '<string>'
})
};
fetch('https://api.connectedfleet.michelin.com/fleet-management/public/v1/customer/{customerId}/location', 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.connectedfleet.michelin.com/fleet-management/public/v1/customer/{customerId}/location",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'categoryName' => '<string>',
'id' => '<string>',
'radius' => 123,
'polygon' => [
[
'longitude' => 123,
'latitude' => 123
]
],
'reference' => '<string>',
'phoneNumber' => '<string>',
'contact' => '<string>',
'email' => '<string>',
'notes' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json;charset=UTF-8"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.connectedfleet.michelin.com/fleet-management/public/v1/customer/{customerId}/location"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"categoryName\": \"<string>\",\n \"id\": \"<string>\",\n \"radius\": 123,\n \"polygon\": [\n {\n \"longitude\": 123,\n \"latitude\": 123\n }\n ],\n \"reference\": \"<string>\",\n \"phoneNumber\": \"<string>\",\n \"contact\": \"<string>\",\n \"email\": \"<string>\",\n \"notes\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json;charset=UTF-8")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.connectedfleet.michelin.com/fleet-management/public/v1/customer/{customerId}/location")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json;charset=UTF-8")
.body("{\n \"name\": \"<string>\",\n \"categoryName\": \"<string>\",\n \"id\": \"<string>\",\n \"radius\": 123,\n \"polygon\": [\n {\n \"longitude\": 123,\n \"latitude\": 123\n }\n ],\n \"reference\": \"<string>\",\n \"phoneNumber\": \"<string>\",\n \"contact\": \"<string>\",\n \"email\": \"<string>\",\n \"notes\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.connectedfleet.michelin.com/fleet-management/public/v1/customer/{customerId}/location")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json;charset=UTF-8'
request.body = "{\n \"name\": \"<string>\",\n \"categoryName\": \"<string>\",\n \"id\": \"<string>\",\n \"radius\": 123,\n \"polygon\": [\n {\n \"longitude\": 123,\n \"latitude\": 123\n }\n ],\n \"reference\": \"<string>\",\n \"phoneNumber\": \"<string>\",\n \"contact\": \"<string>\",\n \"email\": \"<string>\",\n \"notes\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"name": "<string>",
"categoryName": "<string>",
"id": "<string>",
"radius": 123,
"address": {
"city": "<string>",
"postCode": "<string>",
"country": "<string>",
"formattedAddress": "<string>",
"road": "<string>",
"roadNumber": "<string>",
"roadType": "<string>"
},
"coordinate": {
"longitude": 123,
"latitude": 123
},
"polygon": [
{
"longitude": 123,
"latitude": 123
}
],
"reference": "<string>",
"phoneNumber": "<string>",
"contact": "<string>",
"email": "<string>",
"notes": "<string>"
}/location
Add Location
POST request to add a new location with a geo-fence boundary that can be either CIRCULAR or POLYGON. There cannot be an existing location with the same name as the location being created.
The maximum number of POI that can be created in your account is limited based on the number of vehicles in your fleet.
- if your fleet size is less than 1,000 then you can create up to 250,000 locations
- if your fleet size is more than 1,000, then the maximum is reduced on a sliding scale depending on the number of vehicles in your fleet
- longitude and latitude coordinates - An address lookup is done to determine values for roadNumber, road, city, postcode and country. The formattedAddress is constructed as a comma separated set of values from roadNumber, road, city, postcode and country.
- roadNumber, road, city, postcode, country - Values for city, postcode and country are mandatory and must be included in the input JSON object. The formattedAddress is constructed as a comma separated set of values from roadNumber, road, city, postcode and country. A lookup is done to determine the longitude and latitude coordinates.
The geofence for the location can be specified as either:
- radius - A geofence for the location is a circle. The radius for the circle must be between 0.001 and 1.
- polygon - The geofence for the location is a polygon which is specified as an array of longitude and latitude pairs. There must be at least three longitude and latitude pairs specified. The geofence boundary is closed by automatically linking the first longitude and latitude pair to the last longitude and latitude pair specified.
POST
/
public
/
v1
/
customer
/
{customerId}
/
location
Add Location
curl --request POST \
--url https://api.connectedfleet.michelin.com/fleet-management/public/v1/customer/{customerId}/location \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json;charset=UTF-8' \
--data '
{
"name": "<string>",
"categoryName": "<string>",
"id": "<string>",
"radius": 123,
"polygon": [
{
"longitude": 123,
"latitude": 123
}
],
"reference": "<string>",
"phoneNumber": "<string>",
"contact": "<string>",
"email": "<string>",
"notes": "<string>"
}
'import requests
url = "https://api.connectedfleet.michelin.com/fleet-management/public/v1/customer/{customerId}/location"
payload = {
"name": "<string>",
"categoryName": "<string>",
"id": "<string>",
"radius": 123,
"polygon": [
{
"longitude": 123,
"latitude": 123
}
],
"reference": "<string>",
"phoneNumber": "<string>",
"contact": "<string>",
"email": "<string>",
"notes": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json;charset=UTF-8"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
Authorization: 'Bearer <token>',
'Content-Type': 'application/json;charset=UTF-8'
},
body: JSON.stringify({
name: '<string>',
categoryName: '<string>',
id: '<string>',
radius: 123,
polygon: [{longitude: 123, latitude: 123}],
reference: '<string>',
phoneNumber: '<string>',
contact: '<string>',
email: '<string>',
notes: '<string>'
})
};
fetch('https://api.connectedfleet.michelin.com/fleet-management/public/v1/customer/{customerId}/location', 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.connectedfleet.michelin.com/fleet-management/public/v1/customer/{customerId}/location",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'categoryName' => '<string>',
'id' => '<string>',
'radius' => 123,
'polygon' => [
[
'longitude' => 123,
'latitude' => 123
]
],
'reference' => '<string>',
'phoneNumber' => '<string>',
'contact' => '<string>',
'email' => '<string>',
'notes' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json;charset=UTF-8"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.connectedfleet.michelin.com/fleet-management/public/v1/customer/{customerId}/location"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"categoryName\": \"<string>\",\n \"id\": \"<string>\",\n \"radius\": 123,\n \"polygon\": [\n {\n \"longitude\": 123,\n \"latitude\": 123\n }\n ],\n \"reference\": \"<string>\",\n \"phoneNumber\": \"<string>\",\n \"contact\": \"<string>\",\n \"email\": \"<string>\",\n \"notes\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json;charset=UTF-8")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.connectedfleet.michelin.com/fleet-management/public/v1/customer/{customerId}/location")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json;charset=UTF-8")
.body("{\n \"name\": \"<string>\",\n \"categoryName\": \"<string>\",\n \"id\": \"<string>\",\n \"radius\": 123,\n \"polygon\": [\n {\n \"longitude\": 123,\n \"latitude\": 123\n }\n ],\n \"reference\": \"<string>\",\n \"phoneNumber\": \"<string>\",\n \"contact\": \"<string>\",\n \"email\": \"<string>\",\n \"notes\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.connectedfleet.michelin.com/fleet-management/public/v1/customer/{customerId}/location")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json;charset=UTF-8'
request.body = "{\n \"name\": \"<string>\",\n \"categoryName\": \"<string>\",\n \"id\": \"<string>\",\n \"radius\": 123,\n \"polygon\": [\n {\n \"longitude\": 123,\n \"latitude\": 123\n }\n ],\n \"reference\": \"<string>\",\n \"phoneNumber\": \"<string>\",\n \"contact\": \"<string>\",\n \"email\": \"<string>\",\n \"notes\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"name": "<string>",
"categoryName": "<string>",
"id": "<string>",
"radius": 123,
"address": {
"city": "<string>",
"postCode": "<string>",
"country": "<string>",
"formattedAddress": "<string>",
"road": "<string>",
"roadNumber": "<string>",
"roadType": "<string>"
},
"coordinate": {
"longitude": 123,
"latitude": 123
},
"polygon": [
{
"longitude": 123,
"latitude": 123
}
],
"reference": "<string>",
"phoneNumber": "<string>",
"contact": "<string>",
"email": "<string>",
"notes": "<string>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Body
application/json;charset=UTF-8
Pattern:
^[\w]*$Show child attributes
Show child attributes
Geographic coordinate with latitude and longitude values.
Show child attributes
Show child attributes
Required array length:
3 - 2147483647 elementsShow child attributes
Show child attributes
Maximum string length:
50Maximum string length:
20Pattern:
^\+?\d+$Maximum string length:
50Maximum string length:
50Maximum string length:
140Response
200 - application/json;charset=UTF-8
Successful operation
Pattern:
^[\w]*$Show child attributes
Show child attributes
Geographic coordinate with latitude and longitude values.
Show child attributes
Show child attributes
Required array length:
3 - 2147483647 elementsShow child attributes
Show child attributes
Maximum string length:
50Maximum string length:
20Pattern:
^\+?\d+$Maximum string length:
50Maximum string length:
50Maximum string length:
140Was this page helpful?
