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 |
apiKey |
string |
Yes |
The API key for your organisation. |
model |
object |
Yes |
The object detailing the specified values. See Model Object Properties. |
Model Object Properties
Name |
Type |
Required |
Description |
uniqueKey |
string |
Yes |
The unique key of a location record. |
layerKey |
string |
Yes |
The API key matching the Layer in which the record is stored. |
name |
string |
No |
A new name value for the location. Optional. Pass null to retain the current value. |
postcode |
string |
No * |
Optional. The new postcode in which the Location should be positioned. Pass null to retain the current position. |
coordinates |
object |
No * |
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 |
latitudeY |
decimal |
Yes |
The value for the Latitude. Ranges from -90.0 to +90.0. |
longitudeX |
decimal |
Yes |
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 |
Longitudes must range from -180.0 to 180.0. |
The longitudeX parameter value of the coordinate parameter object was out of range. |
Latitudes must range from -90.0 to 90.0. |
The latitudeY parameter value of the coordinate parameter object was out of range. |
|
A location for the specified postcode could not be determined. Please provide latitude and longitude coordinates instead. |
A position for the postcode could not be determined, try specifying coordinates instead. |
|
The MapLayer was not attached to a Geocoding Layer. |
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}}
Comments
0 comments
Article is closed for comments.