本文へ移動

1688 商品詳細 API (V1) ​

GET
APIの健康状態
正常 利用可能 限られた数 ほとんど利用できない データなし
健康状態を読み込んでいます...

商品IDによって1688の卸売リストの公開商品詳細を取得します。商品調達やカタログ調査時に既知の商品を確認するために使用します。

パラメータ ​

名前 パラメーターの場所 タイプ 必須 デフォルト 説明
token query string はい - このAPIサービスのアクセストークン。
itemId query string はい - 1688でのユニークな商品識別子。

コードサンプル ​

bash
curl --max-time 120 -X GET 'https://api.justoneapi.com/api/1688/get-item-detail/v1?token=YOUR_API_KEY&itemId=VALUE'
text
私はJustOneAPIの"商品詳細 (V1)" APIを使用したいです。
基本URL: https://api.justoneapi.com.
APIパス: /api/1688/get-item-detail/v1?token=YOUR_API_KEY&itemId=VALUE
APIエンドポイント: BASE_URL + /api/1688/get-item-detail/v1?token=YOUR_API_KEY&itemId=VALUE
HTTPメソッド: GET
認証: "token"クエリパラメーターをURLに追加します。
OpenAPI定義: https://docs.justoneapi.com/openapi/1688/product-details-v1-ja.json

パラメーター:
- token (query): このAPIサービスのアクセストークン。 (必須)
- itemId (query): 1688でのユニークな商品識別子。 (必須)

返信形式:実際のContent-Typeに応じて、JSONまたはテキストを安全に処理する。

レスポンスの処理とエラーコード:
1. API の処理結果はレスポンス本文の「code」フィールドで判定します。code が 0 なら成功です。
2. 推奨タイムアウト:リクエストのタイムアウトは 120 秒に設定してください。120 秒が長すぎる場合でも、最低 60 秒を確保してください。一部のリクエストは、結果を受け取る前にタイムアウトすることがあります。
3. 処理結果コード:
   - 0: 成功
   - 100: 無効または停止中のトークン
   - 301: データの取得に失敗しました。再試行してください。
   - 302: 呼び出し頻度の上限を超えました
   - 303: 日次の利用上限を超えました
   - 400: パラメーターが無効です
   - 500: サーバー内部エラー
   - 600: アクセス権限がありません
   - 601: 残高不足
   - 602: トークンの予算上限に達しました
4. コード 601 はアカウントの共有残高不足を示します。コード 602 は使用中の API トークン固有の累積予算上限に達したことを示します。トークンに予算上限を設定しても、共有残高から資金が移動することはありません。

お手伝いください。私が好むプログラミング言語でこのAPIを呼び出し、レスポンスを処理するスクリプトを作成してください。
python
import requests

BASE_URL = "https://api.justoneapi.com"  # オープンAPIサーバーによって提供される

url = BASE_URL + "/api/1688/get-item-detail/v1?token=YOUR_API_KEY&itemId=VALUE"
response = requests.get(url, timeout=120)
print(response.status_code)
if response.content:
    content_type = response.headers.get("content-type", "").lower()
    if "json" in content_type:
        try:
            print(response.json())
        except ValueError:
            print(response.text)
    elif content_type.startswith("text/") or "xml" in content_type or content_type.split(";", 1)[0].strip() in {"application/javascript", "application/x-www-form-urlencoded", "application/graphql"}:
        print(response.text)
    else:
        with open("response.bin", "wb") as output:
            output.write(response.content)
        print(f"Saved {len(response.content)} bytes to response.bin")
js
const BASE_URL = "https://api.justoneapi.com"; // オープンAPIサーバーによって提供される
const url = BASE_URL + "/api/1688/get-item-detail/v1?token=YOUR_API_KEY&itemId=VALUE";

const response = await fetch(url, {
  method: "GET",
  signal: AbortSignal.timeout(120000)
});
console.log(response.status);
const responseBytes = await response.arrayBuffer();
if (responseBytes.byteLength) {
  const contentType = (response.headers.get("content-type") || "").toLowerCase();
  const mediaType = contentType.split(";", 1)[0].trim();
  const textual = contentType.startsWith("text/") || contentType.includes("json") || contentType.includes("xml") || ["application/javascript", "application/x-www-form-urlencoded", "application/graphql"].includes(mediaType);
  if (textual) {
    const responseText = new TextDecoder().decode(responseBytes);
    let data = responseText;
    if (contentType.includes("json")) {
      try { data = JSON.parse(responseText); } catch { /* Keep the raw body. */ }
    }
    console.log(data);
  } else {
    console.log(`Received ${responseBytes.byteLength} binary bytes`);
  }
}
java
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.time.Duration;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.Path;

