EXPORT Buyers API Version 2

Updated on 2015-09-23

Current Version: 2

Deprecated Version: 1

Requests Allowed: POST/GET/SOAP


Summary:

This API allows you to export buyer details.


Resource/WSDL Page:

http://<your_domain_here>/api/2/export.asmx?op=Buyers


Parameters

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. 0 to export all Buyers

account_status_id

Required

Type: INTEGER

Max Length: N/A

Buyer status

Use GET AccountStatuses 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/2/export.asmx/Buyers?api_key=dNJFmId9rI&buyer_id=0&account_status_id=0


Sample XML Response:

 

<buyers_export_response xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://cakemarketing.com/api/2/">
<success>true</success>
<row_count>1666</row_count>
<buyers>
<buyer>
<buyer_id>1963</buyer_id>
<buyer_name>Edited API Buyer 160129233333</buyer_name>
<buyer_group/>
<account_managers>
<contact>
<contact_id xmlns="API:id_name_store">9979</contact_id>
<contact_name xmlns="API:id_name_store">Brad Shumard</contact_name>
</contact>
</account_managers>
<account_status>
<account_status_id xmlns="API:id_name_store">1</account_status_id>
<account_status_name xmlns="API:id_name_store">Active</account_status_name>
</account_status>
<address>
<street_1/>
<street_2/>
<city/>
<state/>
<zip_code/>
<country/>
</address>
<website/>
<contacts/>
<billing_cycle>
<billing_cycle_id xmlns="API:id_name_store">3</billing_cycle_id>
<billing_cycle_name xmlns="API:id_name_store">Monthly</billing_cycle_name>
</billing_cycle>
<credit_type>Limited</credit_type>
<credit_limit>9999999.0000</credit_limit>
<credit_balance>0.0000</credit_balance>
<lead_cap>
<limit xsi:nil="true"/>
<interval>
<cap_interval_id xmlns="API:id_name_store">0</cap_interval_id>
<cap_interval_name xmlns="API:id_name_store">None</cap_interval_name>
</interval>
<start_date xsi:nil="true"/>
</lead_cap>
<date_created>2016-01-27T16:14:59.84</date_created>
</buyer>
</buyers>
</buyers_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 Account Status

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