コンテンツにスキップ

開催回の一覧

GET
/api/v1/events/{id}/occurrences
curl --request GET \
--url 'https://app.goyoka.com/api/v1/events/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/occurrences?status=SCHEDULED&limit=50' \
--header 'Authorization: Bearer <token>'

開始日時・ID⁠の昇順。期間は開始日時がfrom以上・to未満の半開区間です。from省略時はお店のタイムゾーンの今日00:00以降で、今日の終了済みの回も含みます。to省略時は上限なし。status省略時は全状態を返します。taken_count⁠は顧客の重複を除いた人数で、短期hold⁠を含まず、購入可能な残席を保証しません。limit⁠は既定50・最大200、next_cursor⁠がnull⁠なら終端です。親イベントの公開範囲・状態・アーカイブで絞りません。親不明は404、該当する回がなければ空一覧です。

必要な範囲: events:read

id
必須
string 形式: uuid
from
string 形式: date-time
to
string 形式: date-time
status
string
取りうる値: SCHEDULED CANCELLED COMPLETED
cursor
string
limit
integer
既定値: 50 >= 1 <= 200

開催回の一覧

メディアタイプapplication/json
object
data
必須
Array<object>
object
id
必須
string 形式: uuid
event_id
必須
string 形式: uuid
status
必須
string
取りうる値: SCHEDULED CANCELLED COMPLETED
starts_at
必須
string 形式: date-time
ends_at
必須
string 形式: date-time
capacity
必須
integer | null
taken_count
必須

鍵やトークンによってはnull

integer | null
facility_unit_ids
必須

この開催日で使う設備の ID。null はすべての設備(貸し切り)。

Array<string> | null
next_cursor
必須
string | null
例
{
"data": [
{
"status": "SCHEDULED"
}
]
}

利用できないヘッダ

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