Product API レスポンスモデル
response_format: "standard" (デフォルト) では、商品エンドポイントは以下の型を返します。正規の TypeScript: packages/shared/src/products.ts。
エンドポイント: detail · search · image search · parse
レスポンスエンベロープ
| Endpoint | 形 |
|---|---|
detail, parse | { product: StandardProductDetail, request_id } |
search, search-by-image | StandardProductList & { request_id } |
upload-image | { channel, image_id, request_id } |
StandardProductDetail
商品ページと購入向けの完全な商品スナップショットです。preview は product.id → lines[].id、選択した variants[].sku_id → lines[].spec_id。Taobao create は preview の変換済みペアを使います。
ID とチャネル
| フィールド | 型 | 説明 |
|---|---|---|
id | string | Taobao = mi_id(preview の lines[].id;定期的に変わるため長期キャッシュしないでください)。1688 = offerId。Weidian は現在 prod_weidian_{source_product_id} |
channel | string | 1688, taobao, または weidian |
source_product_id | string | 1688 = offerId (same as id); Taobao = original item_id |
source_url | string | 正規の商品ページ URL |
ローカライズ済みテキスト (title, description)
| フィールド | 型 | 説明 |
|---|---|---|
original | string | マーケットプレイスのテキスト (通常は中国語) |
translated | string | null | リクエストされた language の翻訳 |
language | string | translated のロケール |
description | object | null | 長文詳細 (多くの場合 HTML) |
価格 (price, price_tiers[])
すべての金額は CNY yuan (fen ではありません)。promotion_amount が設定されていれば優先し、なければ display_amount を使用します。
| フィールド | 型 | 説明 |
|---|---|---|
price.original_amount | number | プロモーション前の定価 |
price.display_amount | number | 購入者向け価格 (CNY) |
price.promotion_amount | number | null | 該当する場合のプロモーション単価 |
price.original_currency / display_currency | string | 常に CNY |
price_tiers[] | array | 1688 卸売数量割引(新オファーは ≥2 から)。Taobao では空 |
min_order_quantity | number | null | 1688 MOQ |
order_quantity_multiple | integer | 購入数量の倍数。1688 は batchNumber に対応。欠落・無効値および Taobao・Weidian は 1。 |
distribution_min_quantity | number | null | 1688 ドロップシップ最小数量 |
購入数量のルール
product.order_quantity_multiple は正の整数で、購入数量はその整数倍である必要があります。1688 の batchNumber(1ロットの数量)に対応し、欠落・無効な場合は 1 です。Taobao と Weidian は 1 を返します。
最小注文数と数量の倍数は、それぞれ満たす必要があります。min_order_quantity = 10、order_quantity_multiple = 6 の場合、数量は 12、18、24… からとなり、在庫やチャネルの他の購入条件にも従います。
商品詳細リクエストでは、response_format: "upstream" では元の batchNumber を保持します。この標準フィールドは元のレスポンス名や注文数量を自動変更しません。
メディア (images[], videos)
| フィールド | 型 | 説明 |
|---|---|---|
images[].url | string | 画像 CDN URL |
images[].type | enum | main, gallery, または variant |
videos.main / videos.detail | string | null | 1688 動画。Taobao は null |
属性とバリエーション
SKU 選択と注文明細に使うのは variants[] だけです。
| フィールド | 役割 |
|---|---|
attributes[] | CPV 仕様。表示専用で、SKU 解決には使用しません |
variants[] | 価格、在庫、仕様を持つ購入可能な SKU マトリクス |
バリエーションオブジェクト (variants[])
| フィールド | 型 | 説明 |
|---|---|---|
sku_id | string | preview の spec_id に使う選択 SKU ID。Taobao create は preview の変換済みペアを使用 |
upstream_sku_id | string | null | 1688 の数値 skuId |
attributes[] | array | 仕様ディメンション (色、サイズなど) |
attributes[].name / value | string | 表示用ラベル(language 指定時は翻訳済み) |
attributes[].original_name / original_value | string | グループ化・照合用の安定した中国語キー |
attributes[].prop_id | string | null | 上流の属性 ID(文字列。Taobao prop_id;1688 attributeId)。ある場合は名称より優先 |
attributes[].value_id | string | null | 上流の属性値 ID(文字列。Taobao value_id)。1688 に valueId がない場合は null |
attributes[].image | string | null | 仕様オプション画像 |
price | object | SKU レベルの元建て価格 |
stock | number | 利用可能数量。0 = 在庫切れ |
image | string | null | SKU のメイン画像 |
shipping | object | null | 1688 SKU 梱包寸法(下表)。Taobao は null |
min_order_quantity | number | null | 1688 MOQ(商品レベル値を各 SKU に付与) |
distribution | object | null | 1688 ドロップシップ価格 |
Taobao の購入前 SKU 価格
カタログ表示には選択 variant の price.promotion_amount ?? price.display_amount を使います。単位は CNY 元です。商品全体の価格を全 SKU の価格に使わないでください。Taobao は SKU 促進価格があれば優先し、なければ SKU 価格を使うため、original_amount は割引前の仕入れ価格を保証しません。カタログはスナップショットであり、注文見積もりではありません。
現在の仕入れ見積もりには、選択 ID、数量、実際の受取人で POST /v1/orders/preview を呼び、success === true を確認します。返される場合、SKU 単価は sellers[].lines[].unit_price.amount、行小計は line_total.amount です。total.payment.amount は国内送料を含む注文総額で、SKU 単価ではありません。preview Money は CNY 分(CNY_minor)で、5580 は 55.80 元です。価格がない場合はゼロと扱わないでください。
見積もりは App の履行モードに従います。HIOBuy Fulfillment(warehouse)はプラットフォーム促進を除外し、割引なしの仕入れ価格を使うため、カタログと異なる場合があります。preview は価格を固定しません。create の金額も概算の場合があるため、作成後に POST /v1/orders/detail で支払い前の現在額を確認してください。
SKU 梱包寸法(variants[].shipping)
1688 上流の productShippingInfo.skuShippingDetails(SkuShippingDetail)からマッピング。Taobao には相当データがなく常に null。空または 0 の寸法/重量は null に正規化。SKU に寸法データが無い場合、shipping 自体が null。
| フィールド | 型 | 説明 |
|---|---|---|
width_cm | number | null | 幅、cm(出品者申告) |
length_cm | number | null | 長さ、cm |
height_cm | number | null | 高さ、cm |
weight_kg | number | null | 重量、kg |
official_width_cm | number | null | 公式計測の幅、cm |
official_length_cm | number | null | 公式計測の長さ、cm |
official_height_cm | number | null | 公式計測の高さ、cm |
official_weight_kg | number | null | 公式計測の重量、kg |
ai_weight_kg | number | null | AI 予測重量、kg |
ai_weight_accuracy | string | null | 当該リーフカテゴリでの AI 重量精度(例: 80%) |
source | string | null | 寸法ソース(例: 商家自填) |
運賃見積もりでは official_* を優先し、次に出品者申告の寸法/重量、さらに ai_weight_kg(ai_weight_accuracy を信頼度の目安に)を使います。
販売者、配送、メタデータ
| フィールド | 型 | 説明 |
|---|---|---|
seller.id / seller.name | string | 店舗 ID と表示名 |
seller.shop_url | string | null | 店舗リンク |
shipping.shipping_from | string | null | 国内発送地域 |
shipping.domestic_shipping_fee | object | null | 元建ての推定国内送料 |
metadata.raw_category | string | null | upstream カテゴリ |
metadata.brand | string | null | 申告ブランド |
metadata.updated_at | string | ISO 8601 の最終同期時刻 |
trade_score | string | null | 1688 品質スコア |
例 (省略)
{
"product": {
"id": "554456348334",
"channel": "1688",
"source_product_id": "554456348334",
"min_order_quantity": 10,
"order_quantity_multiple": 6,
"title": {
"original": "...",
"translated": "...",
"language": "en"
},
"price": {
"display_amount": 29.9,
"promotion_amount": 24.9
},
"variants": [
{
"sku_id": "b266e0...",
"upstream_sku_id": "12123313",
"stock": 100,
"shipping": {
"width_cm": 10,
"length_cm": 10,
"height_cm": 10,
"weight_kg": 1.2,
"official_width_cm": 5,
"official_length_cm": 12,
"official_height_cm": 14,
"official_weight_kg": 0.001,
"ai_weight_kg": 0.001,
"ai_weight_accuracy": "80%",
"source": "商家自填"
}
}
]
},
"request_id": "req_..."
}チャネル別フィールド提供状況
| フィールド | 1688 | Taobao | Weidian |
|---|---|---|---|
order_quantity_multiple | batchNumber / 1 | 1 | 1 |
videos, price_tiers, trade_score | ✓ | — | 場合による |
variants[].shipping, distribution | ✓ | — | — |
variants[].attributes[].prop_id | ✓ (attributeId) | ✓ (prop_id) | — |
variants[].attributes[].value_id | — (null) | ✓ (value_id) | — |
id | offerId | mi_id | プラットフォーム ID |
StandardProductList
search と image search から返されます。各 items[] エントリはサマリーです。SKU マトリクスは detail を呼び出してください。
| フィールド | 型 | 説明 |
|---|---|---|
channel | string | クエリしたマーケットプレイス |
keyword | string | キーワードのエコー (純粋な画像検索では空) |
page / page_size | number | 適用されたページネーション |
total | number | upstream の合計 (概算の場合があります) |
items[] | array | StandardProductListItem オブジェクト |
pic_region_info | object | 画像検索: 検出されたクロップ領域 |
StandardProductListItem
| フィールド | 型 | 説明 |
|---|---|---|
id, channel, source_product_id, source_url | string | 検索結果の id で詳細を取得。Taobao の source_product_id は元の item_id |
title | LocalizedTitle | リスティングタイトル |
price | ProductPrice | CNY yuan のサマリー価格 |
image | string | サムネイル URL |
seller.name | string | 店舗名 |
Upload-image レスポンス
| フィールド | 型 | 説明 |
|---|---|---|
channel | string | 画像を保存したマーケットプレイス |
image_id | string | image search で再利用します |
バリエーション選択
- detail を読み込み、
product.variantsを確認します。 - ディメンションピッカー用に
attributes[].original_nameでグループ化します(prop_idがある場合は ID でも可)。 - ユーザーの各選択でバリエーションを絞り込み、在庫切れの選択肢を無効化します。
- 商品の
idと選択したvariants[].sku_idを注文 previewに渡します。Taobao create は変換済みペアを使います。
照合キー: Taobao で prop_id + value_id がある場合は ID を優先します(安定した CPV 識別子で、多数の SKU が同じ属性名を共有する場合の取り違えを防げます)。UI のグループ化は original_name + original_value にフォールバック。name / value は表示専用。ラベルから意味タイプを推測しないでください。
{
"prop_id": "1627207",
"value_id": "43553464153",
"name": "Color Classification",
"value": "[Special for Bicycle Maintenance] Professional 46-Piece Set",
"original_name": "颜色分类",
"original_value": "【自行车维修专用】专业46件套",
"image": "https://img.alicdn.com/..."
}1688 も同じ形で、prop_id は attributeId、value_id は null(上流 SkuAttribute に valueId なし)です。
1688 の評価:現在のページ内の絞り込み
items[].trade_score: 1688 のキーワード・店舗内の標準検索のみ:上流の tradeScore を数値文字列で返し、未提供・無効なら null。他チャネルと画像検索は変更しません。
page、page_size、total は絞り込み前の意味を維持します(上流に総件数がなければ、total は元のページ件数です)。rating_filter.source_count は絞り込み前、returned_count は絞り込み後の件数です。rating_filter.scope は常に current_page で、これらはフィルター指定時のみ返されます。
件数が少ない場合や items が空の場合でも、次のページがあることがあります。has_next があれば絞り込み前の上流ページ情報に基づきます。未提供ならページ情報は不明です。絞り込み後の件数で終了を判断せず、クライアント側で最大取得ページ数を設定してください。
rating_start: 1688 の現在ページ内の最低 trade_score。任意、JSON 数値 ≥ 0、標準形式のみ。1688 の評価フィルターを参照してください。
Get Support
Need integration help? Contact Developer Support at support@hiobuy.com · Response within 1–2 business days