コンテンツにスキップ

メニューを棚から外す

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

catalogs を省略すると現在の全棚から外します。最後の棚を外した時だけアーカイブします。既存予約は残ります。他店・不明・アーカイブ済み ID は 404。未配置の棚を指定した場合は無視する(removed=false)。

必要な範囲: services:write

id
必須
string 形式: uuid

ヘッダーのパラメータ

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

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

メディアタイプapplication/json
object
catalogs
Array<string>
1件以上 2件以下
取りうる値: SESSION EVENT

メニューを棚から外す

メディアタイプapplication/json
object
data
必須
object
id
必須
string 形式: uuid
name
必須
string
description
必須
string | null
duration_minutes
必須
integer
price_yen
必須
integer
delivery_mode
必須

受け方。IN_PERSON=対面、ONLINE=オンライン、REMOTE=リモート(会わずに受けるもの)。

string
取りうる値: IN_PERSON ONLINE REMOTE
facility_type_id
必須

いつもの場所で使う設備の種類の ID。いつもの場所が無い場合と設備を使わない場合は null。

string | null 形式: uuid
places
必須

受ける場所。並びは場所の設定順、同順なら ID 順。借りている設備の facility_type_id は null。

Array<object>
object
id
必須
string 形式: uuid
kind
必須
string
取りうる値: SHOP LEASED
name
必須
string
facility_type_id
必須
string | null 形式: uuid
is_public
必須
boolean
catalogs
必須
Array<string>
取りうる値: SESSION EVENT
category_ids
必須

全カタログの未アーカイブの MANUAL カテゴリへの明示所属。重複なしの ID 昇順。SMART の動的所属は含まない。

Array<string>
sort_order
必須

Service.sortOrder(メニュー自体の並び順)。棚ごとの placement の並び順とは異なります。

integer
archived_at
必須
string | null 形式: date-time
created_at
必須
string 形式: date-time
updated_at
必須
string 形式: date-time
例
{
"data": {
"delivery_mode": "IN_PERSON",
"places": [
{
"kind": "SHOP"
}
],
"catalogs": [
"SESSION"
]
}
}

利用できないヘッダ

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