営業時間と例外日を置き換える
PATCH
/api/v1/settings/hours
const url = 'https://app.goyoka.com/api/v1/settings/hours';const options = { method: 'PATCH', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"days":[{"weekday":1,"ranges":[{"start_time":"example","end_time":"example"}]}],"settings":{"buffer_before_minutes":1,"buffer_after_minutes":1,"slot_granularity_minutes":1,"min_notice_minutes":1,"max_advance_days":1},"overrides":[{"id":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","type":"CLOSED","start_date":"2026-04-15","end_date":"2026-04-15","start_time":"example","end_time":"example","label":"example","location_name":"example","location_address":"example","access_note":"example"}]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url https://app.goyoka.com/api/v1/settings/hours \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "days": [ { "weekday": 1, "ranges": [ { "start_time": "example", "end_time": "example" } ] } ], "settings": { "buffer_before_minutes": 1, "buffer_after_minutes": 1, "slot_granularity_minutes": 1, "min_notice_minutes": 1, "max_advance_days": 1 }, "overrides": [ { "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "type": "CLOSED", "start_date": "2026-04-15", "end_date": "2026-04-15", "start_time": "example", "end_time": "example", "label": "example", "location_name": "example", "location_address": "example", "access_note": "example" } ] }'days は 7 曜日を
409 SETTINGS_OPERATION_BLOCKEDの
必要なsalon-settings:write
必要な認証
「必要なパラメータ
「 パラメータ 」のヘッダーのパラメータ
「ヘッダーのIdempotency-Key
string
同じ
リクエスト本文必須
「リクエスト本文必須」のメディアタイプapplication/json
object
days
必須
Array<object>
object
weekday
必須
integer
ranges
必須
Array<object>
object
start_time
必須
string
end_time
必須
string
settings
object
buffer_before_minutes
必須
integer
buffer_after_minutes
必須
integer
slot_granularity_minutes
必須
integer
min_notice_minutes
必須
integer
max_advance_days
必須
integer
overrides
Array<object>
object
id
string 形式: uuid
type
必須
string
start_date
必須
string 形式: date
end_date
string | null 形式: date
start_time
string | null
end_time
string | null
label
string | null
location_name
string | null
location_address
string | null
access_note
string | null
レスポンス
「 レスポンス 」の200
「200」の営業時間と
メディアタイプapplication/json
object
data
必須
object
days
必須
Array<object>
object
weekday
必須
integer
ranges
必須
Array<object>
object
start_time
必須
string | null
end_time
必須
string | null
settings
必須
object
buffer_before_minutes
必須
integer
buffer_after_minutes
必須
integer
slot_granularity_minutes
必須
integer
min_notice_minutes
必須
integer
max_advance_days
必須
integer
overrides
必須
Array<object>
object
id
必須
string 形式: uuid
type
必須
string
start_date
必須
string 形式: date
end_date
必須
string 形式: date
start_time
必須
string | null
end_time
必須
string | null
label
必須
string | null
location_name
必須
string | null
location_address
必須
string | null
access_note
必須
string | null
例
{ "data": { "overrides": [ { "type": "CLOSED" } ] }}400
「400」の利用できない
メディアタイプ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" }}401
「401」の鍵が
メディアタイプ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" }}403
「403」の範囲不足
メディアタイプ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" }}404
「404」の見つからない
メディアタイプ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" }}409
「409」の予約・冪等キーの
メディアタイプ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" }}413
「413」の本文が
メディアタイプ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" }}422
「422」の入力の
メディアタイプ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" }}429
「429」の回数の
メディアタイプ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
固定窓内の
RateLimit-Remaining
integer
固定窓内の
RateLimit-Reset
integer
窓終了までの
Retry-After
integer
再試行までの
500
「500」の内部エラー
メディアタイプ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" }}