Skip to main content
POST
Export HubSpot tickets list
Exports HubSpot tickets based on selected filters, columns, and department. The response returns a downloadable file (Excel, CSV, or JSON) depending on the requested format. Requires authentication. If no format is specified, defaults to xlsx.

Request

Headers

Request Body

Request Body Schema

Field Details

format (enum)
  • xlsx - Microsoft Excel format
  • csv - Comma-separated values format
  • json - JSON array format
columns (array of strings)
  • Available columns include: ticketId, subject, content, feedbackCategory, agentInvolved, status, priority, createdAt, updatedAt, closedAt, departmentCode, passenger_name, passenger_email, passenger_phone, chauffeur_name, chauffeur_id, reservation_id, pickup_location, dropoff_location, scheduled_time, actual_time, delay_minutes, resolution_notes, tags
departmentCode (string)
  • Must be valid department code in system
  • Filters exported tickets to specific department
  • Optional - if omitted, exports all departments

Response

200 OK - Successfully generated export file

Headers:
Body: Binary file content (Excel, CSV, or JSON format)

400 Bad Request

401 Unauthorized

500 Internal Server Error

Examples

Export to Excel with all columns

Export to CSV with specific columns

Export to JSON format

Implementation Examples

React Export Component

Vue.js Export Function

File Format Details

Excel (.xlsx)

  • Structure: Worksheet with headers in first row
  • Data Types: Dates formatted as Excel dates, numbers as numbers
  • Features: Auto-sized columns, formatted headers
  • Size: Typically smallest for large datasets

CSV (.csv)

  • Structure: Comma-separated values with headers
  • Encoding: UTF-8 with BOM for Excel compatibility
  • Data Types: All values as strings
  • Compatibility: Works with Excel, Google Sheets, etc.

JSON (.json)

  • Structure: Array of ticket objects
  • Data Types: Preserves original data types
  • Format: Pretty-printed for readability
  • Use Case: Programmatic processing and APIs

Best Practices

  1. Column Selection: Limit columns to reduce file size
  2. Department Filtering: Use department filter for targeted exports
  3. Format Choice: Choose format based on use case (Excel for analysis, CSV for data transfer, JSON for development)
  4. Error Handling: Handle export failures gracefully
  5. File Naming: Use descriptive filenames with timestamps

Performance Considerations

  • Data Volume: Large exports may take significant time
  • Memory Usage: Server memory usage scales with data size
  • Network: File download time depends on file size
  • Timeouts: Very large exports may hit timeout limits
  • Use /hubspot/tickets/list to preview data before export
  • Use /hubspot/tickets/list/filters to understand available data
  • Use /hubspot/ticket-details/{ticketId} for detailed ticket information

Notes

  • Export includes all tickets matching department filter
  • File is generated dynamically on request
  • Export processing time depends on data volume
  • Files are not stored permanently on server
  • Maximum export size may be limited by server configuration

Authorizations

Authorization
string
header
required

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

Body

application/json
format
enum<string>
required

Output file format. Must be one of: - xlsx for Excel - csv for CSV - json for JSON

Available options:
xlsx,
csv,
json
Example:

"xlsx"

columns
string[]
required

List of ticket fields to include in the export.

Example:
departmentCode
string

Optional department code to filter exported tickets. Must be a valid department code.

Example:

"OPS"

Response

Successfully generated export file

Downloadable export file (Excel, CSV, or JSON)