コンテンツにスキップ

予約規約の下書きを保存する

PATCH
/api/v1/settings/legal/booking-terms
curl --request PATCH \
--url https://app.goyoka.com/api/v1/settings/legal/booking-terms \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "free_cancel_value": 1, "free_cancel_unit": "example", "late_cancel_fee_kind": "example", "late_cancel_percentage": 1, "late_cancel_fixed_yen": 1, "no_show_fee_kind": "example", "no_show_percentage": 1, "no_show_fixed_yen": 1, "event_cancel_separate": true, "event_free_cancel_value": 1, "event_free_cancel_unit": "example", "event_late_cancel_fee_kind": "example", "event_late_cancel_percentage": 1, "event_late_cancel_fixed_yen": 1, "event_no_show_fee_kind": "example", "event_no_show_percentage": 1, "event_no_show_fixed_yen": 1, "reschedule_deadline_hours": 1, "reschedule_max_count": 1, "application_note": "example", "cancellation_note": "example", "no_show_note": "example", "salon_cancellation_note": "example", "lateness_note": "example", "refund_note": "example", "custom_notes": "example", "disclaimer_industries": [ "example" ] }'

省略した欄は保持し、null⁠は解除、disclaimer_industries⁠の空配列は免責追記の選択を解除します。空PATCH⁠と保存値の完全一致・正規化後の同値は保存しません。現在のメンバーだけが使え、任意の冪等キーを使えます。保存競合は409 SETTINGS_OPERATION_BLOCKED⁠で、details.blocks[].code⁠はCONCURRENT_UPDATE⁠です。GET⁠で読み直してから同じ要求をやり直してかまいません。公開済みのお店では下書きの保存はお客様に効かず、legal:publish⁠による公開後に新しい予約へ適用されます。一度も公開していないお店では、条件の欄(refund_note⁠を含む)が保存の時点で新しい予約に効くため、条件の実変更だけ追加のlegal:publish⁠が要ります。本文だけの追記には追加scope⁠は不要です。条件は新しい予約の確定メール本文と返金予定額にも反映されます。この操作のメール0通、過去の予約・同意記録は不変です。応答は変更の有無と公開版の識別情報だけです。

予約確認メールの版固定URL⁠は変えません。409 SETTINGS_OPERATION_BLOCKED⁠のdetails.blocks⁠はcode⁠とmessage⁠の1要素配列です。

必要な範囲: salon-settings:write

ヘッダーのパラメータ

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

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

メディアタイプapplication/json
object
free_cancel_value
number | null
free_cancel_unit
string | null
late_cancel_fee_kind
string
late_cancel_percentage
number | null
late_cancel_fixed_yen
number | null
no_show_fee_kind
string
no_show_percentage
number | null
no_show_fixed_yen
number | null
event_cancel_separate
boolean
event_free_cancel_value
number | null
event_free_cancel_unit
string | null
event_late_cancel_fee_kind
string
event_late_cancel_percentage
number | null
event_late_cancel_fixed_yen
number | null
event_no_show_fee_kind
string
event_no_show_percentage
number | null
event_no_show_fixed_yen
number | null
reschedule_deadline_hours
number | null
reschedule_max_count
number | null
application_note
string | null
cancellation_note
string | null
no_show_note
string | null
salon_cancellation_note
string | null
lateness_note
string | null
refund_note
string | null
custom_notes
string | null
disclaimer_industries
Array<string>
例自動生成
{
"free_cancel_value": 1,
"free_cancel_unit": "example",
"late_cancel_fee_kind": "example",
"late_cancel_percentage": 1,
"late_cancel_fixed_yen": 1,
"no_show_fee_kind": "example",
"no_show_percentage": 1,
"no_show_fixed_yen": 1,
"event_cancel_separate": true,
"event_free_cancel_value": 1,
"event_free_cancel_unit": "example",
"event_late_cancel_fee_kind": "example",
"event_late_cancel_percentage": 1,
"event_late_cancel_fixed_yen": 1,
"event_no_show_fee_kind": "example",
"event_no_show_percentage": 1,
"event_no_show_fixed_yen": 1,
"reschedule_deadline_hours": 1,
"reschedule_max_count": 1,
"application_note": "example",
"cancellation_note": "example",
"no_show_note": "example",
"salon_cancellation_note": "example",
"lateness_note": "example",
"refund_note": "example",
"custom_notes": "example",
"disclaimer_industries": [
"example"
]
}

予約規約の下書きを保存する

メディアタイプapplication/json
object
data
必須
object
kind
必須
string
取りうる値: SALON_PRIVACY BOOKING_TERMS TOKUSHO
changed
必須
boolean
published
必須
boolean
revision_id
必須
string | null 形式: uuid
published_version
必須
integer | null
> 0
published_at
必須
string | null 形式: date-time
例
{
"data": {
"kind": "SALON_PRIVACY"
}
}

利用できないヘッダ

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