Skip to main content
GET
Get HubSpot tickets list with filters and pagination
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.

Request

Headers

Path Parameters

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

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, and subject
  • 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

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

  1. Pagination: Use reasonable page sizes (10-50 items)
  2. Filtering: Validate filter values before API calls
  3. Search: Debounce search input to avoid excessive API calls
  4. Caching: Cache ticket data for short periods
  5. 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
  • Use /hubspot/tickets/list/filters to get filter options
  • Use /hubspot/ticket-details/{ticketId} for full ticket details
  • Use /hubspot/tickets/list/export to 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

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

startDate
string<date>
required

Start date for filtering tickets (inclusive)

endDate
string<date>
required

End date for filtering tickets (inclusive)

startIndex
integer
required

Starting index for pagination

Required range: x >= 0
endIndex
integer
required

Ending index for pagination (max page size = 50)

Required range: x >= 1

Query Parameters

agentInvolved
string | null

Filter by agent (must be one of the agents returned from /hubspot/tickets/list/filters)

feedbackCategory
string | null

Filter by category (must be one of the categories returned from /hubspot/tickets/list/filters)

search
string | null

Keyword to search across multiple fields — content, chauffeur_name, passenger_name, and subject.

departmentCode
string | null

Valid department code to filter tickets by department

closedOnly
string

closedOnly must be a "false"/"true" in string default 'false'. Returns only closed tickets.

Response

Successfully retrieved filtered ticket list

message
string
Example:

""

data
object[]

Array of matching tickets