コンテンツにスキップ

担当者の勤務時間を置き換える

PUT
/api/v1/providers/{id}/working-hours
curl --request PUT \
--url https://app.goyoka.com/api/v1/providers/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/working-hours \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "use_shop_hours": true, "weekly": [ { "weekday": 1, "start_time": "example", "end_time": "example" } ] }'

use_shop_hours⁠がtrue⁠ならお店の営業時間を使い、weekly⁠は保存しません。false⁠なら勤務する曜日を1⁠つ以上指定します。休みと既存予約は変更しません。鍵やトークンの持ち主が現在このお店のメンバーでないと、同値の送信でも409 SETTINGS_OPERATION_BLOCKED(details.blocks[].code:NOT_CURRENT_MEMBER)です。任意の冪等キーを使えます。

必要な範囲: providers:write

id
必須
string 形式: uuid

ヘッダーのパラメータ

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

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

メディアタイプapplication/json
object
use_shop_hours
必須
boolean
weekly
必須
Array<object>
object
weekday
必須
integer
<= 6
start_time
必須
string
/^([01]\d|2[0-3]):[0-5]\d$/
end_time
必須
string
/^([01]\d|2[0-3]):[0-5]\d$/
例自動生成
{
"use_shop_hours": true,
"weekly": [
{
"weekday": 1,
"start_time": "example",
"end_time": "example"
}
]
}

担当者の勤務時間を置き換える

メディアタイプapplication/json
object
data
必須
object
use_shop_hours
必須
boolean
weekly
必須
Array<object>
object
weekday
必須
integer
<= 6
start_time
必須
string
/^([01]\d|2[0-3]):[0-5]\d$/
end_time
必須
string
/^([01]\d|2[0-3]):[0-5]\d$/
time_off
必須
Array<object>
object
id
必須
string 形式: uuid
start_date
必須
string 形式: date
end_date
必須
string 形式: date
label
必須
string | null
例自動生成
{
"data": {
"use_shop_hours": true,
"weekly": [
{
"weekday": 1,
"start_time": "example",
"end_time": "example"
}
],
"time_off": [
{
"id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"start_date": "2026-04-15",
"end_date": "2026-04-15",
"label": "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"
}
}