Submit a Ticket My Tickets
Welcome
Login  Sign up

ADDEDIT GeoTargets API Version 1

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
Required
Type: STRING
Length (Max/Min): 50

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
Required
Type: INTEGER
Length (Max/Min): N/A

ID of contract you want to add/edit geo targets for

Example Values: 8078

set_targeting_to_geo
Required
Type: BOOL
Length (Max/Min): N/A

Example Values: true, False

add_edit_option
Required
Type: add_edit_options
Length (Max/Min): N/A

Required

Example Values: add, remove, or replace
countries

Required
Type: STRING
Length (Max/Min):N/A

comma separated list of two character country codes

Required  
Example Values: US,AU

 **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

 

 

Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.