コンテンツにスキップ

通常予約の担当・日時を変更する

POST
/api/v1/bookings/{id}/change
curl --request POST \
--url https://app.goyoka.com/api/v1/bookings/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/change \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "starts_at": "2026-04-15T12:00:00Z", "provider_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "consent": "ask_customer", "confirm_outside_hours": false }'

時刻が動くか、指名した担当者を替えるときはお客様の承認を待ちます。おまかせの担当者だけを替えるとき、またはconsent:already_agreed⁠ならすぐ変更します。メールアドレスの無いお客様には提案できません。提案の期限は24時間後と変更前後の開始時刻のうち早い時刻です。残り15分未満になる提案は作らず422 BOOKING_INPUT_INVALID⁠を返します。承認までは元の予約を保ち、新しい枠の差分だけを押さえます。課金スイッチがOFF⁠の間、開始月をまたぐ変更は行き先の月の予約数上限に達すると409 MONTHLY_BOOKING_LIMIT_REACHED⁠で止まります。営業時間外は422 OUTSIDE_HOURS⁠を返し、確認したうえでconfirm_outside_hours:true⁠を指定して送り直せます。業務入力エラーは422 BOOKING_INPUT_INVALID⁠でmessage⁠に理由を返し、埋まった枠は409 SLOT_TAKEN⁠です。

必要な範囲: booking:write

id
必須
string 形式: uuid

ヘッダーのパラメータ

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

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

メディアタイプapplication/json
object
starts_at
必須
string 形式: date-time
provider_id
string 形式: uuid
consent
string
既定値: ask_customer
取りうる値: ask_customer already_agreed
confirm_outside_hours
boolean

通常予約の担当・日時を変更する

メディアタイプapplication/json
object
data
必須
どれか1⁠つ:
object
result
必須
string
取りうる値: proposed
expires_at
必須
string 形式: date-time
delivery
必須
string
例
{
"data": {
"result": "proposed"
}
}

利用できないヘッダ

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