查询供应商询单
三个只读接口,均需要 supplier_inquiry:read scope。询单归属于创建它的应用:用其他应用的询单 ID 查询返回 404 INQUIRY_NOT_FOUND,而不是 403。
询单列表
GET /v1/supplier-inquiries
| 查询参数 | 说明 |
|---|---|
status | 单个询单状态(pending、processing、waiting_supplier、answered、completed、failed、cancelled) |
channel | 1688 或 taobao |
source_product_id | 精确匹配的渠道商品 ID |
created_after / created_before | ISO 8601 时间 |
page | 默认 1 |
limit | 默认 20,最大 100 |
GET /v1/supplier-inquiries?status=answered&channel=1688&limit=20
{
"data": [
{
"id": "sinq_9f2c...",
"status": "answered",
"product": {
"channel": "1688",
"source_product_id": "554456348334",
"product_url": "https://detail.1688.com/offer/554456348334.html",
"canonical_product_url": "https://detail.1688.com/offer/554456348334.html",
"title": "...", "image": "...", "shop_id": "...", "shop_name": "..."
},
"sku": { "id": "3245:12345", "label": "黑色 / XL" },
"message_count": 2,
"last_message_at": "2026-05-20T10:02:00.000Z",
"created_at": "2026-05-20T08:31:11.000Z",
"updated_at": "2026-05-20T11:40:00.000Z"
}
],
"pagination": { "page": 1, "limit": 20, "total": 1, "total_pages": 1 },
"request_id": "req_..."
}非法的 status 或 channel 会直接返回 400,避免拼错参数时静默返回全量数据。
询单详情
GET /v1/supplier-inquiries/{inquiry_id} 在摘要之外返回完整会话与精简时间线。
{
"id": "sinq_9f2c...",
"status": "answered",
"product": {
"channel": "1688",
"source_product_id": "554456348334",
"...": "..."
},
"sku": {
"id": "3245:12345",
"label": "黑色 / XL"
},
"message_count": 2,
"messages": [
{
"id": "smsg_1a4b...",
"type": "initial",
"status": "answered",
"questions": [
{
"id": "sqst_...",
"type": "packed_weight",
"note": "含彩盒的重量",
"question": null,
"status": "answered",
"answer": {
"question_id": "sqst_...",
"type": "packed_weight",
"status": "answered",
"value": 1250,
"unit": "g",
"provider_note": null,
"answered_at": "2026-05-20T11:40:00.000Z"
}
}
],
"attachments": [
{
"id": "satt_...",
"type": "image",
"url": "https://files.example.com/packaging.jpg",
"filename": "supplier-packaging.jpg",
"mime_type": "image/jpeg",
"source": "supplier",
"expires_at": null,
"created_at": "2026-05-20T11:40:00.000Z"
}
],
"provider_note": null,
"created_at": "2026-05-20T08:31:12.000Z",
"answered_at": "2026-05-20T11:40:00.000Z"
}
],
"timeline": [
{
"message_id": "smsg_1a4b...",
"type": "initial",
"status": "answered",
"created_at": "2026-05-20T08:31:12.000Z",
"answered_at": "2026-05-20T11:40:00.000Z"
}
],
"request_id": "req_..."
}question 仅在 other 类型下非空。尚未作答的问题为 status: "pending"、answer: null。
attachments 列出该消息上的文件引用:既包括你发出的,也包括供应商侧共享给你的,通过 source(developer / operator / supplier / system)区分。询单服务标记为内部使用的文件不会出现在这里。HIOBuy 不托管这些文件:url 指向服务方或你自己的存储,expires_at 非空时表示该 URL 在此时间之后可能失效。
仅取消息
GET /v1/supplier-inquiries/{inquiry_id}/messages 返回同样的消息对象但不含商品块——当你已经持有询单、只想拿新答案时用它更划算。
{
"inquiry_id": "sinq_9f2c...",
"status": "answered",
"data": [ /* 消息,按时间正序 */ ],
"request_id": "req_..."
}轮询还是 Webhook
优先使用 supplier_inquiry.message_answered Webhook:其 payload 已包含完整 answers 数组,通常收到通知就够了。若确实要轮询,请以分钟级频率轮询消息接口——答案来自人工回复,秒级轮询只会消耗限流额度。
获取支持
需要集成帮助?请联系开发者支持 support@hiobuy.com · 预计 1–2 个工作日内回复