How to Use Query Parameters for Supported Ticket Fields
This article explains how to use the List Tickets API query parameter Q to filter tickets by the supported field, for example, externalreferenceids. Use this when you need to retrieve tickets that were mapped to one or more external system reference IDs.
Prerequisites
- Access to the BoldDesk API (valid API key / token).
- Permission to view tickets in the target workspace/brand.
- The external reference IDs must already be stored on the ticket as
externalreferenceids.
Using the Q Parameter for Advanced List Tickets API Filtering
- The List Tickets API supports advanced filtering using the
Qparameter. - For fields that support list/array matching (such as
externalreferenceids), provide the value as an array of strings. - When multiple IDs are provided, the IDs must be separated by commas inside the array.
Filter Tickets by External Reference ID(s) Using the Q Parameter
To filter tickets by external reference ID(s) using the Q parameter, do the following:
- Open your API client (browser, Postman, curl, or code).
- Call the List Tickets API endpoint and pass a
Qfilter usingexternalreferenceids. - Provide the external reference ID(s) inside double quotes.
Example (single external reference ID)
https://rocketer.bolddesk.com/api/v1/tickets?Q=externalreferenceids:["874b6812-f325-11ed-8f2d-06b62cc1a326"]
Example (multiple external reference IDs)
https://rocketer.bolddesk.com/api/v1/tickets?Q=externalreferenceids:["1234-2345-45678","126-345"]
Rules, Conditions, and Behavior
externalreferenceidsvalues must be passed:- As an array:
[...] - With each ID wrapped in double quotes:
"id-value" - With multiple IDs separated by commas.
- As an array:
- The
Qparameter is used for advanced query-based filtering in the List Tickets API.
Supported fields in the query parameter
Provides Q parameter for filtering the ticket module by specified fields (Values allowed are brands, agents, groups, status, priority, categories, requester, createdby, createdon, lastmodifiedon, closedon, responsedue, resolutiondue, source, tags, type, contactgroups, ids, subject, statuscategory, externalreferenceids, requesteremail, requesterphone, agentemail)
How to Combine Filters Using Multiple Q Parameters
You can apply multiple Q-based filters in one request by repeating the Q parameter in the query string (for example, ...&Q=<filter1>&Q=<filter2>). When multiple Q parameters are provided, they act as cumulative filters (equivalent to an AND across the Q clauses).
Example (multiple Q parameters in one request):
/api/v1/tickets?Q=<createdon filter>&Q=<source filter>&RequiresCounts=true
If you use FilterId, do not combine it with Q in the same request—FilterId uses the saved ticket view logic instead.
Use Cases
- Retrieve a ticket created from an external system by searching with that system’s unique reference ID.
- Retrieve tickets linked to any of several external IDs when reconciling data across systems.
Troubleshooting Common Errors
-
No tickets returned
- Confirm the field ID exists on at least one ticket.
- Verify the ID value matches exactly (including hyphens/case).
-
Invalid query / bad request
Ensure theQvalue uses the correct bracket and quote format:- Correct:
externalreferenceids:["id1","id2"] - Incorrect:
externalreferenceids:[id1,id2]
- Correct:
Frequently Asked Questions
-
Can I use FilterId and Q together in the same List Tickets API request?
No. Do not combineFilterIdandQin the same request. UseFilterIdfor saved ticket view filtering and useQfor query-based filtering. -
Which Q field should I use to find tickets linked to external systems?
Useexternalreferenceidswhen you need to retrieve tickets mapped to one or more external system reference IDs. -
How can I confirm that the externalreferenceids Q filter works in my BoldDesk account?
Run the List Tickets API request using an external reference ID that is already stored on a ticket. If the request format is correct and the authenticated user has access to the ticket, the API response should return the matching ticket.