Support Tickets API
Manage customer support tickets in your store. This API allows you to list, view, create, and manage support tickets and their messages.
List Tickets
http
GET /api/external/v1/support-ticketsQuery Parameters
| Parameter | Type | Description |
|---|---|---|
page | integer | Page number (default: 1) |
per_page | integer | Items per page (default: 15, max: 100) |
status | string | Filter: open, in_progress, waiting_customer, resolved, closed |
priority | string | Filter: low, normal, high, urgent |
category | string | Filter: order_issue, technical, billing, general |
assigned_to | integer | Filter by assigned staff user ID |
unassigned | boolean | Filter for unassigned tickets only |
search | string | Search in ticket number, subject, or customer name/email |
from_date | string | Start date (YYYY-MM-DD) |
to_date | string | End date (YYYY-MM-DD) |
sort_by | string | Sort field: created_at, updated_at, priority, status, last_reply_at |
sort_order | string | Sort order: asc, desc |
Example Request
bash
curl -X GET "https://yourstore.pixlpay.net/api/external/v1/support-tickets?status=open&priority=high" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Accept: application/json"Response
json
{
"success": true,
"data": [
{
"id": 1,
"ticket_number": "TICKET-ABC123456",
"subject": "Order not delivered",
"status": "open",
"priority": "high",
"category": "order_issue",
"customer": {
"id": 1,
"name": "Player123",
"email": "player@example.com"
},
"assigned_to": null,
"messages_count": 3,
"last_reply_at": "2025-01-20T15:30:00Z",
"created_at": "2025-01-20T10:00:00Z",
"updated_at": "2025-01-20T15:30:00Z"
}
],
"meta": {
"current_page": 1,
"last_page": 5,
"per_page": 15,
"total": 72
}
}Get Single Ticket
http
GET /api/external/v1/support-tickets/{id}Example Request
bash
curl -X GET "https://yourstore.pixlpay.net/api/external/v1/support-tickets/1" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Accept: application/json"Response
json
{
"success": true,
"data": {
"id": 1,
"ticket_number": "TICKET-ABC123456",
"subject": "Order not delivered",
"status": "open",
"priority": "high",
"category": "order_issue",
"customer": {
"id": 1,
"name": "Player123",
"email": "player@example.com"
},
"assigned_to": {
"id": 5,
"name": "Support Staff"
},
"order_id": 42,
"messages": [
{
"id": 1,
"message": "I purchased a VIP rank but haven't received it yet.",
"is_internal": false,
"user": {
"id": 1,
"name": "Player123"
},
"attachments": [],
"created_at": "2025-01-20T10:00:00Z"
},
{
"id": 2,
"message": "Let me check your order status.",
"is_internal": false,
"user": {
"id": 5,
"name": "Support Staff"
},
"attachments": [],
"created_at": "2025-01-20T10:15:00Z"
}
],
"last_reply_at": "2025-01-20T15:30:00Z",
"resolved_at": null,
"closed_at": null,
"created_at": "2025-01-20T10:00:00Z",
"updated_at": "2025-01-20T15:30:00Z"
}
}Get Ticket Statistics
http
GET /api/external/v1/support-tickets/statsExample Request
bash
curl -X GET "https://yourstore.pixlpay.net/api/external/v1/support-tickets/stats" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Accept: application/json"Response
json
{
"success": true,
"data": {
"open": 12,
"in_progress": 8,
"waiting_customer": 5,
"resolved": 45,
"closed": 230,
"total": 300
}
}Update Ticket Status
Change the status of a support ticket.
http
PUT /api/external/v1/support-tickets/{id}/statusRequest Body
| Parameter | Type | Required | Description |
|---|---|---|---|
status | string | Yes | New status: open, in_progress, waiting_customer, resolved, closed |
Example Request
bash
curl -X PUT "https://yourstore.pixlpay.net/api/external/v1/support-tickets/1/status" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"status": "in_progress"}'Response
json
{
"success": true,
"data": {
"id": 1,
"ticket_number": "TICKET-ABC123456",
"status": "in_progress",
"updated_at": "2025-01-20T16:00:00Z"
},
"message": "Ticket status updated successfully"
}Add Reply to Ticket
Add a message to an existing support ticket.
http
POST /api/external/v1/support-tickets/{id}/messagesRequest Body
| Parameter | Type | Required | Description |
|---|---|---|---|
message | string | Yes | Reply message content (min: 5 characters) |
is_internal | boolean | No | Whether this is an internal note (not visible to customer). Default: false |
Example Request
bash
curl -X POST "https://yourstore.pixlpay.net/api/external/v1/support-tickets/1/messages" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"message": "Your order has been manually delivered. Please check your in-game inventory.",
"is_internal": false
}'Response
json
{
"success": true,
"data": {
"message": {
"id": 3,
"message": "Your order has been manually delivered. Please check your in-game inventory.",
"is_internal": false,
"user": {
"id": 5,
"name": "Support Staff"
},
"attachments": [],
"created_at": "2025-01-20T16:30:00Z"
},
"ticket": {
"id": 1,
"status": "waiting_customer",
"last_reply_at": "2025-01-20T16:30:00Z"
}
},
"message": "Reply added successfully"
}Close Ticket
Close a support ticket.
http
POST /api/external/v1/support-tickets/{id}/closeExample Request
bash
curl -X POST "https://yourstore.pixlpay.net/api/external/v1/support-tickets/1/close" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Accept: application/json"Response
json
{
"success": true,
"data": {
"id": 1,
"ticket_number": "TICKET-ABC123456",
"status": "closed",
"closed_at": "2025-01-20T17:00:00Z"
},
"message": "Ticket closed successfully"
}Assign Ticket
Assign a ticket to a staff member.
http
POST /api/external/v1/support-tickets/{id}/assignRequest Body
| Parameter | Type | Required | Description |
|---|---|---|---|
staff_user_id | integer | Yes | ID of the staff member to assign |
Example Request
bash
curl -X POST "https://yourstore.pixlpay.net/api/external/v1/support-tickets/1/assign" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"staff_user_id": 5}'Response
json
{
"success": true,
"data": {
"id": 1,
"ticket_number": "TICKET-ABC123456",
"status": "in_progress",
"assigned_to": {
"id": 5,
"name": "Support Staff"
}
},
"message": "Ticket assigned successfully"
}Support Ticket Object
| Field | Type | Description |
|---|---|---|
id | integer | Unique identifier |
ticket_number | string | Human-readable ticket number (e.g., TICKET-ABC123456) |
subject | string | Ticket subject line |
status | string | Current status (see Status Values) |
priority | string | Priority level (see Priority Values) |
category | string | Ticket category (see Category Values) |
customer | object | Customer who created the ticket |
assigned_to | object | Staff member assigned to ticket (nullable) |
order_id | integer | Associated order ID (nullable) |
messages | array | Array of ticket messages |
messages_count | integer | Total message count |
last_reply_at | string | ISO 8601 timestamp of last reply |
resolved_at | string | ISO 8601 timestamp when resolved (nullable) |
closed_at | string | ISO 8601 timestamp when closed (nullable) |
created_at | string | ISO 8601 timestamp |
updated_at | string | ISO 8601 timestamp |
Ticket Message Object
| Field | Type | Description |
|---|---|---|
id | integer | Message ID |
message | string | Message content |
is_internal | boolean | Whether message is an internal note |
user | object | User who sent the message |
attachments | array | File attachments |
created_at | string | ISO 8601 timestamp |
Status Values
| Status | Description |
|---|---|
open | New ticket, awaiting staff response |
in_progress | Staff is actively working on the ticket |
waiting_customer | Awaiting customer response |
resolved | Issue has been resolved |
closed | Ticket is closed |
Priority Values
| Priority | Description |
|---|---|
low | Low priority issue |
normal | Standard priority (default) |
high | High priority, needs attention soon |
urgent | Critical issue, immediate attention required |
Category Values
| Category | Label | Description |
|---|---|---|
order_issue | Order Issue | Problems with orders or deliveries |
technical | Technical Problem | Technical issues or bugs |
billing | Billing | Payment or billing questions |
general | General Inquiry | General questions or feedback |
Required Scopes
| Endpoint | Scope Required |
|---|---|
GET /support-tickets | support:read |
GET /support-tickets/{id} | support:read |
GET /support-tickets/stats | support:read |
PUT /support-tickets/{id}/status | support:write |
POST /support-tickets/{id}/messages | support:write |
POST /support-tickets/{id}/close | support:write |
POST /support-tickets/{id}/assign | support:write |
Errors
| Status | Error | Description |
|---|---|---|
| 400 | Bad Request | Ticket is already closed, or invalid operation |
| 401 | Unauthorized | Invalid or missing token |
| 403 | Forbidden | Token lacks required scope |
| 404 | Not Found | Ticket doesn't exist |
| 422 | Unprocessable Entity | Validation failed (e.g., invalid status, message too short) |
| 500 | Server Error | Internal server error |
Webhook Events
Support ticket events can trigger webhooks. Subscribe to these events:
| Event | Description |
|---|---|
support_ticket.created | New ticket created |
support_ticket.updated | Ticket status or assignment changed |
support_ticket.message_added | New message added to ticket |
support_ticket.closed | Ticket was closed |
See Webhook Events for payload formats.
