コンテンツにスキップ
アプリをインストール
日本語

[PUT] ルールを更新

AI による概要

既存の近日公開ルールを更新するエンドポイントを説明します。

  • 必須の coming_soon_id を付けて PUT リクエストを送信します。レート制限は throttle:30,1 です。
  • name、status、日付、apply_to、translations、show_countdown は任意です。
  • apply_to が product または variant の場合は、1~50 件の product_ids または variant_ids を送信します。collection の場合は collection_id を送信します。
  • 検証表には、すべてのフィールドのルールと考えられるエラーメッセージが記載されています。

AI が生成した要約です。誤りが含まれる場合があるため、下記のガイド全文をご確認ください。

* 認証

必須 Authorization

制限 throttle:30,1

リクエスト

エンドポイント PUT - /shop-api/coming-soon/create

ペイロード本文

パラメーター型必須
coming_soon_idintyes
namestringoption
statusint 0 1option
start_datedatetimeoption 例:2026-07-01T10:00:00.000000Z
end_datedatetime option
apply_to"all" | "collection" | "product" | "variant"option
product_idsarray [1,2,...]yes min:1|max:50(apply_to = product の場合)
variant_idsarray [1,2,...]yes min:1|max:50(apply_to = variant の場合)
collection_id number 単一のコレクションyes (apply_to = collection の場合)
translationsobjectoption
show_countdownboolean true falseoption
  1. apply_to は "all" "collection" "product" "variant" のいずれかである必要があります
  2. apply_to が "product" でない場合は product_ids を送信しないでください。また、product_ids は配列である必要があります
  3. apply_to が "variant" でない場合は variant_ids を送信しないでください。また、variant_ids は配列である必要があります
  4. apply_to が "collection" でない場合は collection_id を送信しないでください。また、collection_id は署名付きIDである必要があります
  5. translations はオブジェクトである必要があります。例:
translations: {
default: {
comingSoonAddToCartText: "Coming Soon" // string
}
// en: {...}, jp: {...}
}
PUT /shop-api/coming-soon/update HTTP/1.1
Host: preorder.globo.io
Content-Type: application/json
Authorization: ************
Content-Length: 347
{
"coming_soon_id": 1,
"name": "Summer launch",
"status": 1,
"start_date": "2026-07-01T10:00:00.000000Z",
"end_date": "2026-07-11T10:00:00.000000Z",
"apply_to": "product",
"product_ids": [10076972613912],
"translations": {
"default":{
"comingSoonAddToCartText":"Coming Soon",
"comingSoonAboveMessage":"Product will available in ...",
"comingSoonBellowMessage":""
},
"jp":{
"comingSoonAddToCartText":"Coming Soon",
"comingSoonAboveMessage":"Product will available in ...",
"comingSoonBellowMessage":""
}
}
}
const myHeaders = new Headers();
myHeaders.append("Content-Type", "application/json");
myHeaders.append("Authorization", "************");
const raw = JSON.stringify({
"coming_soon_id": 1,
"name": "Summer launch",
"status": 1,
"start_date": "2026-07-01T10:00:00.000000Z",
"end_date": "2026-07-11T10:00:00.000000Z",
"apply_to": "product",
"product_ids": [10076972613912],
"translations": {
"default":{
"comingSoonAddToCartText":"Coming Soon",
"comingSoonAboveMessage":"Product will available in ...",
"comingSoonBellowMessage":""
},
"jp":{
"comingSoonAddToCartText":"Coming Soon",
"comingSoonAboveMessage":"Product will available in ...",
"comingSoonBellowMessage":""
}
}
});
const requestOptions = {
method: "PUT",
headers: myHeaders,
body: raw,
redirect: "follow"
};
fetch("https://preorder.globo.io/shop-api/coming-soon/create", requestOptions)
.then((response) => response.text())
.then((result) => console.log(result))
.catch((error) => console.error(error));
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://preorder.globo.io/shop-api/coming-soon/create',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'PUT',
CURLOPT_POSTFIELDS =>'{
"coming_soon_id": 1,
"name": "coming soon 1",
"status": 0,
"start_date": "2026-07-01T10:00:00.000000Z",
"apply_to": "product",
"product_ids": [10076972613912],
"translations": {
"default":{
"comingSoonAddToCartText":"Coming Soon",
"comingSoonAboveMessage":"Product will available in ...",
"comingSoonBellowMessage":""
},
"jp":{
"comingSoonAddToCartText":"Coming Soon",
"comingSoonAboveMessage":"Product will available in ...",
"comingSoonBellowMessage":""
}
}
}',
CURLOPT_HTTPHEADER => array(
'Content-Type: application/json',
'Authorization: ************'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;

成功時のレスポンス 200

{
"success": true,
"message": "Coming soon product updated",
"data": {
"id": 1,
"name": "Summer launch",
"start_date": "2026-07-01 10:00:00",
"end_date": null,
"show_countdown": null,
"apply_to": "product",
"product_ids": [10076972613912],
"variant_ids": null,
"collection_id": null,
"translations": { "default": { "comingSoonAddToCartText": "Coming soon",... },... },
"status": 1,
"created_at": "2026-07-16T07:00:00.000000Z",
"updated_at": "2026-07-16T07:00:00.000000Z"
}
}

バリデーション

フィールドルール考えられるエラーメッセージ
namerequired, string, max:255The name field is required.
The name may not be greater than 255 characters.
statusrequired, in:0,1The status field is required.
The selected status is invalid.
start_daterequired, dateThe start date field is required.
The start date is not a valid date.
end_datenullable, date, after:start_dateThe end date is not a valid date.
The end date must be a date after start date.
show_countdownnullable, booleanThe show countdown field must be true or false.
apply_toproduct,variant,collection,allThe apply to field is required.
The selected apply to is invalid.
product_idsrequired_if:apply_to,product, arrayThe product ids field is required when apply to is product.
The product ids must be an array.
variant_idsrequired_if:apply_to,variant, arrayThe variant ids field is required when apply to is variant.
The variant ids must be an array.
collection_idrequired_if:apply_to,collectionThe collection id field is required when apply to is collection.
translationsnullable, arrayThe translations must be an array.
translations.{lang}arrayEach translation entry must be an array.
translations.{lang}.comingSoonAddToCartTextstringThe translations.{lang}.comingSoonAddToCartText must be a string.
translations.{lang}.comingSoonAboveMessagestringThe translations.{lang}.comingSoonAboveMessage must be a string.
translations.{lang}.comingSoonBellowMessagestringThe translations.{lang}.comingSoonBellowMessage must be a string.

このページは役に立ちましたか?

問題を報告