You should always “get” a location before updating it; do NOT try to construct a location object from scratch for the purposes of updating an existing location.
- In lieu of providing the Client Id and Api Key, a call may be made to AuthenticateClient in the Lead web service with those credentials, and the resultant security token added to the Request Header under the key "ClientToken".
- Value.Id must be set to a valid Bullseye location ID, or ThirdPartyId must be set to a valid third-party ID.
- Value.Id is checked first, so it is possible to update a third-party ID by specifying the Bullseye ID as the retrieval key.
- Attributes, Services, Categories, Territories, BusinessHours, RestLocationImage, RestLocationSEO and RestLocationSocialMedia objects are expected. This method will replace the existing values for all of these objects for the location, so be sure to completely specify them. If you leave any of these objects as null, the existing data will be wiped for that object. See the AddLocation() method for further notes on these objects.
- If the BusinessHourList value is null, then what is stored in the internal BusinessHours object will be used.
- User information cannot be updated through UpdateLocation
- The best way to update a location is to first call GetLocation(), then modify any values you need to change, then call UpdateLocation(). If you try to construct the Location object from scratch, you risk wiping out some existing fields.
- If the HolidaySpecialHoursList value is null, then what is stored in the internal RestHolidayHours object will be used.
This call, and other POST calls, will set the location ID in the LocRslt structure to a negative number on failure. Here are the values related to this method:
-1: invalid credentials (API key and/or client ID)
-2: you did not specify either Id or ThirdPartyId on the location you passed into this method.
-3: no matching location was found (based on the Id or ThirdPartyId you passed in).
-4: validation failure (see errorMsg for details)
-5: exception while creating user (see errorMsg for details)