レスポンス形式
対応する POST ルートでは、JSON 本文に任意の response_format フィールドを指定できます。省略するか standard を指定すると、デフォルトの HIOBuy 統一モデルが返ります。
モード
| 値 | 説明 |
|---|---|
standard (デフォルト) | 正規化された型 — StandardProductDetail, StandardProductList, StandardOrderPreviewResult など。 |
upstream | ベンダーパススルー — 公式 1688 Open API または Taobao IOP JSON を、フィールドマッピングなしで upstream に返します。 |
Upstream エンベロープ
response_format が upstream の場合:
{
"channel": "1688",
"response_format": "upstream",
"upstream_api": "com.alibaba.fenxiao.crossborder/product.search.keywordQuery",
"upstream": {
"result": {
"success": true
}
},
"upstream_steps": [],
"request_id": "req_abc123"
}upstream_api— 主要なベンダー API 識別子 (1688 パスまたは Taobao IOP ルート)upstream— その呼び出しの生の HTTP JSON 本文upstream_steps— 任意の事前呼び出し (例: 画像検索前の画像アップロード)
標準プレビューレスポンス {#standard-preview}
POST /v1/orders/preview (1688 と Taobao) は、standard モードで StandardOrderPreviewResult を返します。金額は fen (CNY cents) です。フィールド一覧: Procurement orders。
{
"channel": "taobao",
"success": true,
"total": {
"payment": {
"amount": 12900,
"currency": "CNY"
},
"shipping": {
"amount": 0,
"currency": "CNY"
}
},
"unavailable_lines": [],
"sellers": [
{
"seller_id": "...",
"lines": [
{
"offer_id": "...",
"spec_id": "...",
"quantity": 5
}
]
}
],
"request_id": "req_..."
}1688 では trade_types、pay_channels、promotions が追加されます。response_format: "upstream" の場合、preview は生のベンダー JSON を返します。
商品ルート
| Endpoint | Channels | Upstream API (例) |
|---|---|---|
POST /v1/products/detail | 1688, taobao | queryProductDetail / /traffic/item/get |
POST /v1/products/search | 1688, taobao | keywordQuery / /traffic/item/search |
POST /v1/products/search-by-image | 1688, taobao | upload + imageQuery / upload + /traffic/item/imgsearch |
POST /v1/products/parse は常に standard のみを返します。POST /v1/products/freight/estimate は注文プレビューと同じ本文を使用し、送料のみを返します。
注文ルート (1688 & Taobao)
| Endpoint | Standard | Upstream API (例) |
|---|---|---|
POST /v1/orders/list | ✓ | alibaba.trade.getBuyerOrderList |
POST /v1/orders/1688/preview | ✓ | alibaba.createOrder.preview |
POST /v1/orders/1688/create | ✓ | alibaba.trade.createCrossOrder |
POST /v1/orders/preview | ✓ | channel により振り分け (1688 / taobao) |
POST /v1/orders/create | ✓ | channel により振り分け |
POST /v1/orders/taobao/preview | ✓ | /purchase/order/render |
POST /v1/orders/taobao/create | ✓ | /purchase/order/create |
POST /v1/orders/cancel | ✓ | alibaba.trade.cancel |
POST /v1/orders/pay | ✓ | channel により振り分け |
POST /v1/orders/detail | ✓ | order_id による注文詳細 |
POST /v1/orders/logistics/trace | ✓ | 国内物流追跡 |
POST /v1/orders/purchase/query | ✓ | Taobao 購入一覧 |
例 — upstream search
curl https://api.hiobuy.com/v1/products/search \
-H "Authorization: Bearer hio_live_xxx" \
-H "Content-Type: application/json" \
-d '{
"response_format": "upstream",
"channel": "1688",
"keyword": "phone case",
"page": 1,
"page_size": 10,
"language": "en"
}'バリデーション
無効な値 (例: vendor_raw) は、HTTP 400 と VALIDATION_ERROR を返します。Errors を参照してください。
OpenAPI
機械判読可能な仕様: openapi.json (スキーマ UpstreamApiResponse, UpstreamStep)。