コンテンツにスキップ

棚の一階層を並べ替える

PUT
/api/v1/service-catalog/order
curl --request PUT \
--url https://app.goyoka.com/api/v1/service-catalog/order \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "catalog": "SESSION", "parent_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "nodes": [ { "kind": "category", "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" } ], "expected_order_hash": "example" }'

棚順の GET で受け取った全 nodes と order_hash を送ります。箱は箱 ID、メニューは一覧の Service ID を使います。欠落や重複、別棚の ID は 422、集合の不足は 409 MENU_EDIT_BLOCKED(ORDER_MISMATCH)、古い hash は 409 SETTINGS_OPERATION_BLOCKED(CONCURRENT_UPDATE)です。同じ順なら保存しません。並び替えた箱の updated_at は進み、古い token での箱の更新は 409 になります。鍵やトークンの持ち主が現在このお店のメンバーでないと、同値の送信でも409 SETTINGS_OPERATION_BLOCKED(details.blocks[].code:NOT_CURRENT_MEMBER)です。任意の冪等キーを使えます。

必要な範囲: services:write

ヘッダーのパラメータ

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

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

メディアタイプapplication/json
object
catalog
必須
string
取りうる値: SESSION EVENT
parent_id
必須
string | null 形式: uuid
nodes
必須
Array<object>
object
kind
必須
string
取りうる値: category service
id
必須
string 形式: uuid
expected_order_hash
必須
string
/^[a-f0-9]{64}$/

棚の一階層を並べ替える

メディアタイプapplication/json
object
nodes
必須
Array<object>
object
kind
必須
string
取りうる値: category service
id
必須
string 形式: uuid
order_hash
必須
string
例
{
"nodes": [
{
"kind": "category"
}
]
}

利用できないヘッダ

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