Ticket Details
Retrieve the full conversation history and details of a support ticket. This endpoint returns all messages exchanged between you and the support team, including any attachments.
The ticket detail view is used to display the complete conversation thread, allowing users to review past messages and continue the discussion with support staff. When you view a ticket, all unread messages are automatically marked as read.
If the ticket is linked to a booking, the response includes booking details to provide context about the related rental.
Endpoint
INFO
GET /api/v1/client/tickets/{ticket}
Headers
| Header | Value | Required |
|---|---|---|
Accept | application/json | Yes |
Authorization | Bearer {token} | Yes |
X-Agency-Signature | {signature} | Yes |
Path Parameters
| Parameter | Type | Description |
|---|---|---|
ticket | integer | Ticket ID |
Example Request
bash
curl -X GET https://api.daakey.com/api/v1/client/tickets/1 \
-H "Accept: application/json" \
-H "Authorization: Bearer {token}" \
-H "X-Agency-Signature: {signature}"Response
Success (200)
json
{
"success": true,
"message": "Ticket retrieved",
"data": {
"id": 1,
"reference": "TK-2024-00001",
"subject": "Vehicle not starting",
"status": "in_progress",
"priority": "high",
"category": "vehicle_issue",
"booking": {
"id": 5,
"reference": "BK-2024-00005",
"vehicle": {
"id": 1,
"plate_number": "ABC-123",
"brand": "Toyota",
"model": "Corolla"
},
"start_date": "2024-01-15T10:00:00Z",
"end_date": "2024-01-15T18:00:00Z"
},
"messages": [
{
"id": 1,
"message": "I am unable to start the vehicle. The dashboard shows an error message.",
"sender": "client",
"sender_name": "John Doe",
"attachments": [],
"created_at": "2024-01-15T10:00:00Z"
},
{
"id": 2,
"message": "Thank you for contacting us. Could you please share a photo of the error message?",
"sender": "support",
"sender_name": "Support Team",
"attachments": [],
"created_at": "2024-01-15T10:15:00Z"
},
{
"id": 3,
"message": "Here is the photo.",
"sender": "client",
"sender_name": "John Doe",
"attachments": [
{
"url": "https://api.daakey.com/storage/tickets/1/error.jpg",
"type": "image"
}
],
"created_at": "2024-01-15T10:20:00Z"
},
{
"id": 4,
"message": "Our technician is on the way to your location. ETA: 15 minutes.",
"sender": "support",
"sender_name": "Support Team",
"attachments": [],
"created_at": "2024-01-15T11:00:00Z"
}
],
"created_at": "2024-01-15T10:00:00Z",
"updated_at": "2024-01-15T11:00:00Z"
},
"meta": {
"agency_id": 123,
"agency_code": "AGENCY123"
},
"request_id": "uuid",
"timestamp": "2024-01-01T00:00:00.000Z"
}Error (404)
json
{
"success": false,
"message": "Ticket not found",
"data": null,
"request_id": "uuid",
"timestamp": "2024-01-01T00:00:00.000Z"
}Notes
- Messages are returned in chronological order
- Viewing a ticket marks all messages as read