Integration‎ > ‎

API

Editions:  Support Desk & Enterprise

The TeamSupport API is a RESTful style API over HTTP using XML. Each object (Tickets, Customers, Products, etc...) in TeamSupport is treated as a resource. You can use four verbs (GET, POST, PUT, DELETE) to manipulate the data.

Authentication:
To gain access to your data, you must get authenticated. TeamSupport uses HTTP Basic Authentication over SSL to secure your data. You will use your OrganizationID for your username, and your authentication token as your password. Your authentication token allows access to your data, so be sure to keep it very secure.  


Locate your OrgID: Go to Admin, My Company tab.
Locate your API Token:  Go to Admin, Integration tab and expand the top selection labeled TeamSupport API.

 
An easy way to test your calls is to use a HTTP client such as Fiddler or cURL. You can even test the GET verb with a standard web browser.

Verbs: 
GET (Retrieve)
 
The GET verb allows you to retrieve the data.
 
Example 1: https://app.teamsupport.com/api/xml/customers will retrieve all of your customers.
 
Example 2: https://app.teamsupport.com/api/xml/customers/123 will retrieve a single customer with the CustomerID of 123.
 
You also have an option of appending ".xml" to the resource. This might be useful for some clients to display the proper XML format.
 
Example: https://app.teamsupport.com/api/xml/customers.xml
 
POST (Insert or Create)
 
The POST verb will allow you create resources.
 
Example: https://app.teamsupport.com/api/xml/customers
 
Using the POST verb, a new customer will be created. You need to put the XML of your new customer in the body of the HTTP request.
 
PUT (Update)
 
The PUT verb is much like the POST, except that it updates an existing resource instead of creating a new one.
 
https://app.teamsupport.com/api/xml/customers/123
 
You will need to put the XML in the body of the request. An easy way to see the format, is to use the GET verb to request a resource.
 
DELETE
 
The DELETE verb is pretty much straight forward. You issue an HTTP request upon a resource, and that resource will be deleted.
 
Example: Tickets/123/Customers/456
 
Customer 456's association with ticket 123 will be deleted.
Responses
 
When you receive a response back from your request, the Status Code is very meaningful. The Status Code determines the success of the request.
 
Some common codes are as follows:
200 Successful
201 Created
202 Accepted
300 Redirection
304 Not Modified
401 Unauthorized
404 Not Found
405 Method Not Allowed
500 Server Error
501 Not Implemented
Custom Fields
 
The custom fields that you create will be available like any other property of a resource in TeamSupport. You can modify the property name when you create or edit your custom fields (Admin->Custom Fields). When modifying your custom fields, you will notice a value "API Field Name". This value will determine the element name in your XML.

Filtering And Search

To filter results, use the query string in the URL.  You can use any field name, including custom fields.  For the name portion you use the field name and the value portion you use the value that you want the field contents to equal.

Example:
https://app.teamsupport.com/api/xml/Contacts?Email=jdoe@teamsupport.com
 
Filter with multiple fields:

Example:
https://app.teamsupport.com/api/xml/Contacts?FirstName=John&LastName=Doe
 
Filter with the same field more than once.  This will return all the contacts with the first name of Jane or John.

Example:
https://app.teamsupport.com/api/xml/Contacts?FirstName=John& FirstName =Jane
 
All filters are set to equal the value that you specify, except for dates. Dates and times are handled differently.  The dates that are returned are greater than the date specified in the filter.   They also require a special format of YYYYMMDDHHMMSS.  All 14 characters must be included, and the date must be UTC with a 24 hour format.

Example:
https://app.teamsupport.com/api/xml/Tickets?DateModified=20100325154225
 
Miscellaneous
To include custom fields in the ticket results, you must include the filter for “TicketTypeID”.

Example:
https://app.teamsupport.com/api/xml/Tickets?TicketTypeID=2010
 
Filter Options
Some types of fields have options when filtering, depending on the field’s data type. 

String
String has one option.  It is the keyword “contains”.  The default for filtering a string, is an exact match of the value.  If the “contains” option is used, the field only has include the value, not match it exactly.

Example:
https://app.teamsupport.com/api/xml/Contacts?Email[contains]=@teamsupport.com
 
Date
Date also has only one option, and that is “lt”.  When you use “lt”, all the results will be less than the filtered date, instead of greater than.

Example:
https://app.teamsupport.com/api/xml/Tickets?DateModified[lt]=20100325154225
 
Number
Numbers have several options, but the default is equal to the value.  They include Less Than (“lt”), Less Than or Equal (“lte”), Greater Than (“gt”), Greater Than or Equal (“gte”), Not equal (“not”). 
https://app.teamsupport.com/api/xml/Tickets?Version[gte]=5
 
Null Values
To check for a null value, use "[null]" for the value in the query string.

Example:
https://app.teamsupport.com/api/xml/Customers?CRMLinkID=[null]
OR
https://app.teamsupport.com/api/xml/Customers?CRMLinkID[not]=[null]

API URL's

TeamSupport Api Url's



Note:  The API is available for paid accounts and are only apart of Support Desk and Enterprise editions.
Subpages (2): Filtering And Search URLs