Update geotagging zone
curl --request PATCH \
--url https://apiweb.mile.app/api/v3/geotagging/{geotaggingId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"hubId": "<string>",
"geoTaggingCoordinate": [
"<string>"
],
"color": "<string>",
"isActive": true
}
'import requests
url = "https://apiweb.mile.app/api/v3/geotagging/{geotaggingId}"
payload = {
"name": "<string>",
"hubId": "<string>",
"geoTaggingCoordinate": ["<string>"],
"color": "<string>",
"isActive": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
hubId: '<string>',
geoTaggingCoordinate: ['<string>'],
color: '<string>',
isActive: true
})
};
fetch('https://apiweb.mile.app/api/v3/geotagging/{geotaggingId}', 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://apiweb.mile.app/api/v3/geotagging/{geotaggingId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'hubId' => '<string>',
'geoTaggingCoordinate' => [
'<string>'
],
'color' => '<string>',
'isActive' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://apiweb.mile.app/api/v3/geotagging/{geotaggingId}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"hubId\": \"<string>\",\n \"geoTaggingCoordinate\": [\n \"<string>\"\n ],\n \"color\": \"<string>\",\n \"isActive\": true\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://apiweb.mile.app/api/v3/geotagging/{geotaggingId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"hubId\": \"<string>\",\n \"geoTaggingCoordinate\": [\n \"<string>\"\n ],\n \"color\": \"<string>\",\n \"isActive\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://apiweb.mile.app/api/v3/geotagging/{geotaggingId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"hubId\": \"<string>\",\n \"geoTaggingCoordinate\": [\n \"<string>\"\n ],\n \"color\": \"<string>\",\n \"isActive\": true\n}"
response = http.request(request)
puts response.read_body{
"status": true,
"message": "Update success",
"data": {
"_id": "6620f1a2b3c4d5e6f7a8b9c0",
"name": "North Jakarta",
"hubId": "64d9932e2beb9037735ff022",
"organizationId": "64d99303be0ad015c461c932",
"color": "#1E88E5",
"isActive": true,
"geoTaggingCoordinate": {
"type": "string",
"coordinates": [
[
[
106.8,
-6.1
],
[
106.9,
-6.1
],
[
106.9,
-6.2
],
[
106.8,
-6.1
]
]
]
},
"createdTime": "2024-04-18T10:00:00.000000Z",
"updatedTime": "2024-04-18T10:00:00.000000Z"
}
}{
"status": false,
"message": "Bad request - invalid parameters provided."
}{
"status": false,
"message": "Data not found"
}{
"status": false,
"message": "Internal server error, please contact [email protected]."
}Configuration
Update geotagging zone
Changes only the fields you send. Points follow the same rules as create.
Requires the edit/geotagging permission.
PATCH
/
geotagging
/
{geotaggingId}
Update geotagging zone
curl --request PATCH \
--url https://apiweb.mile.app/api/v3/geotagging/{geotaggingId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"hubId": "<string>",
"geoTaggingCoordinate": [
"<string>"
],
"color": "<string>",
"isActive": true
}
'import requests
url = "https://apiweb.mile.app/api/v3/geotagging/{geotaggingId}"
payload = {
"name": "<string>",
"hubId": "<string>",
"geoTaggingCoordinate": ["<string>"],
"color": "<string>",
"isActive": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
hubId: '<string>',
geoTaggingCoordinate: ['<string>'],
color: '<string>',
isActive: true
})
};
fetch('https://apiweb.mile.app/api/v3/geotagging/{geotaggingId}', 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://apiweb.mile.app/api/v3/geotagging/{geotaggingId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'hubId' => '<string>',
'geoTaggingCoordinate' => [
'<string>'
],
'color' => '<string>',
'isActive' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://apiweb.mile.app/api/v3/geotagging/{geotaggingId}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"hubId\": \"<string>\",\n \"geoTaggingCoordinate\": [\n \"<string>\"\n ],\n \"color\": \"<string>\",\n \"isActive\": true\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://apiweb.mile.app/api/v3/geotagging/{geotaggingId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"hubId\": \"<string>\",\n \"geoTaggingCoordinate\": [\n \"<string>\"\n ],\n \"color\": \"<string>\",\n \"isActive\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://apiweb.mile.app/api/v3/geotagging/{geotaggingId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"hubId\": \"<string>\",\n \"geoTaggingCoordinate\": [\n \"<string>\"\n ],\n \"color\": \"<string>\",\n \"isActive\": true\n}"
response = http.request(request)
puts response.read_body{
"status": true,
"message": "Update success",
"data": {
"_id": "6620f1a2b3c4d5e6f7a8b9c0",
"name": "North Jakarta",
"hubId": "64d9932e2beb9037735ff022",
"organizationId": "64d99303be0ad015c461c932",
"color": "#1E88E5",
"isActive": true,
"geoTaggingCoordinate": {
"type": "string",
"coordinates": [
[
[
106.8,
-6.1
],
[
106.9,
-6.1
],
[
106.9,
-6.2
],
[
106.8,
-6.1
]
]
]
},
"createdTime": "2024-04-18T10:00:00.000000Z",
"updatedTime": "2024-04-18T10:00:00.000000Z"
}
}{
"status": false,
"message": "Bad request - invalid parameters provided."
}{
"status": false,
"message": "Data not found"
}{
"status": false,
"message": "Internal server error, please contact [email protected]."
}Authorizations
Use a valid Bearer token to authenticate.
Path Parameters
Unique identifier of the geotagging zone.
Example: 6620f1a2b3c4d5e6f7a8b9c0
Body
application/json
Zone name, unique within the hub.
Example: North Jakarta
Hub of the zone.
Polygon points as "latitude,longitude". At least 3.
Example: ["-6.1,106.8", "-6.1,106.9", "-6.2,106.9"]
Minimum array length:
3Display color.
Example: #1E88E5
Only active zones are used by route optimization.