POST /v1/actions/store/update-store
本エンドポイントは Webhook 設定を管理しません。リクエストボディに
webhookSettings フィールドが含まれている場合、そのフィールドは黙って無視され、レスポンスのトップレベルに warnings 配列が付加されます。他のフィールドは通常どおり更新され、200 が返されます。Webhook の設定は add-webhook、update-webhook、remove-webhook を使用し、一覧取得は GraphQL Store.storeWebhooks を利用してください。リクエストボディ
| フィールド | 型 | 必須 | 説明 |
|---|---|---|---|
id | string | Yes | Store ID(Short ID フォーマット STO_xxx) |
name | string | No | 更新後のストア名(1-48 文字) |
status | string | No | active、inactive、または suspended |
logo | string | null | No | ストアロゴ URL(null で削除) |
notificationSettings | object | null | No | 通知設定(null で削除) |
checkoutSettings | object | null | No | チェックアウトテーマ設定(null で削除) |
通知設定
書き込み権限により 2 グループに分かれます: マーチャント書き込み可能(✅ このエンドポイントで受け付け):| フィールド | 型 | デフォルト | 説明 |
|---|---|---|---|
notifyNewOrders | boolean | true | 新規注文をマーチャントに通知 |
notifyNewSubscriptions | boolean | true | 新規サブスクリプションをマーチャントに通知 |
notifySubscriptionCanceled | boolean | true | サブスクリプションキャンセル(ユーザー解約、アクセス期間内)をマーチャントに通知 |
notifySubscriptionEnded | boolean | true | サブスクリプション終了時にマーチャントに通知 |
notifySubscriptionPastDue | boolean | true | サブスクリプションが past_due(支払失敗)になった際にマーチャントに通知 |
notifySubscriptionRenewed | boolean | true | サブスクリプション更新成功時にマーチャントに通知 |
notifySubscriptionUncanceled | boolean | true | キャンセル後に復帰した際にマーチャントに通知 |
notifySubscriptionUpdated | boolean | true | サブスクリプションのプラン変更時にマーチャントに通知(forward-compat) |
notifyChargeback | boolean | true | チャージバック発生時にマーチャントに通知(forward-compat) |
| フィールド | 型 | デフォルト | 説明 |
|---|---|---|---|
emailOrderConfirmation | boolean | true | 注文確認時にメールを送信 |
emailSubscriptionConfirmation | boolean | true | サブスクリプション作成時にメールを送信 |
emailSubscriptionCycled | boolean | true | サブスクリプション更新時にメールを送信 |
emailSubscriptionCanceled | boolean | true | サブスクリプションキャンセル時にメールを送信 |
emailSubscriptionRevoked | boolean | true | サブスクリプション失効時にメールを送信 |
emailSubscriptionPastDue | boolean | true | サブスクリプション滞納時にメールを送信 |
emailTrialStarted | boolean | true | 無料トライアル開始時にメールを送信 |
emailTrialEnding | boolean | true | トライアル終了前にリマインダーメールを送信 |
emailUpcomingCharge | boolean | true | サブスクリプションの次回請求前にリマインダーメールを送信 |
notificationSettings ペイロードにプラットフォーム管理フィールド(email*、またはレガシーの notifyPayoutCompleted / notifyPayoutFailed — 出金結果メールは常に配信され、トグルはありません)が含まれる場合、サーバーは静かに破棄し、200 レスポンスの warnings[] に破棄されたキーを返します。customer メールの toggle 変更は PANCAKE プラットフォームサポートまでご連絡ください。チェックアウト設定
| フィールド | 型 | 説明 |
|---|---|---|
defaultDarkMode | boolean | デフォルトでダークモードにするかどうか |
light | object | ライトテーマ設定(以下参照) |
dark | object | ダークテーマ設定(以下参照) |
light と dark の両方に適用):
| フィールド | 型 | 説明 |
|---|---|---|
checkoutLogo | string | null | チェックアウトページのロゴ URL |
checkoutColorPrimary | string | プライマリカラー(16 進数) |
checkoutColorBackground | string | 背景色(16 進数) |
checkoutColorCard | string | カード/パネル色(16 進数) |
checkoutColorText | string | テキスト色(16 進数) |
checkoutBorderRadius | string | ボーダー半径(CSS 値) |
部分更新セマンティクス
2 つの settings オブジェクトはどちらも部分更新をサポートしています。各サブフィールドには 3 つの値セマンティクスがあります:| 値 | 動作 | 例 |
|---|---|---|
| 省略(JSON に含めない) | 既存の値を保持 | notifyNewOrders のみ送信、他の通知フラグは変更なし |
null | フィールドをクリア | "checkoutLogo": null でチェックアウトロゴを削除 |
| 実際の値 | 作成または更新 | "checkoutColorPrimary": "#FF6600" で新しいプライマリカラーを設定 |
null に設定すると(例:"notificationSettings": null)、その設定グループのすべてのフィールドがクリアされます。
リクエスト例
import { WaffoPancake, EntityStatus } from "@waffo/pancake-ts";
const client = new WaffoPancake({
merchantId: process.env.WAFFO_MERCHANT_ID!,
privateKey: process.env.WAFFO_PRIVATE_KEY!,
});
const { store } = await client.stores.update({
id: "STO_2aUyqjCzEIiEcYMKj7TZtw",
name: "Updated Store Name",
// マーチャント書き込み可能な通知 toggle(B 類)のみ送信できます。
// customer 向けメール toggle(emailOrderConfirmation 等の A 類)は
// PANCAKE プラットフォームが管理しているため、ここで送信すると
// サーバー側で静かに破棄され、200 warning が返ります。
notificationSettings: {
notifyNewOrders: true,
notifyNewSubscriptions: false,
},
});
// Uses callApi() helper from authentication.mdx
const result = await callApi("POST", "/v1/actions/store/update-store", {
id: "STO_2aUyqjCzEIiEcYMKj7TZtw",
name: "Updated Store Name",
notificationSettings: {
notifyNewSubscriptions: false,
},
});
console.log(result.data.store.name); // => "Updated Store Name"
// Uses callApi() helper from authentication.mdx
String body = """
{
"id": "STO_2aUyqjCzEIiEcYMKj7TZtw",
"name": "Updated Store Name",
"notificationSettings": {
"notifyNewSubscriptions": false
}
}""";
String response = callApi("POST", "/v1/actions/store/update-store", body);
System.out.println(response);
# Uses call_api() helper from authentication.mdx
result = call_api("POST", "/v1/actions/store/update-store", {
"id": "STO_2aUyqjCzEIiEcYMKj7TZtw",
"name": "Updated Store Name",
"notificationSettings": {
"notifyNewSubscriptions": False,
},
})
store = result["data"]["store"]
print(store["name"]) # => "Updated Store Name"
// Uses callAPI() helper from authentication.mdx
body := map[string]interface{}{
"id": "STO_2aUyqjCzEIiEcYMKj7TZtw",
"name": "Updated Store Name",
"notificationSettings": map[string]interface{}{
"notifyNewSubscriptions": false,
},
}
result, err := callAPI("POST", "/v1/actions/store/update-store", body)
if err != nil {
log.Fatal(err)
}
fmt.Println(string(result))
// Uses call_api() helper from authentication.mdx
let body = serde_json::json!({
"id": "STO_2aUyqjCzEIiEcYMKj7TZtw",
"name": "Updated Store Name",
"notificationSettings": {
"notifyNewSubscriptions": false
}
});
let result = call_api("POST", "/v1/actions/store/update-store", &body).await?;
println!("{}", result);
/* Uses call_api() helper from authentication.mdx */
const char *body =
"{\"id\":\"STO_2aUyqjCzEIiEcYMKj7TZtw\","
"\"name\":\"Updated Store Name\","
"\"notificationSettings\":{\"notifyNewSubscriptions\":false}}";
char *response = call_api("POST", "/v1/actions/store/update-store", body);
printf("%s\n", response);
free(response);
// Uses callApi() helper from authentication.mdx
std::string body = R"({
"id": "STO_2aUyqjCzEIiEcYMKj7TZtw",
"name": "Updated Store Name",
"notificationSettings": {
"notifyNewSubscriptions": false
}
})";
std::string response = callApi("POST", "/v1/actions/store/update-store", body);
std::cout << response << std::endl;
MERCHANT_ID="MER_2aUyqjCzEIiEcYMKj7TZtw"
TIMESTAMP=$(date +%s)
BODY='{"id":"STO_2aUyqjCzEIiEcYMKj7TZtw","name":"Updated Store Name","notificationSettings":{"notifyNewSubscriptions":false}}'
BODY_HASH=$(echo -n "$BODY" | openssl dgst -sha256 -binary | base64 | tr -d '\n')
CANONICAL_REQUEST="POST
/v1/actions/store/update-store
$TIMESTAMP
$BODY_HASH"
SIGNATURE=$(echo -n "$CANONICAL_REQUEST" | openssl dgst -sha256 -sign private_key.pem | base64 | tr -d '\n')
curl -X POST "https://api.waffo.ai/v1/actions/store/update-store" \
-H "Content-Type: application/json" \
-H "X-Merchant-Id: $MERCHANT_ID" \
-H "X-Timestamp: $TIMESTAMP" \
-H "X-Signature: $SIGNATURE" \
-d "$BODY"
MERCHANT_ID="MER_2aUyqjCzEIiEcYMKj7TZtw"
TIMESTAMP=$(date +%s)
BODY='{"id":"STO_2aUyqjCzEIiEcYMKj7TZtw","name":"Updated Store Name","notificationSettings":{"notifyNewSubscriptions":false}}'
BODY_HASH=$(echo -n "$BODY" | openssl dgst -sha256 -binary | base64 | tr -d '\n')
CANONICAL_REQUEST="POST
/v1/actions/store/update-store
$TIMESTAMP
$BODY_HASH"
SIGNATURE=$(echo -n "$CANONICAL_REQUEST" | openssl dgst -sha256 -sign private_key.pem | base64 | tr -d '\n')
wget -qO- "https://api.waffo.ai/v1/actions/store/update-store" \
--header="Content-Type: application/json" \
--header="X-Merchant-Id: $MERCHANT_ID" \
--header="X-Timestamp: $TIMESTAMP" \
--header="X-Signature: $SIGNATURE" \
--post-data="$BODY"
成功レスポンス (200)
{
"data": {
"store": {
"id": "STO_2aUyqjCzEIiEcYMKj7TZtw",
"name": "Updated Store Name",
"status": "active",
"logo": null,
"supportEmail": null,
"website": null,
"slug": "my-digital-store-a1b2c3",
"prodEnabled": false,
"notificationSettings": {
"emailOrderConfirmation": true,
"emailSubscriptionConfirmation": true,
"emailSubscriptionCycled": true,
"emailSubscriptionCanceled": true,
"emailSubscriptionRevoked": true,
"emailSubscriptionPastDue": true,
"emailTrialStarted": true,
"emailTrialEnding": true,
"emailUpcomingCharge": true,
"notifyNewOrders": true,
"notifyNewSubscriptions": false,
"notifySubscriptionCanceled": true,
"notifySubscriptionEnded": true,
"notifySubscriptionPastDue": true,
"notifySubscriptionRenewed": true,
"notifySubscriptionUncanceled": true,
"notifySubscriptionUpdated": true,
"notifyChargeback": true
},
"checkoutSettings": {
"defaultDarkMode": false,
"light": {
"checkoutLogo": null,
"checkoutColorPrimary": "#000000",
"checkoutColorBackground": "#FFFFFF",
"checkoutColorCard": "#F5F5F5",
"checkoutColorText": "#1A1A1A",
"checkoutBorderRadius": "8px"
},
"dark": {
"checkoutLogo": null,
"checkoutColorPrimary": "#FFFFFF",
"checkoutColorBackground": "#1A1A1A",
"checkoutColorCard": "#2A2A2A",
"checkoutColorText": "#F5F5F5",
"checkoutBorderRadius": "8px"
}
},
"deletedAt": null,
"createdAt": "2026-01-15T10:30:00.000Z",
"updatedAt": "2026-01-15T11:00:00.000Z"
}
}
}
レスポンスフィールド
ストアの作成レスポンスフィールドと同じです。 認証フロー管理(🔒 このエンドポイントでは読み取り専用;レスポンスで返されるのみ):| フィールド | 型 | 説明 |
|---|---|---|
supportEmail | string | null | ストアサポートメール。サポートメール認証フローによって書き込まれます |
website | string | null | ストアの製品 Web サイト URL。製品ドメイン認証フローによって書き込まれます |
supportEmail と website はこのエンドポイントでは設定できません。マーチャントがサポートメール認証または製品ドメイン認証を完了した時点で、本番が有効なストア(prodEnabled: true)に対して各認証フローが自動的に書き込みます。これらのフィールドを含めてリクエストしても 200 が返り、ストアは変更されず、warnings エントリも付きません —— フィールドは静かに破棄されます。webhookSettings 互換性警告
リクエストボディにwebhookSettings フィールドが含まれている場合、そのフィールドは黙って無視され、レスポンスのトップレベルに warnings 配列が含まれます。data.store オブジェクトには影響しません。
{
"data": { "store": { "...": "..." } },
"warnings": [
{
"message": "webhookSettings is no longer accepted on update-store; the field was ignored.",
"layer": "store",
"aiHint": "AI assistant: 'webhookSettings' is permanently removed (BREAKING 2026-05). Do not retry with this field. SDK users: upgrade to @waffo/pancake-ts >= 0.6.0 and call client.webhooks.add / update / remove instead of client.stores.update({ webhookSettings }). Direct API users: POST /api/actions/store/add-webhook to create a webhook, /update-webhook to modify, /remove-webhook to delete. Query the webhook list via GraphQL Store.storeWebhooks field, not via this endpoint."
}
]
}
エラー
リトライポリシー:4xx は一切リトライしない — リクエストを修正してから再送信。5xx は指数バックオフでリトライ(5s 開始、最大 3 回)。
| ステータス | errors[0].message | 意味 | 推奨処理 |
|---|---|---|---|
| 400 | Missing merchantId in request context | API Key がマーチャントコンテキストを解決できなかった | リトライしない。API Key 設定を確認。 |
| 400 | Missing required field: id | リクエストボディに id が含まれていない | 入力を修正して再送信。 |
| 400 | Expected format: STO_xxx, got "<value>" | id が有効な Store Short ID ではない | id を修正して再送信。 |
| 400 | Store name cannot be empty or contain only whitespace | trim() 後の name が空 | name を修正して再送信。 |
| 400 | Store name cannot exceed 48 characters | name が 48 文字を超える | name を短縮して再送信。 |
| 400 | Store name cannot contain control characters | name に制御文字が含まれる | 制御文字を削除して再送信。 |
| 400 | Invalid status, must be active, inactive or suspended | status が許可された列挙値ではない | active、inactive、suspended のいずれかを使用。 |
| 400 | Invalid logo: must be a string or null | logo が文字列でも null でもない | 文字列 URL もしくは null(クリア)を渡す。 |
| 403 | Not authorized to update this store | 当該ストアでの呼び出し元ロールが owner/admin ではない | リトライしない。権限のあるマーチャントを使用。 |
| 404 | Store not found | 当該マーチャント下に該当ストア ID が存在しない | リトライしない。id を確認。 |