Edit
Edit an existing Location by either changing its name, position or both.
URL: /data/locations/v2/edit
Method: POST
Method Parameters
Name |
Type |
Required |
Description |
|
|
|
The API key for your organisation. |
|
|
|
The object detailing the specified values. See Model Object Properties. |
Model Object Properties
Name |
Type |
Required |
Description |
|
|
|
The unique key of a location record. |
|
|
|
The API key matching the Layer in which the record is stored. |
|
|
|
A new name value for the location. Optional. Pass null to retain the current value. |
|
|
|
Optional. The new postcode in which the Location should be positioned. Pass null to retain the current position. |
|
|
|
Optional. See Coordinate Object Properties. The new coordinates for the position of the Location or null. Pass null to retain the current position. |
* If you intend to change the position of the location, at least one of either postcode or coordinate parameter values must be provided in order to determine a new position. If both are provided, the position will be determined using the coordinates. You may set both to null to retain the current position.
Coordinate Object Properties
Name |
Type |
Required |
Description |
|
|
|
The value for the Latitude. Ranges from -90.0 to +90.0. |
|
|
|
The value for the Longitude. Ranges from -180.0 to +180.0. |
Response
The following responses may be returned in addition to the standard ones specified under Common Information.
Code |
Error Message |
Notes |
400 |
|
The longitudeX parameter value of the coordinate parameter object was out of range. |
|
|
|
|
|
|
|
There is a configuration error in your system. If you wish to use the postcode parameter to position a location, you must have specified a Geocoding layer on the Layer specified by the layerKey parameter value. |
Example call
URL: https://api.vision-mapping.com/data/locations/v2/edit?apiKey=INSERT_YOUR_KEY_HERE
Body:
{
uniqueKey: "example",
layerKey: "example",
name: null,
postcode: null,
coordinates: {
latitudeY: 0.1,
longitudeX: 0.1
}
}