ADDEDIT GeoTargets API Version 1
Updated on 2014-05-01
Current Version: Version 1
Deprecated Version: n/a
Requests Allowed: GET & SOAP
Summary:
Allows you to create or update GeoTargets for an offer in CAKE.
Parameters
api_key |
You can obtain this api_key from within CAKE >> Setup >> Permissions in the API Key list. Must be a valid API key (existing and not expired) Example Value: Fo35NRAqvFLXoZxqB4aViaiYM7iVMhh |
offer_contract_id |
ID of contract you want to add/edit geo targets for Example Values: 8078 |
set_targeting_to_geo |
Example Values: true, False |
add_edit_option |
Required Example Values: add, remove, or replace |
countries Required |
comma separated list of two character country codes Required |
**Note all optional parameters still need to be passed through in the actual call. These parameters do not need a value (therefore you can use a null value).
Example Request
GET |
https://demo.cakemarketing.com/api/1/addedit.asmx/GeoTargets?api_key=YM6FNThM7EnEDC7AAGpp3K2oRjJdGFP&offer_contract_id=349&set_targeting_to_geo= TRUE&add_edit_option=add&countries=AF%2CAR%2CAU |
Sample XML Response:
<geo_targets_addedit_response> <success>true</success> <message>Countries Added</message> <row_count>0</row_count> </geo_targets_addedit_response> |
Example Error Messages:
Error Message |
Likely Cause |
Invalid API Key |
API Key does not exist or is expired |
Invalid Offer Contract ID |
offer_contract_id does not correspond to an offer contract in the system |
Please Provide Valid Country Code(s) |
one or more of the country codes provided is not valid |