public class Main {
    public static void main(String[] args) throws Exception {
        final String BASE_URL = "https://api.justoneapi.com"; // オープンAPIサーバーによって提供される
        final String url = BASE_URL + "/api/1688/get-item-detail/v1?token=YOUR_API_KEY&itemId=VALUE";

        HttpClient client = HttpClient.newBuilder().connectTimeout(Duration.ofSeconds(120)).build();
        HttpRequest.Builder builder = HttpRequest.newBuilder()
            .uri(URI.create(url))
            .timeout(Duration.ofSeconds(120))
            .method("GET", HttpRequest.BodyPublishers.noBody());

        HttpRequest request = builder.build();

        HttpResponse<byte[]> response = client.send(request, HttpResponse.BodyHandlers.ofByteArray());
        System.out.println(response.statusCode());
        String contentType = response.headers().firstValue("content-type").orElse("").toLowerCase();
        String mediaType = contentType.split(";", 2)[0].trim();
        if (contentType.startsWith("text/") || contentType.contains("json") || contentType.contains("xml") || mediaType.equals("application/javascript") || mediaType.equals("application/x-www-form-urlencoded") || mediaType.equals("application/graphql")) {
            System.out.println(new String(response.body(), StandardCharsets.UTF_8));
        } else {
            Files.write(Path.of("response.bin"), response.body());
            System.out.println("Saved " + response.body().length + " bytes to response.bin");
        }
    }
}
go
package main

import (
	"fmt"
	"io"
	"os"
	"strings"
	"net/http"
	"time"
)

const BASE_URL = "https://api.justoneapi.com" // オープンAPIサーバーによって提供される

func main() {
	client := &http.Client{Timeout: 120 * time.Second}
	url := BASE_URL + "/api/1688/get-item-detail/v1?token=YOUR_API_KEY&itemId=VALUE"
	req, _ := http.NewRequest("GET", url, nil)
	resp, _ := client.Do(req)
	defer resp.Body.Close()
	fmt.Println(resp.StatusCode)
	bodyBytes, _ := io.ReadAll(resp.Body)
	contentType := strings.ToLower(resp.Header.Get("Content-Type"))
	mediaType := strings.TrimSpace(strings.SplitN(contentType, ";", 2)[0])
	if strings.HasPrefix(contentType, "text/") || strings.Contains(contentType, "json") || strings.Contains(contentType, "xml") || mediaType == "application/javascript" || mediaType == "application/x-www-form-urlencoded" || mediaType == "application/graphql" {
		fmt.Println(string(bodyBytes))
	} else {
		os.WriteFile("response.bin", bodyBytes, 0600)
		fmt.Printf("Saved %d bytes to response.bin\n", len(bodyBytes))
	}
}
php
<?php
$BASE_URL = 'https://api.justoneapi.com'; // オープンAPIサーバーによって提供される
$url = $BASE_URL . '/api/1688/get-item-detail/v1?token=YOUR_API_KEY&itemId=VALUE';

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_TIMEOUT, 120);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");
$response = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);
$contentType = strtolower((string) curl_getinfo($ch, CURLINFO_CONTENT_TYPE));
curl_close($ch);
echo $status . PHP_EOL;
$mediaType = trim(explode(';', $contentType, 2)[0]);
if (str_starts_with($contentType, 'text/') || str_contains($contentType, 'json') || str_contains($contentType, 'xml') || in_array($mediaType, ['application/javascript', 'application/x-www-form-urlencoded', 'application/graphql'], true)) {
    echo $response;
} else {
    file_put_contents('response.bin', $response);
    echo 'Saved ' . strlen($response) . ' bytes to response.bin' . PHP_EOL;
}

レスポンスフィールド ​

成功したレスポンスのキーフィールド(code = 0)。

商品と店舗15 項目

data

データがオブジェクトの場合、これらのフィールドは要求された1688商品を説明します。商品詳細がない成功した応答には空の文字列を含めることができます。

