URL | https://www10.versaccounts.com/v1/customer |
Supported Methods | GET |
Description | Returns a firm's BillTo Customers |
Accepted Query Formats
GET /customer[.format] | retrieve all customers |
GET /customer/1[.format] | retrieve customer with ID = 1 |
POST /customer[.format] | create new customer / response contains new customer record |
Elements
id | width="80%" Unique ID assigned to customer record |
organization_gl_account_id | Default revenue account to which revenue from this customer will be posted. |
currency_id | Default currency in which Quotes, Orders, or Invoices will be created. This currency can, of course, be changed when the documents themselves are created. |
adjustment_type_id | Default adjustment suggested for line items of Quotes, Orders, or Invoices when they are created. The adjustments are purely optional for each line item created. |
term_id | Default payment terms for the customer when creating Quotes, Orders, or Invoices will be created. The payment terms can be changed when the documents themselves are created. |
active | A Boolean value (true or false) indicating whether the customer new business may be conducted with the customer. |
credit_limit | The maximum Accounts Receivable outstanding amount allowed for the customer. |
Party Record | A mandatory record for each BillTo Customer. Provides company, contact, and address information. see the Party resource for this record's mandatory fields. |
Default Taxes | A set of taxes, if any, to be applied to newly created line items of Quotes, Orders, or Invoices. These taxes are purely optional when creating such records. |
Examples
Create a new customer using a payload in XML format:
$ curl -X POST -H "Content-Type: application/xml" -d @new_customer.xml -i --header "VERSACCOUNTS_AUTHORIZATION:494d60c5b140f1900e04256eca0d599cc0214fcf" https://www10.versaccounts.com/v1/customer
Posted XML file:
<?xml version="1.0" encoding="UTF-8"?> <customer> <organization_gl_account_id>33147</organization_gl_account_id> <currency_id>2</currency_id> <adjustment_type_id></adjustment_type_id> <term_id>189</term_id> <active>true</active> <credit_limit>0.0</credit_limit> <party> <company_name>Rockford Investigations</company_name> <business_number></business_number> <given_name>James</given_name> <surname>Rockford</surname> <title></title> <address_line_1>126 Water Street</address_line_1> <address_line_2></address_line_2> <address_line_3></address_line_3> <city>ROCKFORD</city> <province_state>Illinois</province_state> <postal_zip_code>635101</postal_zip_code> <country>United States</country> <contact_number_1>815-555-1212</contact_number_1> <contact_number_2></contact_number_2> <fax_number>815-444-1234</fax_number> <email>jrock@pi.net</email> </party> </customer>
Response:
<?xml version="1.0" encoding="UTF-8"?> <customers> <customer> <id>5408</id> <organization_gl_account_id>33147</organization_gl_account_id> <currency_id>2</currency_id> <adjustment_type_id></adjustment_type_id> <term_id>189</term_id> <active>true</active> <credit_limit>0.0</credit_limit> <party> <id>9412</id> <company_name>Rockford Investigations</company_name> <business_number></business_number> <given_name>James</given_name> <surname>Rockford</surname> <title></title> <address_line_1>126 Water Street</address_line_1> <address_line_2></address_line_2> <address_line_3></address_line_3> <city>ROCKFORD</city> <province_state>Illinois</province_state> <postal_zip_code>635101</postal_zip_code> <country>United States</country> <contact_number_1>815-555-1212</contact_number_1> <contact_number_2></contact_number_2> <fax_number>815-444-1234</fax_number> <email>jrock@pi.net</email> </party> <taxes> </taxes> </customer> </customers>
Retrieve all customers in XML format:
$ curl -i --header "VERSACCOUNTS_AUTHORIZATION:409696900e0b3f5a4297e3cd5823f734f0095e66" https://www10.versaccounts.com/v1/customer.xml
<?xml version="1.0" encoding="UTF-8"?> <customers> <customer> <id>352</id> <organization_gl_account_id>10281</organization_gl_account_id> <currency_id>1</currency_id> <adjustment_type_id></adjustment_type_id> <term_id>217</term_id> <active>true</active> <credit_limit>0.0</credit_limit> <party> <id>1463</id> <company_name>Swift Railroad Contractors Limited</company_name> <business_number></business_number> <given_name></given_name> <surname></surname> <title></title> <address_line_1>109 Griffin St. N.</address_line_1> <address_line_2>PO Box 909</address_line_2> <address_line_3></address_line_3> <city>SMITHVILLE</city> <province_state>Ontario</province_state> <postal_zip_code>L0R 2A0</postal_zip_code> <country>Canada</country> <contact_number_1>905-769-1317</contact_number_1> <contact_number_2></contact_number_2> <fax_number>905-769-1318</fax_number> <email>brad.swift@swiftrailroad.com</email> </party> <taxes> <tax> <id>316</id> <name>HST @ 13%</name> </tax> </taxes> </customer> <customer> <id>350</id> <organization_gl_account_id>34310</organization_gl_account_id> <currency_id>1</currency_id> <adjustment_type_id></adjustment_type_id> <term_id>217</term_id> <active>true</active> <credit_limit>0.0</credit_limit> <party> <id>1459</id> <company_name>Penvidic Contracting (1971) Limited</company_name> <business_number></business_number> <given_name>Brent</given_name> <surname>Penvidic</surname> <title></title> <address_line_1>PO Box 130</address_line_1> <address_line_2></address_line_2> <address_line_3></address_line_3> <city>BURLINGTON</city> <province_state>Ontario</province_state> <postal_zip_code>L7R 3X8</postal_zip_code> <country>Canada</country> <contact_number_1>905-632-5890</contact_number_1> <contact_number_2></contact_number_2> <fax_number>905-333-3790</fax_number> <email>brent@penvidic.com</email> </party> <taxes> <tax> <id>316</id> <name>HST @ 13%</name> </tax> </taxes> </customer> </customers>
Comments and Suggestions
0 comments
Please sign in to leave a comment.
Related articles