Get available HubSpot ticket filters
Ticket Management
Get Ticket Filters
Retrieves possible filters and their values to be displayed in the frontend dropdowns. Currently supports two filter types: - Agents (all agents) - Categories (all feedback categories)
GET
Get available HubSpot ticket filters
Retrieves possible filters and their values to be displayed in the frontend dropdowns. Currently supports two filter types: Agents (all agents) and Categories (all feedback categories).
Request
Headers
| Name | Type | Required | Description |
|---|---|---|---|
| Authorization | string | Yes | Bearer token |
Response
200 OK - Successfully retrieved filter options
401 Unauthorized
500 Internal Server Error
Example
Data Fields Explained
Agents Array
| Field | Type | Description |
|---|---|---|
| label | string | Display name for the agent |
| value | string | Internal value used for filtering |
Categories Array
| Field | Type | Description |
|---|---|---|
| label | string | Display name for the feedback category |
| value | string | Internal value used for filtering |
Use Cases
- Dropdown Population: Populate filter dropdowns in frontend
- Dynamic Filtering: Enable users to filter by agent or category
- Form Validation: Validate filter values before API calls
- User Interface: Build filter controls with available options
Implementation Examples
React Component Example
Vue.js Example
Best Practices
- Caching: Cache filter data to avoid repeated API calls
- Error Handling: Handle cases where filters are unavailable
- Loading States: Show loading indicators while fetching filters
- Validation: Validate filter values before using in list API
- Accessibility: Ensure dropdowns are accessible and keyboard-navigable
Related Endpoints
- Use
/hubspot/tickets/listwith filter values from this endpoint - Use
/hubspot/tickets/list/exportwith same filter options - Use
/hubspot/ticket-details/{ticketId}for individual ticket details
Notes
- Agent list includes all active agents in the system
- Categories include all feedback categories from HubSpot integration
- Filter values are case-sensitive and must match exactly
- This endpoint should be called before rendering filter controls
- Data is updated in real-time as agents and categories change
Integration Guidelines
Before Using Filters
- Call this endpoint to get available options
- Store filter options in component state
- Use values (not labels) for API calls
- Validate filter values before submitting
Filter Value Mapping
- Use
valuefield for API parameters - Use
labelfield for display text - Maintain mapping between labels and values
- Handle cases where filter options change dynamically
Error Handling
- Handle 401 errors by redirecting to login
- Handle 500 errors with retry logic
- Provide fallback options when filters unavailable
- Show user-friendly error messages