利用可能な商品の更新
curl --request PATCH \
--url https://api.example.com/endpointimport 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 を送信することで、Kameleoon の在庫商品のリストを更新します。省略されたアイテムは在庫切れとしてマークされます。
PATCH
/
endpoint
利用可能な商品の更新
curl --request PATCH \
--url https://api.example.com/endpointimport 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_id | String | Yes | ストアキー。Kameleoon アプリの Recommendations > Settings > Store settings で確認できます。キーについては、カスタマーサクセスマネージャーにもお問い合わせいただけます。 |
shop_secret | String | Yes | シークレットキー。Kameleoon アプリの Recommendations > Settings > Store settings で確認できます。キーについては、カスタマーサクセスマネージャーにもお問い合わせいただけます。 |
items | List | Yes | 在庫がある商品 ID のリスト。利用可能な(在庫がある)すべての商品の識別子をリストします。PATCH リクエストに含まれていないデータベース内のアイテムは利用不可(在庫切れ)としてマークされます。 |
JSON リクエスト例
{
"shop_id": "eehj3eu84299kg5ghw5a6743r8",
"shop_secret": "pmd5362597thrgq8k256ep01t0",
"items": ["1235", "4337", "7578"]
}
このページは役に立ちましたか?
⌘I