コンテンツにスキップ

参加者の出欠を記録する

POST
/api/v1/events/{id}/occurrences/{occId}/participants/{bookingId}/attendance
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/attendance \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "attendance": "UNSET" }'

出欠はUNSET・ATTENDED・NO_SHOW⁠の3値。同じお店・開催回・顧客の対象予約を、指定予約が同値でもまとめて更新し、指定bookingId⁠の最新行を返す。HELD⁠またはCONFIRMED⁠の明細が必要で、CANCELLED・AWAITING_APPROVAL・DECLINED・EXPIRED・WITHDRAWN⁠の予約は対象外。対象外は409 BOOKING_NOT_LIVE、details.status⁠に現在の予約状態を返す。不正な出欠は422 VALIDATION。通知は送らない。アーカイブ済み・他店・指定イベントや開催回や予約への帰属違いは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
attendance
必須
string
取りうる値: UNSET ATTENDED NO_SHOW

参加者の出欠を記録する

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