フィールド タイプ 説明
item object 基本商品情報とマーチャントが表示する店舗詳細。
item.offerId string 1688商品オファーID、テキストとして返されます。
item.offerTitle string 商品オファーの表示タイトル。
item.companyName string マーチャントに表示される店名。
item.winportUrl string マーチャントに表示される店舗リンク。
item.defaultOfferImg string 商品のデフォルト表示画像へのリンク。
item.offerUnit string 商品の販売単位。
item.saleOut boolean 商品が売り切れになっているかどうか。
item.price string 商品概要と共に表示される価格表示テキスト。
item.saledCount integer 商品情報に記載されている販売数量。
item.saledCountStr string 商品の販売数量表示テキスト。
item.topCategoryId string 商品のトップレベルカテゴリID、テキスト形式で返される。
item.postCategoryId string 商品のリストカテゴリID、テキスト形式で返される。
item.businessType string このリストのビジネスタイプラベル。
item.consignOffer boolean リストが寄贈オファーとしてマークされているかどうか。
商品の画像と動画45 項目

data

フィールド タイプ 説明
mainPic object メディアグループがプライベートとしてマークされているかどうか。
mainPic.offerId string 1688商品オファーID、テキストとして返されます。
mainPic.isPrivacy boolean メディアグループに対して報告されるビデオリンク。文字列は空で構わない。
mainPic.videoUrl string メディアグループのビデオリンクが報告されました。この文字列は空の場合もあります。
mainPic.videoId integer メディアグループに対して返される数値のビデオID。
mainPic.offerImgList array このメディアグループ内の商品画像のリンク。
mainPic.offerImgList[] string メディアグループ内の一つの商品画像へのリンク。
mainPic.offerImages array 商品画像とそのタイプラベル。
mainPic.offerImages[] object この商品メディアグループ内の一つの画像。
mainPic.offerImages[].imgUrl string 商品画像へのリンク。
mainPic.offerImages[].type string テキストとして返される商品画像のタイプコード。
mainPic.offerImages[].typeDes string 商品画像タイプの表示説明。
mainPic.offerInfoModel object このメディアグループに含まれる商品の概要。
mainPic.offerInfoModel.offerId integer 1688商品オファーID、整数形式で返される。
mainPic.offerInfoModel.title string メディアグループで報告された商品のタイトル。
mainPic.offerInfoModel.price string メディアグループで報告された価格の表示テキスト。
mainPic.skuImages array SKUオプション名に関連する画像。
mainPic.skuImages[] object 一つのSKUオプション画像。
mainPic.skuImages[].imgUrl string そのSKUオプション画像へのリンク。
mainPic.skuImages[].name string この画像に関連するSKUオプションの表示名。
mainPic.skuImages[].type string そのSKUオプション画像に対して報告されたタイプコード。
video object 動画メディアのグループ。商品メディアが mainPic に返る場合は空のオブジェクトになることがあります。
video.offerId string 1688商品オファーID、テキストとして返されます。
video.isPrivacy boolean メディアグループに対して報告されるビデオリンク。文字列は空で構わない。
video.videoUrl string メディアグループのビデオリンクが報告されました。この文字列は空の場合もあります。
video.videoId integer メディアグループに対して返される数値のビデオID。
video.offerImgList array このメディアグループ内の商品画像のリンク。
video.offerImgList[] string メディアグループ内の一つの商品画像へのリンク。
video.offerImages array 商品画像とそのタイプラベル。
video.offerImages[] object この商品メディアグループ内の一つの画像。
video.offerImages[].imgUrl string 商品画像へのリンク。
video.offerImages[].type string テキストとして返される商品画像のタイプコード。
video.offerImages[].typeDes string 商品画像タイプの表示説明。
video.offerInfoModel object このメディアグループに含まれる商品の概要。
video.offerInfoModel.offerId integer 1688商品オファーID、整数形式で返される。
video.offerInfoModel.title string メディアグループで報告された商品のタイトル。
video.offerInfoModel.price string メディアグループで報告された価格の表示テキスト。
images array 報告されたURLバリアントを持つ商品画像エントリ。
images[] object 一つの商品画像エントリ。
images[].imageURI string 商品画像の報告された主要URI。
images[].fullPathImageURI string 商品画像の報告された完全な画像URI。
images[].size220x220ImageURI string 220×220バリアントフィールドの画像URI。
images[].size310x310ImageURI string 310×310バリアントフィールドの画像URI。
images[].searchImageURI string 検索表示で使用される画像URI。
images[].summImageURI string 商品の概要サイズ画像URIが返されます。
説明と属性23 項目

data

