Query after-sales ticket (req_ticket)
About 522 words
Queries the full history of an after-sales ticket by ticket number: current state, submitted details, handling records, and refund result.
- Permission:
after_sales.read - Method:
GET - Idempotency: read-only
v1 draft
This page is part of the draft v1 integration contract; details may change along with the integration checklist, so rely on the official checklist published in the portal.
点开字段可查看类型与说明
正在加载交互式结构…
Request example
GET /dist/api/v1/req_ticket?ticket_no=AS202611240007 HTTP/1.1
Host: api.xstock.example
X-Xstock-Api-Key: xs_live_xxxxxxxx
X-Xstock-Timestamp: 1795000000
X-Xstock-Signature: 9f2c...Response example
{
"id": "shop-a-20261127-case-001",
"cmd": "req_ticket",
"code": 0,
"msg": "",
"data": {
"ticket_no": "AS202611240007",
"order_id": 9001,
"order_no": "XS20261124000123",
"state": "resolved",
"description": "1 份账号无法登录,提示密码错误",
"created_at": "2026-11-24T13:20:00Z",
"updated_at": "2026-11-25T02:10:00Z",
"resolved_at": "2026-11-25T02:10:00Z",
"events": [
{
"at": "2026-11-24T13:20:00Z",
"actor": "distributor",
"state": "open",
"desc": "提交工单,附错误提示截图",
"evidence": [
{ "kind": "text", "content": "错误提示:账号或密码不正确" },
{ "kind": "link", "url": "https://shop-a.example/ticket/202611240007-1.png" }
]
},
{
"at": "2026-11-24T15:02:00Z",
"actor": "platform",
"state": "resolving",
"desc": "已向上游核实账号状态",
"evidence": []
},
{
"at": "2026-11-25T02:10:00Z",
"actor": "platform",
"state": "resolved",
"desc": "确认账号无效,已按单价退款",
"evidence": []
}
]
},
"stamp": 1795000001
}History records (events)
events is the ticket's complete timeline in ascending time order, never truncated:
| Field | Description |
|---|---|
at | Time the record occurred |
actor | Actor: distributor, platform, or system |
state | Ticket state at the time of this record |
desc | Handling note; may be an empty string |
evidence | Evidence attached to this record; kind is text or link, at most 10 items |
- Distributor actions (adding material or notes) also appear in the timeline.
- Automatic system transitions (such as timeout reminders) have
actorsystem. - Order information predating the ticket is not duplicated in
events; seeorder_id/order_no.
States and refunds
state | Meaning |
|---|---|
open | Awaiting verification |
resolving | Under verification |
resolved | Resolved |
rejected | Not upheld |
resolvedmeans verification is complete; the refund amount and its settlement appear in the billing transactions, and this endpoint does not return a refund amount.rejectedmeans the claim was not upheld or the evidence was insufficient; if you still disagree, add evidence to the original ticket or open a new one.- Refund settlement timing matches
billingand is usually immediate.
Recommendations
- Use this endpoint for after-sales detail pages and ticket progress views; query once at key points (after submitting and after a platform reply) rather than polling aggressively.
- To link the order, call
get_orderswith the returnedorder_id/order_no. - Store
eventsas-is for support review and reconciliation.
Errors
| code | Scenario | Action |
|---|---|---|
1001 | ticket_no not provided | Pass the ticket number |
2001 | Ticket does not exist | Confirm the ticket number and whether it belongs to this shop |
1003 | after_sales.read not enabled | Enable the permission in the portal |
4001 | Rate limit exceeded | Back off per retry_after |