サプライヤー問い合わせの取得
読み取り系のエンドポイントは 3 つあり、いずれも supplier_inquiry:read スコープが必要です。問い合わせは作成したアプリケーションにスコープされるため、他のアプリケーションの問い合わせ ID を指定した場合は 403 ではなく 404 INQUIRY_NOT_FOUND が返ります。
問い合わせ一覧
GET /v1/supplier-inquiries
| クエリ | 説明 |
|---|---|
status | 問い合わせステータスを 1 つ指定(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 が非 null になるのは other タイプの質問の場合のみです。まだ回答がない質問は status: "pending"、answer: null となります。
attachments はそのメッセージに紐づくファイル参照の一覧です。あなたが送信したものと、サプライヤー側から共有されたものが含まれます。source(developer、operator、supplier、system)で区別できます。問い合わせサービスが内部用として保持するファイルがここに返ることはありません。HIOBuy はこれらのファイルをホストしません。url はプロバイダーまたはあなた自身のストレージを指し、expires_at が非 null の場合はその時点以降 URL が解決できなくなる可能性があります。
メッセージのみ取得
GET /v1/supplier-inquiries/{inquiry_id}/messages は商品ブロックを除いた同じメッセージオブジェクトを返します。問い合わせ情報を既に保持しており、新しい回答だけを取得したい場合に低コストな呼び出しです。
{
"inquiry_id": "sinq_9f2c...",
"status": "answered",
"data": [ /* messages, oldest first */ ],
"request_id": "req_..."
}ポーリングと Webhook
supplier_inquiry.message_answered Webhook の利用を推奨します。ペイロードに answers 配列全体が含まれるため、多くの場合は通知だけで十分です。ポーリングする場合は、メッセージ取得エンドポイントを分単位の間隔で呼び出してください。回答は人間の時間軸で届くため、数秒ごとのポーリングはレートリミットを消費するだけです。
Get Support
Need integration help? Contact Developer Support at support@hiobuy.com · Response within 1–2 business days