フィールド タイプ 説明
title object 商品の見出しテキストと表示バッジ。
title.offerId integer 1688商品オファーID、整数形式で返される。
title.title string 商品見出しに表示されるタイトル。
title.selledNumber string タイトルの近くに表示される販売表示テキスト。
title.wantBuy string タイトルの近くに表示される購入興味テキスト、返される場合。
title.tagList array タイトルの近くに表示されるタグ。配列は空で構わない。
title.tagList[] string 表示される商品タグのテキスト。
title.scrollList array 商品見出しに返されるスクロール表示テキスト。
title.scrollList[] object 見出し内の一つの表示テキストエントリ。
title.scrollList[].prefix string メインラベルの前に表示されるテキスト。
title.scrollList[].text string メインラベルの後ろに表示されるテキスト。
title.scrollList[].suffix string このメディアレイアウトを使用するリストに対して返される商品画像グループ。
description object 拡張された商品説明情報。
description.detailUrl string 拡張商品説明へのプラットフォームリンク。
description.isUseNewDetail boolean 商品説明が新しい詳細フォーマットを使用しているかどうか。
attribute object 商品属性情報と表示値。
attribute.offerId integer 1688商品オファーID、整数形式で返される。
attribute.title string 商品属性に表示される見出し。
attribute.propsList array 商品に表示される属性名と値。
attribute.propsList[] object 表示される商品属性の一つ。
attribute.propsList[].name string 商品属性の表示名。
attribute.propsList[].value string 商品属性の表示値。
attribute.propsList[].show boolean 属性が表示対象であるかどうか。
価格と数量の階層18 項目

data

フィールド タイプ 説明
price object 商品の価格、表示単位、数量階層。
price.displayType string 商品の価格表示タイプラベル。
price.unit string 商品価格の隣に表示される単位。
price.priceModel object 商品の数量による価格階層の報告。
price.priceModel.priceDisplayType string 価格モデル内の表示タイプコード。
price.priceModel.currentPrices array 注文数量による現在の価格階層。
price.priceModel.currentPrices[] object 開始注文数量のための価格階層の一つ。
price.priceModel.currentPrices[].price string この数量階層の価格、表示テキストとして返されるもの。
price.priceModel.currentPrices[].beginAmount integer 価格階層の開始注文数量。
price.priceModel.originalPrices array 存在する場合の注文数量による元の価格階層。
price.priceModel.originalPrices[] object 開始注文数量のための価格階層の一つ。
price.priceModel.originalPrices[].price string この数量階層の価格、表示テキストとして返されるもの。
price.priceModel.originalPrices[].beginAmount integer 価格階層の開始注文数量。
price.priceModel.originalPriceDisplay string 存在する場合の元の価格表示テキスト。
price.priceModel.currentPricesWithOnePiece array 片割れ価格を含む現在の数量階層、存在する場合。
price.priceModel.currentPricesWithOnePiece[] object 開始注文数量のための価格階層の一つ。
price.priceModel.currentPricesWithOnePiece[].price string この数量階層の価格、表示テキストとして返されるもの。
price.priceModel.currentPricesWithOnePiece[].beginAmount integer 価格階層の開始注文数量。
クーポンとプロモーション27 項目

data

フィールド タイプ 説明
coupon object | array 利用可能なクーポン情報。応答はここで空の配列を返すこともできます。
coupon.offerId integer 1688商品オファーID、整数形式で返される。
coupon.buttonName string クーポンアクションボタンのラベル。
coupon.pageName string クーポンセクションの表示名。
coupon.couponRuleLinkText string クーポンルールリンクの表示テキスト。
coupon.couponList array リストに含まれるクーポンラベル。
coupon.couponList[] object クーポンの表示ラベルの一つ。
coupon.couponList[].couponType string このクーポンに関する報告されたタイプコード。
coupon.couponList[].couponContent string このクーポンに表示されるテキスト。
coupon.couponInfoList array 返される場合のクーポンの詳細表示グループ。
coupon.couponInfoList[] object 一つのクーポンの詳細表示グループ。
coupon.couponInfoList[].name string クーポングループの表示名。
coupon.couponInfoList[].summary string クーポングループの表示概要。
coupon.couponInfoList[].buttonName string クーポングループアクションボタンのラベル。
coupon.couponInfoList[].type string クーポングループに関する報告されたタイプコード。
coupon.couponInfoList[].promotionItems array このクーポン表示グループに含まれるプロモーションエントリ。
coupon.couponInfoList[].promotionItems[] object 一つのクーポンプロモーションエントリ。
coupon.couponInfoList[].promotionItems[].summary string プロモーションに表示される概要テキスト。
coupon.couponInfoList[].promotionItems[].label string プロモーションに関する報告された表示ラベル。
coupon.couponInfoList[].promotionItems[].promotionDisplayName string クーポン表示に表示されるプロモーション名。
coupon.couponInfoList[].promotionItems[].availablePeriod string プロモーションの利用可能期間。
coupon.couponInfoList[].promotionItems[].startTime string プロモーションの開始時間がテキストとして返される。
coupon.couponInfoList[].promotionItems[].endTime string プロモーションの終了時間がテキストとして返される。
coupon.couponInfoList[].promotionItems[].detail string プロモーションの詳細表示テキスト。
coupon.couponInfoList[].promotionItems[].discountFee string 表示される割引額。
coupon.couponInfoList[].promotionItems[].applied boolean プロモーションが適用済みとしてマークされているかどうか。
coupon.couponInfoList[].promotionItems[].canApply boolean プロモーションが利用可能としてマークされているかどうか。
配送と保証30 項目

