コンテンツにスキップ

お店の予約ページを公開する

POST
/api/v1/onboarding/publish
curl --request POST \
--url https://app.goyoka.com/api/v1/onboarding/publish \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{}'

初期設定を終えて、お店の予約ページをお客様に公開します。管理画面の「公開する」と同じ処理で、公開前の試しの予約はこのときに消えます。公開は取り消せません。残っている工程があるときは 409 SETTINGS_OPERATION_BLOCKED(details.blocks[].code:STEP_DATA_MISSING)と、message⁠に残りの工程を返します。公開済みは 409 SETTINGS_OPERATION_BLOCKED(details.blocks[].code:ALREADY_PUBLISHED)です。成功すると公開後の状態(お客様が開く public_url を含む)を返します。鍵やトークンの持ち主が現在このお店のメンバーでないと、同値の送信でも409 SETTINGS_OPERATION_BLOCKED(details.blocks[].code:NOT_CURRENT_MEMBER)です。任意の冪等キーを使えます。

必要な範囲: onboarding:write

ヘッダーのパラメータ

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

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

メディアタイプapplication/json
object
例自動生成
{}

お店の予約ページを公開する

メディアタイプapplication/json
object
setup_mode
必須
string | null
取りうる値: SELF AI
selections
必須
object
booking_kinds
必須
string | null
取りうる値: PERSONAL EVENT BOTH INQUIRY
meeting_place
必須
string | null
取りうる値: IN_PERSON ONLINE BOTH
website
必須
string | null
取りうる値: HAS_SITE NO_SITE UNDECIDED
location_disclosure
必須
string | null
取りうる値: PUBLIC_PAGE CONFIRMED_ONLY MANUAL
calendar_choice
必須
string | null
取りうる値: GOOGLE APPLE SKIPPED
steps
必須
Array<object>
object
key
必須
string
取りうる値: SALON_PROFILE FIRST_SERVICE BUSINESS_HOURS FIRST_EVENT BOOKING_RULES LEGAL_DOCUMENTS TEST_BOOKING PUBLISH
group
必須
string
取りうる値: A B C
title
必須
string
applicable
必須
boolean
completed
必須
boolean
manual
必須
boolean
later
必須
Array<object>
object
key
必須
string
取りうる値: calendar guidePage embed contact
title
必須
string
url
必須
string
completed
必須
boolean
published_at
必須
string | null 形式: date-time
public_url
必須
string 形式: uri
next_step
必須
object
key
必須
string
取りうる値: SHAPE SALON_PROFILE FIRST_SERVICE BUSINESS_HOURS FIRST_EVENT BOOKING_RULES LEGAL_DOCUMENTS TEST_BOOKING PUBLISH
title
必須
string
ask
必須
Array<string>
tools
必須
Array<string>
done_when
必須
string
note
必須
string | null
can_publish
必須
boolean
cannot_publish_reason
必須
string | null
human_tasks
必須
Array<object>
object
key
必須
string
label
必須
string
url
必須
string
例
{
"setup_mode": "SELF",
"selections": {
"booking_kinds": "PERSONAL",
"meeting_place": "IN_PERSON",
"website": "HAS_SITE",
"location_disclosure": "PUBLIC_PAGE",
"calendar_choice": "GOOGLE"
},
"steps": [
{
"key": "SALON_PROFILE",
"group": "A"
}
],
"later": [
{
"key": "calendar"
}
],
"next_step": {
"key": "SHAPE"
}
}

利用できないヘッダ

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