curl --request PUT \
--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.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
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 => "PUT",
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("PUT", 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.put("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::Put.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>"
}Update Location
PUT request to update location details. The identifier for the location to be updated is included in the JSON body. This is a partial update and only those details specified in the JSON body will be updated.
The updated address for the location can be specified as just the longitude and latitude coordinates or an address (roadNumber, road, city, postcode, country).
The type of a location can be updated from a circle to a polygon or from a polygon to a circle, by specifying the the geofence for the location 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.
curl --request PUT \
--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.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
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 => "PUT",
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("PUT", 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.put("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::Put.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
^[\w]*$Show child attributes
Show child attributes
Geographic coordinate with latitude and longitude values.
Show child attributes
Show child attributes
3 - 2147483647 elementsShow child attributes
Show child attributes
5020^\+?\d+$5050140Response
Successful operation
^[\w]*$Show child attributes
Show child attributes
Geographic coordinate with latitude and longitude values.
Show child attributes
Show child attributes
3 - 2147483647 elementsShow child attributes
Show child attributes
5020^\+?\d+$5050140Was this page helpful?
