Input Variable |
Input Value |
Description |
id |
Integer value |
This would be the ID number of the database record for a customer. No wildcards are accepted. |
cid |
String value |
This can be a single customer ID, a comma separated list of customer IDs or the * character as a wildcard to return all customers. You can use * in conjunction with start_cid, end_cid, start_date and end_date and count to limit the returned values. |
start_cid |
String value |
This can be a single letter or the first few letters of a customer ID. The returned records will start with this value and go to the last record, unless you include the end_cid and/or count variables. Example: If you include start_cid=j in your request, only customer IDs starting with j or later in the alphabet will be returned. |
end_cid |
String value |
This can be a single letter or the first few letters of a customer ID. The returned records will stop at customer IDs that start with this value. It can be used in conjunction with start_cid or alone. When used alone the returned records will start with first record in the database. Example: If you include start_cid=j in your request, only customer IDs starting with j or later in the alphabet will be returned. |
start_date |
Date/time value |
The returned records will start with customer IDs that were inserted on or after the date supplied. This can be used alone or in conjunction with end_date. Example: If you include start_date=04/01/2014 in your request, only customers who were added on or after that date will be returned. |
count |
Integer value |
This would be the number of records to return. |
count_only |
String value |
Defines whether or not to return only the number of records. This is used in conjunction with the "page" variable or just to get the total number of records. Accepted values are "N" and "Y" (without the quotes). The default value is "N", and if this variable is excluded the detailed data is returned. |
page |
Integer value |
This would be the number of the "page" of records to return. You must use a wildcard like "id=*" or "cid=*" to get paged records, and you must also include the "count" variable". Example: &cid=*&count=10&page=1. |
order |
String value |
Defines the sort order of the returned records. You will need to examine the database to determine the exact field names to sort by. You may also include " ASC" (ascending) and " DESC" (descending) in the value for the sort direction (note the precedding blank space). For example, to sort by customer ID in descending order you would include the following in the URL: &order=CID DESC. You can optionally include the "order_direction" variable separately. |
order_direction |
String value |
Defines the sort order direction of the returned records. Accepted values are "ASC" (ascending) and "DESC" (descending). The default value is "ASC". For example, to sort by customer ID in descending order you would include the following in the URL: &order=CID&order_direction=DESC. |
Output Variable |
URL Encoded |
Description |
id |
No |
Unique ID of the database record. |
customer_id |
Yes |
The customer's login ID. |
password |
Yes |
The customer's password, returned as en encrypted string. |
company_id |
No |
The unique ID of the database record of the company. |
company_name |
Yes |
The name of the company. |
contact |
Yes |
The customer's contact name. |
phone |
Yes |
The customer's phone number. |
additional_phone |
Yes |
Additional phone numbers associated with the cutomer account. |
email |
Yes |
The customer's email address. |
additional_email |
Yes |
Additional email addresses associated with the cutomer account. |
address |
Yes |
The customer's street address. |
city |
Yes |
The customer's city. |
state |
Yes |
The customer's state. |
zip |
Yes |
The customer's ZIP/postal code. |
country |
Yes |
The customer's country. |
customer_group_id |
No |
The unique ID of the database record of the customer group. |
customer_group_name |
Yes |
The name of the customer group. |
status |
No |
The customer's approval status. Posssible values will be "PENDING" and "APPROVED" (without the quotes). |
support |
No |
The customer's support status. Posssible values will be "N" and "Y" (without the quotes). |
chat |
No |
The customer's ability to use live chat. Posssible values will be "N" and "Y" (without the quotes). |
date_added |
No |
The date the customer record was created. |
viewable_tickets |
No |
This defines the types of tickets the customer can view. Possible return values are "PERSONAL" and "COMPANY" (without the quotes). |
viewable_invoices |
No |
This defines the types of invoices the customer can view. Possible return values are "PERSONAL" and "COMPANY" (without the quotes). |
viewable_assets |
No |
This defines the types of assets the customer can view. Possible return values are "PERSONAL" and "COMPANY" (without the quotes). |
selectable_categories |
No |
This defines which categories the customer can see when submitting tickets. The return value will be a comma separated list of category names. |
support_contracts |
No |
This defines which support contracts the customer is associated with. The return value will be a comma separated list of the ID numbers of the support contract. |
sc_start_dates |
No |
This defines the support contract start dates. The return value will be a comma separated list of dates that corresponds the values returned by support_contracts. |
ticket_num_limit |
No |
This is the number of tickets remaining on the customer's support contract(s). |
ticket_time_limit |
No |
This is the amount of time, in seconds, remaining on the customer's support contract(s). |
chat_num_limit |
No |
This is the number of chat sessions remaining on the customer's support contract(s). |
rd_num_limit |
No |
This is the number of remote desktop sessions remaining on the customer's support contract(s). |
customer_portal |
No |
The unique ID of the database record of the customer portal. |
use_encryption |
No |
This defines whether or not to use encryption when emailing the customer. |
latitude |
No |
The customer's latitude. |
longitude |
No |
The customer's longitude. |
notes |
Yes |
Basic notes about the customer account. |
Example Usage |
http://localhost/API/default.aspx?key=your key here&action=get_customers&cid=* |
Example Response |
XML: |
<?xml version="1.0"?>
<customers>
<customer>
<id>123</id>
<customer_id>demo</customer_id>
<password>encrypted string</password>
<company_id>1</id>
<company_name>Demo+Company</id>
<contact>John+Smith</contact>
<phone>404-000-0000</id>
<additional_phone>404-111-1111</additional_phone>
<email>John.Smith%40DemoCompany.com</email>
<additional_email>123</additional_email>
<address>123 some Street</id>
<city>Atlanta</city>
<state>GA</state>
<zip>30318</zip>
<country>USA</country>
<customer_group_id>1</customer_group_id>
<customer_group_name></customer_group_name>
<status>APPROVED</status>
<support></support>
<chat></chat>
<date_added>4/18/2014 6:58:11 PM</date_added>
<viewable_tickets>PERSONAL</viewable_tickets>
<viewable_invoices>PERSONAL</viewable_invoices>
<viewable_assets>PERSONAL</viewable_assets>
<selectable_categories></selectable_categories>
<support_contracts></support_contracts>
<sc_start_dates></sc_start_dates>
<ticket_num_limit>0</ticket_num_limit>
<ticket_time_limit>0</ticket_time_limit>
<chat_num_limit>0</chat_num_limit>
<rd_num_limit>0</rd_num_limit>
<customer_portal>2</customer_portal>
<use_encryption>N</use_encryption>
<latitude></latitude>
<longitude></longitude>
<notes></notes>
</customer>
</customers> |
JSON: |
{
"customers": [
{
"id" : "1",
"customer_id" : "demo",
"password" : "54DC7880713817A90552AC9C52DAA32AD571F897",
"company_id" : "5",
"company_name" : "demo",
"contact" : "John+Smith",
"phone" : "404-000-0000",
"additional_phone" : "",
"email" : "John.Smith%40DemoCompany.com",
"additional_email" : "",
"address" : "123+demo+street",
"city" : "Atlanta",
"state" : "GA",
"zip" : "30318",
"country" : "United+States",
"customer_group_id" : "0",
"customer_group_name" : "",
"status" : "APPROVED",
"support" : "Y",
"chat" : "Y",
"date_added" : "8/25/2006 7:27:29 PM",
"viewable_tickets" : "PERSONAL",
"viewable_invoices" : "PERSONAL",
"viewable_assets" : "NONE",
"selectable_categories" : "",
"support_contracts" : "",
"sc_start_dates" : "",
"ticket_num_limit" : "",
"ticket_time_limit" : "",
"chat_num_limit" : "0",
"rd_num_limit" : "0",
"customer_portal" : "2",
"use_encryption" : "N",
"latitude" : "33.8604722",
"longitude" : "-84.42777030000002",
"notes" : "123+Demo+Street"
}
]
} |
URL DELIMITED: |
id=1&customer_id=demo&password=54DC7880713817A90552AC9C52DAA32AD571F897&company_id=5
&company_name=demo&contact=SMOOT&phone=404-000-0000&additional_phone=&email=Jeremy%40readydesk.com
&additional_email=&address=123+demo+street&city=Atlanta&state=ON&zip=30327&country=United+States
&customer_group_id=0&customer_group_name=&status=APPROVED&support=YES&chat=Y
&date_added=8/25/2006 7:27:29 PM&viewable_tickets=PERSONAL&viewable_invoices=PERSONAL&viewable_assets=NONE
&selectable_categories=&support_contracts=&sc_start_dates=&ticket_num_limit=&ticket_time_limit=
&chat_num_limit=0&rd_num_limit=0&customer_portal=2&use_encryption=N&latitude=33.8604722
&longitude=-84.42777030000002¬es=123 Demo Street |