コンテンツにスキップ

営業時間と例外日を読む

GET
/api/v1/settings/hours
curl --request GET \
--url https://app.goyoka.com/api/v1/settings/hours \
--header 'Authorization: Bearer <token>'

曜日 0(日曜)から 6(土曜)の 7 日を返します。休業曜日の ranges は空配列、未設定の settings は null。例外日は開始日・ID 順です。

必要な範囲: salon-settings:read

営業時間と例外日を読む

メディアタイプapplication/json
object
data
必須
object
days
必須
Array<object>
object
weekday
必須
integer
<= 6
ranges
必須
Array<object>
object
start_time
必須
string | null
/^([01]\d|2[0-3]):[0-5]\d$/
end_time
必須
string | null
/^([01]\d|2[0-3]):[0-5]\d$/
settings
必須
object
buffer_before_minutes
必須
integer
<= 240
buffer_after_minutes
必須
integer
<= 240
slot_granularity_minutes
必須
integer
>= 5 <= 120
min_notice_minutes
必須
integer
max_advance_days
必須
integer
>= 1 <= 365
overrides
必須
Array<object>
object
id
必須
string 形式: uuid
type
必須
string
取りうる値: CLOSED CUSTOM_HOURS TRIP
start_date
必須
string 形式: date
end_date
必須
string 形式: date
start_time
必須
string | null
/^([01]\d|2[0-3]):[0-5]\d$/
end_time
必須
string | null
/^([01]\d|2[0-3]):[0-5]\d$/
label
必須
string | null
120文字以下
location_name
必須
string | null
120文字以下
location_address
必須
string | null
300文字以下
access_note
必須
string | null
2000文字以下
例
{
"data": {
"overrides": [
{
"type": "CLOSED"
}
]
}
}

利用できないヘッダ

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