Locations
Update a location.
This endpoint updates a location. Locations must also have either a valid address or lat and lon. When adding custom_attributes, if the custom_attribute does not already exist on the layer (based on name), you can set the create_or_update_custom_attributes in the main body of the JSON or create_or_update_custom_attribute in the nested attribute object to create or ignore it. Without this flag, new custom_attributes will return an error. Moving the location to new layers is possible by passing a new layer_id in the JSON body. Example request:
curl --location --request PUT 'https://api.mapulus.com/api/v1/locations/<location-id>' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <your-token>' \
--data '{
"object": "location",
"lat": -27.4704528,
"lon": 153.0260341,
"label": null,
"title": "Head Office",
"address": "Brisbane, Australia",
"external_id": null,
"travel_contour": true,
"contour_mode": "driving",
"contour_metric": "minutes",
"contour_style": "polygons",
"contour_minutes": "15",
"layer_id": "0b942634-814f-42f7-82f5-7f4d06213275",
"create_or_update_custom_attributes": true,
"custom_attributes": [
{
"object": "custom_attribute",
"name": "Location Type",
"value": "Public Store",
"create_or_update_custom_attribute": false
}
]
}'
put/api/v1/locations/{id}
Request
- Base URL: https://api.mapulus.com
- URL: https://api.mapulus.com/api/v1/locations/{id}
- Auth: HTTP bearer
Path parameters
idstring required
Location ID (Required)
Request body
Example request
{
"object": "location",
"lat": -27.4704528,
"lon": 153.0260341,
"title": "Head Office",
"address": "Brisbane, Australia",
"contour_mode": "driving",
"contour_metric": "minutes",
"contour_style": "polygons",
"contour_minutes": "15",
"create_or_update_custom_attributes": true,
"custom_attributes": [
{
"object": "custom_attribute",
"name": "Location Type",
"value": "Public Store"
}
]
}Response
Success: Updates a single location.
Example response
{
"object": "location",
"lat": -27.4704528,
"lon": 153.0260341,
"title": "Head Office",
"address": "Brisbane, Australia",
"contour_mode": "driving",
"contour_metric": "minutes",
"contour_style": "polygons",
"contour_minutes": "15",
"custom_attributes": [
{
"object": "custom_attribute",
"name": "Location Type",
"value": "Public Store"
}
]
}Changes
No recorded changes to this operation across all 1 revision of this API.