コンテンツにスキップ

開催回のメニュー枠を更新する

PATCH
/api/v1/events/{id}/occurrences/{occId}/menus
curl --request PATCH \
--url https://app.goyoka.com/api/v1/events/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/occurrences/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/menus \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "rows": [ { "occurrence_menu_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "capacity": 1, "starts_at": "2026-04-15T12:00:00Z", "ends_at": "2026-04-15T12:00:00Z" } ] }'

指定行の定員と時間帯だけを更新します。開催回詳細のmenus[].id⁠をoccurrence_menu_id⁠に使います。省略は保持、null⁠は解除です。FIXED窓の制約を適用します。空配列は無更新です。他回のID⁠が1行でもあれば404⁠で何も保存しません。応答は指定行だけを入力順で返します。メニュー本体と未指定行は保持します。任意の冪等キーを使えます。

保存状態で拒否する変更は409 EVENT_EDIT_BLOCKED⁠です。details.blocks⁠は理由の配列で、code⁠で分岐しmessage⁠を表示します。

アーカイブ済みイベントは404 NOT_FOUND⁠です。

BOOKING_INPUT_INVALID⁠は、欄名を持つ業務エラーならdetails.fieldErrors、欄名がない場合はdetails⁠なしとなる経路もあります。MCP⁠でも業務エラーはstructuredContent.error⁠に返します。入力の形の誤りは、REST⁠では422 VALIDATION(details.fieldErrors)、MCP⁠ではツールの入力検査のエラー文を返します。

ハンドラ内で検査するoccurrence_menu_id⁠の重複は422 VALIDATION⁠です。これはMCP⁠でもstructuredContent.error⁠にcode:VALIDATION⁠とdetails.fieldErrors⁠を返します。

必要な範囲: events:write

id
必須
string 形式: uuid
occId
必須
string 形式: uuid

ヘッダーのパラメータ

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

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

メディアタイプapplication/json
object
rows
必須
Array<object>
object
occurrence_menu_id
必須
string 形式: uuid
capacity
integer | null
>= 1 <= 2147483647
starts_at
string | null 形式: date-time
ends_at
string | null 形式: date-time
例自動生成
{
"rows": [
{
"occurrence_menu_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"capacity": 1,
"starts_at": "2026-04-15T12:00:00Z",
"ends_at": "2026-04-15T12:00:00Z"
}
]
}

開催回のメニュー枠を更新する

メディアタイプapplication/json
object
data
必須
Array<object>
object
occurrence_menu_id
必須
string 形式: uuid
event_menu_id
必須
string 形式: uuid
capacity
必須
integer | null
>= 1 <= 2147483647
starts_at
必須
string | null 形式: date-time
ends_at
必須
string | null 形式: date-time
例自動生成
{
"data": [
{
"occurrence_menu_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"event_menu_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"capacity": 1,
"starts_at": "2026-04-15T12:00:00Z",
"ends_at": "2026-04-15T12:00:00Z"
}
]
}

利用できないヘッダ

メディアタイプ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"
}
}