Skip to content
English - United Kingdom
  • There are no suggestions because the search field is empty.

Data/Locations/v1/Edit

This endpoint is deprecated. Please see the latest version.

Edit an existing Location by either changing its name, position or both.

URL: /data/locations/v1/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


recordKey


string


Yes


The Key of a location record.



dataFieldKey



string



Yes



The ClientKey matching the DataField in which the recordKey value is stored.

The specified DataField should be of SystemLink type.



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 MapLayer specified by the targetMapLayerKey parameter value.

Example call

URL: https://api.vision-mapping.com/data/locations/v1/edit?apiKey=INSERT_YOUR_KEY_HERE

Body:

{
recordKey: "example",
dataFieldKey: "example",
name: null,
postcode: null,
coordinates: {
latitudeY: 0.1,
longitudeX: 0.1
}
}