コンテンツにスキップ

イベントの基本情報を更新する

PATCH
/api/v1/events/{id}
curl --request PATCH \
--url https://app.goyoka.com/api/v1/events/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0 \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "sender_profile_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "slug": "example", "title": "example", "description": "example", "visibility": "PUBLIC", "display_mode": "LIST", "delivery_mode": "IN_PERSON", "location_name": "example", "location_address": "example", "online_url": "example", "address_visibility": "PUBLIC", "payment_note": "example", "reception_default": { "opens_before_minutes": 1, "closes_before_minutes": 1 } }'

slug/title/visibility/display_mode/delivery_mode⁠の5欄は必須。任意欄は省略で保持し、null⁠を受ける欄はnull⁠で消去、値で上書きしますが、address_visibility⁠はnull⁠を受けません。reception_default(受付期間の標準。開催の何分前に受付を始める・締め切るか、null⁠は制限なし)は省略で保持し、送ると2欄とも置き換えます。この日だけの受付期間にした開催回(reception_overridden)には効きません。sender_profile_id⁠は自店の差出人だけを指定できる。メニュー・質問・開催回・公開状態は変更しない。応答は既存のイベント概要で、description⁠やpayment_note等の保存欄は含まない。

アーカイブ済み・他店・不明なイベントは404 NOT_FOUND⁠で、書き込みも通知もしません。

必要な範囲: events:write

id
必須
string 形式: uuid

ヘッダーのパラメータ

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

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

メディアタイプapplication/json
object
sender_profile_id
string | null 形式: uuid
slug
必須
string
1文字以上 63文字以下 /^[a-z0-9-]{1,63}$/
title
必須
string
120文字以下
description
string | null
2000文字以下
visibility
必須
string
取りうる値: PUBLIC LINK_ONLY MEMBERS_ONLY
display_mode
必須
string
取りうる値: LIST CALENDAR
delivery_mode
必須
string
取りうる値: IN_PERSON ONLINE
location_name
string | null
120文字以下
location_address
string | null
300文字以下
online_url
string | null
address_visibility
string
取りうる値: PUBLIC CONFIRMED_ONLY INDIVIDUAL
payment_note
string | null
2000文字以下
reception_default

受付期間の標準(開催の何分前)。省略で保持。reception_overridden⁠がfalse⁠の開催回すべてに効く。両方の値があるときは opens_before_minutes を closes_before_minutes より大きくする。

object
opens_before_minutes
必須
integer | null
<= 525600
closes_before_minutes
必須
integer | null
<= 525600

イベントの基本情報を更新する

メディアタイプapplication/json
object
data
必須
object
id
必須
string 形式: uuid
title
必須
string
status
必須
string
取りうる値: DRAFT PUBLISHED ENDED CANCELLED
visibility
必須
string
取りうる値: PUBLIC LINK_ONLY MEMBERS_ONLY
timing
必須
object
first_starts_at
必須
string | null 形式: date-time
last_ends_at
必須
string | null 形式: date-time
occurrence_count
必須
integer
menu_count
必須
integer
question_count
必須
integer
archived_at
必須
string | null 形式: date-time
created_at
必須
string 形式: date-time
reception_default
必須

受付期間の標準。reception_overridden⁠がfalse⁠の開催回すべてに効く

object
opens_before_minutes
必須

開催の何分前に受付を始めるか。null⁠は公開したらすぐ

integer | null
closes_before_minutes
必須

開催の何分前に締め切るか。null⁠は締め切らない(開催の終わりまで)

integer | null
例
{
"data": {
"status": "DRAFT",
"visibility": "PUBLIC"
}
}

利用できないヘッダ

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