認証済みマーチャント用の新しいストアを作成します。ストアスラッグは名前から自動生成され、JSONB 設定フィールド(webhookSettings、notificationSettings、checkoutSettings)はデフォルト値で初期化されます。
POST /v1/actions/store/create-store
認証: API Key
リクエストボディ
| フィールド | 型 | 必須 | 説明 |
|---|
name | string | はい | ストア名(1-48文字、自動トリム) |
リクエスト例
import { WaffoPancake } 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.create({ name: "My Digital Store" });
console.log(store.id); // => "STO_2aUyqjCzEIiEcYMKj7TZtw"
console.log(store.slug); // => "my-digital-store-a1b2c3"
成功レスポンス(200)
{
"data": {
"store": {
"id": "STO_2aUyqjCzEIiEcYMKj7TZtw",
"name": "My Digital Store",
"status": "active",
"logo": null,
"supportEmail": null,
"website": null,
"slug": "my-digital-store-a1b2c3",
"prodEnabled": false,
"webhookSettings": {
"testWebhookUrl": null,
"prodWebhookUrl": null,
"testEvents": [],
"prodEvents": []
},
"notificationSettings": {
"emailOrderConfirmation": true,
"emailSubscriptionConfirmation": true,
"emailSubscriptionCycled": true,
"emailSubscriptionCanceled": true,
"emailSubscriptionRevoked": true,
"emailSubscriptionPastDue": true,
"notifyNewOrders": true,
"notifyNewSubscriptions": 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-15T10:30:00.000Z"
}
}
}
レスポンスフィールド
| フィールド | 型 | 説明 |
|---|
id | string | ストア ID(Short ID 形式 STO_xxx) |
name | string | ストア表示名 |
status | string | ストアステータス(active、inactive、または suspended) |
logo | string | null | ストアロゴ URL |
supportEmail | string | null | サポートメールアドレス |
website | string | null | ストアウェブサイト URL |
slug | string | null | 自動生成された URL スラッグ |
prodEnabled | boolean | 本番モードが有効かどうか |
webhookSettings | object | null | Webhook 設定(Webhook 設定を参照) |
notificationSettings | object | null | 通知設定(通知設定を参照) |
checkoutSettings | object | null | チェックアウトページテーマ(チェックアウト設定を参照) |
deletedAt | string | null | 論理削除タイムスタンプ(ISO 8601)、有効な場合は null |
createdAt | string | 作成タイムスタンプ(ISO 8601) |
updatedAt | string | 最終更新タイムスタンプ(ISO 8601) |
エラーレスポンス
| ステータス | エラー | 説明 |
|---|
| 400 | Missing required field: name | リクエストボディに name が指定されていません |
| 400 | Store name cannot be empty | name が空文字列またはスペースのみです |
| 400 | Store name exceeds maximum length of 48 characters | トリム後の name が48文字を超えています |
| 400 | Maximum store limit reached (20) | マーチャントが既に20ストアを所有しています |
各マーチャントは最大 20ストアを作成できます。ストア作成者には自動的に owner ロールが割り当てられます。