コンテンツにスキップ

予約の公開範囲を変更する

PATCH
/api/v1/settings/safety
curl --request PATCH \
--url https://app.goyoka.com/api/v1/settings/safety \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "visibility": "example" }'

visibility⁠はPUBLIC・PER_SERVICE・MEMBERS_ONLY⁠です。省略と完全一致は業務検査より先に200⁠で返し保存しません。設定行なしのPUBLIC⁠も同じです。行がないときの変更は409 SETTINGS_OPERATION_BLOCKED(BOOKING_NOT_SET_UP)、保存対象列の競合は409 SETTINGS_OPERATION_BLOCKED(details.blocks[].code:CONCURRENT_UPDATE)です。

409 SETTINGS_OPERATION_BLOCKED⁠のdetails.blocks⁠はcode⁠とmessage⁠の1要素配列です。競合したら設定を読み直してください。公開の空き枠と予約ページの案内に反映します。MEMBERS_ONLY⁠では台帳のお客様だけが予約でき、PUBLIC・PER_SERVICE⁠でもメニューのお客様限定設定は効きます。MEMBERS_ONLY⁠はご案内ページ全体を非公開にする設定ではなく、紹介文やアクセスが公開のままの場合があります。既存のsearchable⁠は変えません。既存予約・購読・同意は変えず、保存時にメールは送りません。API の手動予約(booking_create)はこの制限を受けません。鍵やトークンの持ち主が現在このお店のメンバーでないと、同値の送信でも409 SETTINGS_OPERATION_BLOCKED(details.blocks[].code:NOT_CURRENT_MEMBER)です。任意の冪等キーを使えます。

必要な範囲: salon-settings:write

ヘッダーのパラメータ

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

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

メディアタイプapplication/json
object
visibility
string
例自動生成
{
"visibility": "example"
}

予約の公開範囲を変更する

メディアタイプapplication/json
object
data
必須
object
visibility
必須
string
例自動生成
{
"data": {
"visibility": "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"
}
}

予約・冪等キーの競合

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