Submit a Ticket My Tickets
Welcome
Login  Sign up

EXPORT RoutingRules API Version 1

EXPORT RoutingRules API Version 1

Updated on 2018-08-22

Current Version: Version 1
Requests Allowed: GET&SOAP



Summary:

Returns routing rules set within CAKE which is found under Routing section of the Lead Gen page


Resource/WSDL Page:

http://<your_domain_here>/api/1/EXPORT.asmx?op=RoutingRules


Parameters

api_key
Required
Type: STRING
Length (Max/Min): 50
This api_key will provide you with the ability to export Campaigns for your instance. You can obtain this api_key from within CAKE >> Setup >> Permissions in the API Key list.
Example Value: 
Fo35NRAqvFLXoZxqB4aViaiYM7iVMhh
buyer_contract_id
Required
Type: INT
Length (Max/Min): NA
If passing anything <= 0 the result will include all buyer contracts.


Example Values: 9
buyer_id
Required
Type: INT
Length (Max/Min): NA
If passing anything <= 0 the result will include all buyer contracts.


Example Values: 79
offer_id
Required
Type: INTEGER
Length (Max/Min): N/A
This is the identifier for a unique Offer.  Use EXPORT Offer API

0 = ALL Offer IDs
Example Values: 1298
advertiser_id
Required
Type: INT
Length (Max/Min): NA
If passing anything <= 0 the result will include all advertisers.  If the advertiser ID does not exist, it will return an empty array instead of an error.

Example Values: 90079
affiliate_id
Required
Type: INTEGER
Length (Max/Min): N/A
This is the identifier for a unique Affiliate.  
If passing anything <= 0 the result will include all affiliates.

Example Values: 12
sub_affiliate_id
Optional
Type: String
Length (Max/Min): N/A
This is the identifier for a unique Sub-Affiliate.  
Leave empty to pass on field

Example Values: 1235
campaign_id
Required
Type: INT
Length (Max/Min): N/A
This is the identifier for a unique campaign. Must be non-zero if site_offer_id and source_affiliate_id are both set to 0

Example Values: 1234
vertical_id
Required
Type: INT
Length (Max/Min): NA
If passing anything <= 0 the result will include all verticals.


Example Values: 799
routing_rule_type_id
Required
Type INT
Length (Max/Min): NA
ID that represents routing type in your CAKE instance, Pass 0 to extract all types
1 = Block
2 = Allow buyer to only get leads from this source
3 = Allow source to only send leads to this buyer
start_at_row
Required
Type: INT
Length (Max/Min): NA
Must pass at least 0 as value, which means start at the beginning of the data set.


Example Values: 0
row_limit
Required
Type: INT
Length (Max/Min): NA
Must pass at least 0 as value, which means no limit


Example Values: 0
sort_field
Required
Type: STRING
Length (Max/Min): NA
Accepts 'routing_rule_id' or 'routing_rule_type'


Example Values: routing_rule_type
sort_descending
Required
Type: BOOL
Length (Max/Min): NA



Example Values: True, False



Example Request:

GET
https://cs1.cakemarketing.com/api/1/EXPORT.asmx/RoutingRules?api_key=7h5wniMrGuyizGE52P9Vg&buyer_contract_id=0&buyer_id=23&offer_id=0&advertiser_id=0&affiliate_id=0&sub_affiliate_id=&campaign_id=0&vertical_id=0&routing_rule_type_id=0&start_at_row=0&row_limit=1000&sort_field=routing_rule_id&sort_descending=TRUE


Sample XML Response:

<routing_rules_export_response xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://cakemarketing.com/api/1/">
<success>true</success>
<row_count>4</row_count>
<routing_rules>
<routing_rule>
<routing_rule_id>20</routing_rule_id>
<routing_rule_type_name>Allow source to only send leads to this buyer</routing_rule_type_name>
<affiliate>
<affiliate_id xmlns="API:id_name_store">17</affiliate_id>
<affiliate_name xmlns="API:id_name_store">Tobias Funke</affiliate_name>
</affiliate>
<offer>
<offer_id xmlns="API:id_name_store">167</offer_id>
<offer_name xmlns="API:id_name_store">Zac's Leadgen Test</offer_name>
</offer>
<buyer>
<buyer_id xmlns="API:id_name_store">23</buyer_id>
<buyer_name xmlns="API:id_name_store">Zac Buyer</buyer_name>
</buyer>
<buyer_contract>
<buyer_contract_id xmlns="API:id_name_store">42</buyer_contract_id>
<buyer_contract_name xmlns="API:id_name_store">Contract C</buyer_contract_name>
</buyer_contract>
</routing_rule>
<routing_rule>
<routing_rule_id>19</routing_rule_id>
<routing_rule_type_name>Allow source to only send leads to this buyer</routing_rule_type_name>
<affiliate>
<affiliate_id xmlns="API:id_name_store">17</affiliate_id>
<affiliate_name xmlns="API:id_name_store">Tobias Funke</affiliate_name>
</affiliate>
<offer>
<offer_id xmlns="API:id_name_store">167</offer_id>
<offer_name xmlns="API:id_name_store">Zac's Leadgen Test</offer_name>
</offer>
<buyer>
<buyer_id xmlns="API:id_name_store">23</buyer_id>
<buyer_name xmlns="API:id_name_store">Zac Buyer</buyer_name>
</buyer>
<buyer_contract>
<buyer_contract_id xmlns="API:id_name_store">43</buyer_contract_id>
<buyer_contract_name xmlns="API:id_name_store">Contract D</buyer_contract_name>
</buyer_contract>
</routing_rule>
<routing_rule>
<routing_rule_id>18</routing_rule_id>
<routing_rule_type_name>Allow source to only send leads to this buyer</routing_rule_type_name>
<affiliate>
<affiliate_id xmlns="API:id_name_store">17</affiliate_id>
<affiliate_name xmlns="API:id_name_store">Tobias Funke</affiliate_name>
</affiliate>
<offer>
<offer_id xmlns="API:id_name_store">167</offer_id>
<offer_name xmlns="API:id_name_store">Zac's Leadgen Test</offer_name>
</offer>
<buyer>
<buyer_id xmlns="API:id_name_store">23</buyer_id>
<buyer_name xmlns="API:id_name_store">Zac Buyer</buyer_name>
</buyer>
<buyer_contract>
<buyer_contract_id xmlns="API:id_name_store">44</buyer_contract_id>
<buyer_contract_name xmlns="API:id_name_store">Contract E</buyer_contract_name>
</buyer_contract>
</routing_rule>
<routing_rule>
<routing_rule_id>17</routing_rule_id>
<routing_rule_type_name>Allow source to only send leads to this buyer</routing_rule_type_name>
<affiliate>
<affiliate_id xmlns="API:id_name_store">17</affiliate_id>
<affiliate_name xmlns="API:id_name_store">Tobias Funke</affiliate_name>
</affiliate>
<offer>
<offer_id xmlns="API:id_name_store">167</offer_id>
<offer_name xmlns="API:id_name_store">Zac's Leadgen Test</offer_name>
</offer>
<buyer>
<buyer_id xmlns="API:id_name_store">23</buyer_id>
<buyer_name xmlns="API:id_name_store">Zac Buyer</buyer_name>
</buyer>
<buyer_contract>
<buyer_contract_id xmlns="API:id_name_store">41</buyer_contract_id>
<buyer_contract_name xmlns="API:id_name_store">Zac's Contract B</buyer_contract_name>
</buyer_contract>
</routing_rule>
</routing_rules>
</routing_rules_export_response>




Did you find it helpful? Yes No

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