メインコンテンツへスキップ
PATCH
/
endpoint
利用可能な商品の更新
curl --request PATCH \
  --url https://api.example.com/endpoint
import requests

url = "https://api.example.com/endpoint"

response = requests.patch(url)

print(response.text)
const options = {method: 'PATCH'};

fetch('https://api.example.com/endpoint', 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.example.com/endpoint",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "PATCH",
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.example.com/endpoint"

	req, _ := http.NewRequest("PATCH", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.patch("https://api.example.com/endpoint")
  .asString();
require 'uri'
require 'net/http'

url = URI("https://api.example.com/endpoint")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Patch.new(url)

response = http.request(request)
puts response.read_body
利用可能な(在庫がある)すべてのアイテムの ID リストを使用して、利用可能な商品のリストを更新するには、このエンドポイントを使用します。これは JSON リクエストとして送信する必要があります。

HTTP リクエスト

PATCH https://api.products.kameleoon.com/import/products

クエリパラメーターのリスト

パラメーター必須説明
shop_idStringYesストアキー。Kameleoon アプリの Recommendations > Settings > Store settings で確認できます。キーについては、カスタマーサクセスマネージャーにもお問い合わせいただけます。
shop_secretStringYesシークレットキー。Kameleoon アプリの Recommendations > Settings > Store settings で確認できます。キーについては、カスタマーサクセスマネージャーにもお問い合わせいただけます。
itemsListYes在庫がある商品 ID のリスト。利用可能な(在庫がある)すべての商品の識別子をリストします。PATCH リクエストに含まれていないデータベース内のアイテムは利用不可(在庫切れ)としてマークされます。

JSON リクエスト例

{
    "shop_id": "eehj3eu84299kg5ghw5a6743r8",
    "shop_secret": "pmd5362597thrgq8k256ep01t0",
    "items": ["1235", "4337", "7578"]
}