コンテンツにスキップ

参加者にメニューを追加する

POST
/api/v1/events/{id}/occurrences/{occId}/participants/{bookingId}/menus
curl --request POST \
--url https://app.goyoka.com/api/v1/events/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/occurrences/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/participants/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/menus \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "occurrence_menu_ids": [ "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" ], "provider_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "starts_at_by_menu": { "additionalProperty": "2026-04-15T12:00:00Z" }, "notify": true }'

既存の参加者に同じ開催回のメニューを追加し、追加後の参加者を返します。starts_at_by_menu⁠は選択したメニューだけ指定できます。notify⁠の省略はfalse⁠です。notify:true⁠かつ予約のお客様にメールがある場合は、追加メニューと差額を通知します。customers:contact⁠がなくても追加できます。customer⁠はid⁠とname⁠だけ、contact⁠はemail⁠とphone⁠で、customers:contact⁠の許可がなければcontact全体がnull、許可があっても未登録の欄はnull⁠です。任意の冪等キーを使えます。

アーカイブ済み・他店・指定イベントや開催回や予約への帰属違いは404 NOT_FOUND⁠で、EVENT_EDIT_BLOCKED⁠は返しません。

業務入力エラーは422 BOOKING_INPUT_INVALID⁠で、details⁠は付かずmessage⁠で理由を説明します。

必要な範囲: events:write

customers:contact があるとメール・電話が入る(会話はメールのみ)。

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

ヘッダーのパラメータ

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

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

メディアタイプapplication/json
object
occurrence_menu_ids
必須
Array<string>
1件以上
provider_id
string | null 形式: uuid
starts_at_by_menu
object
任意のキー
追加の項目
string 形式: date-time
notify
boolean
例自動生成
{
"occurrence_menu_ids": [
"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"
],
"provider_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"starts_at_by_menu": {
"additionalProperty": "2026-04-15T12:00:00Z"
},
"notify": true
}

参加者にメニューを追加する

メディアタイプapplication/json
object
data
必須
object
booking_id
必須
string 形式: uuid
status
必須
string
取りうる値: PENDING AWAITING_APPROVAL APPROVED_PENDING_NOTICE CONFIRMED COMPLETED CANCELLED WITHDRAWN DECLINED EXPIRED
attendance
必須
string
取りうる値: UNSET ATTENDED NO_SHOW
customer
必須
object
id
必須
string 形式: uuid
name
必須
string
contact
必須
object
email
必須
string | null
phone
必須
string | null
items
必須
Array<object>
object
id
必須
string 形式: uuid
status
必須
string
取りうる値: HELD CONFIRMED WAITLISTED OFFERED CANCELLED
live
必須
boolean
menu_name
必須
string
starts_at
必須
string 形式: date-time
provider
必須
object
id
必須
string 形式: uuid
name
必須
string | null
price_yen
必須
integer
due_yen
必須

生きた明細ぶんの合計金額。既存の変更・取消し台帳を反映し、取消済み履歴のprice_yen⁠を単純加算しない。

integer
paid_yen
必須
integer
created_at
必須
string 形式: date-time
例
{
"data": {
"status": "PENDING",
"attendance": "UNSET",
"items": [
{
"status": "HELD"
}
]
}
}

利用できないヘッダ

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