Get detailed information of a specific HubSpot ticket
curl --request GET \
--url http://localhost:2000/hubspot/ticket-details/{ticketId} \
--header 'Authorization: Bearer <token>'import requests
url = "http://localhost:2000/hubspot/ticket-details/{ticketId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('http://localhost:2000/hubspot/ticket-details/{ticketId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "2000",
CURLOPT_URL => "http://localhost:2000/hubspot/ticket-details/{ticketId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "http://localhost:2000/hubspot/ticket-details/{ticketId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("http://localhost:2000/hubspot/ticket-details/{ticketId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:2000/hubspot/ticket-details/{ticketId}")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"message": "",
"data": {
"id": "123456789"
}
}Ticket Management
Get Ticket Details
Retrieves the full details of a single HubSpot ticket using its unique ticketId. Requires authentication and a valid HubSpot ticket ID.
The endpoint validates the ticket ID before fetching data and returns complete ticket metadata including content, related contacts, categories, and assigned agent.
GET
/
hubspot
/
ticket-details
/
{ticketId}
Get detailed information of a specific HubSpot ticket
curl --request GET \
--url http://localhost:2000/hubspot/ticket-details/{ticketId} \
--header 'Authorization: Bearer <token>'import requests
url = "http://localhost:2000/hubspot/ticket-details/{ticketId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('http://localhost:2000/hubspot/ticket-details/{ticketId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "2000",
CURLOPT_URL => "http://localhost:2000/hubspot/ticket-details/{ticketId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "http://localhost:2000/hubspot/ticket-details/{ticketId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("http://localhost:2000/hubspot/ticket-details/{ticketId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:2000/hubspot/ticket-details/{ticketId}")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"message": "",
"data": {
"id": "123456789"
}
}Retrieves the full details of a single HubSpot ticket using its unique ticketId. Requires authentication and a valid HubSpot ticket ID. The endpoint validates the ticket ID before fetching data and returns complete ticket metadata including content, related contacts, categories, and assigned agent.
Request
Headers
| Name | Type | Required | Description |
|---|---|---|---|
| Authorization | string | Yes | Bearer token |
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| ticketId | string | Yes | Unique HubSpot ticket identifier |
Parameter Details
- ticketId: Must be a valid HubSpot ticket ID
- Format: String identifier from HubSpot system
- Validation: Endpoint validates ticket ID before processing
Response
200 OK - Successfully retrieved ticket details
{
"message": "",
"data": {
"ticketId": "12345678",
"subject": "Late Driver - Airport Pickup",
"content": "Customer reported that driver was 45 minutes late for scheduled airport pickup. Passenger had to wait at arrivals and missed important meeting. Requesting refund for inconvenience.",
"feedbackCategory": "Late Driver",
"agentInvolved": "abdullah",
"status": "closed",
"priority": "high",
"createdAt": "2025-10-01T10:30:00.000Z",
"updatedAt": "2025-10-01T14:45:00.000Z",
"closedAt": "2025-10-01T14:45:00.000Z",
"departmentCode": "OPS",
"passenger_name": "John Smith",
"passenger_email": "john.smith@example.com",
"passenger_phone": "+1-555-123-",
"chauffeur_name": "Mike Johnson",
"chauffeur_id": "CH78",
"reservation_id": "RES",
"pickup_location": "J",
"dropoff_location": "o",
"scheduled_time": "2025-10-01T09:00:00.000Z",
"actual_time": "2025-10-01T09:45:00.000Z",
"delay_minutes": 45,
"resolution_notes": "Apology issued, partial refund processed, driver coached on punctuality",
"tags": ["urgent", "airport", "refund"],
"custom_properties": {
"vehicle_type": "Luxury Sedan",
"service_level": "Premium",
"complaint_type": "delay"
},
"associated_contacts": [
{
"id": "contact-123",
"name": "John Smith",
"email": "john.smith@example.com",
"type": "passenger"
},
{
"id": "contact-123",
"name": "Mike Johnson",
"email": "mike.johnson@company.com",
"type": "chauffeur"
}
],
"activity_log": [
{
"timestamp": "2025-10-01T10:30:00.000Z",
"action": "created",
"user": "system",
"notes": "Ticket automatically created from feedback form"
},
{
"timestamp": "2025-10-01T11:00:00.000Z",
"action": "assigned",
"user": "admin",
"notes": "Assigned to agent abdullah"
},
{
"timestamp": "2025-10-01T14:45:00.000Z",
"action": "resolved",
"user": "abdullah",
"notes": "Issue resolved with customer satisfaction"
}
]
}
}
400 Bad Request
{
"error": {
"code": "INVALID_TICKET_ID",
"message": "Invalid or missing ticket ID"
}
}
404 Not Found
{
"error": {
"code": "TICKET_NOT_FOUND",
"message": "Ticket not found"
}
}
401 Unauthorized
{
"error": {
"code": "UNAUTHORIZED",
"message": "Missing or invalid token"
}
}
500 Internal Server Error
{
"error": {
"code": "SERVER_ERROR",
"message": "Internal server error"
}
}
Example
curl -X GET 'http://localhost:2000/hubspot/ticket-details/123456' \
-H 'Authorization:Bearer your-jwt-token'
Data Fields Explained
Core Ticket Information
| Field | Type | Description |
|---|---|---|
| ticketId | string | Unique HubSpot ticket identifier |
| subject | string | Ticket subject line |
| content | string | Full ticket content/description |
| feedbackCategory | string | Feedback category assigned to ticket |
| agentInvolved | string | Agent handling the ticket |
| status | string | Current ticket status |
| priority | string | Ticket priority level (low, medium, high) |
Timestamps
| Field | Type | Description |
|---|---|---|
| createdAt | string | Ticket creation timestamp (ISO 8601) |
| updatedAt | string | Last update timestamp (ISO 8601) |
| closedAt | string | Ticket closure timestamp (ISO 8601) |
Service Information
| Field | Type | Description |
|---|---|---|
| departmentCode | string | Department code associated with ticket |
| reservation_id | string | Associated reservation ID |
| pickup_location | string | Pickup location details |
| dropoff_location | string | Dropoff location details |
| scheduled_time | string | Scheduled service time (ISO 8601) |
| actual_time | string | Actual service time (ISO 8601) |
| delay_minutes | integer | Delay in minutes (if applicable) |
People Information
| Field | Type | Description |
|---|---|---|
| passenger_name | string | Passenger name |
| passenger_email | string | Passenger email address |
| passenger_phone | string | Passenger phone number |
| chauffeur_name | string | Chauffeur name |
| chauffeur_id | string | Chauffeur ID |
Additional Information
| Field | Type | Description |
|---|---|---|
| resolution_notes | string | Notes about ticket resolution |
| tags | array | Tags associated with ticket |
| custom_properties | object | Custom HubSpot properties |
| associated_contacts | array | Related contact information |
| activity_log | array | Ticket activity history |
Use Cases
- Ticket Details View: Display complete ticket information
- Customer Service: Provide detailed ticket history
- Analytics: Analyze ticket patterns and details
- Reporting: Generate detailed ticket reports
- Audit Trail: Track ticket activity and changes
Implementation Examples
React Ticket Detail Component
import React, { useState, useEffect } from 'react';
function TicketDetail({ ticketId }) {
const [ticket, setTicket] = useState(null);
const [loading, setLoading] = useState(true);
const [error, setError] = useState(null);
useEffect(() => {
fetchTicketDetails();
}, [ticketId]);
const fetchTicketDetails = async () => {
try {
const response = await fetch(`/hubspot/ticket-details/${ticketId}`, {
headers: { 'Authorization': `Bearer ${token}` }
});
if (!response.ok) {
throw new Error(`HTTP error! status: ${response.status}`);
}
const data = await response.json();
setTicket(data.data);
} catch (error) {
setError(error.message);
} finally {
setLoading(false);
}
};
if (loading) return <LoadingSpinner />;
if (error) return <ErrorMessage error={error} />;
if (!ticket) return <div>No ticket found</div>;
return (
<div className="ticket-detail">
<TicketHeader ticket={ticket} />
<TicketContent ticket={ticket} />
<TicketActivity activity={ticket.activity_log} />
<TicketContacts contacts={ticket.associated_contacts} />
</div>
);
}
Activity Timeline Component
function ActivityTimeline({ activity }) {
return (
<div className="activity-timeline">
<h3>Activity Log</h3>
{activity.map((item, index) => (
<div key={index} className="activity-item">
<div className="activity-time">
{new Date(item.timestamp).toLocaleString()}
</div>
<div className="activity-action">{item.action}</div>
<div className="activity-user">{item.user}</div>
<div className="activity-notes">{item.notes}</div>
</div>
))}
</div>
);
}
Ticket Status Badge
function TicketStatus({ status }) {
const statusConfig = {
'open': { color: 'orange', label: 'Open' },
'closed': { color: 'green', label: 'Closed' },
'pending': { color: 'blue', label: 'Pending' },
'escalated': { color: 'red', label: 'Escalated' }
};
const config = statusConfig[status] || { color: 'gray', label: status };
return (
<span className={`status-badge status-${config.color}`}>
{config.label}
</span>
);
}
Best Practices
- Error Handling: Handle ticket not found and invalid ID cases
- Loading States: Show loading indicators while fetching details
- Data Validation: Validate ticket ID format before API call
- Caching: Cache ticket details for short periods
- Responsive Design: Ensure detail view works on mobile devices
Performance Considerations
- Data Size: Ticket details can be large with activity logs
- API Calls: Minimize unnecessary detail API calls
- Images: Handle any associated images efficiently
- Real-time Updates: Consider WebSocket for live updates
Related Endpoints
- Use
/hubspot/tickets/listto browse and find tickets - Use
/hubspot/tickets/list/filtersfor filter options - Use
/hubspot/tickets/list/exportto export ticket data
Notes
- Ticket details include all available HubSpot properties
- Activity log shows chronological ticket history
- Associated contacts include passengers, chauffeurs, and staff
- Custom properties vary based on HubSpot configuration
- Response time depends on ticket complexity and activity log size
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Unique HubSpot Ticket ID
Was this page helpful?