ACCOUNTING ExportBuyerBills API Version 1

Updated on 2014-07-09
Current Version: Version 1
Deprecated Version: NA
Requests Allowed: GET&SOAP

 

Summary:

Returns a list of bills. No message. 


Resource/WSDL Page:

http://<your_domain_here>/api/1/accounting.asmx?op=ExportBuyerBills

 

Parameters

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

Must be a valid API key (existing and not expired) 
Example Values: BETwue0XUuMnZitzyqzddodKbz08h7
billing_cycle
Required
Type: BILLING_CYCLE_OPTIONS
Length (Max/Min): NA

Example Values: Must be one of the following: weekly, bimonthly, monthly or all 
billing_period_start_date
Required
Type: DATETIME
Length (Max/Min): NA

Example Values: Allowed formats: "YYYY-mm-dd", "dd-mm-YYYY"
billing_period_end_date
Required
Type: DATETIME
Length (Max/Min): NA

Example Values: Allowed formats: "YYYY-mm-dd", "dd-mm-YYYY"

 **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-new.cakemarketing.com/api/1/accounting.asmx/ExportBuyerBills?api_key=fmpZgYnJyh0jJ6IP9G0bw&billing_cycle=monthly&billing_period_start_date=2016-11-01&billing_period_end_date=2016-12-01

 

Sample XML Response:

<export_buyer_bills_accounting_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>1</row_count>
<buyer_bills>
<buyer_bill>
<bill_id>66</bill_id>
<buyer>
<buyer_id>202</buyer_id>
<buyer_name>New Buyer 2015</buyer_name>
<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>
<account_managers>
<account_manager>
<contact_id>1</contact_id>
<contact_name>Hanisha Amin</contact_name>
</account_manager>
</account_managers>
<buyer_billing>
<contacts>
<contact>
<contact_id>487</contact_id>
<contact_type/>
<first_name>Joe</first_name>
<last_name>Shmoe</last_name>
</contact>
</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>
<address>
<street_1/>
<street_2/>
<city/>
<state/>
<zip_code/>
<country/>
</address>
</buyer_billing>
</buyer>
<start_date>2016-11-01T00:00:00</start_date>
<end_date>2016-12-01T00:00:00</end_date>
<prepaid>false</prepaid>
<bill_amount>
<currency_id>1</currency_id>
<amount>1200.0000</amount>
<formatted_amount>$1,200.00</formatted_amount>
</bill_amount>
<sent_invoice>false</sent_invoice>
<received_payment>false</received_payment>
<buyer_bill_line_items>
<buyer_bill_line_item>
<line_item_id>66</line_item_id>
<line_item_type>Standard Item</line_item_type>
<buyer_contract>
<buyer_contract_id xmlns="API:id_name_store">236</buyer_contract_id>
<buyer_contract_name xmlns="API:id_name_store">home securtiy</buyer_contract_name>
</buyer_contract>
<price_per_lead>
<currency_id>1</currency_id>
<amount>1200.0000</amount>
<formatted_amount>$1,200.00</formatted_amount>
</price_per_lead>
<leads>1</leads>
<total_amount>
<currency_id>1</currency_id>
<amount>1200.0000</amount>
<formatted_amount>$1,200.00</formatted_amount>
</total_amount>
<adjustment_date xsi:nil="true"/>
</buyer_bill_line_item>
</buyer_bill_line_items>
</buyer_bill>
</buyer_bills>
</export_buyer_bills_accounting_response>


Error Message
Likely Cause
Invalid API Key
API key does not exist or is expired