コンテンツにスキップ

イベントのメニュー順を変更する

PUT
/api/v1/events/{id}/menus/order
curl --request PUT \
--url https://app.goyoka.com/api/v1/events/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/menus/order \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "menu_ids": [ "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" ] }'

GET /events/{id}/menus⁠で読んだ全メニューのID⁠をmenu_ids⁠へ希望の順で送ってください。UUID⁠の大小文字だけ違う重複も422 VALIDATION(details.fieldErrors.menu_ids)です。別イベント・他店・消失したメニューや開催回メニューのID⁠はdetails⁠なしの404 NOT_FOUND⁠です。同じID順ならdisplay_order⁠が飛び飛びでも書き込みません。変更するのはdisplay_order⁠だけで、名前・価格・箱への所属・選択条件・既存予約は変えません。箱(カテゴリ)の中の並びはdisplay_order⁠で変わりますが、箱は子孫メニューの最小display_order⁠の位置にまとまって出ます。箱をまたいで交互に並べても箱は割れません。各階層で同点は箱が先、空箱は表示しません。アーカイブ済みは404⁠です。任意の冪等キーを使えます。

ID⁠の欠けや保存時までの集合変更は409 EVENT_EDIT_BLOCKED(details.blocks[].code:MENU_ORDER_MISMATCH)なので、全メニューを読み直し全ID⁠を送ってください。空のイベントへmenu_ids:[]を送ると無変更の200⁠です。

必要な範囲: events:write

id
必須
string 形式: uuid

ヘッダーのパラメータ

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

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

メディアタイプapplication/json
object
menu_ids
必須
Array<string>
例自動生成
{
"menu_ids": [
"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"
]
}

イベントのメニュー順を変更する

メディアタイプapplication/json
object
data
必須
Array<object>
object
id
必須
string 形式: uuid
service_id
必須
string | null 形式: uuid
name
必須
string
1文字以上 120文字以下
price_yen
必須
integer
<= 2147483647
duration_minutes
必須
integer
>= 1 <= 2147483647
timing_mode
必須
string
取りうる値: FIXED INDIVIDUAL
required
必須
boolean
display_order
必須
integer
>= -2147483648 <= 2147483647
buffer_before_minutes
必須
integer
<= 2147483647
buffer_after_minutes
必須
integer
<= 2147483647
menu_category
必須
object
id
必須
string 形式: uuid
name
必須
string
60文字以下
open_by_default
必須
boolean
sort_order
必須
integer
>= -2147483648 <= 2147483647
parent_id
string | null 形式: uuid
selection_group_id
必須
string | null 形式: uuid
menu_category_source
必須
string
取りうる値: LEDGER EVENT
例
{
"data": [
{
"timing_mode": "FIXED"
}
],
"menu_category_source": "LEDGER"
}

利用できないヘッダ

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