Product API レスポンスモデル
response_format: "standard" (デフォルト) では、商品エンドポイントは以下の型を返します。正規の TypeScript: packages/shared/src/products.ts。
エンドポイント: detail · search · image search · parse
レスポンスエンベロープ {#envelope}
| Endpoint | 形 |
|---|---|
detail, parse | { product: StandardProductDetail, request_id } |
search, search-by-image | StandardProductList & { request_id } |
upload-image | { channel, image_id, request_id } |
StandardProductDetail {#standard-product-detail}
商品ページとチェックアウト向けの完全な商品スナップショットです。注文へのマッピング: source_product_id → offer_id, variants[].sku_id → spec_id (Procurement orders)。
ID とチャネル
| フィールド | 型 | 説明 |
|---|---|---|
id | string | HIOBuy 複合キー: {channel}_{source_product_id} |
channel | string | 1688, taobao, または weidian |
source_product_id | string | 1688 = offerId; Taobao = mi_id (注文 API で必須) |
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 卸売数量割引。Taobao では空 |
min_order_quantity | number | null | 1688 MOQ |
distribution_min_quantity | number | null | 1688 ドロップシップ最小数量 |
メディア (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 | 注文作成時に spec_id として渡します |
upstream_sku_id | string | null | 1688 の数値 skuId |
attributes[] | array | 仕様ディメンション (色、サイズなど) |
price | object | SKU レベルの元建て価格 |
stock | number | 利用可能数量。0 = 在庫切れ |
image | string | null | SKU のメイン画像 |
shipping | object | null | 送料計算用の 1688 梱包サイズ |
distribution | object | null | 1688 ドロップシップ価格 |
販売者、配送、メタデータ
| フィールド | 型 | 説明 |
|---|---|---|
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": "1688_554456348334",
"channel": "1688",
"source_product_id": "554456348334",
"title": {
"original": "...",
"translated": "...",
"language": "en"
},
"price": {
"display_amount": 29.9,
"promotion_amount": 24.9
},
"variants": [
{
"sku_id": "b266e0...",
"stock": 100
}
]
},
"request_id": "req_..."
}チャネル別フィールド提供状況
| フィールド | 1688 | Taobao | Weidian |
|---|---|---|---|
videos, price_tiers, trade_score | ✓ | — | 場合による |
variants[].shipping, distribution | ✓ | — | — |
注文用の source_product_id | offerId | mi_id | プラットフォーム ID |
StandardProductList {#standard-product-list}
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 | detail 取得には source_product_id を使用します |
title | LocalizedTitle | リスティングタイトル |
price | ProductPrice | CNY yuan のサマリー価格 |
image | string | サムネイル URL |
seller.name | string | 店舗名 |
Upload-image レスポンス {#upload-image-response}
| フィールド | 型 | 説明 |
|---|---|---|
channel | string | 画像を保存したマーケットプレイス |
image_id | string | image search で再利用します |
バリエーション選択 {#variant-selection}
- detail を読み込み、
product.variantsを確認します。 - ディメンションピッカー用に
attributes[].original_nameでグループ化します。 - ユーザーの各選択でバリエーションを絞り込み、在庫切れの選択肢を無効化します。
- 一致した
sku_idとsource_product_idを order preview に渡します。