メインコンテンツへスキップ
既存ストアの名前、ステータス、または設定を更新します。リクエストボディに含まれたフィールドのみが更新され、省略されたフィールドは変更されません。
POST /v1/actions/store/update-store
認証: API Key(owner または admin ロールが必要)
本エンドポイントは Webhook 設定を管理しません。リクエストボディに webhookSettings フィールドが含まれている場合、そのフィールドは黙って無視され、レスポンスのトップレベルに warnings 配列が付加されます。他のフィールドは通常どおり更新され、200 が返されます。Webhook の設定は add-webhookupdate-webhookremove-webhook を使用し、一覧取得は GraphQL Store.storeWebhooks を利用してください。

リクエストボディ

フィールド必須説明
idstringYesStore ID(Short ID フォーマット STO_xxx
namestringNo更新後のストア名(1-48 文字)
statusstringNoactiveinactive、または suspended
logostring | nullNoストアロゴ URL(null で削除)
supportEmailstring | nullNoストアサポートメール(null で削除)
websitestring | nullNoストア Web サイト URL(null で削除)
notificationSettingsobject | nullNo通知設定(null で削除)
checkoutSettingsobject | nullNoチェックアウトテーマ設定(null で削除)

通知設定

書き込み権限により 2 グループに分かれます: マーチャント書き込み可能(✅ このエンドポイントで受け付け):
フィールドデフォルト説明
notifyNewOrdersbooleantrue新規注文をマーチャントに通知
notifyNewSubscriptionsbooleantrue新規サブスクリプションをマーチャントに通知
notifySubscriptionCanceledbooleantrueサブスクリプションキャンセル(ユーザー解約、アクセス期間内)をマーチャントに通知
notifySubscriptionEndedbooleantrueサブスクリプション終了時にマーチャントに通知
notifySubscriptionPastDuebooleantrueサブスクリプションが past_due(支払失敗)になった際にマーチャントに通知
notifySubscriptionRenewedbooleantrueサブスクリプション更新成功時にマーチャントに通知
notifySubscriptionUncanceledbooleantrueキャンセル後に復帰した際にマーチャントに通知
notifySubscriptionUpdatedbooleantrueサブスクリプションのプラン変更時にマーチャントに通知(forward-compat)
notifyChargebackbooleantrueチャージバック発生時にマーチャントに通知(forward-compat)
notifyPayoutCompletedbooleantrue出金完了時にマーチャントに通知(forward-compat)
notifyPayoutFailedbooleantrue出金失敗時にマーチャントに通知(forward-compat)
プラットフォーム管理(🔒 マーチャント API では読み取り専用;PANCAKE プラットフォームが管理):
フィールドデフォルト説明
emailOrderConfirmationbooleantrue注文確認時にメールを送信
emailSubscriptionConfirmationbooleantrueサブスクリプション作成時にメールを送信
emailSubscriptionCycledbooleantrueサブスクリプション更新時にメールを送信
emailSubscriptionCanceledbooleantrueサブスクリプションキャンセル時にメールを送信
emailSubscriptionRevokedbooleantrueサブスクリプション失効時にメールを送信
emailSubscriptionPastDuebooleantrueサブスクリプション滞納時にメールを送信
emailTrialStartedbooleantrue無料トライアル開始時にメールを送信
emailTrialEndingbooleantrueトライアル終了前にリマインダーメールを送信
notificationSettings ペイロードに email* のプラットフォーム管理フィールドが含まれる場合、サーバーは静かに破棄し、200 レスポンスの warnings[] に破棄されたキーを返します。消費者メールの toggle 変更は PANCAKE プラットフォームサポートまでご連絡ください。

チェックアウト設定

フィールド説明
defaultDarkModebooleanデフォルトでダークモードにするかどうか
lightobjectライトテーマ設定(以下参照)
darkobjectダークテーマ設定(以下参照)
チェックアウトテーマ設定lightdark の両方に適用):
フィールド説明
checkoutLogostring | nullチェックアウトページのロゴ URL
checkoutColorPrimarystringプライマリカラー(16 進数)
checkoutColorBackgroundstring背景色(16 進数)
checkoutColorCardstringカード/パネル色(16 進数)
checkoutColorTextstringテキスト色(16 進数)
checkoutBorderRadiusstringボーダー半径(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 類)のみ送信できます。
  // 消費者向けメール toggle(emailOrderConfirmation 等の A 類)は
  // PANCAKE プラットフォームが管理しているため、ここで送信すると
  // サーバー側で静かに破棄され、200 warning が返ります。
  notificationSettings: {
    notifyNewOrders: true,
    notifyNewSubscriptions: false,
  },
});

成功レスポンス (200)

{
  "data": {
    "store": {
      "id": "STO_2aUyqjCzEIiEcYMKj7TZtw",
      "name": "Updated Store Name",
      "status": "active",
      "logo": 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,
        "notifyNewOrders": true,
        "notifyNewSubscriptions": false,
        "notifySubscriptionCanceled": true,
        "notifySubscriptionEnded": true,
        "notifySubscriptionPastDue": true,
        "notifySubscriptionRenewed": true,
        "notifySubscriptionUncanceled": true,
        "notifySubscriptionUpdated": true,
        "notifyChargeback": true,
        "notifyPayoutCompleted": true,
        "notifyPayoutFailed": 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"
    }
  }
}

レスポンスフィールド

ストアの作成レスポンスフィールドと同じです。

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意味推奨処理
400Missing merchantId in request contextAPI Key がマーチャントコンテキストを解決できなかったリトライしない。API Key 設定を確認。
400Missing required field: idリクエストボディに id が含まれていない入力を修正して再送信。
400Expected format: STO_xxx, got "<value>"id が有効な Store Short ID ではないid を修正して再送信。
400Store name cannot be empty or contain only whitespacetrim() 後の name が空name を修正して再送信。
400Store name cannot exceed 48 charactersname が 48 文字を超えるname を短縮して再送信。
400Invalid status, must be active, inactive or suspendedstatus が許可された列挙値ではないactiveinactivesuspended のいずれかを使用。
400Invalid logo: must be a string or nulllogo が文字列でも null でもない文字列 URL もしくは null(クリア)を渡す。
403Not authorized to update this store当該ストアでの呼び出し元ロールが owner/admin ではないリトライしない。権限のあるマーチャントを使用。
404Store not found当該マーチャント下に該当ストア ID が存在しないリトライしないid を確認。