List HubSpot Tickets
Retrieves a list of HubSpot tickets within the specified date range and pagination window. Supports filtering by agent, feedback category, search keyword, and department code.
Notes: - If the calculated pageSize (endIndex - startIndex) exceeds 50, it is automatically resized to 50. - search looks into the following fields: content, chauffeur_name, passenger_name, and subject. - agentInvolved and feedbackCategory must match values returned from the /hubspot/tickets/list/filters endpoint. - departmentCode must be a valid department code in the system. - closedOnly must be a “false”/“true” in string default ‘false’. Returns only closed tickets
Request
Headers
| Name | Type | Required | Description |
|---|---|---|---|
| Authorization | string | Yes | Bearer token |
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| startDate | string | Yes | Start date for filtering tickets (inclusive) |
| endDate | string | Yes | End date for filtering tickets (inclusive) |
| startIndex | integer | Yes | Starting index for pagination |
| endIndex | integer | Yes | Ending index for pagination (max page size = 50) |
Path Parameter Format
- Date Format:
YYYY-MM-DD(ISO 8601 date) - Pagination: Zero-based indexing
- Page Size: Automatically limited to 50 items max
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| agentInvolved | string | No | Filter by agent (from filters endpoint) |
| feedbackCategory | string | No | Filter by category (from filters endpoint) |
| search | string | No | Search keyword across multiple fields |
| departmentCode | string | No | Valid department code filter |
| closedOnly | string | No | ”true”/“false” - return only closed tickets |
Query Parameter Details
- agentInvolved: Must match value from
/hubspot/tickets/list/filters - feedbackCategory: Must match value from
/hubspot/tickets/list/filters - search: Searches in
content,chauffeur_name,passenger_name, andsubject - departmentCode: Must be valid department code in system
- closedOnly: Default “false”, use “true” for closed tickets only
Response
200 OK - Successfully retrieved filtered ticket list
400 Bad Request
401 Unauthorized
500 Internal Server Error
Examples
Get first 10 tickets for date range
Filter by agent and category
Search with keyword
Filter by department and closed tickets
Data Fields Explained
Ticket Object Fields
| Field | Type | Description |
|---|---|---|
| ticketId | string | Unique HubSpot ticket identifier |
| subject | string | Ticket subject line |
| feedbackCategory | string | Feedback category assigned to ticket |
| agentInvolved | string | Agent handling the ticket |
| status | string | Current ticket status (open, closed, etc) |
| createdAt | string | Ticket creation timestamp (ISO 8601) |
| updatedAt | string | Last update timestamp (ISO 8601) |
| priority | string | Ticket priority level |
| departmentCode | string | Department code associated with ticket |
| passenger_name | string | Passenger name (if available) |
| chauffeur_name | string | Chauffeur name (if available) |
| content | string | Ticket content/description |
Use Cases
- Ticket Dashboard: Display paginated ticket lists
- Filter Management: Apply multiple filters simultaneously
- Search Functionality: Search across ticket content and metadata
- Department Views: Show tickets by department
- Agent Workloads: View tickets assigned to specific agents
Implementation Examples
React Component with Pagination
Advanced Filtering
Pagination Logic
Calculate Total Pages
Pagination Controls
Best Practices
- Pagination: Use reasonable page sizes (10-50 items)
- Filtering: Validate filter values before API calls
- Search: Debounce search input to avoid excessive API calls
- Caching: Cache ticket data for short periods
- Error Handling: Handle pagination and filter errors gracefully
Performance Considerations
- Page Size: Larger pages take longer to load
- Filter Combinations: Multiple filters may impact performance
- Date Range: Very large date ranges may be slow
- Search: Full-text search can be resource-intensive
Related Endpoints
- Use
/hubspot/tickets/list/filtersto get filter options - Use
/hubspot/ticket-details/{ticketId}for full ticket details - Use
/hubspot/tickets/list/exportto export filtered results
Notes
- Page size automatically limited to 50 items maximum
- Filter values must match exactly with values from filters endpoint
- Search is case-insensitive but matches partial words
- Date range is inclusive of both start and end dates
- Results are sorted by creation date (newest first) by default
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Start date for filtering tickets (inclusive)
End date for filtering tickets (inclusive)
Starting index for pagination
x >= 0Ending index for pagination (max page size = 50)
x >= 1Query Parameters
Filter by agent (must be one of the agents returned from /hubspot/tickets/list/filters)
Filter by category (must be one of the categories returned from /hubspot/tickets/list/filters)
Keyword to search across multiple fields — content, chauffeur_name, passenger_name, and subject.
Valid department code to filter tickets by department
closedOnly must be a "false"/"true" in string default 'false'. Returns only closed tickets.