data

フィールド タイプ 説明
delivery object リストに関する配送と購入者保護情報。
delivery.offerId integer 1688商品オファーID、整数形式で返される。
delivery.location string 商品の配送元が表示される。
delivery.logistics string 商品に関する物流表示テキストが返される。
delivery.deliveryLimitTxt string 報告された配送または発送約束の表示テキスト。
delivery.postFree boolean このレスポンスで配送が無料とマークされているかどうか。
delivery.postFeeValue integer このリストに関する数値的な配送料金値。
delivery.templateId integer 報告された配送テンプレートの識別子。
delivery.unitWeight integer 配送の単位重量値が報告される。
delivery.skuWeight object 報告されたSKU識別子によってキー付けされた重量値。
delivery.skuWeight.{key} number このSKUキーに関する報告された重量値。
delivery.deliveryLimitTimeModel object リストに関する配送時間約束の詳細が返される。
delivery.deliveryLimitTimeModel.limitTimeDay integer 配送時間制限の日数が報告される。
delivery.deliveryLimitTimeModel.limitTimeDesc string 配送時間制限の表示説明。
delivery.deliveryLimitTimeModel.expectTimeDesc string 予想される発送時間の表示説明。
delivery.protectionInfos array 配送情報に含まれる保護サービス。
delivery.protectionInfos[] object 表示されるサービスまたは保護のエントリ一つ。
delivery.protectionInfos[].serviceName string サービスの表示名。
delivery.protectionInfos[].serviceCode string サービスに関するコード。
delivery.protectionInfos[].description string 保護サービスの表示説明。
delivery.protectionInfos[].longDescription string 保護サービスのより長い説明。
delivery.protectionInfos[].buyerDescription string 保護サービスの購入者向け説明。
delivery.protectionInfos[].agreeDeliveryHours integer 返される場合の時間単位で報告された合意された配送時間。
delivery.buyerProtectionModel array 配送に関する追加の購入者保護項目が表示されます。
delivery.buyerProtectionModel[] object 表示されるサービスまたは保護のエントリ一つ。
delivery.buyerProtectionModel[].serviceName string サービスの表示名。
delivery.buyerProtectionModel[].serviceCode string サービスに関するコード。
delivery.buyerProtectionModel[].enabled boolean 購入者保護項目が有効に設定されているかどうか。
delivery.buyerProtectionModel[].shortBuyerDesc string 購入者に表示される短い説明。
delivery.buyerProtectionModel[].textDesc string 購入者保護項目の表示説明。
サービスと購入オプション21 項目

data

フィールド タイプ 説明
service object 商品に関して表示されるサービスと説明。
service.offerId integer 1688商品オファーID、整数形式で返される。
service.service1 string 商品に関して返される最初のサービス表示ラベル。
service.service2 string 返される場合の第二サービスの表示ラベル。
service.service3 string 返される場合の第三サービスの表示ラベル。
service.serviceDetail array 表示されるサービスの詳細情報。
service.serviceDetail[] object 表示されるサービスまたは保護のエントリ一つ。
service.serviceDetail[].serviceName string サービスの表示名。
service.serviceDetail[].serviceCode string サービスに関するコード。
service.serviceDetail[].description string サービスに関する説明。
service.serviceDesc array リストに含まれるサービス記述エントリ。
service.serviceDesc[] object 表示されるサービスまたは保護のエントリ一つ。
service.serviceDesc[].serviceName string サービスの表示名。
service.serviceDesc[].serviceCode string サービスに関するコード。
service.serviceDesc[].type string このサービス記述のタイプラベル。
order object 商品の購入モードが表示されます。
order.sceneList array 商品の購入モードが表示されます。
order.sceneList[] object 一つの購入オプションが表示されます。
order.sceneList[].sceneName string 購入モードの表示名。
order.selectedScene object 商品で選択されている購入モード。
order.selectedScene.sceneName string 選択された購入モードの表示名。

レスポンス例 ​

レスポンスのサンプルを読み込んでいます...