Locations
Create a location.
This endpoint creates a single location when provided a valid layer_id in the JSON body. Locations must also have either a valid address or latitude and longitude. 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. Example request:
curl --location 'https://api.mapulus.com/api/v1/locations' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <your-token>' \
--data '{
"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": "<layer-id>",
"create_or_update_custom_attributes": true,
"custom_attributes": [
{
"object": "custom_attribute",
"name": "Location Type",
"value": "Public Store",
"create_or_update_custom_attribute": false
}
]
}'
post/api/v1/locations
Request
- Base URL: https://api.mapulus.com
- URL: https://api.mapulus.com/api/v1/locations
- Auth: HTTP bearer
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: Creates 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.