コンテンツにスキップ

開催回を中止する

POST
/api/v1/events/{id}/occurrences/{occId}/cancel
curl --request POST \
--url https://app.goyoka.com/api/v1/events/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/occurrences/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/cancel \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "notify": true }'

開催回を中止し、占有を解放する。notify⁠は省略時にtrue⁠として扱い、参加者へ既存の中止通知を送る。notify:false⁠でも状態変更と枠解放は行う。既に中止済みでも200⁠で開催回を返す。日時・定員・受付期間を変えるだけなら、events_occurrences_replace⁠でその回のid⁠を付けて直せます(中止して作り直すと、公開ページに中止の回と新しい回が並びます)。申し込みが1件も無いまま中止した回は公開ページの一覧に出ません。

アーカイブ済み・他店・指定イベントや開催回への帰属違いは404 NOT_FOUND⁠で、書き込みも通知もしません。

必要な範囲: events:write

id
必須
string 形式: uuid
occId
必須
string 形式: uuid

ヘッダーのパラメータ

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

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

メディアタイプapplication/json
object
notify
boolean
例自動生成
{
"notify": true
}

開催回を中止する

メディアタイプapplication/json
object
data
必須
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
venue
必須
object
location_name
必須
string | null
location_address
必須
string | null
online_url
必須
string | null
providers
必須
Array<object>
object
id
必須
string 形式: uuid
name
必須
string
starts_at
必須
string 形式: date-time
ends_at
必須
string 形式: date-time
menus
必須
Array<object>
object
id
必須
string 形式: uuid
event_menu_id
必須
string 形式: uuid
name
必須
string
capacity
必須
integer | null
> 0
starts_at
必須
string | null 形式: date-time
ends_at
必須
string | null 形式: date-time
opens_at
必須

この日だけの受付開始。reception_overridden⁠がfalse⁠ならnull

string | null 形式: date-time
closes_at
必須

この日だけの受付締切。reception_overridden⁠がfalse⁠ならnull

string | null 形式: date-time
cancel_deadline_at
必須
string | null 形式: date-time
reception_overridden
必須

true⁠はこの日だけの受付期間(opens_at・closes_at、null⁠はその側の制限なし)。false⁠はイベントのreception_default⁠に従う

boolean
effective_opens_at
必須

実際に効く受付開始(上書きか標準)。null⁠は制限なし

string | null 形式: date-time
effective_closes_at
必須

実際に効く受付締切(上書きか標準)。null⁠は制限なし

string | null 形式: date-time
例
{
"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"
}
}