Ticket List
Endpoint: GET /api/v6.1/tickets
Description: This API is used to retrieve a list of support tickets from the CRM system, including detailed information such as title, content, category, related customer, and custom fields.
Request
Method: GET
Headers:
X-API-KEY: <your-api-key>
Query Parameters:
fields
(optional): List of fields to retrieve, comma-separated (,
). Example:id,ticket_title,ticket_content,...
Response
Status: 200 OK
Response Structure:
{
"data": [
{
"id": 1,
"ticket_title": "Ticket Title",
"ticket_code": "TICKET-12345",
"ticket_content": "<p>Support content</p>",
"cate_id": 4,
"emergency_phone": "0123456789",
"account_id": 12345,
"account_name": "Customer Name",
"custom_fields": {
"test_kit_date": "1740330000"
}
}
],
"offset": 0,
"limited": false,
"sorted": {
"id": "DESC"
}
}
Field Descriptions
| Field | Data Type | Description |
|-------------------|---------------|----------------------------------------------------------------|
| id
| integer | Unique ID of the ticket |
| ticket_code
| string | Unique code of the ticket |
| ticket_title
| string | Short title describing the ticket content |
| ticket_content
| string (HTML) | Detailed content of the ticket, can include HTML tags |
| cate_id
| integer | Ticket category ID (linked to /ticket/categories
API) |
| emergency_phone
| string | Emergency contact phone number provided by the creator |
| account_id
| integer | ID of the related customer (account) |
| account_name
| string | Name of the related customer (account name) |
| custom_fields
| object | Extended fields with detailed values (e.g., test kit date) |\
Notes
detail_custom_fields
andcustom_fields
fields may vary depending on system configuration.\- Time fields like
test_kit_date
are usually timestamps (seconds since epoch).\ - The API supports pagination via
offset
,limit
parameters if available.
cURL Example
curl --location 'https://<your-domain>/api/v6.1/tickets?fields=id,ticket_title,ticket_code,ticket_content,cate_id,emergency_phone,account_id,account_name,custom_fields' \
--header 'X-API-KEY: <api-key>'
Error Handling
| Error Code | Description |
|--------|------|
| 401 | Unauthorized – invalid API key or session |
| 403 | Access denied |
| 500 | Internal system error |\