Untitled Page
API Overview
Example
Customers  
Companies  
Technicians  
Technician Groups  
Tickets  
Ticket History  
Ticket Attachments  
Billing Line Items  
Billing Invoices  
Time Tracking  
Knowledge Base Articles  
Scheduling  
Asset Managements  
 
get_companies
Input Variable Input Value Description
id Integer value A valid company ID. You may also use * as a wildcard.
name String value A valid company name to limit the returned values by. You may use * as a wildcard.
start_name String value This can be a single letter or the first few letters of a company name. The returned records will have a company name that starts with this value and go to the last record, unless you include the end_name and/or count variables. Example: If you include start_name=j in your request, only records with a company name starting with j or later in the alphabet will be returned.
end_name String value This can be a single letter or the first few letters of a company name. The returned records will stop at records that have a company name that starts with this value. It can be used in conjunction with start_name or alone. When used alone the returned records will start with first record in the database. Example: If you include end_name=j in your request, only records with a company name starting with j or earlier in the alphabet 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 "name=*" to get paged records, and you must also include the "count" variable". Example: &id=*&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 ID in descending order you would include the following in the URL: &order=ID 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 values is "ASC". For example, to sort by ID in descending order you would include the following in the URL: &order=id&order_direction=DESC.

Output Variable URL Encoded Description
id No Unique ID of the company.
name Yes The company name.
address Yes The street address of the company.
city Yes The city of the company.
state Yes The state of the company.
zip Yes The ZIP/postal code of the company.
country Yes The country of the company.
phone Yes The phone number of the company.
email Yes The email address of the company.
customer_portal No The ID of the customer portal the company is associated with.
Example Usage
http://localhost/API/default.aspx?key=your key here&action=get_companies&cid=*
Example Response
XML:
<?xml version="1.0"?>
<companies>
	<company>
		<id>37</id>
		<name>Demo+Company</name>
		<address>123+Some+Street</address>
		<city>Atlanta</city>
		<state>GA</state>
		<zip>30318</zip>
		<country>United+States</country>
		<phone>404-000-0000</phone>
		<customer_portal>1</customer_portal>
	</company>
</companies>
JSON:
{
	"companies": [
		{
			"id" : "37",
			"name" : "Demo+Company",
			"address" : "123+Some+Street",
			"city" : "Atlanta",
			"state" : "GA",
			"zip" : "30318",
			"country" : "United+States",
			"phone" : "404-000-0000",
			"customer_portal" : "1",
		}
	]
}
URL DELIMITED:
id=37&name=Demo+Company&address=123+Some+Street&city=Atlanta&state=GA
&zip=30318&country=United+States&phone=404-000-0000&customer_portal=1