コンテンツにスキップ

イベントの承認待ち予約を承認する

POST
/api/v1/events/{id}/occurrences/{occId}/participants/{bookingId}/approve
curl --request POST \
--url https://app.goyoka.com/api/v1/events/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/occurrences/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/participants/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/approve \
--header 'Authorization: Bearer <token>'

AWAITING_APPROVAL⁠の予約を承認し、既存の承認通知を送る。通知状況によっては成功時もAPPROVED_PENDING_NOTICE⁠を返す。PAYMENT⁠の入金確認を伴う承認は対象外。状態不一致・PAYMENT⁠は409 BOOKING_NOT_APPROVABLE、details.status⁠に現在の状態、details.awaiting_payment⁠に申込時の確定方法がPAYMENT⁠かを返す。アーカイブ済み・他店・指定イベントや開催回や予約への帰属違いは404 NOT_FOUND⁠で、書き込みも通知もしません。

customer⁠はid⁠とname⁠だけ、contact⁠はemail⁠とphone⁠で、customers:contact⁠の許可がなければcontact全体がnull、許可があっても未登録の欄はnull⁠です。

必要な範囲: events:write

customers:contact があるとメール・電話が入る(会話はメールのみ)。

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

ヘッダーのパラメータ

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

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

イベントの承認待ち予約を承認する

メディアタイプapplication/json
object
data
必須
object
booking_id
必須
string 形式: uuid
status
必須
string
取りうる値: PENDING AWAITING_APPROVAL APPROVED_PENDING_NOTICE CONFIRMED COMPLETED CANCELLED WITHDRAWN DECLINED EXPIRED
attendance
必須
string
取りうる値: UNSET ATTENDED NO_SHOW
customer
必須
object
id
必須
string 形式: uuid
name
必須
string
contact
必須
object
email
必須
string | null
phone
必須
string | null
items
必須
Array<object>
object
id
必須
string 形式: uuid
status
必須
string
取りうる値: HELD CONFIRMED WAITLISTED OFFERED CANCELLED
live
必須
boolean
menu_name
必須
string
starts_at
必須
string 形式: date-time
provider
必須
object
id
必須
string 形式: uuid
name
必須
string | null
price_yen
必須
integer
due_yen
必須

生きた明細ぶんの合計金額。既存の変更・取消し台帳を反映し、取消済み履歴のprice_yen⁠を単純加算しない。

integer
paid_yen
必須
integer
created_at
必須
string 形式: date-time
例
{
"data": {
"status": "PENDING",
"attendance": "UNSET",
"items": [
{
"status": "HELD"
}
]
}
}

利用できないヘッダ

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