We have a situation where we have a large amount of markers on a cloud database that each have a unique name (a SKU ID that relates to a product in a store). Every week we add/remove/update these markers in modest quantities (around 20-30) per week.
To make this process easier, we use the VWS to batch upload the new markers. At the moment though we haven't been able to figure out how to update our markers using VWS.
We want our code to do this:
- Attempt to upload marker
- If marker already exists (TargetNameExist result), find out which marker
- Switch to an update request instead and replace the marker with the same name
The trouble is we can't figure out the target_id of the marker that is already on the cloud. The result just returns the result code and a transaction ID. If we can't get the target_id then we can't use the update API.
Is there a way to get the target_id of the marker when you receive a "TargetNameExist" result, or is there a way to get a marker by it's name and not the target_id?