Contents
On this page
Update Location - Plugixa Chauffeur
PUT /plugixa-chauffeur/v1/locations/{id}
Change the fields you send and keep the others.
Needs a signed-in user with the plugixa_chauffeur_manage capability (administrators have it after activation).
Request
PUT https://your-site.example/wp-json/plugixa-chauffeur/v1/locations/5
Path parameters
| Name | Type | Description |
|---|---|---|
id |
integer |
The location’s id |
Request body
Content type: application/json
| Field | Type | Required | Description |
|---|---|---|---|
name |
string |
No | Must not be blank. |
slug |
string |
No | Made from the name when empty. Made unique by appending -2, -3, … |
address |
string |
No | Plain text. |
latitude |
number |
No | Empty stores null. |
longitude |
number |
No | Empty stores null. |
place_id |
string |
No | Google Places id. |
type |
string |
No | Free text; the admin offers point, airport, station, hotel, port and custom. |
display_order |
integer |
No | Default 0. |
A merge: fields you leave out keep their value. Send latitude or longitude as an empty string to clear it. language_code and translation_group are ignored here.
{
"address": "Aeroport Paris-Charles de Gaulle, 95700 Roissy-en-France"
}
Responses
200 OK. data is the updated location.
{
"success": true,
"message": "",
"data": {
"id": "5",
"language_code": "",
"translation_group": "",
"name": "Paris Charles de Gaulle Airport",
"slug": "paris-charles-de-gaulle-airport",
"address": "Aeroport Paris-Charles de Gaulle, 95700 Roissy-en-France",
"latitude": "49.0096906",
"longitude": "2.5479245",
"place_id": "",
"type": "airport",
"display_order": "0",
"created_at": "2026-11-12 09:30:00"
}
}
| Field | Type | Meaning |
|---|---|---|
data.id |
string |
The location id, as a string |
data.address |
string |
Plain text |
data.latitude |
string|null |
Latitude, as a string with 7 decimals |
data.longitude |
string|null |
Longitude, as a string with 7 decimals |
data.place_id |
string |
Google Places id, when you have one |
data.type |
string |
The admin offers point, airport, station, hotel, port and custom |
data.display_order |
string |
Position in lists |
Errors
| Status | Code | When |
|---|---|---|
404 |
rest_error |
No location with that id. |
400 |
rest_error |
The body holds none of the fields below (“No fields to update.”). |
Plus the errors every endpoint can return.
Examples
curl -s -X PUT "https://your-site.example/wp-json/plugixa-chauffeur/v1/locations/5" \
-u "admin:$WP_APP_PASSWORD" \
-H "Content-Type: application/json" \
-d '{"address":"Aeroport Paris-Charles de Gaulle, 95700 Roissy-en-France"}'
<?php
$ch = curl_init('https://your-site.example/wp-json/plugixa-chauffeur/v1/locations/5');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'PUT',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_USERPWD => 'admin:' . getenv('WP_APP_PASSWORD'),
CURLOPT_HTTPHEADER => [
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode([
'address' => 'Aeroport Paris-Charles de Gaulle, 95700 Roissy-en-France',
]),
]);
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
const auth = Buffer.from(`admin:${process.env.WP_APP_PASSWORD}`).toString('base64');
const response = await fetch('https://your-site.example/wp-json/plugixa-chauffeur/v1/locations/5', {
method: 'PUT',
headers: {
'Authorization': `Basic ${auth}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({ address: 'Aeroport Paris-Charles de Gaulle, 95700 Roissy-en-France' }),
});
const { data } = await response.json();
Quick Links
Share