商品のインポートと更新
50,000 点以上の商品を持つカタログに推奨されるエンドポイントを使用して、Kameleoon の商品カタログをインポートまたは更新します。
curl --request PUT \
--url https://api.products.kameleoon.com/import/products \
--header 'Content-Type: application/json' \
--data '
{
"shop_id": "eehj3eu84299kg5ghw5a6743r8",
"shop_secret": "pmd5362597thrgq8k256ep01t0",
"items": [
{
"id": "myID",
"name": "myItem",
"price": 1,
"currency": "USD",
"url": "https://example.com/product",
"picture": "https://example.com/product/image.png",
"available": true,
"categories": [
"ID1",
"ID2"
]
}
]
}
'import requests
url = "https://api.products.kameleoon.com/import/products"
payload = {
"shop_id": "eehj3eu84299kg5ghw5a6743r8",
"shop_secret": "pmd5362597thrgq8k256ep01t0",
"items": [
{
"id": "myID",
"name": "myItem",
"price": 1,
"currency": "USD",
"url": "https://example.com/product",
"picture": "https://example.com/product/image.png",
"available": True,
"categories": ["ID1", "ID2"]
}
]
}
headers = {"Content-Type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
shop_id: 'eehj3eu84299kg5ghw5a6743r8',
shop_secret: 'pmd5362597thrgq8k256ep01t0',
items: [
{
id: 'myID',
name: 'myItem',
price: 1,
currency: 'USD',
url: 'https://example.com/product',
picture: 'https://example.com/product/image.png',
available: true,
categories: ['ID1', 'ID2']
}
]
})
};
fetch('https://api.products.kameleoon.com/import/products', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.products.kameleoon.com/import/products",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'shop_id' => 'eehj3eu84299kg5ghw5a6743r8',
'shop_secret' => 'pmd5362597thrgq8k256ep01t0',
'items' => [
[
'id' => 'myID',
'name' => 'myItem',
'price' => 1,
'currency' => 'USD',
'url' => 'https://example.com/product',
'picture' => 'https://example.com/product/image.png',
'available' => true,
'categories' => [
'ID1',
'ID2'
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.products.kameleoon.com/import/products"
payload := strings.NewReader("{\n \"shop_id\": \"eehj3eu84299kg5ghw5a6743r8\",\n \"shop_secret\": \"pmd5362597thrgq8k256ep01t0\",\n \"items\": [\n {\n \"id\": \"myID\",\n \"name\": \"myItem\",\n \"price\": 1,\n \"currency\": \"USD\",\n \"url\": \"https://example.com/product\",\n \"picture\": \"https://example.com/product/image.png\",\n \"available\": true,\n \"categories\": [\n \"ID1\",\n \"ID2\"\n ]\n }\n ]\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.products.kameleoon.com/import/products")
.header("Content-Type", "application/json")
.body("{\n \"shop_id\": \"eehj3eu84299kg5ghw5a6743r8\",\n \"shop_secret\": \"pmd5362597thrgq8k256ep01t0\",\n \"items\": [\n {\n \"id\": \"myID\",\n \"name\": \"myItem\",\n \"price\": 1,\n \"currency\": \"USD\",\n \"url\": \"https://example.com/product\",\n \"picture\": \"https://example.com/product/image.png\",\n \"available\": true,\n \"categories\": [\n \"ID1\",\n \"ID2\"\n ]\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.products.kameleoon.com/import/products")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"shop_id\": \"eehj3eu84299kg5ghw5a6743r8\",\n \"shop_secret\": \"pmd5362597thrgq8k256ep01t0\",\n \"items\": [\n {\n \"id\": \"myID\",\n \"name\": \"myItem\",\n \"price\": 1,\n \"currency\": \"USD\",\n \"url\": \"https://example.com/product\",\n \"picture\": \"https://example.com/product/image.png\",\n \"available\": true,\n \"categories\": [\n \"ID1\",\n \"ID2\"\n ]\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"status": "success"
}{
"status": "error",
"message": "Incorrect shop credentials"
}レート制限
- API リクエスト制限(Rate Limit)は 1 分間に 40 リクエストで、最大で 1.5 秒に 1 リクエストです。
- API リクエスト重量制限(Weight Limit)は 1 リクエストあたり最大 35 メガバイトに制限されています。
クエリパラメーターのリスト
| パラメーター | 型 | 必須 | 説明 |
|---|---|---|---|
shop_id | String | Yes | ストアキー。Kameleoon アプリの Recommendations > Settings > Store settings で確認できます。キーについては、カスタマーサクセスマネージャーにもお問い合わせいただけます。 |
shop_secret | String | Yes | シークレットキー。Kameleoon アプリの Recommendations > Settings > Store settings で確認できます。キーについては、カスタマーサクセスマネージャーにもお問い合わせいただけます。 |
items | List | Yes | 商品アイテムのリスト。items に必要なパラメーターはこの表を参照してください。 |
webhook | String | No | Webhook URL。インポート完了時に POST リクエストが送信されます。 |
webhook の目的は、リクエストが完了したことを開発者に通知することです。API 呼び出しで指定されたすべての商品がインポートされ完全に利用可能になると、指定された Webhook に POST リクエストが送信されます。成功したリクエストの例:{
"status": "success"
}
{
"status": "error",
"message": "MESSAGE"
}
items オブジェクトのパラメーターリスト
| パラメーター | 型 | 必須 | 説明 |
|---|---|---|---|
id | String (最大長 64) | Yes | アイテムに割り当てられた一意の ID |
group_id | String (最大長 64) | Optional | アイテムグループに関連付けられた ID |
name | String (最大長 255) | Yes | アイテムの名前 |
price | Float (正の値である必要があります) | Yes | アイテムの価格。複数の場所で価格を提供するには、代わりに locations オブジェクトを使用してください。 |
oldprice | Float (正の値である必要があります) | Optional | アイテムの以前の価格 |
currency | String | Yes | price フィールドで指定された通貨 |
url | String | Yes | アイテムに関連付ける URL |
picture | String | Yes | アイテムの画像を含む URL |
available | Boolean | Yes | アイテムが購入可能かどうかを示します。後で更新するには、商品更新エンドポイントを使用してください |
categories | Array of strings | Yes | 各文字列は、この商品が属するカテゴリ ID を表します。 |
locations | Array | Optional | 異なる場所でのアイテムの価格の配列。locations に必要なパラメーターはこの表を参照してください。 |
accessories | Array of strings | Optional | アイテムに関連するアクセサリの商品 ID を含みます |
seasonality | Array of integers | Optional | このアイテムを宣伝したい年の月(1 月=1、12 月=12)を表します |
brand | String | Optional | アイテムのブランド名 |
barcode | Integer | Optional | アイテムのバーコード値 |
price_margin | Integer | Optional | アイテムの価格マージン |
tags | Array of strings | Optional | アイテムに関連付けたいキーワードのリスト |
is_child | Boolean | Optional | このアイテムが別のアイテムの子であるかどうかを示します |
is_fashion | Boolean | Optional | このアイテムがファッションアイテムかどうかを示します |
is_new | Boolean | Optional | このアイテムが新しいアイテムかどうかを示します |
fashion | Object | Optional | ファッションアイテム用のいくつかの追加パラメーターを定義します。fashion に必要なパラメーターはこの表を参照してください。 |
stock_quantity | Integer | Optional | 在庫数量 |
type_prefix | String | Optional | アイテムタイプを区別するためのプレフィックス |
model | String | Optional | アイテムのモデル名 |
params | Object | Optional | カスタムパラメーターを追加します。params に必要なパラメーターはこの表を参照してください。 |
merchant | String | Optional | アイテムに関連付けたいマーチャント |
rating | Integer | Optional | 1 から 5 の間の値。アイテムに割り当てたいユーザー評価 |
leftovers | String | Optional | 残在庫の説明。たとえば、“one” は単一ユニットとして利用可能な商品を表し、“few” は限定数量(最大 10 ユニット)で入手可能な商品を表し、“lot” は 10 ユニット以上の数量で入手可能な商品を表します |
creation_date | String | Optional | 形式 yyyy-mm-dd で指定する必要があります。これはアイテムが作成された日付です |
locations オブジェクトのパラメーターリスト
複数の場所がある場合に、場所に固有の価格、在庫、その他の情報を提供するために locations オブジェクトを使用します。商品アイテムオブジェクト内に locations オブジェクトを渡します。
| パラメーター | 型 | 必須 | 説明 |
|---|---|---|---|
location | String | Yes | 価格を指定する場所。locations フィールドが提供される場合、このフィールドは必須です。 |
price | Float (正の値である必要があります) | Optional | この場所での価格。 |
oldprice | Float (正の値である必要があります) | Optional | アイテムの以前の価格(たとえば、セール品の通常価格)。 |
stock_quantity | Int (正の値である必要があります) | Optional | 在庫の数量。 |
sizes | Array of Strings | Optional | アイテムのサイズオプションのリスト。 |
weight | Int (正の値である必要があります) | Optional | アイテムの重量。 |
delivery_types | Object | Optional | アイテムの利用可能性を示します。delivery_types に必要なパラメーターはこの表を参照してください。 |
delivery_types オブジェクトのパラメーターリスト
| パラメーター | 型 | 必須 | 説明 |
|---|---|---|---|
store | Int (正の値である必要があります) | Yes | 店頭で利用可能な数量 |
delivery | Int (正の値である必要があります) | Yes | 配送または倉庫で利用可能な数量 |
Params オブジェクトのパラメーターリスト
params オブジェクトを使用すると、アイテムのカスタムパラメーター値を指定できます。商品 items オブジェクトの中に params オブジェクトを渡します。
| パラメーター | 型 | 必須 | 説明 |
|---|---|---|---|
name | String | Yes | パラメーターの名前 |
value | Array of Strings | Yes | パラメーターの値の配列 |
unit | String | Optional | 値の測定単位。 |
Fashion オブジェクトのパラメーターリスト
fashion オブジェクトを使用すると、ファッションアイテムに関する追加情報を指定できます。商品 items オブジェクトの中に fashion オブジェクトを渡します。
| パラメーター | 型 | 必須 | 説明 |
|---|---|---|---|
gender | String | Optional | アイテムに関連付ける性別。たとえば、“m”、“f”、または “female”。 |
sizes | Array of Strings | Optional | アイテムのサイズリスト。 |
type | String | Yes | ファッションアイテムのタイプ。たとえば、“jacket”。 |
JSON リクエスト例
{
"id": "myID",
"group_id": "myGroup",
"name": "myItem",
"price": 1,
"oldprice": 2,
"currency": "USD",
"url": "https://example.com/product",
"picture": "https://example.com/product/image.png",
"available": true,
"categories": ["ID1", "ID2"],
"locations": [
{
"location": "USA",
"delivery_types": {
"store": 10,
"delivery": 50
}
},
{
"location": "CAN",
"price": 60
}
],
"accessories": ["ID1", "ID2"],
"seasonality": [1, 2, 3],
"brand": "Acme",
"barcode": 123456789,
"price_margin": 10,
"tags": ["TAG1", "TAG2"],
"is_child": false,
"is_fashion": true,
"is_new": false,
"fashion": {
"gender": "m",
"sizes": ["48", "50", "52"],
"type": "jacket"
},
"stock_quantity": 60,
"type_prefix": "prefix",
"model": "Widget 3000",
"params": [
{
"name": "Param 1",
"value": ["bluetooth", "wi-fi"]
},
{
"name": "Param 2",
"value": [23]
}
],
"merchant": "MerchantName",
"rating": 4,
"leftovers": "one",
"creation_date": "2021-12-21"
}
ボディ
Store Key. Find this in Recommendations > Settings > Store settings in the Kameleoon app. Contact your Customer Success Manager for the key if necessary.
Secret Key. Find this in Recommendations > Settings > Store settings in the Kameleoon app. Contact your Customer Success Manager for the key if necessary.
A list of product items. To update only some properties of a product, you must still include all of that product's mandatory parameters, or the product is ignored during import.
Show child attributes
Show child attributes
The webhook URL where a POST request is sent upon completion of the import.
レスポンス
Import accepted. Verified against a live response on 2026-09-24: this endpoint returns an empty 204 response on success, not a JSON body — the {"status": "success"} shape only applies to the asynchronous webhook callback payload, if a webhook was provided.
Request outcome.
success このページは役に立ちましたか?
curl --request PUT \
--url https://api.products.kameleoon.com/import/products \
--header 'Content-Type: application/json' \
--data '
{
"shop_id": "eehj3eu84299kg5ghw5a6743r8",
"shop_secret": "pmd5362597thrgq8k256ep01t0",
"items": [
{
"id": "myID",
"name": "myItem",
"price": 1,
"currency": "USD",
"url": "https://example.com/product",
"picture": "https://example.com/product/image.png",
"available": true,
"categories": [
"ID1",
"ID2"
]
}
]
}
'import requests
url = "https://api.products.kameleoon.com/import/products"
payload = {
"shop_id": "eehj3eu84299kg5ghw5a6743r8",
"shop_secret": "pmd5362597thrgq8k256ep01t0",
"items": [
{
"id": "myID",
"name": "myItem",
"price": 1,
"currency": "USD",
"url": "https://example.com/product",
"picture": "https://example.com/product/image.png",
"available": True,
"categories": ["ID1", "ID2"]
}
]
}
headers = {"Content-Type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
shop_id: 'eehj3eu84299kg5ghw5a6743r8',
shop_secret: 'pmd5362597thrgq8k256ep01t0',
items: [
{
id: 'myID',
name: 'myItem',
price: 1,
currency: 'USD',
url: 'https://example.com/product',
picture: 'https://example.com/product/image.png',
available: true,
categories: ['ID1', 'ID2']
}
]
})
};
fetch('https://api.products.kameleoon.com/import/products', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.products.kameleoon.com/import/products",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'shop_id' => 'eehj3eu84299kg5ghw5a6743r8',
'shop_secret' => 'pmd5362597thrgq8k256ep01t0',
'items' => [
[
'id' => 'myID',
'name' => 'myItem',
'price' => 1,
'currency' => 'USD',
'url' => 'https://example.com/product',
'picture' => 'https://example.com/product/image.png',
'available' => true,
'categories' => [
'ID1',
'ID2'
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.products.kameleoon.com/import/products"
payload := strings.NewReader("{\n \"shop_id\": \"eehj3eu84299kg5ghw5a6743r8\",\n \"shop_secret\": \"pmd5362597thrgq8k256ep01t0\",\n \"items\": [\n {\n \"id\": \"myID\",\n \"name\": \"myItem\",\n \"price\": 1,\n \"currency\": \"USD\",\n \"url\": \"https://example.com/product\",\n \"picture\": \"https://example.com/product/image.png\",\n \"available\": true,\n \"categories\": [\n \"ID1\",\n \"ID2\"\n ]\n }\n ]\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.products.kameleoon.com/import/products")
.header("Content-Type", "application/json")
.body("{\n \"shop_id\": \"eehj3eu84299kg5ghw5a6743r8\",\n \"shop_secret\": \"pmd5362597thrgq8k256ep01t0\",\n \"items\": [\n {\n \"id\": \"myID\",\n \"name\": \"myItem\",\n \"price\": 1,\n \"currency\": \"USD\",\n \"url\": \"https://example.com/product\",\n \"picture\": \"https://example.com/product/image.png\",\n \"available\": true,\n \"categories\": [\n \"ID1\",\n \"ID2\"\n ]\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.products.kameleoon.com/import/products")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"shop_id\": \"eehj3eu84299kg5ghw5a6743r8\",\n \"shop_secret\": \"pmd5362597thrgq8k256ep01t0\",\n \"items\": [\n {\n \"id\": \"myID\",\n \"name\": \"myItem\",\n \"price\": 1,\n \"currency\": \"USD\",\n \"url\": \"https://example.com/product\",\n \"picture\": \"https://example.com/product/image.png\",\n \"available\": true,\n \"categories\": [\n \"ID1\",\n \"ID2\"\n ]\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"status": "success"
}{
"status": "error",
"message": "Incorrect shop credentials"
}