Document toolboxDocument toolbox

Create/Update/Delete Postcode/Location SOAP API

On This Page:

Related Pages:

The sp:UpdateLocationRequest API method can be used to create, update and delete postcodes/locations.

Description

Postcodes (or locations, depending on the use case) may be added into the system and mapped onto the regions structure. Locations created through this interface are referred to elsewhere as ‘named places’.

Additionally, existing postcode/locations may be updated with new latitude/longitude information (the old entry is removed and the new entry replaces it). Entries may also be deleted via this interface.

Definition

The definition of this API is:

 Click here to expand...

Web Service

Type

Description

Req?

Val?

<sp:UpdateLocationRequest>

 

 

  

 

<name>?</name>

Postcode

The textual postcode/zipcode or location code for the place

(tick)

(tick)

 

<lat>?</lat>

float

Latitude (see 2.5) of the named postcode/location

(tick)

 

 

<long>?</long>

float

Longitude (see 2.5)  of the named postcode/location

(tick)

 

 

<action>?</action>

Integer

Optional Bit field indicating whether this is an addition, update (replacement) or deletion:

  • 0x00 - add a new entry. Returns SP_UDLOC_NAME_ALREADY_EXISTS (693) if name already exists
  • 0x01 - add a new entry or update existing entry if name already exists
  • 0x02 - delete the entry of return SP_UDLOC_INVALID_NAME (691) if name does not exist

Not supplying the parameter is the same as supplying it with a value of 0. 

(error)

 

 

<isVisible>?</isVisible>

Boolean

This is an optional parameter.

Set true (1) if the named place to be created should be visible in the ServicePlanner map.

Set false (0) if the named place to be created should not be visible in the ServicePlanner map.

Not supplying the parameter is the same as supplying a value of false(0).

(error)

 

</sp:UpdateLocationRequest>

 

 

  

 

 

Return Structure

The API returns the standard return structure.

Return Codes

In addition to the Standard Return Codes, the possible Return Codes from this API are:

  • SP_OK (0)
  • SP_UDLOC_INVALID_ACTION (690)
  • SP_UDLOC_INVALID_NAME (691)
  • SP_UDLOC_FAILED_REGION_MAPPING (692)
  • SP_UDLOC_NAME_ALREADY_EXISTS (693)