Submit a Ticket My Tickets
Welcome
Login  Sign up

EXPORT BuyerContracts API Version 3 (DEPRECATED)

EXPORT BuyerContracts API V3

Updated on 2015-09-23

Current Version: 3

Deprecated Version: 1

Requests Allowed: POST/GET/SOAP


Summary:

This API allows you to export buyer contract details.


Resource/WSDL Page:

http://<your_domain_here>/api/3/export.asmx?op=BuyerContracts


Parameters

Example Values: 

api_key
Required
Type: STRING
Length (Max/Min): 50

Must be a valid API key (existing and Not expired)

Example Values: Fo35NRAqvFLXoZxqB4aVMhh

buyer_id

Required

Type: INTEGER

Max Length: N/A

Buyer‘s CAKE Entity ID

Pass 0 to skip

At least one of buyer_id, buyer_contract_id or vertical_id must be passed.

Use EXPORT Buyers API

buyer_contract_id

Required

Type: INTEGER

Max Length: N/A

Buyer Contract‘s CAKE Entity ID

Pass 0 to skip

vertical_id

Required

Type: INTEGER

Max Length: N/A

Vertical‘s CAKE Entity ID

Pass 0 to skip

Use EXPORT Verticals API

buyer_contract_status_id

Required

Type: INTEGER

Max Length: N/A

Filter by the Buyer Contract’s status.

See: GETAccountStatuses API

 

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

http://demo.cakemarketing.com/api/3/export.asmx/BuyerContracts?api_key=dNJFmId9rI&buyer_contract_id=1498&buyer_id=0&vertical_id=0&buyer_contract_status_id=0



Sample XML Response:

<buyer_contract_export_response><success>true</success><row_count>1</row_count><buyer_contracts><buyer_contract><buyer_contract_id>1498</buyer_contract_id><buyer_contract_name>Test Buyer Contract 2</buyer_contract_name><buyer_contract_status><buyer_contract_status_id>1</buyer_contract_status_id><buyer_contract_status_name>Active</buyer_contract_status_name></buyer_contract_status><buyer><buyer_id>1326</buyer_id><buyer_name>Matt Test Buyer</buyer_name></buyer><vertical><vertical_id>607</vertical_id><vertical_name>Matt Test Vert</vertical_name></vertical><credit_type>Limited</credit_type><credit_balance>23000.0000</credit_balance><lead_cap><limit>10000</limit><interval><cap_interval_id>3</cap_interval_id><cap_interval_name>Monthly</cap_interval_name></interval><start_date xsi:nil="true"/></lead_cap><buy_upsells>false</buy_upsells><rank>0</rank><posting_wait_seconds>0</posting_wait_seconds><min_lead_age_minutes>0</min_lead_age_minutes><max_lead_age_minutes>7200</max_lead_age_minutes><max_post_errors>0</max_post_errors><send_alert_only>false</send_alert_only><max_return_days>30</max_return_days><returns_owed>0</returns_owed><replace_returns>false</replace_returns><replacements_non_returnable>false</replacements_non_returnable><vintage_leads>false</vintage_leads><delivery_schedules><delivery_schedule><delivery_schedule_id>8285</delivery_schedule_id><schedule_day>Tuesday</schedule_day><time_open>00:00:00</time_open><time_closed>23:59:00</time_closed><daily_cap>200</daily_cap><default_price>100.0000</default_price><schedule_type><schedule_type_id>1</schedule_type_id><schedule_type_name>Exclusive</schedule_type_name></schedule_type><sweeper>false</sweeper><priority>true</priority><no_return>false</no_return></delivery_schedule></delivery_schedules><delivery_method><url>http://testdomain.com</url><username/><timeout xsi:nil="true"/><xml> <xml>#xmltoken#</xml></xml><delivery_emails><delivery_email><delivery_email_id>1500</delivery_email_id><delivery_email_address>[email protected]</delivery_email_address></delivery_email><delivery_email><delivery_email_id>1501</delivery_email_id><delivery_email_address>[email protected]</delivery_email_address></delivery_email><delivery_email><delivery_email_id>1502</delivery_email_id><delivery_email_address>[email protected]</delivery_email_address></delivery_email><delivery_email><delivery_email_id>1503</delivery_email_id><delivery_email_address>[email protected]</delivery_email_address></delivery_email></delivery_emails><responses><response><delivery_method_response_id>1565</delivery_method_response_id><delivery_method_response_text>result>SUCCESS<result</delivery_method_response_text><response_disposition_id>1</response_disposition_id><response_disposition_name>Communication Error</response_disposition_name><is_success>false</is_success></response></responses><xml_decode_response_tokens>false</xml_decode_response_tokens><response_tokens><response_token><token_name>Price Token</token_name><token_regex>price>(.*?)</price</token_regex></response_token><response_token><token_name>Lead ID Token</token_name><token_regex>leadid>(.*?)</leadid</token_regex></response_token></response_tokens></delivery_method><ping_delivery_method><url>http://testdomain.com</url><username/><timeout xsi:nil="true"/><xml><testfield>#testtoken#</testfield></xml><responses><response><delivery_method_response_id>1563</delivery_method_response_id><delivery_method_response_text>result>SUCCESS<result</delivery_method_response_text><response_disposition_id>1</response_disposition_id><response_disposition_name>Communication Error</response_disposition_name><is_success>false</is_success></response></responses><xml_decode_response_tokens>false</xml_decode_response_tokens><response_tokens><response_token><token_name>Price Token</token_name><token_regex>price>(.*?)</price</token_regex></response_token><response_token><token_name>Session ID Token</token_name><token_regex>session>(.*?)</session</token_regex></response_token></response_tokens></ping_delivery_method><filters><filter><filter_id>131569</filter_id><filter_type><filter_type_id>8</filter_type_id><filter_type_name>Contains State</filter_type_name><data_type><data_type_id>3</data_type_id><data_type_name>number</data_type_name></data_type><operator><operator_id>10</operator_id><operator_name>listcontains</operator_name><operator_label>List Contains</operator_label></operator></filter_type><param_number xsi:nil="true"/><param_string>CA|CO|IL|MN|NV</param_string><param_date xsi:nil="true"/><param_bool xsi:nil="true"/></filter></filters><zip_code_filter>92660</zip_code_filter><zip_code_filter_distance>50</zip_code_filter_distance><date_created>2014-12-09T18:41:29.413</date_created></buyer_contract></buyer_contracts></buyer_contract_export_response>



Example Error Messages:

Error Message

Likely Cause

Invalid API Key

API Key does not exist or is expired

Invalid Buyer ID

buyer_id is less than or equal to 0 or is greater than 0, but doesn’t match an existing Buyer ID in CAKE.

Invalid Buyer Contract ID

buyer_contract_id is less than or equal to 0 or is greater than 0, but doesn’t match an existing Buyer Contract ID in CAKE.

Invalid Vertical ID

vertical_id is less than or equal to 0 or is greater than 0, but doesn’t match an existing Vertical ID in CAKE.

Did you find it helpful? Yes No

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