コンテンツにスキップ

イベントの確定の方式と期限を置き換える

PUT
/api/v1/events/{id}/confirmation
curl --request PUT \
--url https://app.goyoka.com/api/v1/events/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/confirmation \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "confirmation_mode": "IMMEDIATE", "confirmation_window_hours": 1 }'

確定の方式(即時・承認・入金確認)と期限(24・48・72・120・168時間)。メール確認前の申し込みは、確認した時点の方式で確定する。承認待ち以降の予約は、申し込み時の方式・期限・送信済みのメールが変わらない。2欄全部を置き換える。読んだ保存値をそのまま戻すと、候補外の既存期限も無変更。変更時の候補外の期限は422 VALIDATION⁠です。アーカイブ済み・他店・不明なID⁠は404⁠です。任意の冪等キーを使えます。

PUT⁠にはGET⁠のdata⁠からconfirmation_mode⁠とconfirmation_window_hours⁠の2欄をすべて戻します。方式はIMMEDIATE・APPROVAL・PAYMENT⁠です。

設定を変えても、既存予約の期限や通知は変更しない(承認・取消し・期限の再計算をしない)。メールは0通です。お店の予約フォーム標準と待機案内の方式・回答期限は管理画面で設定します。

型違い・必須欄の欠落は、REST⁠では422 VALIDATION(details.fieldErrors⁠の最上位の欄名を確認)、MCP⁠ではツールの入力検査のエラー文を返します。候補外の期限を変更する業務エラーは、MCP⁠でもstructuredContent.error⁠にVALIDATION⁠とdetails.fieldErrors⁠を返します。

必要な範囲: events:write

id
必須
string 形式: uuid

ヘッダーのパラメータ

「ヘッダーのパラメータ」の節へ
Idempotency-Key
string

同じ内容の再送に同じ値を使います。異なる内容との再利用や処理中の再送は409 IDEMPOTENCY_KEY_REUSED⁠です。

メディアタイプapplication/json
object
confirmation_mode
必須
string
取りうる値: IMMEDIATE APPROVAL PAYMENT
confirmation_window_hours
必須
integer

イベントの確定の方式と期限を置き換える

メディアタイプapplication/json
object
data
必須
object
confirmation_mode
必須
string
取りうる値: IMMEDIATE APPROVAL PAYMENT
confirmation_window_hours
必須
integer
例
{
"data": {
"confirmation_mode": "IMMEDIATE"
}
}

利用できないヘッダ

メディアタイプapplication/json
object
error
必須
object
code
必須
string
message
必須
string
details
object
任意のキー
追加の項目
request_id
必須
string
例自動生成
{
"error": {
"code": "example",
"message": "example",
"details": {
"additionalProperty": "example"
},
"request_id": "example"
}
}

鍵が無い・無効

メディアタイプapplication/json
object
error
必須
object
code
必須
string
message
必須
string
details
object
任意のキー
追加の項目
request_id
必須
string
例自動生成
{
"error": {
"code": "example",
"message": "example",
"details": {
"additionalProperty": "example"
},
"request_id": "example"
}
}

範囲不足

メディアタイプapplication/json
object
error
必須
object
code
必須
string
message
必須
string
details
object
任意のキー
追加の項目
request_id
必須
string
例自動生成
{
"error": {
"code": "example",
"message": "example",
"details": {
"additionalProperty": "example"
},
"request_id": "example"
}
}

見つからない

メディアタイプapplication/json
object
error
必須
object
code
必須
string
message
必須
string
details
object
任意のキー
追加の項目
request_id
必須
string
例自動生成
{
"error": {
"code": "example",
"message": "example",
"details": {
"additionalProperty": "example"
},
"request_id": "example"
}
}

予約・冪等キーの競合

メディアタイプapplication/json
object
error
必須
object
code
必須
string
message
必須
string
details
object
任意のキー
追加の項目
request_id
必須
string
例自動生成
{
"error": {
"code": "example",
"message": "example",
"details": {
"additionalProperty": "example"
},
"request_id": "example"
}
}

本文が1 MiB⁠を超えている

メディアタイプapplication/json
object
error
必須
object
code
必須
string
message
必須
string
details
object
任意のキー
追加の項目
request_id
必須
string
例自動生成
{
"error": {
"code": "example",
"message": "example",
"details": {
"additionalProperty": "example"
},
"request_id": "example"
}
}

入力の検証失敗

メディアタイプapplication/json
object
error
必須
object
code
必須
string
message
必須
string
details
object
任意のキー
追加の項目
request_id
必須
string
例自動生成
{
"error": {
"code": "example",
"message": "example",
"details": {
"additionalProperty": "example"
},
"request_id": "example"
}
}

回数の上限

メディアタイプapplication/json
object
error
必須
object
code
必須
string
message
必須
string
details
object
任意のキー
追加の項目
request_id
必須
string
例自動生成
{
"error": {
"code": "example",
"message": "example",
"details": {
"additionalProperty": "example"
},
"request_id": "example"
}
}
RateLimit-Limit
integer
>= 1

固定窓内の回数上限

RateLimit-Remaining
integer

固定窓内の残り回数

RateLimit-Reset
integer

窓終了までの秒数

Retry-After
integer
>= 1

再試行までの待機秒数

内部エラー

メディアタイプapplication/json
object
error
必須
object
code
必須
string
message
必須
string
details
object
任意のキー
追加の項目
request_id
必須
string
例自動生成
{
"error": {
"code": "example",
"message": "example",
"details": {
"additionalProperty": "example"
},
"request_id": "example"
}
}