• Using Spaces and Special Characters
    Any filter where you will need to use spaces or other special characters will need to be encoded. This means the code contained in this table will need to be used in place of the special character. For example, %20 will be used in place of a space. The following example will find tickets with the name “Error Code 303”.

    Example: https://app.[ServerName].teamsupport.com/api/xml/Tickets?name=Error%20Code%20303

  • 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.[ServerName].teamsupport.com/api/xml/Contacts?Email=jdoe@teamsupport.com

  • Filter with multiple fields
    To filter using multiple fields, you may use a ampersand (&) in between fields.

    Example: https://app.[ServerName].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.[ServerName].teamsupport.com/api/xml/Contacts?FirstName=John&FirstName=Jane

  • Filter with date fields
    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.[ServerName].teamsupport.com/api/xml/Tickets?DateModified=20100325154225

  • Filter Between Two Dates
    The “between” filter allows you to return results that fall in between two dates. Exactly two date filter parameters must be passed. If additional date filter parameters are passed, the result will be that no date filter is applied. Both of the parameters must have the “between” keyword: [bt].

    Example: https://app.[ServerName].teamsupport.com/api/xml/Tickets?dateclosed[bt]=20170101102033&dateclosed[bt]=20180601102033

    This will return the Tickets whose DateClosed is between ’2017-01-01 10:20:33’ and ’2018-06-01 10:20:33’

  • Filtering on Custom Fields
    To include custom fields in the ticket results, you must include the filter for “TicketTypeID”.

    Example: https://app.[ServerName].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: Strings use 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.[ServerName].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.[ServerName].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”).

    Example: https://app.[ServerName].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.[ServerName].teamsupport.com/api/xml/Customers?CRMLinkID=[null]



  • Does not contain: To filter out a phrase, you can use the “doesnotcontain” text filter. The following example will return all tickets where the name does not contain the word ‘test’.

    Example: https://app.[ServerName].teamsupport.com/api/xml/tickets?name[doesnotcontain]=test

  • Not: Use the [not] filter (which is <>) to find text or numbers that are not an exact match. The following example will return all tickets where the name is not exactly ‘test’.

    Example: https://app.[ServerName].teamsupport.com/api/xml/tickets?name[not]=test

Need more help with this?
Customer Support

Was this helpful?

Yes No
You indicated this topic was not helpful to you ...
Could you please leave a comment telling us why? Thank you!
Thanks for your feedback.