{"openapi":"3.1.0","info":{"title":"Goyoka API","version":"2026-10-04","description":"お店の予約・お客様・イベントを、自分の AI や外部のサービスから扱うための API。"},"servers":[{"url":"https://app.goyoka.com"}],"tags":[{"name":"booking","description":"予約: お客様がオンラインでメニューと日時を選んで予約し、確認メールのリンクを踏むと確定します。電話で受けた予約はお店が管理画面から手入力できます。","x-displayName":"予約"},{"name":"calendar","description":"カレンダー: GoogleカレンダーやiCloud（Apple）カレンダーと連携し、確定した予約を自動で書き込み、外部の予定を空き時間の計算に反映します。","x-displayName":"カレンダー"},{"name":"email","description":"メール: 予約確認・リマインド・お礼・お知らせなど、お客様に届くメールの文面とタイミング、差出人情報を設定します。","x-displayName":"メール"},{"name":"events","description":"イベント: 定員制イベントを公開し、「全員そろって」と「お一人ずつ」を同じ開催日の中で受け付けられます。満席時はキャンセル待ちへ案内できます。","x-displayName":"イベント"},{"name":"customers","description":"顧客管理: お客様ごとに記録・回数券・これまでの予約をまとめて見られます。回数券の販売は売上台帳に、予約ごとの内容は記録に残ります。","x-displayName":"顧客管理"},{"name":"inquiries","description":"お問い合わせ: 予約以外のご質問を、事業者のページやサイトへ埋め込んだフォームから受け付けます。フォームに届いた内容は事業者の管理画面から確認できます。LINEが設定され、表示が有効なら、LINEとフォームのどちらで相談するかを選べます。LINEでのやりとりはLINE公式アカウントのアプリで行います。","x-displayName":"お問い合わせ"},{"name":"messages","description":"メッセージ: お客様とのやりとりを1本のスレッドにまとめます。お店は管理画面から返信や新しい連絡を送り、お客様はメールに載ったリンクのページから返事を書けます。","x-displayName":"メッセージ"},{"name":"guide-page","description":"ご案内ページ: 事業者の紹介・プロフィール・メニュー・お客様の声などをまとめた、お客様向けの公開ページです。サイトへ埋め込める予約フォームもここから使えます。","x-displayName":"ご案内ページ"},{"name":"services","description":"メニュー: 予約で選べるメニューの内容・料金・並び順を管理し、カテゴリの箱で整理できます。","x-displayName":"メニュー"},{"name":"providers","description":"担当者: 予約やイベントを担当する人の名簿を管理します。担当者はオーナーやスタッフとつなげられます。","x-displayName":"担当者"},{"name":"facilities","description":"設備: 予約で使う部屋・ベッドなどを種類と数で登録します。","x-displayName":"設備"},{"name":"salon-settings","description":"お店の設定: お店の基本情報、受付時間、予約の確定方法、安全設定、データの書き出しとお店の削除を管理します。","x-displayName":"お店の設定"},{"name":"onboarding","description":"初期設定: お店の形に合わせた設定を済ませ、試しの予約を確かめて公開できます。","x-displayName":"初期設定"}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","description":"設定 › API キー・MCP で発行した鍵、または OAuth で得たトークン"},"oauth2":{"type":"oauth2","flows":{"authorizationCode":{"authorizationUrl":"https://app.goyoka.com/api/oauth/authorize","tokenUrl":"https://app.goyoka.com/api/oauth/token","refreshUrl":"https://app.goyoka.com/api/oauth/token","scopes":{"booking:read":"予約を読む","booking:write":"予約を書き換える","calendar:read":"カレンダー連携を読む","email:read":"差出人・メールの文面・お知らせを読む（不足している標準の文面は補完されます）","email:write":"お客様への自動メールを有効にし、文面・差出人・返信先を変更する。お知らせの下書きを書き、公開ページへ載せる・外し、送信予約を取り消す。自分宛にテスト送信する","events:read":"イベントを読む","events:write":"イベントを書き換える","customers:read":"お客様を読む","customers:write":"お客様を書き換える","inquiries:read":"お問い合わせフォームの質問の設定だけを読む。届いた本文やお客様の情報は含まない","inquiries:write":"お問い合わせフォームの質問の設定だけを丸ごと置き換える。届いた本文やお客様の情報は含まない","messages:read":"メッセージを読む","messages:write":"メッセージを書き換える","guide-page:read":"ご案内ページの下書き・公開内容・画像の一覧を読む","guide-page:write":"ご案内ページの下書きを書き、公開ページをすぐに変える・非公開にする。検索の設定を変え、公開中を含む画像を削除する","services:read":"メニューを読む","services:write":"メニューを書き換える","providers:read":"担当者の公開名・紹介文・写真とアーカイブ状態、勤務時間と休みを読む。連絡先は含まない","providers:write":"担当者の公開名・紹介文を追加・変更し、名簿から外す・戻す。勤務時間と休みを変える","salon-settings:read":"お店の基本情報・予約の確定方式・公開範囲・ブロック・営業時間・埋め込みコード・法務文書の状態・下書き・公開前の本文を読む","salon-settings:write":"お店の基本情報・予約の確定方式・公開範囲・ブロック・営業時間・埋め込みコードを変更する。支払い案内・参加URLの実変更時は全オーナーへ値を含めず知らせる。お客様への保存時メールは送らないが、以後の受付・状態遷移時のメール・同意文に影響する。ブロック追加にはcustomers:contactも必要。法務文書の下書きを保存する。法務公開および未公開のお店の予約条件変更にはlegal:publishが必要","onboarding:read":"初期設定の選択、工程の進み具合、公開までに人が行う作業を読む","onboarding:write":"初期設定の選択と、データで確認できる工程の完了・見送りを記録する。住所の案内方法は公開ページでの住所の出し方を変える。カレンダーを選んでも接続はされない（接続は管理画面）。公開とテスト予約の確認は管理画面で行う","customers:contact":"メール・電話を読む・登録・変更する。ブロック一覧のメールアドレスとメモ（note）を読む。ブロックの追加にも必要（無いと contact は null、顧客の連絡先指定は不可）","charts":"カルテを読み書きする","email:broadcast":"お知らせを、同意したお客様へ一斉に送る予約ができる","legal:publish":"お客様が予約のときに同意する文書と、法律で求められる表示を公開し直す"}}}}},"schemas":{"Booking":{"type":"object","properties":{"id":{"type":"string","example":"0191f1c0-8d4e-7a3c-9b1e-2f6d1a3b4c5d"},"status":{"type":"string","enum":["PENDING","AWAITING_APPROVAL","APPROVED_PENDING_NOTICE","CONFIRMED","COMPLETED","CANCELLED","WITHDRAWN","DECLINED","EXPIRED"]},"kind":{"type":"string","enum":["SESSION","EVENT"]},"start_at":{"type":"string","format":"date-time","description":"ISO 8601、オフセット付き","example":"2026-10-01T10:00:00+09:00"},"end_at":{"type":"string","format":"date-time"},"total_minutes":{"type":"integer"},"total_price_yen":{"type":"integer"},"source":{"type":"string"},"provider_id":{"type":["string","null"],"format":"uuid"},"provider_chosen_by_customer":{"type":"boolean"},"customer":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]},"items":{"type":"array","items":{"type":"object","properties":{"service_name":{"type":"string"},"quantity":{"type":"integer"}},"required":["service_name","quantity"]}},"created_at":{"type":"string","format":"date-time"}},"required":["id","status","kind","start_at","end_at","total_minutes","total_price_yen","source","provider_id","provider_chosen_by_customer","customer","items","created_at"]},"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"request_id":{"type":"string"}},"required":["code","message","request_id"]}},"required":["error"]},"Slot":{"type":"object","properties":{"start":{"type":"string","format":"date-time"},"end":{"type":"string","format":"date-time"}},"required":["start","end"]},"Provider":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"public_name":{"type":"string"},"public_bio":{"type":["string","null"]},"photo_url":{"type":["string","null"]},"archived_at":{"type":["string","null"],"format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","public_name","public_bio","photo_url","archived_at","updated_at"]},"OnboardingStatus":{"type":"object","properties":{"setup_mode":{"type":["string","null"],"enum":["SELF","AI",null]},"selections":{"type":"object","properties":{"booking_kinds":{"type":["string","null"],"enum":["PERSONAL","EVENT","BOTH",null]},"meeting_place":{"type":["string","null"],"enum":["IN_PERSON","ONLINE","BOTH",null]},"website":{"type":["string","null"],"enum":["HAS_SITE","NO_SITE","UNDECIDED",null]},"location_disclosure":{"type":["string","null"],"enum":["PUBLIC_PAGE","CONFIRMED_ONLY","MANUAL",null]},"calendar_choice":{"type":["string","null"],"enum":["GOOGLE","APPLE","SKIPPED",null]}},"required":["booking_kinds","meeting_place","website","location_disclosure","calendar_choice"]},"steps":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","enum":["SALON_PROFILE","FIRST_SERVICE","BUSINESS_HOURS","FIRST_EVENT","BOOKING_RULES","LEGAL_DOCUMENTS","TEST_BOOKING","PUBLISH"]},"group":{"type":"string","enum":["A","B","C"]},"title":{"type":"string"},"applicable":{"type":"boolean"},"completed":{"type":"boolean"},"manual":{"type":"boolean"}},"required":["key","group","title","applicable","completed","manual"]}},"later":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","enum":["calendar","guidePage","embed","contact"]},"title":{"type":"string"},"url":{"type":"string"},"completed":{"type":"boolean"}},"required":["key","title","url","completed"]}},"published_at":{"type":["string","null"],"format":"date-time"},"can_publish":{"type":"boolean"},"cannot_publish_reason":{"type":["string","null"]},"human_tasks":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"},"url":{"type":"string"}},"required":["key","label","url"]}}},"required":["setup_mode","selections","steps","later","published_at","can_publish","cannot_publish_reason","human_tasks"]},"InquiryQuestions":{"type":"object","properties":{"module_enabled":{"type":"boolean"},"questions":{"type":"array","items":{"type":"object","properties":{"prompt":{"type":"string","minLength":1,"maxLength":200},"required":{"type":"boolean"}},"required":["prompt","required"],"additionalProperties":false}},"content_hash":{"type":"string"}},"required":["module_enabled","questions","content_hash"]},"Service":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"description":{"type":["string","null"]},"duration_minutes":{"type":"integer"},"price_yen":{"type":"integer"},"facility_type_id":{"type":["string","null"],"format":"uuid","description":"いつもの場所で使う設備の種類の ID。いつもの場所が無い場合と設備を使わない場合は null。"},"places":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"kind":{"type":"string","enum":["SHOP","LEASED"]},"name":{"type":"string"},"facility_type_id":{"type":["string","null"],"format":"uuid"}},"required":["id","kind","name","facility_type_id"]},"description":"受ける場所。並びは場所の設定順、同順なら ID 順。借りている設備の facility_type_id は null。"},"is_public":{"type":"boolean"},"catalogs":{"type":"array","items":{"type":"string","enum":["SESSION","EVENT"]}},"category_ids":{"type":"array","items":{"type":"string","format":"uuid"},"description":"全カタログの未アーカイブの MANUAL カテゴリへの明示所属。重複なしの ID 昇順。SMART の動的所属は含まない。"},"sort_order":{"type":"integer","description":"Service.sortOrder（メニュー自体の並び順）。棚ごとの placement の並び順とは異なります。"},"archived_at":{"type":["string","null"],"format":"date-time"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","name","description","duration_minutes","price_yen","facility_type_id","places","is_public","catalogs","category_ids","sort_order","archived_at","created_at","updated_at"]},"ServiceCategory":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"catalog":{"type":"string","enum":["SESSION","EVENT"]},"parent_id":{"type":["string","null"],"format":"uuid"},"kind":{"type":"string","enum":["MANUAL","SMART"]},"sort_order":{"type":"integer"},"open_by_default":{"type":"boolean"},"archived_at":{"type":["string","null"],"format":"date-time"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","name","catalog","parent_id","kind","sort_order","open_by_default","archived_at","created_at","updated_at"]},"TenantEmbedPresetListResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/TenantEmbedPreset"}}},"required":["data"],"additionalProperties":false},"TenantEmbedPreset":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string","maxLength":120},"display":{"type":"string","enum":["INLINE","MODAL"],"description":"INLINEはフォーム、MODALはボタンから開く。作成時の省略はMODAL。"},"button_label":{"type":["string","null"],"maxLength":40,"description":"nullまたは空文字は既定の文言。PATCHの省略は保存値を保持する。"},"base_theme":{"type":"string","enum":["AUTO","LIGHT","DARK"],"description":"作成時の省略はAUTO。PATCHの省略は保存値を保持する。"},"accent_color":{"type":["string","null"],"maxLength":7,"pattern":"^#[0-9a-f]{6}$/i","description":"#RRGGBB形式の色。nullは標準色。PATCHの省略は保存値を保持する。"},"created_at":{"type":"string","format":"date-time"},"embed_url":{"type":"string","format":"uri","description":"保存済みコードの埋め込みURL。応答専用。"},"snippet":{"type":"string","description":"貼り付けコード。サイトの許可は管理画面の設定の『お店』のタブにある『埋め込みを貼ってよいサイト』で行う。"},"last_seen":{"$ref":"#/components/schemas/EmbedPresetLastSeen"},"surface":{"type":"string","enum":["BOOKING","CONTACT","ANNOUNCE"],"description":"フォームの種類。作成時に指定し、変更できない。"},"service_ids":{"type":"array","items":{"type":"string","format":"uuid"},"description":"保存された初期選択のメニューID。順を保持。[]は追加の初期選択なし。CONTACT/ANNOUNCEは空配列。PATCHの省略は保持。"},"sender_profile_id":{"type":["string","null"],"format":"uuid","description":"CONTACTの差出人。nullは標準差出人。CONTACT以外の非nullは422。PATCHの省略は保持。"}},"required":["id","name","display","button_label","base_theme","accent_color","created_at","embed_url","snippet","last_seen","surface","service_ids","sender_profile_id"],"additionalProperties":false},"EmbedPresetLastSeen":{"type":["object","null"],"properties":{"at":{"type":"string","format":"date-time"},"origin":{"type":"string"}},"required":["at","origin"],"additionalProperties":false,"description":"許可済み・非表示も含む最終読込。表示成功や訪問人数、サイト所有の証明ではない。"},"TenantEmbedPresetResponse":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/TenantEmbedPreset"}},"required":["data"],"additionalProperties":false},"CreateTenantEmbedPresetBody":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120,"description":"1〜120文字。作成時の省略は自動命名、PATCHの省略は保持。"},"display":{"type":"string","enum":["INLINE","MODAL"],"description":"INLINEはフォーム、MODALはボタンから開く。作成時の省略はMODAL。"},"button_label":{"type":["string","null"],"maxLength":40,"description":"nullまたは空文字は既定の文言。PATCHの省略は保持。"},"base_theme":{"type":"string","enum":["AUTO","LIGHT","DARK"],"description":"作成時の省略はAUTO。PATCHの省略は保存値を保持する。"},"accent_color":{"type":["string","null"],"maxLength":7,"pattern":"^#[0-9a-f]{6}$/i","description":"#RRGGBB形式の色。nullは標準色。PATCHの省略は保存値を保持する。"},"surface":{"type":"string","enum":["BOOKING","CONTACT","ANNOUNCE"],"description":"フォームの種類。作成時に指定し、変更できない。"},"service_ids":{"type":"array","items":{"type":"string","format":"uuid"},"description":"保存された初期選択のメニューID。順を保持。[]は追加の初期選択なし。CONTACT/ANNOUNCEは空配列。PATCHの省略は保持。"},"sender_profile_id":{"type":["string","null"],"format":"uuid","description":"CONTACTの差出人。nullは標準差出人。CONTACT以外の非nullは422。PATCHの省略は保持。"}},"required":["surface"],"additionalProperties":false},"UpdateTenantEmbedPresetBody":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120,"description":"1〜120文字。作成時の省略は自動命名、PATCHの省略は保持。"},"display":{"type":"string","enum":["INLINE","MODAL"],"description":"INLINEはフォーム、MODALはボタンから開く。作成時の省略はMODAL。"},"button_label":{"type":["string","null"],"maxLength":40,"description":"nullまたは空文字は既定の文言。PATCHの省略は保持。"},"base_theme":{"type":"string","enum":["AUTO","LIGHT","DARK"],"description":"作成時の省略はAUTO。PATCHの省略は保存値を保持する。"},"accent_color":{"type":["string","null"],"maxLength":7,"pattern":"^#[0-9a-f]{6}$/i","description":"#RRGGBB形式の色。nullは標準色。PATCHの省略は保存値を保持する。"},"service_ids":{"type":"array","items":{"type":"string","format":"uuid"},"description":"保存された初期選択のメニューID。順を保持。[]は追加の初期選択なし。CONTACT/ANNOUNCEは空配列。PATCHの省略は保持。"},"sender_profile_id":{"type":["string","null"],"format":"uuid","description":"CONTACTの差出人。nullは標準差出人。CONTACT以外の非nullは422。PATCHの省略は保持。"}},"additionalProperties":false,"description":"省略欄は保存値を保持する。空objectまたは同じ値の往復は保存しない。"},"DeleteEmbedPresetResponse":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"deleted":{"type":"boolean","enum":[true]}},"required":["id","deleted"],"additionalProperties":false}},"required":["data"],"additionalProperties":false},"EmbedOriginsResponse":{"type":"object","properties":{"data":{"type":"object","properties":{"allowed_origins":{"type":"array","items":{"type":"string"},"description":"許可済みサイト。追加・削除は管理画面の設定の『お店』のタブにある『埋め込みを貼ってよいサイト』で、お店の方が行う。"},"pending_sightings":{"type":"array","items":{"type":"object","properties":{"origin":{"type":"string"},"preset_id":{"type":"string"},"last_seen_at":{"type":"string","format":"date-time"}},"required":["origin","preset_id","last_seen_at"],"additionalProperties":false},"description":"未許可かつ非表示にしていないoriginごとの最新検知。表示成功やサイト所有を保証しない。"}},"required":["allowed_origins","pending_sightings"],"additionalProperties":false}},"required":["data"],"additionalProperties":false},"SalonProfileResponse":{"type":"object","properties":{"data":{"type":"object","properties":{"public_theme":{"type":"string"},"name":{"type":"string"},"tagline":{"type":["string","null"]},"base_location_name":{"type":["string","null"]},"base_location_address":{"type":["string","null"]},"online_meeting_url":{"type":["string","null"]},"payment_note_in_person":{"type":["string","null"]},"payment_note_online":{"type":["string","null"]},"payment_note_remote":{"type":["string","null"]},"logo_url":{"type":["string","null"]}},"required":["public_theme","name","tagline","base_location_name","base_location_address","online_meeting_url","payment_note_in_person","payment_note_online","payment_note_remote","logo_url"],"additionalProperties":false}},"required":["data"]},"UpdateSalonProfileBody":{"type":"object","properties":{"public_theme":{"type":"string"},"name":{"type":"string"},"tagline":{"type":["string","null"]},"base_location_name":{"type":["string","null"]},"base_location_address":{"type":["string","null"]},"online_meeting_url":{"type":["string","null"]},"payment_note_in_person":{"type":["string","null"]},"payment_note_online":{"type":["string","null"]},"payment_note_remote":{"type":["string","null"]}},"additionalProperties":false},"BookingPolicyResponse":{"type":"object","properties":{"data":{"type":"object","properties":{"default_confirmation":{"type":"string"},"asks_health_info":{"type":"boolean"},"session_provider_selectable":{"type":"boolean"},"session_allow_auto_assign":{"type":"boolean"},"session_reveal_auto_assigned_provider":{"type":"boolean"},"session_scheduling":{"type":"string","enum":["shop","providers"]}},"required":["default_confirmation","asks_health_info","session_provider_selectable","session_allow_auto_assign","session_reveal_auto_assigned_provider","session_scheduling"],"additionalProperties":false}},"required":["data"]},"UpdateBookingPolicyBody":{"type":"object","properties":{"default_confirmation":{"type":"string"},"asks_health_info":{"type":"boolean"},"session_provider_selectable":{"type":"boolean"},"session_allow_auto_assign":{"type":"boolean"},"session_reveal_auto_assigned_provider":{"type":"boolean"},"session_scheduling":{"type":"string","enum":["shop","providers"]}},"additionalProperties":false},"SalonSafetyResponse":{"type":"object","properties":{"data":{"type":"object","properties":{"visibility":{"type":"string"}},"required":["visibility"],"additionalProperties":false}},"required":["data"]},"UpdateSalonSafetyBody":{"type":"object","properties":{"visibility":{"type":"string"}},"additionalProperties":false},"BlockedContactsResponse":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"contact":{"type":["object","null"],"properties":{"email":{"type":"string"},"note":{"type":["string","null"]}},"required":["email","note"]},"created_at":{"type":"string","format":"date-time"}},"required":["id","contact","created_at"]}},"next_cursor":{"type":["string","null"]}},"required":["data","next_cursor"]},"BlockedContactResponse":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"contact":{"type":["object","null"],"properties":{"email":{"type":"string"},"note":{"type":["string","null"]}},"required":["email","note"]},"created_at":{"type":"string","format":"date-time"}},"required":["id","contact","created_at"]}},"required":["data"]},"CreateBlockedContactBody":{"type":"object","properties":{"email":{"type":"string"},"note":{"type":["string","null"]}},"required":["email"],"additionalProperties":false},"DeletedBlockedContactResponse":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"deleted":{"type":"boolean","enum":[true]}},"required":["id","deleted"]}},"required":["data"]},"CalendarConnection":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"kind":{"type":"string","enum":["google_calendar","apple_caldav"]},"display_name":{"type":["string","null"]},"status":{"type":"string","enum":["ok","error"]},"last_checked_at":{"type":["string","null"],"format":"date-time"},"last_error":{"type":["string","null"]}},"required":["id","kind","display_name","status","last_checked_at","last_error"]},"Customer":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"contact":{"type":["object","null"],"properties":{"email":{"type":["string","null"]},"phone":{"type":["string","null"]}},"required":["email","phone"]},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","name","contact","created_at","updated_at"]},"ChartNote":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"session_date":{"type":"string","format":"date"},"booking_id":{"type":["string","null"],"format":"uuid"},"body":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","session_date","booking_id","body","created_at","updated_at"]},"ChartNoteSaved":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"session_date":{"type":"string","format":"date"},"booking_id":{"type":["string","null"],"format":"uuid"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","session_date","booking_id","created_at","updated_at"]},"Conversation":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"customer_id":{"type":["string","null"],"format":"uuid"},"subject":{"type":"string"},"contact_name":{"type":"string"},"contact":{"type":["object","null"],"properties":{"email":{"type":["string","null"]}},"required":["email"]},"status":{"type":"string","enum":["OPEN","CLOSED"]},"channel":{"type":"string","enum":["EMAIL"]},"booking_id":{"type":["string","null"],"format":"uuid"},"sender_profile_id":{"type":["string","null"],"format":"uuid"},"last_message_at":{"type":"string","format":"date-time"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","customer_id","subject","contact_name","contact","status","channel","booking_id","sender_profile_id","last_message_at","created_at","updated_at"]},"ConversationDetail":{"allOf":[{"$ref":"#/components/schemas/Conversation"},{"type":"object","properties":{"messages":{"type":"array","items":{"$ref":"#/components/schemas/Message"}},"inquiry":{"type":["object","null"],"properties":{"name":{"type":"string"},"body":{"type":"string"},"answers":{"type":"array","items":{"type":"object","properties":{"prompt":{"type":"string"},"answer":{"type":"string"}},"required":["prompt","answer"]}},"source_name":{"type":["string","null"]},"consented_at":{"type":["string","null"],"format":"date-time"}},"required":["name","body","answers","source_name","consented_at"]}},"required":["messages","inquiry"]}]},"Message":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"direction":{"type":"string","enum":["INBOUND","OUTBOUND"]},"author_kind":{"type":"string","enum":["CUSTOMER","STAFF"]},"body":{"type":"string"},"created_at":{"type":"string","format":"date-time"}},"required":["id","direction","author_kind","body","created_at"]},"ApiEvent":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string"},"status":{"type":"string","enum":["DRAFT","PUBLISHED","ENDED","CANCELLED"]},"visibility":{"type":"string","enum":["PUBLIC","LINK_ONLY","MEMBERS_ONLY"]},"timing":{"type":"object","properties":{"first_starts_at":{"type":["string","null"],"format":"date-time"},"last_ends_at":{"type":["string","null"],"format":"date-time"}},"required":["first_starts_at","last_ends_at"]},"occurrence_count":{"type":"integer","minimum":0},"menu_count":{"type":"integer","minimum":0},"question_count":{"type":"integer","minimum":0},"archived_at":{"type":["string","null"],"format":"date-time"},"created_at":{"type":"string","format":"date-time"}},"required":["id","title","status","visibility","timing","occurrence_count","menu_count","question_count","archived_at","created_at"]},"ApiOccurrence":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"event_id":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["SCHEDULED","CANCELLED","COMPLETED"]},"starts_at":{"type":"string","format":"date-time"},"ends_at":{"type":"string","format":"date-time"},"capacity":{"type":["integer","null"],"minimum":0},"taken_count":{"type":["integer","null"],"minimum":0,"description":"鍵やトークンによってはnull"},"facility_unit_ids":{"type":["array","null"],"items":{"type":"string","format":"uuid"},"description":"この開催日で使う設備の ID。null はすべての設備（貸し切り）。"}},"required":["id","event_id","status","starts_at","ends_at","capacity","taken_count","facility_unit_ids"]},"ApiOccurrenceDetail":{"allOf":[{"$ref":"#/components/schemas/ApiOccurrence"},{"type":"object","properties":{"venue":{"type":"object","properties":{"location_name":{"type":["string","null"]},"location_address":{"type":["string","null"]},"online_url":{"type":["string","null"]}},"required":["location_name","location_address","online_url"]},"providers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"starts_at":{"type":"string","format":"date-time"},"ends_at":{"type":"string","format":"date-time"}},"required":["id","name","starts_at","ends_at"]}},"menus":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"event_menu_id":{"type":"string","format":"uuid"},"name":{"type":"string"},"capacity":{"type":["integer","null"],"exclusiveMinimum":0},"starts_at":{"type":["string","null"],"format":"date-time"},"ends_at":{"type":["string","null"],"format":"date-time"}},"required":["id","event_menu_id","name","capacity","starts_at","ends_at"],"additionalProperties":false}},"opens_at":{"type":["string","null"],"format":"date-time"},"closes_at":{"type":["string","null"],"format":"date-time"},"cancel_deadline_at":{"type":["string","null"],"format":"date-time"}},"required":["venue","providers","menus","opens_at","closes_at","cancel_deadline_at"]}]},"ApiParticipant":{"type":"object","properties":{"booking_id":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["PENDING","AWAITING_APPROVAL","APPROVED_PENDING_NOTICE","CONFIRMED","COMPLETED","CANCELLED","WITHDRAWN","DECLINED","EXPIRED"]},"attendance":{"type":"string","enum":["UNSET","ATTENDED","NO_SHOW"]},"customer":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"}},"required":["id","name"]},"contact":{"type":["object","null"],"properties":{"email":{"type":["string","null"]},"phone":{"type":["string","null"]}},"required":["email","phone"]},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["HELD","CONFIRMED","WAITLISTED","OFFERED","CANCELLED"]},"live":{"type":"boolean"},"menu_name":{"type":"string"},"starts_at":{"type":"string","format":"date-time"},"provider":{"type":["object","null"],"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":["string","null"]}},"required":["id","name"]},"price_yen":{"type":"integer"}},"required":["id","status","live","menu_name","starts_at","provider","price_yen"]}},"due_yen":{"type":"integer","description":"生きた明細ぶんの合計金額。既存の変更・取消し台帳を反映し、取消済み履歴のprice_yenを単純加算しない。"},"paid_yen":{"type":"integer"},"created_at":{"type":"string","format":"date-time"}},"required":["booking_id","status","attendance","customer","contact","items","due_yen","paid_yen","created_at"]},"EventEmbedPresetListResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/EventEmbedPreset"}}},"required":["data"],"additionalProperties":false},"EventEmbedPreset":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string","maxLength":120},"display":{"type":"string","enum":["INLINE","MODAL"],"description":"INLINEはフォーム、MODALはボタンから開く。作成時の省略はMODAL。"},"button_label":{"type":["string","null"],"maxLength":40,"description":"nullまたは空文字は既定の文言。PATCHの省略は保存値を保持する。"},"base_theme":{"type":"string","enum":["AUTO","LIGHT","DARK"],"description":"作成時の省略はAUTO。PATCHの省略は保存値を保持する。"},"accent_color":{"type":["string","null"],"maxLength":7,"pattern":"^#[0-9a-f]{6}$/i","description":"#RRGGBB形式の色。nullは標準色。PATCHの省略は保存値を保持する。"},"created_at":{"type":"string","format":"date-time"},"embed_url":{"type":"string","format":"uri","description":"保存済みコードの埋め込みURL。応答専用。"},"snippet":{"type":"string","description":"貼り付けコード。サイトの許可は管理画面の設定の『お店』のタブにある『埋め込みを貼ってよいサイト』で行う。"},"last_seen":{"$ref":"#/components/schemas/EmbedPresetLastSeen"},"event_id":{"type":"string","format":"uuid","description":"所属イベント。URLから決まり、bodyでは指定・変更できない。"},"target":{"type":"string","enum":["EVENT","OCCURRENCE"],"description":"作成時の省略はEVENT。EVENTへの変更はoccurrence_idをnullにする。"},"occurrence_id":{"type":["string","null"],"format":"uuid","description":"OCCURRENCEの対象回。PATCHの省略は保持。回が削除された保存値はnullの場合がある。"},"menu_ids":{"type":"array","items":{"type":"string","format":"uuid"},"description":"保存された初期選択のイベントメニューID。順を保持。[]は追加の初期選択なし。PATCHの省略は保持。"}},"required":["id","name","display","button_label","base_theme","accent_color","created_at","embed_url","snippet","last_seen","event_id","target","occurrence_id","menu_ids"],"additionalProperties":false},"EventEmbedPresetResponse":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/EventEmbedPreset"}},"required":["data"],"additionalProperties":false},"CreateEventEmbedPresetBody":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120,"description":"1〜120文字。作成時の省略は自動命名、PATCHの省略は保持。"},"display":{"type":"string","enum":["INLINE","MODAL"],"description":"INLINEはフォーム、MODALはボタンから開く。作成時の省略はMODAL。"},"button_label":{"type":["string","null"],"maxLength":40,"description":"nullまたは空文字は既定の文言。PATCHの省略は保持。"},"base_theme":{"type":"string","enum":["AUTO","LIGHT","DARK"],"description":"作成時の省略はAUTO。PATCHの省略は保存値を保持する。"},"accent_color":{"type":["string","null"],"maxLength":7,"pattern":"^#[0-9a-f]{6}$/i","description":"#RRGGBB形式の色。nullは標準色。PATCHの省略は保存値を保持する。"},"target":{"type":"string","enum":["EVENT","OCCURRENCE"],"description":"作成時の省略はEVENT。EVENTへの変更はoccurrence_idをnullにする。"},"occurrence_id":{"type":["string","null"],"format":"uuid","description":"OCCURRENCEの対象回。PATCHの省略は保持。回が削除された保存値はnullの場合がある。"},"menu_ids":{"type":"array","items":{"type":"string","format":"uuid"},"description":"保存された初期選択のイベントメニューID。順を保持。[]は追加の初期選択なし。PATCHの省略は保持。"}},"additionalProperties":false},"UpdateEventEmbedPresetBody":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120,"description":"1〜120文字。作成時の省略は自動命名、PATCHの省略は保持。"},"display":{"type":"string","enum":["INLINE","MODAL"],"description":"INLINEはフォーム、MODALはボタンから開く。作成時の省略はMODAL。"},"button_label":{"type":["string","null"],"maxLength":40,"description":"nullまたは空文字は既定の文言。PATCHの省略は保持。"},"base_theme":{"type":"string","enum":["AUTO","LIGHT","DARK"],"description":"作成時の省略はAUTO。PATCHの省略は保存値を保持する。"},"accent_color":{"type":["string","null"],"maxLength":7,"pattern":"^#[0-9a-f]{6}$/i","description":"#RRGGBB形式の色。nullは標準色。PATCHの省略は保存値を保持する。"},"target":{"type":"string","enum":["EVENT","OCCURRENCE"],"description":"作成時の省略はEVENT。EVENTへの変更はoccurrence_idをnullにする。"},"occurrence_id":{"type":["string","null"],"format":"uuid","description":"OCCURRENCEの対象回。PATCHの省略は保持。回が削除された保存値はnullの場合がある。"},"menu_ids":{"type":"array","items":{"type":"string","format":"uuid"},"description":"保存された初期選択のイベントメニューID。順を保持。[]は追加の初期選択なし。PATCHの省略は保持。"}},"additionalProperties":false,"description":"省略欄は保存値を保持する。空objectまたは同じ値の往復は保存しない。"},"EventBookingFormSettingsResponse":{"type":"object","properties":{"data":{"type":"object","properties":{"override":{"$ref":"#/components/schemas/EventBookingFormValue"},"effective":{"$ref":"#/components/schemas/EventBookingFormValue"}},"required":["override","effective"]}},"required":["data"]},"EventBookingFormValue":{"type":"object","properties":{"time_selectable":{"type":"boolean"},"provider_selectable":{"type":"boolean"},"allow_auto_assign":{"type":"boolean"},"reveal_auto_assigned_provider":{"type":"boolean"},"notice":{"type":["string","null"]},"waitlist_mode":{"type":"string","enum":["SEQUENTIAL","BROADCAST"]},"waitlist_offer_hours":{"type":"integer"}},"required":["time_selectable","provider_selectable","allow_auto_assign","reveal_auto_assigned_provider","notice","waitlist_mode","waitlist_offer_hours"],"additionalProperties":false},"ReplaceEventBookingFormSettingsBody":{"type":"object","properties":{"time_selectable":{"type":["boolean","null"],"description":"nullは今のイベントの値を保ちます。"},"provider_selectable":{"type":["boolean","null"],"description":"nullは今のイベントの値を保ちます。"},"allow_auto_assign":{"type":["boolean","null"],"description":"nullは今のイベントの値を保ちます。"},"reveal_auto_assigned_provider":{"type":["boolean","null"],"description":"nullは今のイベントの値を保ちます。"},"notice":{"type":["string","null"],"description":"nullは今の値を保ちます。trim後空文字は備考なし（null）にします。非空の文字列は変更時trim後2000字以内で保存します。完全一致の保存値は長さにかかわらず前後の空白も保持します。"},"waitlist_mode":{"type":"string","enum":["SEQUENTIAL","BROADCAST"],"description":"省略時はこのイベントの今の方式を保ちます。"},"waitlist_offer_hours":{"type":"integer","description":"省略時はこのイベントの今の期限を保ちます。候補: 1・2・4・6・12・24時間。"}},"required":["time_selectable","provider_selectable","allow_auto_assign","reveal_auto_assigned_provider","notice"],"additionalProperties":false},"EventConfirmationResponse":{"type":"object","properties":{"data":{"type":"object","properties":{"confirmation_mode":{"type":"string","enum":["IMMEDIATE","APPROVAL","PAYMENT"]},"confirmation_window_hours":{"type":"integer"}},"required":["confirmation_mode","confirmation_window_hours"]}},"required":["data"]},"ReplaceEventConfirmationBody":{"type":"object","properties":{"confirmation_mode":{"type":"string","enum":["IMMEDIATE","APPROVAL","PAYMENT"]},"confirmation_window_hours":{"type":"integer"}},"required":["confirmation_mode","confirmation_window_hours"],"additionalProperties":false},"ReorderEventMenusBody":{"type":"object","properties":{"menu_ids":{"type":"array","items":{"type":"string","format":"uuid"}}},"required":["menu_ids"],"additionalProperties":false},"EmailSenderGetResponse":{"type":"object","properties":{"data":{"type":"object","properties":{"sender":{"$ref":"#/components/schemas/EmailSender"},"effective_sender":{"$ref":"#/components/schemas/EmailEffectiveSender"}},"required":["sender","effective_sender"],"additionalProperties":false}},"required":["data"],"additionalProperties":false},"EmailSender":{"type":"object","properties":{"sender_name":{"type":["string","null"]},"reply_to_email":{"type":["string","null"]},"legal_name":{"type":["string","null"]},"legal_address":{"type":["string","null"]}},"required":["sender_name","reply_to_email","legal_name","legal_address"],"additionalProperties":false},"EmailEffectiveSender":{"type":"object","properties":{"sender_name":{"type":"string"},"reply_to_email":{"type":["string","null"]}},"required":["sender_name","reply_to_email"],"additionalProperties":false},"EmailSenderProfileListResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/EmailSenderProfile"}}},"required":["data"],"additionalProperties":false},"EmailSenderProfile":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"reply_to_email":{"type":["string","null"]}},"required":["id","name","reply_to_email"],"additionalProperties":false},"EmailSenderReplaceResponse":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/EmailSender"}},"required":["data"],"additionalProperties":false},"ReplaceEmailSenderBody":{"type":"object","properties":{"sender_name":{"type":["string","null"]},"reply_to_email":{"type":["string","null"]},"legal_name":{"type":["string","null"]},"legal_address":{"type":["string","null"]}},"required":["sender_name","reply_to_email","legal_name","legal_address"],"additionalProperties":false},"EmailSenderProfileResponse":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/EmailSenderProfile"}},"required":["data"],"additionalProperties":false},"CreateEmailSenderProfileBody":{"type":"object","properties":{"name":{"type":"string"},"reply_to_email":{"type":["string","null"]}},"required":["name","reply_to_email"],"additionalProperties":false},"UpdateEmailSenderProfileBody":{"type":"object","properties":{"name":{"type":"string"},"reply_to_email":{"type":["string","null"]}},"additionalProperties":false},"DeleteEmailResourceResponse":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"deleted":{"type":"boolean","enum":[true]}},"required":["id","deleted"],"additionalProperties":false}},"required":["data"],"additionalProperties":false},"EmailTemplateListResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/EmailTemplate"}}},"required":["data"],"additionalProperties":false},"EmailTemplate":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"kind":{"type":"string"},"scope":{"type":"string"},"booking_kind":{"type":"string"},"subject":{"type":"string"},"body":{"type":"string"},"enabled":{"type":"boolean"},"anchor":{"type":"string"},"offset_minutes":{"type":"number"},"send_at_local_time":{"type":["string","null"]},"target_service_ids":{"type":"array","items":{"type":"string","format":"uuid"}},"is_custom":{"type":"boolean"},"sort_order":{"type":"number"},"tab":{"type":"string","enum":["session","event","inquiry"]},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","kind","scope","booking_kind","subject","body","enabled","anchor","offset_minutes","send_at_local_time","target_service_ids","is_custom","sort_order","tab","created_at","updated_at"],"additionalProperties":false},"EmailTemplateResponse":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/EmailTemplate"}},"required":["data"],"additionalProperties":false},"CreateEmailTemplateBody":{"type":"object","properties":{"kind":{"type":"string"},"scope":{"type":"string"},"booking_kind":{"type":"string"},"subject":{"type":"string"},"body":{"type":"string"},"anchor":{"type":["string","null"]}},"required":["kind","scope","booking_kind","subject","body","anchor"],"additionalProperties":false},"UpdateEmailTemplateBody":{"type":"object","properties":{"subject":{"type":"string"},"body":{"type":"string"},"enabled":{"type":"boolean"},"anchor":{"type":"string"},"offset_minutes":{"type":"number"},"send_at_local_time":{"type":["string","null"]},"target_service_ids":{"type":"array","items":{"type":"string","format":"uuid"}}},"additionalProperties":false},"EmailTestSendResponse":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"sent":{"type":"boolean","enum":[true]}},"required":["id","sent"],"additionalProperties":false}},"required":["data"],"additionalProperties":false},"EmailTestSendBody":{"type":"object","properties":{},"additionalProperties":false},"EmailAnnouncementListResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/EmailAnnouncementListItem"}},"next_cursor":{"type":["string","null"]}},"required":["data","next_cursor"],"additionalProperties":false},"EmailAnnouncementListItem":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"subject":{"type":"string"},"audience":{"type":"string"},"event_id":{"type":["string","null"],"format":"uuid"},"sender_profile_id":{"type":["string","null"],"format":"uuid"},"status":{"type":"string"},"scheduled_at":{"type":["string","null"],"format":"date-time"},"send_requested_at":{"type":["string","null"],"format":"date-time"},"sent_at":{"type":["string","null"],"format":"date-time"},"published_at":{"type":["string","null"],"format":"date-time"},"schedule_failed_reason":{"type":["string","null"]},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"summary":{"$ref":"#/components/schemas/EmailAnnouncementSummary"}},"required":["id","subject","audience","event_id","sender_profile_id","status","scheduled_at","send_requested_at","sent_at","published_at","schedule_failed_reason","created_at","updated_at","summary"],"additionalProperties":false},"EmailAnnouncementSummary":{"type":["object","null"],"properties":{"total":{"type":"integer"},"sent":{"type":"integer"},"failed":{"type":"integer"},"skipped":{"type":"integer"},"pending":{"type":"integer"}},"required":["total","sent","failed","skipped","pending"],"additionalProperties":false},"EmailAnnouncementResponse":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/EmailAnnouncement"}},"required":["data"],"additionalProperties":false},"EmailAnnouncement":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"subject":{"type":"string"},"body":{"type":"string"},"audience":{"type":"string"},"event_id":{"type":["string","null"],"format":"uuid"},"sender_profile_id":{"type":["string","null"],"format":"uuid"},"status":{"type":"string"},"scheduled_at":{"type":["string","null"],"format":"date-time"},"send_requested_at":{"type":["string","null"],"format":"date-time"},"sent_at":{"type":["string","null"],"format":"date-time"},"published_at":{"type":["string","null"],"format":"date-time"},"schedule_failed_reason":{"type":["string","null"]},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"summary":{"$ref":"#/components/schemas/EmailAnnouncementSummary"}},"required":["id","subject","body","audience","event_id","sender_profile_id","status","scheduled_at","send_requested_at","sent_at","published_at","schedule_failed_reason","created_at","updated_at","summary"],"additionalProperties":false},"EmailAnnouncementAudienceResponse":{"type":"object","properties":{"data":{"type":"object","properties":{"announcement_id":{"type":"string","format":"uuid"},"audience":{"type":"string"},"event_id":{"type":["string","null"],"format":"uuid"},"counted_at":{"type":"string","format":"date-time"},"candidate_count":{"type":"integer"},"recipient_count":{"type":"integer"},"skipped_monthly_cap_count":{"type":"integer"},"quota":{"type":"object","properties":{"limit":{"type":["integer","null"]},"cap_per_recipient":{"type":["integer","null"],"description":"課金 ON は支払う人のプランの1人あたりの通数。OFF は人数枠があるとき5、上限なしのとき null。"},"used":{"type":"integer"},"adding":{"type":"integer"},"remaining":{"type":["integer","null"]},"exceeded":{"type":"boolean"},"period_starts_at":{"type":["string","null"],"format":"date-time"},"period_ends_at":{"type":["string","null"],"format":"date-time"}},"required":["limit","cap_per_recipient","used","adding","remaining","exceeded","period_starts_at","period_ends_at"],"additionalProperties":false},"blocks":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}}},"required":["announcement_id","audience","event_id","counted_at","candidate_count","recipient_count","skipped_monthly_cap_count","quota","blocks"],"additionalProperties":false}},"required":["data"],"additionalProperties":false},"CreateEmailAnnouncementBody":{"type":"object","properties":{"subject":{"type":"string"},"body":{"type":"string"},"audience":{"type":"string"},"event_id":{"type":["string","null"],"format":"uuid"},"sender_profile_id":{"type":["string","null"],"format":"uuid"}},"required":["subject","body","audience","event_id","sender_profile_id"],"additionalProperties":false},"UpdateEmailAnnouncementBody":{"type":"object","properties":{"subject":{"type":"string"},"body":{"type":"string"},"audience":{"type":"string"},"event_id":{"type":["string","null"],"format":"uuid"},"sender_profile_id":{"type":["string","null"],"format":"uuid"}},"additionalProperties":false},"EmailAnnouncementActionBody":{"type":"object","properties":{},"additionalProperties":false},"ScheduleEmailAnnouncementBody":{"type":"object","properties":{"scheduled_at":{"type":"string","format":"date-time"},"expected_recipient_count":{"type":"number"}},"required":["scheduled_at","expected_recipient_count"],"additionalProperties":false},"Facility":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"units":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"}},"required":["id","name"]}},"service_ids":{"type":"array","items":{"type":"string","format":"uuid"}}},"required":["id","name","units","service_ids"]}},"parameters":{}},"paths":{"/api/v1/bookings":{"get":{"operationId":"booking_list","tags":["booking"],"summary":"予約の一覧","description":"開始日時の昇順。from/to はお店のタイムゾーンで解釈し、status は open（進行中）・cancelled・done・all。provider_idとprovider_chosen_by_customerを返し、担当者の公開名はproviders_listで引けます。\n\n必要な範囲: `booking:read`","security":[{"bearer":[]},{"oauth2":["booking:read"]}],"parameters":[{"schema":{"type":"string","format":"date","example":"2026-10-01"},"required":false,"name":"from","in":"query"},{"schema":{"type":"string","format":"date"},"required":false,"name":"to","in":"query"},{"schema":{"type":"string","enum":["open","cancelled","done","all"],"default":"open"},"required":false,"name":"status","in":"query"},{"schema":{"type":"string"},"required":false,"name":"cursor","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":200,"default":50},"required":false,"name":"limit","in":"query"}],"responses":{"200":{"description":"予約の一覧","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Booking"}},"next_cursor":{"type":["string","null"]}},"required":["data","next_cursor"]}}}},"400":{"description":"利用できないヘッダ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"鍵が無い・無効","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"範囲不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"見つからない","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"予約・冪等キーの競合","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"本文が1 MiBを超えている","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"入力の検証失敗","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"回数の上限","headers":{"RateLimit-Limit":{"description":"固定窓内の回数上限","schema":{"type":"integer","minimum":1}},"RateLimit-Remaining":{"description":"固定窓内の残り回数","schema":{"type":"integer","minimum":0}},"RateLimit-Reset":{"description":"窓終了までの秒数","schema":{"type":"integer","minimum":0}},"Retry-After":{"description":"再試行までの待機秒数","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"内部エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-goyoka-audience":"tenant","x-goyoka-required-scopes":["booking:read"]},"post":{"operationId":"booking_create","tags":["booking"],"summary":"予約を入れる（手動予約）","description":"電話で受けた予約と同じ扱い。営業時間外でも入るが、重なりは SLOT_TAKEN。place_id はメニューの場所 ID で、共通の場所が複数あるときは必須です。provider_idを指定するとその担当者で予約し、省略するとおまかせです。お店単位の予約で指定すると400 VALIDATIONです。確定済みで作り、notify が true なら確認メールを送る。customer_id か customer のどちらかを渡す。customer.emailかcustomer.phoneを指定する場合は空文字も含めcustomers:contactが必要です。この条件は冪等再送にも適用します。customer_idだけ、またはcustomerが名前だけならcustomers:contactは不要です。\n\n受付停止は403 NEW_BOOKING_SUSPENDED、顧客上限は409 CUSTOMER_LIMIT_REACHED、月間予約上限は409 MONTHLY_BOOKING_LIMIT_REACHEDです。\n\n500も同じ冪等キーと内容なら保存済みの結果を返します。新しいキーで再実行する前にbooking_listで作成済みか確認し、保存後の500による二重予約を避けてください。\n\n必要な範囲: `booking:write`","security":[{"bearer":[]},{"oauth2":["booking:write"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"service_id":{"type":"string","format":"uuid"},"quantity":{"type":"integer","minimum":1,"maximum":10}},"required":["service_id","quantity"]},"minItems":1},"start_at":{"type":"string","format":"date-time","example":"2026-10-01T10:00:00+09:00"},"customer_id":{"type":"string","format":"uuid"},"customer":{"type":"object","properties":{"name":{"type":"string","minLength":1},"email":{"type":"string","format":"email"},"phone":{"type":"string"}},"required":["name"]},"notify":{"type":"boolean","default":false},"provider_id":{"type":"string","format":"uuid"},"place_id":{"type":"string","format":"uuid"}},"required":["items","start_at"],"additionalProperties":false}}}},"responses":{"201":{"description":"予約を入れる（手動予約）","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Booking"}},"required":["data"]}}}},"400":{"description":"利用できないヘッダ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"鍵が無い・無効","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"範囲不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"見つからない","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"予約・冪等キーの競合","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"本文が1 MiBを超えている","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"入力の検証失敗","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"回数の上限","headers":{"RateLimit-Limit":{"description":"固定窓内の回数上限","schema":{"type":"integer","minimum":1}},"RateLimit-Remaining":{"description":"固定窓内の残り回数","schema":{"type":"integer","minimum":0}},"RateLimit-Reset":{"description":"窓終了までの秒数","schema":{"type":"integer","minimum":0}},"Retry-After":{"description":"再試行までの待機秒数","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"内部エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-goyoka-audience":"tenant","x-goyoka-required-scopes":["booking:write"],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"同じ内容の再送に同じ値を使います。異なる内容との再利用や処理中の再送は409 IDEMPOTENCY_KEY_REUSEDです。"}]}},"/api/v1/bookings/{id}":{"get":{"operationId":"booking_get","tags":["booking"],"summary":"予約1件","description":"他のお店の ID は 404。\n\n必要な範囲: `booking:read`","security":[{"bearer":[]},{"oauth2":["booking:read"]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"予約1件","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"allOf":[{"$ref":"#/components/schemas/Booking"},{"type":"object","properties":{"pending_change":{"type":["object","null"],"properties":{"expires_at":{"type":"string","format":"date-time"},"kind":{"type":"string","enum":["TIME_CHANGE","PROVIDER_CHANGE"]},"before":{"type":"object","properties":{"starts_at":{"type":"string","format":"date-time"},"ends_at":{"type":"string","format":"date-time"},"provider_id":{"type":["string","null"],"format":"uuid"}},"required":["starts_at","ends_at","provider_id"]},"after":{"type":"object","properties":{"starts_at":{"type":"string","format":"date-time"},"ends_at":{"type":"string","format":"date-time"},"provider_id":{"type":["string","null"],"format":"uuid"}},"required":["starts_at","ends_at","provider_id"]},"delivery":{"type":["string","null"]}},"required":["expires_at","kind","before","after","delivery"]}},"required":["pending_change"]}]}},"required":["data"]}}}},"400":{"description":"利用できないヘッダ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"鍵が無い・無効","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"範囲不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"見つからない","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"予約・冪等キーの競合","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"本文が1 MiBを超えている","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"入力の検証失敗","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"回数の上限","headers":{"RateLimit-Limit":{"description":"固定窓内の回数上限","schema":{"type":"integer","minimum":1}},"RateLimit-Remaining":{"description":"固定窓内の残り回数","schema":{"type":"integer","minimum":0}},"RateLimit-Reset":{"description":"窓終了までの秒数","schema":{"type":"integer","minimum":0}},"Retry-After":{"description":"再試行までの待機秒数","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"内部エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-goyoka-audience":"tenant","x-goyoka-required-scopes":["booking:read"]}},"/api/v1/bookings/{id}/approve":{"post":{"operationId":"booking_approve","tags":["booking"],"summary":"承認待ちの予約を承認する","description":"承認メールを送る。承認できる状態でなければ BOOKING_NOT_APPROVABLE。\n\n必要な範囲: `booking:write`","security":[{"bearer":[]},{"oauth2":["booking:write"]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"同じ内容の再送に同じ値を使います。異なる内容との再利用や処理中の再送は409 IDEMPOTENCY_KEY_REUSEDです。"}],"responses":{"200":{"description":"承認待ちの予約を承認する","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Booking"}},"required":["data"]}}}},"400":{"description":"利用できないヘッダ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"鍵が無い・無効","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"範囲不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"見つからない","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"予約・冪等キーの競合","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"本文が1 MiBを超えている","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"入力の検証失敗","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"回数の上限","headers":{"RateLimit-Limit":{"description":"固定窓内の回数上限","schema":{"type":"integer","minimum":1}},"RateLimit-Remaining":{"description":"固定窓内の残り回数","schema":{"type":"integer","minimum":0}},"RateLimit-Reset":{"description":"窓終了までの秒数","schema":{"type":"integer","minimum":0}},"Retry-After":{"description":"再試行までの待機秒数","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"内部エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-goyoka-audience":"tenant","x-goyoka-required-scopes":["booking:write"]}},"/api/v1/slots":{"get":{"operationId":"booking_slots","tags":["booking"],"summary":"空き枠の一覧","description":"from は包含、to は非包含のお店の日付（午前 0 時）。期間は 1〜62 暦日。serviceId またはカンマ区切りの serviceIds の片方を指定します。place_id はメニューの場所 ID で、共通の場所が複数あるときは必須です。provider_id は任意の担当者UUIDで、担当できない人やお店単位の予約では400 VALIDATIONを返します。公開済みの通常予約メニュー限定、最大 20 件、各数量 1。オーナーの照会なので会員限定の表示制限は適用しません。公開ページが停止中のお店では data は空配列。\n\n必要な範囲: `booking:read`","security":[{"bearer":[]},{"oauth2":["booking:read"]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":false,"name":"serviceId","in":"query"},{"schema":{"type":"string"},"required":false,"name":"serviceIds","in":"query"},{"schema":{"type":"string","format":"uuid"},"required":false,"name":"provider_id","in":"query"},{"schema":{"type":"string","format":"uuid"},"required":false,"name":"place_id","in":"query"},{"schema":{"type":"string","format":"date","example":"2026-10-01"},"required":true,"name":"from","in":"query"},{"schema":{"type":"string","format":"date","example":"2026-10-02"},"required":true,"name":"to","in":"query"}],"responses":{"200":{"description":"空き枠の一覧","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Slot"}}},"required":["data"]}}}},"400":{"description":"利用できないヘッダ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"鍵が無い・無効","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"範囲不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"見つからない","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"予約・冪等キーの競合","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"本文が1 MiBを超えている","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"入力の検証失敗","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"回数の上限","headers":{"RateLimit-Limit":{"description":"固定窓内の回数上限","schema":{"type":"integer","minimum":1}},"RateLimit-Remaining":{"description":"固定窓内の残り回数","schema":{"type":"integer","minimum":0}},"RateLimit-Reset":{"description":"窓終了までの秒数","schema":{"type":"integer","minimum":0}},"Retry-After":{"description":"再試行までの待機秒数","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"内部エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-goyoka-audience":"tenant","x-goyoka-required-scopes":["booking:read"]}},"/api/v1/bookings/{id}/change":{"post":{"operationId":"booking_change","tags":["booking"],"summary":"通常予約の担当・日時を変更する","description":"時刻が動くか、指名した担当者を替えるときはお客様の承認を待ちます。おまかせの担当者だけを替えるとき、またはconsent:already_agreedならすぐ変更します。メールアドレスの無いお客様には提案できません。提案の期限は24時間後と変更前後の開始時刻のうち早い時刻です。残り15分未満になる提案は作らず422 BOOKING_INPUT_INVALIDを返します。承認までは元の予約を保ち、新しい枠の差分だけを押さえます。課金スイッチがOFFの間、開始月をまたぐ変更は行き先の月の予約数上限に達すると409 MONTHLY_BOOKING_LIMIT_REACHEDで止まります。営業時間外は422 OUTSIDE_HOURSを返し、確認したうえでconfirm_outside_hours:trueを指定して送り直せます。業務入力エラーは422 BOOKING_INPUT_INVALIDでmessageに理由を返し、埋まった枠は409 SLOT_TAKENです。\n\n必要な範囲: `booking:write`","security":[{"bearer":[]},{"oauth2":["booking:write"]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"同じ内容の再送に同じ値を使います。異なる内容との再利用や処理中の再送は409 IDEMPOTENCY_KEY_REUSEDです。"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"starts_at":{"type":"string","format":"date-time"},"provider_id":{"type":"string","format":"uuid"},"consent":{"type":"string","enum":["ask_customer","already_agreed"],"default":"ask_customer"},"confirm_outside_hours":{"type":"boolean","default":false}},"required":["starts_at"]}}}},"responses":{"200":{"description":"通常予約の担当・日時を変更する","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"oneOf":[{"type":"object","properties":{"result":{"type":"string","enum":["proposed"]},"expires_at":{"type":"string","format":"date-time"},"delivery":{"type":"string"}},"required":["result","expires_at","delivery"]},{"type":"object","properties":{"result":{"type":"string","enum":["changed"]},"customer_notified":{"type":"boolean"},"calendar_sync":{"type":"string","enum":["ok","failed"]}},"required":["result","customer_notified","calendar_sync"]}]}},"required":["data"]}}}},"400":{"description":"利用できないヘッダ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"鍵が無い・無効","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"範囲不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"見つからない","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"予約・冪等キーの競合","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"本文が1 MiBを超えている","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"入力の検証失敗","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"回数の上限","headers":{"RateLimit-Limit":{"description":"固定窓内の回数上限","schema":{"type":"integer","minimum":1}},"RateLimit-Remaining":{"description":"固定窓内の残り回数","schema":{"type":"integer","minimum":0}},"RateLimit-Reset":{"description":"窓終了までの秒数","schema":{"type":"integer","minimum":0}},"Retry-After":{"description":"再試行までの待機秒数","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"内部エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-goyoka-audience":"tenant","x-goyoka-required-scopes":["booking:write"]}},"/api/v1/bookings/{id}/change/withdraw":{"post":{"operationId":"booking_change_withdraw","tags":["booking"],"summary":"通常予約の変更提案を取り下げる","description":"お返事待ちの提案を取り下げ、新しい枠の仮押さえを外します。提案が無ければ404 NOT_FOUNDです。\n\n必要な範囲: `booking:write`","security":[{"bearer":[]},{"oauth2":["booking:write"]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"同じ内容の再送に同じ値を使います。異なる内容との再利用や処理中の再送は409 IDEMPOTENCY_KEY_REUSEDです。"}],"responses":{"200":{"description":"通常予約の変更提案を取り下げる","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"result":{"type":"string","enum":["withdrawn"]}},"required":["result"]}},"required":["data"]}}}},"400":{"description":"利用できないヘッダ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"鍵が無い・無効","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"範囲不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"見つからない","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"予約・冪等キーの競合","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"本文が1 MiBを超えている","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"入力の検証失敗","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"回数の上限","headers":{"RateLimit-Limit":{"description":"固定窓内の回数上限","schema":{"type":"integer","minimum":1}},"RateLimit-Remaining":{"description":"固定窓内の残り回数","schema":{"type":"integer","minimum":0}},"RateLimit-Reset":{"description":"窓終了までの秒数","schema":{"type":"integer","minimum":0}},"Retry-After":{"description":"再試行までの待機秒数","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"内部エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-goyoka-audience":"tenant","x-goyoka-required-scopes":["booking:write"]}},"/api/v1/providers":{"get":{"operationId":"providers_list","tags":["providers"],"summary":"担当者の公開情報を読む","description":"公開名・紹介文・写真URL・アーカイブ状態とミリ秒付き更新時刻を返します。連絡先と能力は返しません。既定では名簿から外した担当者を除きます。\n\n必要な範囲: `providers:read`","security":[{"bearer":[]},{"oauth2":["providers:read"]}],"parameters":[{"schema":{"type":"string","enum":["true","false"],"default":"false"},"required":false,"name":"include_archived","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":200,"default":50},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","format":"uuid"},"required":false,"name":"cursor","in":"query"}],"responses":{"200":{"description":"担当者の公開情報を読む","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Provider"}},"next_cursor":{"type":["string","null"],"format":"uuid"}},"required":["data","next_cursor"]}}}},"400":{"description":"利用できないヘッダ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"鍵が無い・無効","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"範囲不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"見つからない","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"予約・冪等キーの競合","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"本文が1 MiBを超えている","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"入力の検証失敗","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"回数の上限","headers":{"RateLimit-Limit":{"description":"固定窓内の回数上限","schema":{"type":"integer","minimum":1}},"RateLimit-Remaining":{"description":"固定窓内の残り回数","schema":{"type":"integer","minimum":0}},"RateLimit-Reset":{"description":"窓終了までの秒数","schema":{"type":"integer","minimum":0}},"Retry-After":{"description":"再試行までの待機秒数","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"内部エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-goyoka-audience":"tenant","x-goyoka-required-scopes":["providers:read"]},"post":{"operationId":"providers_create","tags":["providers"],"summary":"担当者を名簿に加える","description":"公開名と紹介文だけを登録します。写真は空で作ります。連絡先と能力は登録しません。鍵やトークンの持ち主が現在このお店のメンバーでないと、同値の送信でも409 SETTINGS_OPERATION_BLOCKED（details.blocks[].code:NOT_CURRENT_MEMBER）です。任意の冪等キーを使えます。\n\n必要な範囲: `providers:write`","security":[{"bearer":[]},{"oauth2":["providers:write"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"public_name":{"type":"string","minLength":1,"maxLength":120},"public_bio":{"type":["string","null"],"maxLength":3000}},"required":["public_name"],"additionalProperties":false}}}},"responses":{"201":{"description":"担当者を名簿に加える","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Provider"}},"required":["data"]}}}},"400":{"description":"利用できないヘッダ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"鍵が無い・無効","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"範囲不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"見つからない","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"予約・冪等キーの競合","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"本文が1 MiBを超えている","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"入力の検証失敗","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"回数の上限","headers":{"RateLimit-Limit":{"description":"固定窓内の回数上限","schema":{"type":"integer","minimum":1}},"RateLimit-Remaining":{"description":"固定窓内の残り回数","schema":{"type":"integer","minimum":0}},"RateLimit-Reset":{"description":"窓終了までの秒数","schema":{"type":"integer","minimum":0}},"Retry-After":{"description":"再試行までの待機秒数","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"内部エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-goyoka-audience":"tenant","x-goyoka-required-scopes":["providers:write"],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"同じ内容の再送に同じ値を使います。異なる内容との再利用や処理中の再送は409 IDEMPOTENCY_KEY_REUSEDです。"}]}},"/api/v1/providers/{id}":{"patch":{"operationId":"providers_update","tags":["providers"],"summary":"担当者の公開情報を変える","description":"GET /providersのupdated_atをexpected_updated_atへ渡します。ミリ秒付き日時が必須です。古い値は409 SETTINGS_OPERATION_BLOCKED（details.blocks[].code:CONCURRENT_UPDATE）、欠落や空の変更は422 VALIDATIONです。公開欄以外の変更で更新時刻が進んだ場合も古い値を断ります。同値なら保存しません。写真、連絡先、能力は変えません。鍵やトークンの持ち主が現在このお店のメンバーでないと、同値の送信でも409 SETTINGS_OPERATION_BLOCKED（details.blocks[].code:NOT_CURRENT_MEMBER）です。任意の冪等キーを使えます。\n\n必要な範囲: `providers:write`","security":[{"bearer":[]},{"oauth2":["providers:write"]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"同じ内容の再送に同じ値を使います。異なる内容との再利用や処理中の再送は409 IDEMPOTENCY_KEY_REUSEDです。"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"public_name":{"type":"string","minLength":1,"maxLength":120},"public_bio":{"type":["string","null"],"maxLength":3000},"expected_updated_at":{"type":"string","format":"date-time","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}(?:Z|[+-]\\d{2}:\\d{2})$"}},"required":["expected_updated_at"],"additionalProperties":false}}}},"responses":{"200":{"description":"担当者の公開情報を変える","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Provider"}},"required":["data"]}}}},"400":{"description":"利用できないヘッダ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"鍵が無い・無効","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"範囲不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"見つからない","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"予約・冪等キーの競合","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"本文が1 MiBを超えている","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"入力の検証失敗","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"回数の上限","headers":{"RateLimit-Limit":{"description":"固定窓内の回数上限","schema":{"type":"integer","minimum":1}},"RateLimit-Remaining":{"description":"固定窓内の残り回数","schema":{"type":"integer","minimum":0}},"RateLimit-Reset":{"description":"窓終了までの秒数","schema":{"type":"integer","minimum":0}},"Retry-After":{"description":"再試行までの待機秒数","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"内部エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-goyoka-audience":"tenant","x-goyoka-required-scopes":["providers:write"]}},"/api/v1/providers/{id}/archive":{"post":{"operationId":"providers_archive","tags":["providers"],"summary":"担当者を名簿から外す","description":"名簿から外した担当者は今後の開催回へ新しく割り当てられません。既存の割当と履歴は残ります。二度目は保存しません。鍵やトークンの持ち主が現在このお店のメンバーでないと、同値の送信でも409 SETTINGS_OPERATION_BLOCKED（details.blocks[].code:NOT_CURRENT_MEMBER）です。任意の冪等キーを使えます。\n\n必要な範囲: `providers:write`","security":[{"bearer":[]},{"oauth2":["providers:write"]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"同じ内容の再送に同じ値を使います。異なる内容との再利用や処理中の再送は409 IDEMPOTENCY_KEY_REUSEDです。"}],"responses":{"200":{"description":"担当者を名簿から外す","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Provider"}},"required":["data"]}}}},"400":{"description":"利用できないヘッダ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"鍵が無い・無効","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"範囲不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"見つからない","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"予約・冪等キーの競合","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"本文が1 MiBを超えている","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"入力の検証失敗","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"回数の上限","headers":{"RateLimit-Limit":{"description":"固定窓内の回数上限","schema":{"type":"integer","minimum":1}},"RateLimit-Remaining":{"description":"固定窓内の残り回数","schema":{"type":"integer","minimum":0}},"RateLimit-Reset":{"description":"窓終了までの秒数","schema":{"type":"integer","minimum":0}},"Retry-After":{"description":"再試行までの待機秒数","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"内部エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-goyoka-audience":"tenant","x-goyoka-required-scopes":["providers:write"]}},"/api/v1/providers/{id}/restore":{"post":{"operationId":"providers_restore","tags":["providers"],"summary":"担当者を名簿へ戻す","description":"外した担当者を名簿へ戻します。すでに戻っていれば保存しません。鍵やトークンの持ち主が現在このお店のメンバーでないと、同値の送信でも409 SETTINGS_OPERATION_BLOCKED（details.blocks[].code:NOT_CURRENT_MEMBER）です。任意の冪等キーを使えます。\n\n必要な範囲: `providers:write`","security":[{"bearer":[]},{"oauth2":["providers:write"]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"同じ内容の再送に同じ値を使います。異なる内容との再利用や処理中の再送は409 IDEMPOTENCY_KEY_REUSEDです。"}],"responses":{"200":{"description":"担当者を名簿へ戻す","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Provider"}},"required":["data"]}}}},"400":{"description":"利用できないヘッダ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"鍵が無い・無効","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"範囲不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"見つからない","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"予約・冪等キーの競合","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"本文が1 MiBを超えている","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"入力の検証失敗","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"回数の上限","headers":{"RateLimit-Limit":{"description":"固定窓内の回数上限","schema":{"type":"integer","minimum":1}},"RateLimit-Remaining":{"description":"固定窓内の残り回数","schema":{"type":"integer","minimum":0}},"RateLimit-Reset":{"description":"窓終了までの秒数","schema":{"type":"integer","minimum":0}},"Retry-After":{"description":"再試行までの待機秒数","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"内部エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-goyoka-audience":"tenant","x-goyoka-required-scopes":["providers:write"]}},"/api/v1/providers/{id}/working-hours":{"get":{"operationId":"providers_working_hours_get","tags":["providers"],"summary":"担当者の勤務時間と休みを読む","description":"勤務時間を個別に設定していない場合はuse_shop_hoursがtrueになり、お店の営業時間を使います。\n\n必要な範囲: `providers:read`","security":[{"bearer":[]},{"oauth2":["providers:read"]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"担当者の勤務時間と休みを読む","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"use_shop_hours":{"type":"boolean"},"weekly":{"type":"array","items":{"type":"object","properties":{"weekday":{"type":"integer","minimum":0,"maximum":6},"start_time":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"end_time":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"}},"required":["weekday","start_time","end_time"],"additionalProperties":false}},"time_off":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"start_date":{"type":"string","format":"date"},"end_date":{"type":"string","format":"date"},"label":{"type":["string","null"]}},"required":["id","start_date","end_date","label"]}}},"required":["use_shop_hours","weekly","time_off"]}},"required":["data"]}}}},"400":{"description":"利用できないヘッダ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"鍵が無い・無効","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"範囲不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"見つからない","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"予約・冪等キーの競合","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"本文が1 MiBを超えている","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"入力の検証失敗","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"回数の上限","headers":{"RateLimit-Limit":{"description":"固定窓内の回数上限","schema":{"type":"integer","minimum":1}},"RateLimit-Remaining":{"description":"固定窓内の残り回数","schema":{"type":"integer","minimum":0}},"RateLimit-Reset":{"description":"窓終了までの秒数","schema":{"type":"integer","minimum":0}},"Retry-After":{"description":"再試行までの待機秒数","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"内部エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-goyoka-audience":"tenant","x-goyoka-required-scopes":["providers:read"]},"put":{"operationId":"providers_working_hours_replace","tags":["providers"],"summary":"担当者の勤務時間を置き換える","description":"use_shop_hoursがtrueならお店の営業時間を使い、weeklyは保存しません。falseなら勤務する曜日を1つ以上指定します。休みと既存予約は変更しません。鍵やトークンの持ち主が現在このお店のメンバーでないと、同値の送信でも409 SETTINGS_OPERATION_BLOCKED（details.blocks[].code:NOT_CURRENT_MEMBER）です。任意の冪等キーを使えます。\n\n必要な範囲: `providers:write`","security":[{"bearer":[]},{"oauth2":["providers:write"]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"同じ内容の再送に同じ値を使います。異なる内容との再利用や処理中の再送は409 IDEMPOTENCY_KEY_REUSEDです。"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"use_shop_hours":{"type":"boolean"},"weekly":{"type":"array","items":{"type":"object","properties":{"weekday":{"type":"integer","minimum":0,"maximum":6},"start_time":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"end_time":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"}},"required":["weekday","start_time","end_time"],"additionalProperties":false}}},"required":["use_shop_hours","weekly"],"additionalProperties":false}}}},"responses":{"200":{"description":"担当者の勤務時間を置き換える","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"use_shop_hours":{"type":"boolean"},"weekly":{"type":"array","items":{"type":"object","properties":{"weekday":{"type":"integer","minimum":0,"maximum":6},"start_time":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"end_time":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"}},"required":["weekday","start_time","end_time"],"additionalProperties":false}},"time_off":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"start_date":{"type":"string","format":"date"},"end_date":{"type":"string","format":"date"},"label":{"type":["string","null"]}},"required":["id","start_date","end_date","label"]}}},"required":["use_shop_hours","weekly","time_off"]}},"required":["data"]}}}},"400":{"description":"利用できないヘッダ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"鍵が無い・無効","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"範囲不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"見つからない","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"予約・冪等キーの競合","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"本文が1 MiBを超えている","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"入力の検証失敗","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"回数の上限","headers":{"RateLimit-Limit":{"description":"固定窓内の回数上限","schema":{"type":"integer","minimum":1}},"RateLimit-Remaining":{"description":"固定窓内の残り回数","schema":{"type":"integer","minimum":0}},"RateLimit-Reset":{"description":"窓終了までの秒数","schema":{"type":"integer","minimum":0}},"Retry-After":{"description":"再試行までの待機秒数","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"内部エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-goyoka-audience":"tenant","x-goyoka-required-scopes":["providers:write"]}},"/api/v1/providers/{id}/time-off":{"post":{"operationId":"providers_time_off_create","tags":["providers"],"summary":"担当者の休みを足す","description":"開始日と終了日を含む休みを登録します。conflictsは期間内の未完了予約の数で、予約は変更しません。鍵やトークンの持ち主が現在このお店のメンバーでないと、同値の送信でも409 SETTINGS_OPERATION_BLOCKED（details.blocks[].code:NOT_CURRENT_MEMBER）です。任意の冪等キーを使えます。\n\n必要な範囲: `providers:write`","security":[{"bearer":[]},{"oauth2":["providers:write"]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"同じ内容の再送に同じ値を使います。異なる内容との再利用や処理中の再送は409 IDEMPOTENCY_KEY_REUSEDです。"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"start_date":{"type":"string","format":"date"},"end_date":{"type":"string","format":"date"},"label":{"type":"string","maxLength":120}},"required":["start_date","end_date"],"additionalProperties":false}}}},"responses":{"201":{"description":"担当者の休みを足す","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"conflicts":{"type":"integer"}},"required":["id","conflicts"]}},"required":["data"]}}}},"400":{"description":"利用できないヘッダ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"鍵が無い・無効","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"範囲不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"見つからない","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"予約・冪等キーの競合","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"本文が1 MiBを超えている","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"入力の検証失敗","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"回数の上限","headers":{"RateLimit-Limit":{"description":"固定窓内の回数上限","schema":{"type":"integer","minimum":1}},"RateLimit-Remaining":{"description":"固定窓内の残り回数","schema":{"type":"integer","minimum":0}},"RateLimit-Reset":{"description":"窓終了までの秒数","schema":{"type":"integer","minimum":0}},"Retry-After":{"description":"再試行までの待機秒数","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"内部エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-goyoka-audience":"tenant","x-goyoka-required-scopes":["providers:write"]}},"/api/v1/providers/{id}/time-off/{time_off_id}":{"delete":{"operationId":"providers_time_off_delete","tags":["providers"],"summary":"担当者の休みを削除する","description":"指定した休みを削除します。既存予約は変更しません。鍵やトークンの持ち主が現在このお店のメンバーでないと、同値の送信でも409 SETTINGS_OPERATION_BLOCKED（details.blocks[].code:NOT_CURRENT_MEMBER）です。任意の冪等キーを使えます。\n\n必要な範囲: `providers:write`","security":[{"bearer":[]},{"oauth2":["providers:write"]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","format":"uuid"},"required":true,"name":"time_off_id","in":"path"},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"同じ内容の再送に同じ値を使います。異なる内容との再利用や処理中の再送は409 IDEMPOTENCY_KEY_REUSEDです。"}],"responses":{"200":{"description":"担当者の休みを削除する","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"deleted":{"type":"boolean","enum":[true]}},"required":["id","deleted"]}},"required":["data"]}}}},"400":{"description":"利用できないヘッダ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"鍵が無い・無効","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"範囲不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"見つからない","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"予約・冪等キーの競合","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"本文が1 MiBを超えている","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"入力の検証失敗","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"回数の上限","headers":{"RateLimit-Limit":{"description":"固定窓内の回数上限","schema":{"type":"integer","minimum":1}},"RateLimit-Remaining":{"description":"固定窓内の残り回数","schema":{"type":"integer","minimum":0}},"RateLimit-Reset":{"description":"窓終了までの秒数","schema":{"type":"integer","minimum":0}},"Retry-After":{"description":"再試行までの待機秒数","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"内部エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-goyoka-audience":"tenant","x-goyoka-required-scopes":["providers:write"]}},"/api/v1/onboarding":{"get":{"operationId":"onboarding_status_get","tags":["onboarding"],"summary":"初期設定の状態を読む","description":"工程は8つで、予約の受け方以外はお店の設定のデータから済みを判定します。selections にお店の形などの答え、setup_mode に選んだ進め方、steps に工程の該当性と完了、later に後でもいいことを返します。human_tasks には、必要に応じて試しの予約、予約ページの公開、カレンダーの接続、ご案内ページの写真、担当者の招待、貼り付け先の許可と、それぞれを行う管理画面の URL を返します。規約と表記は legal:publish を許可された AI が、本文をお店の人に見せて了承をもらってから公開できます。進捗の行が無くても保存せず既定の状態を返します。\n\n必要な範囲: `onboarding:read`","security":[{"bearer":[]},{"oauth2":["onboarding:read"]}],"responses":{"200":{"description":"初期設定の状態を読む","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OnboardingStatus"}}}},"400":{"description":"利用できないヘッダ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"鍵が無い・無効","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"範囲不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"見つからない","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"予約・冪等キーの競合","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"本文が1 MiBを超えている","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"入力の検証失敗","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"回数の上限","headers":{"RateLimit-Limit":{"description":"固定窓内の回数上限","schema":{"type":"integer","minimum":1}},"RateLimit-Remaining":{"description":"固定窓内の残り回数","schema":{"type":"integer","minimum":0}},"RateLimit-Reset":{"description":"窓終了までの秒数","schema":{"type":"integer","minimum":0}},"Retry-After":{"description":"再試行までの待機秒数","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"内部エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-goyoka-audience":"tenant","x-goyoka-required-scopes":["onboarding:read"]}},"/api/v1/onboarding/selections":{"patch":{"operationId":"onboarding_selections_update","tags":["onboarding"],"summary":"初期設定の選択を変える","description":"お店の形（予約の種類・会う場所・ホームページ）と住所の案内・カレンダーの選択を保存します。工程は完了になりません。公開後も変えられます。少なくとも一つの選択を指定します。カレンダーの選択だけでは接続されません。空の入力、purpose や未知の選択肢は 422 VALIDATION です。鍵やトークンの持ち主が現在このお店のメンバーでないと、同値の送信でも409 SETTINGS_OPERATION_BLOCKED（details.blocks[].code:NOT_CURRENT_MEMBER）です。任意の冪等キーを使えます。\n\n必要な範囲: `onboarding:write`","security":[{"bearer":[]},{"oauth2":["onboarding:write"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"booking_kinds":{"type":"string","enum":["PERSONAL","EVENT","BOTH"]},"meeting_place":{"type":"string","enum":["IN_PERSON","ONLINE","BOTH"]},"website":{"type":"string","enum":["HAS_SITE","NO_SITE","UNDECIDED"]},"location_disclosure":{"type":"string","enum":["PUBLIC_PAGE","CONFIRMED_ONLY","MANUAL"]},"calendar_choice":{"type":"string","enum":["GOOGLE","APPLE","SKIPPED"]}},"additionalProperties":false}}}},"responses":{"200":{"description":"初期設定の選択を変える","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OnboardingStatus"}}}},"400":{"description":"利用できないヘッダ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"鍵が無い・無効","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"範囲不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"見つからない","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"予約・冪等キーの競合","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"本文が1 MiBを超えている","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"入力の検証失敗","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"回数の上限","headers":{"RateLimit-Limit":{"description":"固定窓内の回数上限","schema":{"type":"integer","minimum":1}},"RateLimit-Remaining":{"description":"固定窓内の残り回数","schema":{"type":"integer","minimum":0}},"RateLimit-Reset":{"description":"窓終了までの秒数","schema":{"type":"integer","minimum":0}},"Retry-After":{"description":"再試行までの待機秒数","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"内部エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-goyoka-audience":"tenant","x-goyoka-required-scopes":["onboarding:write"],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"同じ内容の再送に同じ値を使います。異なる内容との再利用や処理中の再送は409 IDEMPOTENCY_KEY_REUSEDです。"}]}},"/api/v1/onboarding/steps/{key}":{"post":{"operationId":"onboarding_steps_update","tags":["onboarding"],"summary":"初期設定の工程に完了の印を付ける","description":"完了の印を付けられるのは予約の受け方（BOOKING_RULES）だけです。ほかの工程は設定のデータで決まるので DATA_DERIVED、試しに予約する・公開はお店の方が管理画面で行うので HUMAN_STEP_REQUIRED を返します。見送りは STEP_NOT_SKIPPABLE、公開済みは ALREADY_PUBLISHED です。同じ状態は保存せずイベントも増やしません。未知の工程・state は 422 VALIDATION。鍵やトークンの持ち主が現在このお店のメンバーでないと、同値の送信でも409 SETTINGS_OPERATION_BLOCKED（details.blocks[].code:NOT_CURRENT_MEMBER）です。任意の冪等キーを使えます。\n\n必要な範囲: `onboarding:write`","security":[{"bearer":[]},{"oauth2":["onboarding:write"]}],"parameters":[{"schema":{"type":"string","enum":["SALON_PROFILE","FIRST_SERVICE","BUSINESS_HOURS","FIRST_EVENT","BOOKING_RULES","LEGAL_DOCUMENTS","TEST_BOOKING","PUBLISH"]},"required":true,"name":"key","in":"path"},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"同じ内容の再送に同じ値を使います。異なる内容との再利用や処理中の再送は409 IDEMPOTENCY_KEY_REUSEDです。"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"state":{"type":"string","enum":["completed","skipped"]}},"required":["state"],"additionalProperties":false}}}},"responses":{"200":{"description":"初期設定の工程に完了の印を付ける","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OnboardingStatus"}}}},"400":{"description":"利用できないヘッダ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"鍵が無い・無効","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"範囲不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"見つからない","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"予約・冪等キーの競合","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"本文が1 MiBを超えている","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"入力の検証失敗","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"回数の上限","headers":{"RateLimit-Limit":{"description":"固定窓内の回数上限","schema":{"type":"integer","minimum":1}},"RateLimit-Remaining":{"description":"固定窓内の残り回数","schema":{"type":"integer","minimum":0}},"RateLimit-Reset":{"description":"窓終了までの秒数","schema":{"type":"integer","minimum":0}},"Retry-After":{"description":"再試行までの待機秒数","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"内部エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-goyoka-audience":"tenant","x-goyoka-required-scopes":["onboarding:write"]}},"/api/v1/inquiries/questions":{"get":{"operationId":"inquiries_questions_get","tags":["inquiries"],"summary":"お問い合わせの質問を読む","description":"質問の順序・文面・必須指定と、置換時に使う content_hash を返します。お問い合わせが無効でも module_enabled:false とともに返します。お問い合わせの本文やお客様の情報は含みません。\n\n必要な範囲: `inquiries:read`","security":[{"bearer":[]},{"oauth2":["inquiries:read"]}],"responses":{"200":{"description":"お問い合わせの質問を読む","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InquiryQuestions"}}}},"400":{"description":"利用できないヘッダ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"鍵が無い・無効","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"範囲不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"見つからない","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"予約・冪等キーの競合","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"本文が1 MiBを超えている","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"入力の検証失敗","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"回数の上限","headers":{"RateLimit-Limit":{"description":"固定窓内の回数上限","schema":{"type":"integer","minimum":1}},"RateLimit-Remaining":{"description":"固定窓内の残り回数","schema":{"type":"integer","minimum":0}},"RateLimit-Reset":{"description":"窓終了までの秒数","schema":{"type":"integer","minimum":0}},"Retry-After":{"description":"再試行までの待機秒数","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"内部エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-goyoka-audience":"tenant","x-goyoka-required-scopes":["inquiries:read"]},"put":{"operationId":"inquiries_questions_replace","tags":["inquiries"],"summary":"お問い合わせの質問を丸ごと置き換える","description":"GET /inquiries/questions の content_hash を expected_content_hash に渡し、質問を指定した順で丸ごと置き換えます。空配列は全質問を削除します。質問は最大5件です。過去の回答は残ります。同じ内容なら保存しません。古い hash は 409 SETTINGS_OPERATION_BLOCKED（CONCURRENT_UPDATE）、お問い合わせが無効なら同エラー（FEATURE_DISABLED）、入力不足や不正値は 422 VALIDATION です。鍵やトークンの持ち主が現在このお店のメンバーでないと、同値の送信でも409 SETTINGS_OPERATION_BLOCKED（details.blocks[].code:NOT_CURRENT_MEMBER）です。任意の冪等キーを使えます。\n\n必要な範囲: `inquiries:write`","security":[{"bearer":[]},{"oauth2":["inquiries:write"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"questions":{"type":"array","items":{"type":"object","properties":{"prompt":{"type":"string","minLength":1,"maxLength":200},"required":{"type":"boolean"}},"required":["prompt","required"],"additionalProperties":false},"maxItems":5},"expected_content_hash":{"type":"string","pattern":"^[a-f0-9]{64}$"}},"required":["questions","expected_content_hash"],"additionalProperties":false}}}},"responses":{"200":{"description":"お問い合わせの質問を丸ごと置き換える","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InquiryQuestions"}}}},"400":{"description":"利用できないヘッダ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"鍵が無い・無効","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"範囲不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"見つからない","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"予約・冪等キーの競合","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"本文が1 MiBを超えている","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"入力の検証失敗","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"回数の上限","headers":{"RateLimit-Limit":{"description":"固定窓内の回数上限","schema":{"type":"integer","minimum":1}},"RateLimit-Remaining":{"description":"固定窓内の残り回数","schema":{"type":"integer","minimum":0}},"RateLimit-Reset":{"description":"窓終了までの秒数","schema":{"type":"integer","minimum":0}},"Retry-After":{"description":"再試行までの待機秒数","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"内部エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-goyoka-audience":"tenant","x-goyoka-required-scopes":["inquiries:write"],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"同じ内容の再送に同じ値を使います。異なる内容との再利用や処理中の再送は409 IDEMPOTENCY_KEY_REUSEDです。"}]}},"/api/v1/services":{"get":{"operationId":"services_list","tags":["services"],"summary":"メニューの一覧","description":"作成日時・ID の昇順。既定は全カタログの未アーカイブ行。棚からすべて外した行は catalog=all と include_archived=true の指定で取得できます。\n\n必要な範囲: `services:read`","security":[{"bearer":[]},{"oauth2":["services:read"]}],"parameters":[{"schema":{"type":"string","enum":["session","event","all"],"default":"all"},"required":false,"name":"catalog","in":"query"},{"schema":{"type":"string","enum":["true","false"],"default":"false"},"required":false,"name":"include_archived","in":"query"},{"schema":{"type":"string"},"required":false,"name":"cursor","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":200,"default":50},"required":false,"name":"limit","in":"query"}],"responses":{"200":{"description":"メニューの一覧","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Service"}},"next_cursor":{"type":["string","null"]}},"required":["data","next_cursor"]}}}},"400":{"description":"利用できないヘッダ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"鍵が無い・無効","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"範囲不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"見つからない","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"予約・冪等キーの競合","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"本文が1 MiBを超えている","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"入力の検証失敗","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"回数の上限","headers":{"RateLimit-Limit":{"description":"固定窓内の回数上限","schema":{"type":"integer","minimum":1}},"RateLimit-Remaining":{"description":"固定窓内の残り回数","schema":{"type":"integer","minimum":0}},"RateLimit-Reset":{"description":"窓終了までの秒数","schema":{"type":"integer","minimum":0}},"Retry-After":{"description":"再試行までの待機秒数","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"内部エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-goyoka-audience":"tenant","x-goyoka-required-scopes":["services:read"]},"post":{"operationId":"services_create","tags":["services"],"summary":"メニューを作る","description":"名前・所要時間・料金を指定して作成します。棚の既定は SESSION。カテゴリは指定した棚の手動カテゴリを選びます。\n\n必要な範囲: `services:write`","security":[{"bearer":[]},{"oauth2":["services:write"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"description":{"type":"string","maxLength":2000,"default":""},"duration_minutes":{"type":"integer","minimum":1,"maximum":1440},"price_yen":{"type":"integer","minimum":0},"facility_type_id":{"type":["string","null"],"format":"uuid","description":"いつもの場所で使う設備の種類の ID。非 null を送るといつもの場所の設備を変え、いつもの場所がなければ追加します。借りている設備の場所は残ります。null はいつもの場所の設備だけを外し、借り先だけのメニューでは何も変えません。対面メニューを新規作成するときに省略すると、設備なしのいつもの場所を作ります。"},"is_public":{"type":"boolean","default":true},"catalogs":{"type":"array","items":{"type":"string","enum":["SESSION","EVENT"]},"minItems":1,"maxItems":2,"default":["SESSION"]},"category_ids":{"type":"array","items":{"type":"string","format":"uuid"},"default":[]}},"required":["name","duration_minutes","price_yen"],"additionalProperties":false}}}},"responses":{"201":{"description":"メニューを作る","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Service"}},"required":["data"]}}}},"400":{"description":"利用できないヘッダ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"鍵が無い・無効","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"範囲不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"見つからない","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"予約・冪等キーの競合","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"本文が1 MiBを超えている","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"入力の検証失敗","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"回数の上限","headers":{"RateLimit-Limit":{"description":"固定窓内の回数上限","schema":{"type":"integer","minimum":1}},"RateLimit-Remaining":{"description":"固定窓内の残り回数","schema":{"type":"integer","minimum":0}},"RateLimit-Reset":{"description":"窓終了までの秒数","schema":{"type":"integer","minimum":0}},"Retry-After":{"description":"再試行までの待機秒数","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"内部エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-goyoka-audience":"tenant","x-goyoka-required-scopes":["services:write"],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"同じ内容の再送に同じ値を使います。異なる内容との再利用や処理中の再送は409 IDEMPOTENCY_KEY_REUSEDです。"}]}},"/api/v1/services/{id}":{"get":{"operationId":"services_get","tags":["services"],"summary":"メニュー1件","description":"アーカイブ済みも取得できます。他のお店の ID と不明な ID は 404。\n\n必要な範囲: `services:read`","security":[{"bearer":[]},{"oauth2":["services:read"]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"メニュー1件","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Service"}},"required":["data"]}}}},"400":{"description":"利用できないヘッダ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"鍵が無い・無効","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"範囲不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"見つからない","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"予約・冪等キーの競合","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"本文が1 MiBを超えている","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"入力の検証失敗","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"回数の上限","headers":{"RateLimit-Limit":{"description":"固定窓内の回数上限","schema":{"type":"integer","minimum":1}},"RateLimit-Remaining":{"description":"固定窓内の残り回数","schema":{"type":"integer","minimum":0}},"RateLimit-Reset":{"description":"窓終了までの秒数","schema":{"type":"integer","minimum":0}},"Retry-After":{"description":"再試行までの待機秒数","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"内部エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-goyoka-audience":"tenant","x-goyoka-required-scopes":["services:read"]},"patch":{"operationId":"services_update","tags":["services"],"summary":"メニューを更新する","description":"指定した欄だけを更新します。catalogs は配置の全置換、category_ids は手動所属の全置換。空の本文は 422。他店・不明・アーカイブ済み ID は 404。\n\n必要な範囲: `services:write`","security":[{"bearer":[]},{"oauth2":["services:write"]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"同じ内容の再送に同じ値を使います。異なる内容との再利用や処理中の再送は409 IDEMPOTENCY_KEY_REUSEDです。"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"description":{"type":"string","maxLength":2000},"duration_minutes":{"type":"integer","minimum":1,"maximum":1440},"price_yen":{"type":"integer","minimum":0},"facility_type_id":{"type":["string","null"],"format":"uuid","description":"いつもの場所で使う設備の種類の ID。非 null を送るといつもの場所の設備を変え、いつもの場所がなければ追加します。借りている設備の場所は残ります。null はいつもの場所の設備だけを外し、借り先だけのメニューでは何も変えません。対面メニューを新規作成するときに省略すると、設備なしのいつもの場所を作ります。"},"is_public":{"type":"boolean"},"catalogs":{"type":"array","items":{"type":"string","enum":["SESSION","EVENT"]},"minItems":1,"maxItems":2},"category_ids":{"type":"array","items":{"type":"string","format":"uuid"}}},"additionalProperties":false}}}},"responses":{"200":{"description":"メニューを更新する","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Service"}},"required":["data"]}}}},"400":{"description":"利用できないヘッダ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"鍵が無い・無効","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"範囲不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"見つからない","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"予約・冪等キーの競合","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"本文が1 MiBを超えている","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"入力の検証失敗","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"回数の上限","headers":{"RateLimit-Limit":{"description":"固定窓内の回数上限","schema":{"type":"integer","minimum":1}},"RateLimit-Remaining":{"description":"固定窓内の残り回数","schema":{"type":"integer","minimum":0}},"RateLimit-Reset":{"description":"窓終了までの秒数","schema":{"type":"integer","minimum":0}},"Retry-After":{"description":"再試行までの待機秒数","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"内部エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-goyoka-audience":"tenant","x-goyoka-required-scopes":["services:write"]}},"/api/v1/service-categories":{"get":{"operationId":"services_categories","tags":["services"],"summary":"メニューカテゴリの一覧","description":"アーカイブ済みを含む平坦な一覧。カタログ・並び順・ID の昇順。cursor は直前のページの next_cursor（カテゴリ ID）を指定します。\n\n必要な範囲: `services:read`","security":[{"bearer":[]},{"oauth2":["services:read"]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":false,"name":"cursor","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":200,"default":50},"required":false,"name":"limit","in":"query"}],"responses":{"200":{"description":"メニューカテゴリの一覧","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ServiceCategory"}},"next_cursor":{"type":["string","null"],"format":"uuid"}},"required":["data","next_cursor"]}}}},"400":{"description":"利用できないヘッダ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"鍵が無い・無効","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"範囲不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"見つからない","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"予約・冪等キーの競合","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"本文が1 MiBを超えている","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"入力の検証失敗","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"回数の上限","headers":{"RateLimit-Limit":{"description":"固定窓内の回数上限","schema":{"type":"integer","minimum":1}},"RateLimit-Remaining":{"description":"固定窓内の残り回数","schema":{"type":"integer","minimum":0}},"RateLimit-Reset":{"description":"窓終了までの秒数","schema":{"type":"integer","minimum":0}},"Retry-After":{"description":"再試行までの待機秒数","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"内部エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-goyoka-audience":"tenant","x-goyoka-required-scopes":["services:read"]},"post":{"operationId":"services_categories_create","tags":["services"],"summary":"手動の箱を作る","description":"MANUAL の箱を作ります。SMART は作れません。親は同じ棚の手動の箱だけを指定できます。鍵やトークンの持ち主が現在このお店のメンバーでないと、同値の送信でも409 SETTINGS_OPERATION_BLOCKED（details.blocks[].code:NOT_CURRENT_MEMBER）です。任意の冪等キーを使えます。\n\n必要な範囲: `services:write`","security":[{"bearer":[]},{"oauth2":["services:write"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"catalog":{"type":"string","enum":["SESSION","EVENT"]},"name":{"type":"string","minLength":1,"maxLength":60},"parent_id":{"type":["string","null"],"format":"uuid","default":null},"open_by_default":{"type":"boolean"},"kind":{"type":"string","enum":["MANUAL"]}},"required":["catalog","name"],"additionalProperties":false}}}},"responses":{"201":{"description":"手動の箱を作る","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/ServiceCategory"}},"required":["data"]}}}},"400":{"description":"利用できないヘッダ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"鍵が無い・無効","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"範囲不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"見つからない","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"予約・冪等キーの競合","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"本文が1 MiBを超えている","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"入力の検証失敗","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"回数の上限","headers":{"RateLimit-Limit":{"description":"固定窓内の回数上限","schema":{"type":"integer","minimum":1}},"RateLimit-Remaining":{"description":"固定窓内の残り回数","schema":{"type":"integer","minimum":0}},"RateLimit-Reset":{"description":"窓終了までの秒数","schema":{"type":"integer","minimum":0}},"Retry-After":{"description":"再試行までの待機秒数","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"内部エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-goyoka-audience":"tenant","x-goyoka-required-scopes":["services:write"],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"同じ内容の再送に同じ値を使います。異なる内容との再利用や処理中の再送は409 IDEMPOTENCY_KEY_REUSEDです。"}]}},"/api/v1/services/{id}/archive":{"post":{"operationId":"services_archive","tags":["services"],"summary":"メニューを棚から外す","description":"catalogs を省略すると現在の全棚から外します。最後の棚を外した時だけアーカイブします。既存予約は残ります。他店・不明・アーカイブ済み ID は 404。未配置の棚を指定した場合は無視する（removed=false）。\n\n必要な範囲: `services:write`","security":[{"bearer":[]},{"oauth2":["services:write"]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"同じ内容の再送に同じ値を使います。異なる内容との再利用や処理中の再送は409 IDEMPOTENCY_KEY_REUSEDです。"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"catalogs":{"type":"array","items":{"type":"string","enum":["SESSION","EVENT"]},"minItems":1,"maxItems":2}},"additionalProperties":false}}}},"responses":{"200":{"description":"メニューを棚から外す","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Service"}},"required":["data"]}}}},"400":{"description":"利用できないヘッダ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"鍵が無い・無効","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"範囲不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"見つからない","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"予約・冪等キーの競合","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"本文が1 MiBを超えている","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"入力の検証失敗","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"回数の上限","headers":{"RateLimit-Limit":{"description":"固定窓内の回数上限","schema":{"type":"integer","minimum":1}},"RateLimit-Remaining":{"description":"固定窓内の残り回数","schema":{"type":"integer","minimum":0}},"RateLimit-Reset":{"description":"窓終了までの秒数","schema":{"type":"integer","minimum":0}},"Retry-After":{"description":"再試行までの待機秒数","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"内部エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-goyoka-audience":"tenant","x-goyoka-required-scopes":["services:write"]}},"/api/v1/service-categories/{id}":{"patch":{"operationId":"services_categories_update","tags":["services"],"summary":"箱の名前や親を変える","description":"箱の一覧 GET で受け取った updated_at をミリ秒付き expected_updated_at へ渡します。欠落や空 PATCH は 422 VALIDATION、古い値は 409 SETTINGS_OPERATION_BLOCKED（details.blocks[].code:CONCURRENT_UPDATE）です。sort_order の変更でも updated_at が進みます。同値なら保存しません。SMART の既存の箱も名前と親を変えられます。鍵やトークンの持ち主が現在このお店のメンバーでないと、同値の送信でも409 SETTINGS_OPERATION_BLOCKED（details.blocks[].code:NOT_CURRENT_MEMBER）です。任意の冪等キーを使えます。\n\n必要な範囲: `services:write`","security":[{"bearer":[]},{"oauth2":["services:write"]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"同じ内容の再送に同じ値を使います。異なる内容との再利用や処理中の再送は409 IDEMPOTENCY_KEY_REUSEDです。"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"catalog":{"type":"string","enum":["SESSION","EVENT"]},"name":{"type":"string","minLength":1,"maxLength":60},"parent_id":{"type":["string","null"],"format":"uuid"},"open_by_default":{"type":"boolean"},"expected_updated_at":{"type":"string","format":"date-time","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}(?:Z|[+-]\\d{2}:\\d{2})$"}},"required":["catalog","expected_updated_at"],"additionalProperties":false}}}},"responses":{"200":{"description":"箱の名前や親を変える","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/ServiceCategory"}},"required":["data"]}}}},"400":{"description":"利用できないヘッダ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"鍵が無い・無効","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"範囲不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"見つからない","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"予約・冪等キーの競合","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"本文が1 MiBを超えている","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"入力の検証失敗","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"回数の上限","headers":{"RateLimit-Limit":{"description":"固定窓内の回数上限","schema":{"type":"integer","minimum":1}},"RateLimit-Remaining":{"description":"固定窓内の残り回数","schema":{"type":"integer","minimum":0}},"RateLimit-Reset":{"description":"窓終了までの秒数","schema":{"type":"integer","minimum":0}},"Retry-After":{"description":"再試行までの待機秒数","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"内部エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-goyoka-audience":"tenant","x-goyoka-required-scopes":["services:write"]},"delete":{"operationId":"services_categories_delete","tags":["services"],"summary":"箱を削除する","description":"箱の一覧 GET で受け取った updated_at をミリ秒付き query expected_updated_at へ渡します。body は不要です。古い値は 409 SETTINGS_OPERATION_BLOCKED（details.blocks[].code:CONCURRENT_UPDATE）、欠落は 422 です。メニューは消えず、所属なしになったメニューは棚の根の末尾へ移ります。子箱は一段上へ移ります。sort_order の変更でも updated_at が進みます。鍵やトークンの持ち主が現在このお店のメンバーでないと、同値の送信でも409 SETTINGS_OPERATION_BLOCKED（details.blocks[].code:NOT_CURRENT_MEMBER）です。任意の冪等キーを使えます。\n\n必要な範囲: `services:write`","security":[{"bearer":[]},{"oauth2":["services:write"]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","enum":["SESSION","EVENT"]},"required":true,"name":"catalog","in":"query"},{"schema":{"type":"string","format":"date-time","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}(?:Z|[+-]\\d{2}:\\d{2})$"},"required":true,"name":"expected_updated_at","in":"query"},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"同じ内容の再送に同じ値を使います。異なる内容との再利用や処理中の再送は409 IDEMPOTENCY_KEY_REUSEDです。"}],"responses":{"200":{"description":"箱を削除する","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/ServiceCategory"}},"required":["data"]}}}},"400":{"description":"利用できないヘッダ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"鍵が無い・無効","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"範囲不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"見つからない","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"予約・冪等キーの競合","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"本文が1 MiBを超えている","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"入力の検証失敗","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"回数の上限","headers":{"RateLimit-Limit":{"description":"固定窓内の回数上限","schema":{"type":"integer","minimum":1}},"RateLimit-Remaining":{"description":"固定窓内の残り回数","schema":{"type":"integer","minimum":0}},"RateLimit-Reset":{"description":"窓終了までの秒数","schema":{"type":"integer","minimum":0}},"Retry-After":{"description":"再試行までの待機秒数","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"内部エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-goyoka-audience":"tenant","x-goyoka-required-scopes":["services:write"]}},"/api/v1/service-catalog/order":{"get":{"operationId":"services_catalog_order_get","tags":["services"],"summary":"棚の現在順と確認用の印を読む","description":"一階層の箱 ID と Service ID を現在の順で返します。メニューの ID は `GET /services` と同じです。placement ID は返しません。空の棚にも order_hash を返します。\n\n必要な範囲: `services:read`","security":[{"bearer":[]},{"oauth2":["services:read"]}],"parameters":[{"schema":{"type":"string","enum":["SESSION","EVENT"]},"required":true,"name":"catalog","in":"query"},{"schema":{"type":["string","null"],"format":"uuid","default":null},"required":false,"name":"parent_id","in":"query"}],"responses":{"200":{"description":"棚の現在順と確認用の印を読む","content":{"application/json":{"schema":{"type":"object","properties":{"nodes":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["category","service"]},"id":{"type":"string","format":"uuid"}},"required":["kind","id"],"additionalProperties":false}},"order_hash":{"type":"string"}},"required":["nodes","order_hash"]}}}},"400":{"description":"利用できないヘッダ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"鍵が無い・無効","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"範囲不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"見つからない","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"予約・冪等キーの競合","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"本文が1 MiBを超えている","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"入力の検証失敗","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"回数の上限","headers":{"RateLimit-Limit":{"description":"固定窓内の回数上限","schema":{"type":"integer","minimum":1}},"RateLimit-Remaining":{"description":"固定窓内の残り回数","schema":{"type":"integer","minimum":0}},"RateLimit-Reset":{"description":"窓終了までの秒数","schema":{"type":"integer","minimum":0}},"Retry-After":{"description":"再試行までの待機秒数","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"内部エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-goyoka-audience":"tenant","x-goyoka-required-scopes":["services:read"]},"put":{"operationId":"services_reorder","tags":["services"],"summary":"棚の一階層を並べ替える","description":"棚順の GET で受け取った全 nodes と order_hash を送ります。箱は箱 ID、メニューは一覧の Service ID を使います。欠落や重複、別棚の ID は 422、集合の不足は 409 MENU_EDIT_BLOCKED（ORDER_MISMATCH）、古い hash は 409 SETTINGS_OPERATION_BLOCKED（CONCURRENT_UPDATE）です。同じ順なら保存しません。並び替えた箱の updated_at は進み、古い token での箱の更新は 409 になります。鍵やトークンの持ち主が現在このお店のメンバーでないと、同値の送信でも409 SETTINGS_OPERATION_BLOCKED（details.blocks[].code:NOT_CURRENT_MEMBER）です。任意の冪等キーを使えます。\n\n必要な範囲: `services:write`","security":[{"bearer":[]},{"oauth2":["services:write"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"catalog":{"type":"string","enum":["SESSION","EVENT"]},"parent_id":{"type":["string","null"],"format":"uuid"},"nodes":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["category","service"]},"id":{"type":"string","format":"uuid"}},"required":["kind","id"],"additionalProperties":false}},"expected_order_hash":{"type":"string","pattern":"^[a-f0-9]{64}$"}},"required":["catalog","parent_id","nodes","expected_order_hash"],"additionalProperties":false}}}},"responses":{"200":{"description":"棚の一階層を並べ替える","content":{"application/json":{"schema":{"type":"object","properties":{"nodes":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["category","service"]},"id":{"type":"string","format":"uuid"}},"required":["kind","id"],"additionalProperties":false}},"order_hash":{"type":"string"}},"required":["nodes","order_hash"]}}}},"400":{"description":"利用できないヘッダ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"鍵が無い・無効","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"範囲不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"見つからない","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"予約・冪等キーの競合","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"本文が1 MiBを超えている","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"入力の検証失敗","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"回数の上限","headers":{"RateLimit-Limit":{"description":"固定窓内の回数上限","schema":{"type":"integer","minimum":1}},"RateLimit-Remaining":{"description":"固定窓内の残り回数","schema":{"type":"integer","minimum":0}},"RateLimit-Reset":{"description":"窓終了までの秒数","schema":{"type":"integer","minimum":0}},"Retry-After":{"description":"再試行までの待機秒数","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"内部エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-goyoka-audience":"tenant","x-goyoka-required-scopes":["services:write"],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"同じ内容の再送に同じ値を使います。異なる内容との再利用や処理中の再送は409 IDEMPOTENCY_KEY_REUSEDです。"}]}},"/api/v1/settings/hours":{"get":{"operationId":"salon-settings_hours","tags":["salon-settings"],"summary":"営業時間と例外日を読む","description":"曜日 0（日曜）から 6（土曜）の 7 日を返します。休業曜日の ranges は空配列、未設定の settings は null。例外日は開始日・ID 順です。\n\n必要な範囲: `salon-settings:read`","security":[{"bearer":[]},{"oauth2":["salon-settings:read"]}],"responses":{"200":{"description":"営業時間と例外日を読む","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"days":{"type":"array","items":{"type":"object","properties":{"weekday":{"type":"integer","minimum":0,"maximum":6},"ranges":{"type":"array","items":{"type":"object","properties":{"start_time":{"type":["string","null"],"pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"end_time":{"type":["string","null"],"pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"}},"required":["start_time","end_time"],"additionalProperties":false}}},"required":["weekday","ranges"],"additionalProperties":false}},"settings":{"type":["object","null"],"properties":{"buffer_before_minutes":{"type":"integer","minimum":0,"maximum":240},"buffer_after_minutes":{"type":"integer","minimum":0,"maximum":240},"slot_granularity_minutes":{"type":"integer","minimum":5,"maximum":120},"min_notice_minutes":{"type":"integer","minimum":0},"max_advance_days":{"type":"integer","minimum":1,"maximum":365}},"required":["buffer_before_minutes","buffer_after_minutes","slot_granularity_minutes","min_notice_minutes","max_advance_days"],"additionalProperties":false},"overrides":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"type":{"type":"string","enum":["CLOSED","CUSTOM_HOURS","TRIP"]},"start_date":{"type":"string","format":"date"},"end_date":{"type":"string","format":"date"},"start_time":{"type":["string","null"],"pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"end_time":{"type":["string","null"],"pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"label":{"type":["string","null"],"maxLength":120},"location_name":{"type":["string","null"],"maxLength":120},"location_address":{"type":["string","null"],"maxLength":300},"access_note":{"type":["string","null"],"maxLength":2000}},"required":["id","type","start_date","end_date","start_time","end_time","label","location_name","location_address","access_note"],"additionalProperties":false}}},"required":["days","settings","overrides"]}},"required":["data"]}}}},"400":{"description":"利用できないヘッダ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"鍵が無い・無効","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"範囲不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"見つからない","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"予約・冪等キーの競合","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"本文が1 MiBを超えている","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"入力の検証失敗","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"回数の上限","headers":{"RateLimit-Limit":{"description":"固定窓内の回数上限","schema":{"type":"integer","minimum":1}},"RateLimit-Remaining":{"description":"固定窓内の残り回数","schema":{"type":"integer","minimum":0}},"RateLimit-Reset":{"description":"窓終了までの秒数","schema":{"type":"integer","minimum":0}},"Retry-After":{"description":"再試行までの待機秒数","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"内部エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-goyoka-audience":"tenant","x-goyoka-required-scopes":["salon-settings:read"]},"patch":{"operationId":"salon-settings_update_hours","tags":["salon-settings"],"summary":"営業時間と例外日を置き換える","description":"days は 7 曜日を一度ずつ指定して全置換します。各 range は start_time < end_time。settings は 5 欄すべて指定、省略すると保持します。overrides は省略で保持、空配列で全削除、配列で全置換。同店の既存 ID は維持し、他店・未知 ID は 404。既存予約は変更しません。鍵やトークンの持ち主が現在このお店のメンバーであることを確認します。同値でも所属がなければ409 SETTINGS_OPERATION_BLOCKED（NOT_CURRENT_MEMBER）で拒否します。\n\n409 SETTINGS_OPERATION_BLOCKEDのdetails.blocksはcodeとmessageの1要素配列です。\n\n必要な範囲: `salon-settings:write`","security":[{"bearer":[]},{"oauth2":["salon-settings:write"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"days":{"type":"array","items":{"type":"object","properties":{"weekday":{"type":"integer","minimum":0,"maximum":6},"ranges":{"type":"array","items":{"type":"object","properties":{"start_time":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"end_time":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"}},"required":["start_time","end_time"],"additionalProperties":false}}},"required":["weekday","ranges"],"additionalProperties":false}},"settings":{"type":"object","properties":{"buffer_before_minutes":{"type":"integer","minimum":0,"maximum":240},"buffer_after_minutes":{"type":"integer","minimum":0,"maximum":240},"slot_granularity_minutes":{"type":"integer","minimum":5,"maximum":120},"min_notice_minutes":{"type":"integer","minimum":0},"max_advance_days":{"type":"integer","minimum":1,"maximum":365}},"required":["buffer_before_minutes","buffer_after_minutes","slot_granularity_minutes","min_notice_minutes","max_advance_days"],"additionalProperties":false},"overrides":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"type":{"type":"string","enum":["CLOSED","CUSTOM_HOURS","TRIP"]},"start_date":{"type":"string","format":"date"},"end_date":{"type":["string","null"],"format":"date"},"start_time":{"type":["string","null"],"pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"end_time":{"type":["string","null"],"pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"label":{"type":["string","null"],"maxLength":120},"location_name":{"type":["string","null"],"maxLength":120},"location_address":{"type":["string","null"],"maxLength":300},"access_note":{"type":["string","null"],"maxLength":2000}},"required":["type","start_date"],"additionalProperties":false}}},"required":["days"],"additionalProperties":false}}}},"responses":{"200":{"description":"営業時間と例外日を置き換える","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"days":{"type":"array","items":{"type":"object","properties":{"weekday":{"type":"integer","minimum":0,"maximum":6},"ranges":{"type":"array","items":{"type":"object","properties":{"start_time":{"type":["string","null"],"pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"end_time":{"type":["string","null"],"pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"}},"required":["start_time","end_time"],"additionalProperties":false}}},"required":["weekday","ranges"],"additionalProperties":false}},"settings":{"type":["object","null"],"properties":{"buffer_before_minutes":{"type":"integer","minimum":0,"maximum":240},"buffer_after_minutes":{"type":"integer","minimum":0,"maximum":240},"slot_granularity_minutes":{"type":"integer","minimum":5,"maximum":120},"min_notice_minutes":{"type":"integer","minimum":0},"max_advance_days":{"type":"integer","minimum":1,"maximum":365}},"required":["buffer_before_minutes","buffer_after_minutes","slot_granularity_minutes","min_notice_minutes","max_advance_days"],"additionalProperties":false},"overrides":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"type":{"type":"string","enum":["CLOSED","CUSTOM_HOURS","TRIP"]},"start_date":{"type":"string","format":"date"},"end_date":{"type":"string","format":"date"},"start_time":{"type":["string","null"],"pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"end_time":{"type":["string","null"],"pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"label":{"type":["string","null"],"maxLength":120},"location_name":{"type":["string","null"],"maxLength":120},"location_address":{"type":["string","null"],"maxLength":300},"access_note":{"type":["string","null"],"maxLength":2000}},"required":["id","type","start_date","end_date","start_time","end_time","label","location_name","location_address","access_note"],"additionalProperties":false}}},"required":["days","settings","overrides"]}},"required":["data"]}}}},"400":{"description":"利用できないヘッダ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"鍵が無い・無効","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"範囲不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"見つからない","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"予約・冪等キーの競合","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"本文が1 MiBを超えている","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"入力の検証失敗","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"回数の上限","headers":{"RateLimit-Limit":{"description":"固定窓内の回数上限","schema":{"type":"integer","minimum":1}},"RateLimit-Remaining":{"description":"固定窓内の残り回数","schema":{"type":"integer","minimum":0}},"RateLimit-Reset":{"description":"窓終了までの秒数","schema":{"type":"integer","minimum":0}},"Retry-After":{"description":"再試行までの待機秒数","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"内部エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-goyoka-audience":"tenant","x-goyoka-required-scopes":["salon-settings:write"],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"同じ内容の再送に同じ値を使います。異なる内容との再利用や処理中の再送は409 IDEMPOTENCY_KEY_REUSEDです。"}]}},"/api/v1/settings/embed-presets":{"get":{"operationId":"salon-settings_embed_presets_list","tags":["salon-settings"],"summary":"お店の埋め込みコードの一覧","description":"BOOKING・CONTACT・ANNOUNCEの順に、各種類の作成日時・IDの昇順で返します。機能停止中も保存済みコードを読めます。\n\n保存済みの全行をdataに返し、cursor・limit・next_cursorはありません。embed_urlはリンク先、snippetはホームページのHTMLへ貼るscriptです。\n\nlast_seenは許可・非表示に関係なくコードの最終読込を表し、未記録ならnullです。検知は表示成功・訪問人数・本人確認・サイト所有の証明ではなく、許可前にお店の方がアドレスを確認してください。\n\n必要な範囲: `salon-settings:read`","security":[{"bearer":[]},{"oauth2":["salon-settings:read"]}],"responses":{"200":{"description":"お店の埋め込みコードの一覧","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantEmbedPresetListResponse"}}}},"400":{"description":"利用できないヘッダ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"鍵が無い・無効","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"範囲不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"見つからない","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"予約・冪等キーの競合","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"本文が1 MiBを超えている","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"入力の検証失敗","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"回数の上限","headers":{"RateLimit-Limit":{"description":"固定窓内の回数上限","schema":{"type":"integer","minimum":1}},"RateLimit-Remaining":{"description":"固定窓内の残り回数","schema":{"type":"integer","minimum":0}},"RateLimit-Reset":{"description":"窓終了までの秒数","schema":{"type":"integer","minimum":0}},"Retry-After":{"description":"再試行までの待機秒数","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"内部エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-goyoka-audience":"tenant","x-goyoka-required-scopes":["salon-settings:read"]},"post":{"operationId":"salon-settings_embed_presets_create","tags":["salon-settings"],"summary":"お店の埋め込みコードを作る","description":"nameを省略すると自動で名前を付け、同じ名前には連番を付けます。embed_urlはリンク先、snippetはホームページのHTMLへ貼るscriptです。\n\n新しい貼り付け先は、コードを貼って自動検知した後、お店の方が管理画面の設定の『お店』のタブにある『埋め込みを貼ってよいサイト』で許可します。検知されなければアドレスを入力して許可し、コードの作成・取得だけでは未許可サイトに表示できません。\n\noriginは指定できず、APIは貼り付け先の許可を増減しません。許可の追加・削除と検知の非表示は管理画面でお店の方が行います。\n\nlast_seenは許可・非表示に関係なくコードの最終読込を表し、未記録ならnullです。検知は表示成功・訪問人数・本人確認・サイト所有の証明ではなく、許可前にお店の方がアドレスを確認してください。\n\n作成時の機能停止は409 EMBED_EDIT_BLOCKED（details.blocks[].code:FEATURE_DISABLED）です。理由はdetails.blocksの1要素にcodeとmessageで返します。\n\nACCENT_CONTRASTは色とテーマの不適合、予約以外の初期選択はSERVICE_IDS_NOT_ALLOWEDです。入力だけで決まる不適合は422 BOOKING_INPUT_INVALIDで、details.blocksは1要素です。\n\n明示したメニュー・差出人が不明・他店ならdetailsなしの404 NOT_FOUNDです。\n\noriginなどの未知キーやUUID・色・文字数など入力の形の誤りは、RESTでは422 VALIDATION（未知キーだけならerror.messageにキー名が入り、details.fieldErrorsは空object）、MCPではツールの入力検査のエラー文を返します。\n\nCONTACT以外への非nullのsender_profile_idはハンドラ内で検査し、422 VALIDATIONです。これはMCPでもstructuredContent.errorにcode:VALIDATIONとdetails.fieldErrors.sender_profile_idを返します。\n\n鍵やトークンの持ち主が現在このお店のメンバーであることを確認します。同値でも所属がなければ409 SETTINGS_OPERATION_BLOCKED（NOT_CURRENT_MEMBER）で拒否します。409 SETTINGS_OPERATION_BLOCKEDのdetails.blocksはcodeとmessageの1要素配列です。\n\n必要な範囲: `salon-settings:write`","security":[{"bearer":[]},{"oauth2":["salon-settings:write"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateTenantEmbedPresetBody"}}}},"responses":{"201":{"description":"お店の埋め込みコードを作る","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantEmbedPresetResponse"}}}},"400":{"description":"利用できないヘッダ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"鍵が無い・無効","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"範囲不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"見つからない","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"予約・冪等キーの競合","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"本文が1 MiBを超えている","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"入力の検証失敗","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"回数の上限","headers":{"RateLimit-Limit":{"description":"固定窓内の回数上限","schema":{"type":"integer","minimum":1}},"RateLimit-Remaining":{"description":"固定窓内の残り回数","schema":{"type":"integer","minimum":0}},"RateLimit-Reset":{"description":"窓終了までの秒数","schema":{"type":"integer","minimum":0}},"Retry-After":{"description":"再試行までの待機秒数","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"内部エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-goyoka-audience":"tenant","x-goyoka-required-scopes":["salon-settings:write"],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"同じ内容の再送に同じ値を使います。異なる内容との再利用や処理中の再送は409 IDEMPOTENCY_KEY_REUSEDです。"}]}},"/api/v1/settings/embed-presets/{presetId}":{"patch":{"operationId":"salon-settings_embed_presets_update","tags":["salon-settings"],"summary":"お店の埋め込みコードを更新する","description":"省略した欄は保持し、空objectや同じ値の往復では保存しません。nullは解除、accent_color:nullは標準色へ戻します。service_idsの空配列は追加の初期選択なしで、公開範囲を制限せず必須選択のルールも変えません。surfaceは変更できません。\n\n読戻しではid・created_at・embed_url・snippet・last_seenとsurfaceを外してください。embed_urlはリンク先、snippetはホームページのHTMLへ貼るscriptです。\n\noriginは指定できず、APIは貼り付け先の許可を増減しません。許可の追加・削除と検知の非表示は管理画面でお店の方が行います。\n\nlast_seenは許可・非表示に関係なくコードの最終読込を表し、未記録ならnullです。検知は表示成功・訪問人数・本人確認・サイト所有の証明ではなく、許可前にお店の方がアドレスを確認してください。\n\nACCENT_CONTRASTは色とテーマの不適合、予約以外の初期選択はSERVICE_IDS_NOT_ALLOWEDです。入力だけで決まる不適合は422 BOOKING_INPUT_INVALID、PATCHで色・テーマなどを省略して保存値との組合せで決まる不適合は409 EMBED_EDIT_BLOCKEDで、details.blocksは1要素です。\n\n明示したメニュー・差出人が不明・他店ならdetailsなしの404 NOT_FOUNDです。\n\n変更時にservice_idsを省略して保存済み参照が無効なら409 EMBED_EDIT_BLOCKED（details.blocks[].code:UNKNOWN_SERVICE）です。保存済みIDは自動で消さず、使えるメニューの配列を送ってください。\n\noriginなどの未知キーやUUID・色・文字数など入力の形の誤りは、RESTでは422 VALIDATION（未知キーだけならerror.messageにキー名が入り、details.fieldErrorsは空object）、MCPではツールの入力検査のエラー文を返します。\n\nCONTACT以外への非nullのsender_profile_idはハンドラ内で検査し、422 VALIDATIONです。これはMCPでもstructuredContent.errorにcode:VALIDATIONとdetails.fieldErrors.sender_profile_idを返します。\n\n鍵やトークンの持ち主が現在このお店のメンバーであることを確認します。同値でも所属がなければ409 SETTINGS_OPERATION_BLOCKED（NOT_CURRENT_MEMBER）で拒否します。409 SETTINGS_OPERATION_BLOCKEDのdetails.blocksはcodeとmessageの1要素配列です。\n\n必要な範囲: `salon-settings:write`","security":[{"bearer":[]},{"oauth2":["salon-settings:write"]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"presetId","in":"path"},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"同じ内容の再送に同じ値を使います。異なる内容との再利用や処理中の再送は409 IDEMPOTENCY_KEY_REUSEDです。"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateTenantEmbedPresetBody"}}}},"responses":{"200":{"description":"お店の埋め込みコードを更新する","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantEmbedPresetResponse"}}}},"400":{"description":"利用できないヘッダ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"鍵が無い・無効","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"範囲不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"見つからない","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"予約・冪等キーの競合","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"本文が1 MiBを超えている","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"入力の検証失敗","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"回数の上限","headers":{"RateLimit-Limit":{"description":"固定窓内の回数上限","schema":{"type":"integer","minimum":1}},"RateLimit-Remaining":{"description":"固定窓内の残り回数","schema":{"type":"integer","minimum":0}},"RateLimit-Reset":{"description":"窓終了までの秒数","schema":{"type":"integer","minimum":0}},"Retry-After":{"description":"再試行までの待機秒数","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"内部エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-goyoka-audience":"tenant","x-goyoka-required-scopes":["salon-settings:write"]},"delete":{"operationId":"salon-settings_embed_presets_delete","tags":["salon-settings"],"summary":"お店の埋め込みコードを削除する","description":"bodyは不要です。サンプル・デモ用に用意された埋め込み設定は、削除だけ409 EMBED_EDIT_BLOCKEDで、details.blocks[].codeはSEED_OWNED_PRESETです。理由はdetails.blocksの1要素にcodeとmessageで返します。許可済みサイトや検知は変更しません。任意の冪等キーで再送できます。鍵やトークンの持ち主が現在このお店のメンバーであることを確認します。同値でも所属がなければ409 SETTINGS_OPERATION_BLOCKED（NOT_CURRENT_MEMBER）で拒否します。\n\n409 SETTINGS_OPERATION_BLOCKEDのdetails.blocksはcodeとmessageの1要素配列です。\n\n必要な範囲: `salon-settings:write`","security":[{"bearer":[]},{"oauth2":["salon-settings:write"]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"presetId","in":"path"},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"同じ内容の再送に同じ値を使います。異なる内容との再利用や処理中の再送は409 IDEMPOTENCY_KEY_REUSEDです。"}],"responses":{"200":{"description":"お店の埋め込みコードを削除する","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteEmbedPresetResponse"}}}},"400":{"description":"利用できないヘッダ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"鍵が無い・無効","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"範囲不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"見つからない","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"予約・冪等キーの競合","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"本文が1 MiBを超えている","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"入力の検証失敗","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"回数の上限","headers":{"RateLimit-Limit":{"description":"固定窓内の回数上限","schema":{"type":"integer","minimum":1}},"RateLimit-Remaining":{"description":"固定窓内の残り回数","schema":{"type":"integer","minimum":0}},"RateLimit-Reset":{"description":"窓終了までの秒数","schema":{"type":"integer","minimum":0}},"Retry-After":{"description":"再試行までの待機秒数","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"内部エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-goyoka-audience":"tenant","x-goyoka-required-scopes":["salon-settings:write"]}},"/api/v1/settings/embed-origins":{"get":{"operationId":"salon-settings_embed_origins_get","tags":["salon-settings"],"summary":"許可済みサイトと貼り付け先の検知を読む","description":"allowed_originsは許可済みサイト、pending_sightingsは未許可かつ非表示でないoriginごとの最新検知で、origin・preset_id・last_seen_atを返します。表示成功やサイト所有の証明ではありません。許可の追加・削除は管理画面の設定の『お店』のタブにある『埋め込みを貼ってよいサイト』で、お店の方が行う。\n\n新しい貼り付け先は、コードを貼って自動検知した後、お店の方が管理画面の設定の『お店』のタブにある『埋め込みを貼ってよいサイト』で許可します。検知されなければアドレスを入力して許可し、コードの作成・取得だけでは未許可サイトに表示できません。\n\n必要な範囲: `salon-settings:read`","security":[{"bearer":[]},{"oauth2":["salon-settings:read"]}],"responses":{"200":{"description":"許可済みサイトと貼り付け先の検知を読む","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmbedOriginsResponse"}}}},"400":{"description":"利用できないヘッダ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"鍵が無い・無効","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"範囲不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"見つからない","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"予約・冪等キーの競合","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"本文が1 MiBを超えている","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"入力の検証失敗","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"回数の上限","headers":{"RateLimit-Limit":{"description":"固定窓内の回数上限","schema":{"type":"integer","minimum":1}},"RateLimit-Remaining":{"description":"固定窓内の残り回数","schema":{"type":"integer","minimum":0}},"RateLimit-Reset":{"description":"窓終了までの秒数","schema":{"type":"integer","minimum":0}},"Retry-After":{"description":"再試行までの待機秒数","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"内部エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-goyoka-audience":"tenant","x-goyoka-required-scopes":["salon-settings:read"]}},"/api/v1/settings/salon":{"get":{"operationId":"salon-settings_profile_get","tags":["salon-settings"],"summary":"お店の基本情報を読む","description":"保存された基本情報9欄と読取専用のlogo_urlを返します。読み取りでは設定行や文面を作らず、メールも送りません。logo_urlは更新できません。\n\nロゴの変更は管理画面で行ってください。\n\n必要な範囲: `salon-settings:read`","security":[{"bearer":[]},{"oauth2":["salon-settings:read"]}],"responses":{"200":{"description":"お店の基本情報を読む","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SalonProfileResponse"}}}},"400":{"description":"利用できないヘッダ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"鍵が無い・無効","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"範囲不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"見つからない","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"予約・冪等キーの競合","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"本文が1 MiBを超えている","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"入力の検証失敗","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"回数の上限","headers":{"RateLimit-Limit":{"description":"固定窓内の回数上限","schema":{"type":"integer","minimum":1}},"RateLimit-Remaining":{"description":"固定窓内の残り回数","schema":{"type":"integer","minimum":0}},"RateLimit-Reset":{"description":"窓終了までの秒数","schema":{"type":"integer","minimum":0}},"Retry-After":{"description":"再試行までの待機秒数","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"内部エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-goyoka-audience":"tenant","x-goyoka-required-scopes":["salon-settings:read"]},"patch":{"operationId":"salon-settings_profile_update","tags":["salon-settings"],"summary":"お店の基本情報を変更する","description":"省略した欄は保持します。保存値との完全一致は業務検査より先に200で返し、正規化後の一致も保存しません。nameは前後の空白を除き、任意のtext欄は空ならnullにします。logo_urlは読取専用です。\n\n409 SETTINGS_OPERATION_BLOCKEDのdetails.blocksはcodeとmessageの1要素配列です。競合したら設定を読み直してください。\n\nロゴの変更は管理画面で行ってください。店名と支払い案内は、既存予約を含む今後送るメールに現在値が使われます。文面に対応する変数がある場合に現れ、無料予約の支払い案内は空、イベントでは個別の支払い案内と差出人名が優先します。所在地とonline_meeting_urlの変更は今後作られる予約に反映し、既存予約に記録された所在地・入室URLは変えません。公開ページの基本情報も更新します。payment_note_in_person・payment_note_online・payment_note_remote・online_meeting_urlの実変更に成功したときだけ、すべてのOWNER（オーナー）へ各1通、変更した欄の名前と鍵やトークンの名前、設定画面へのリンクを知らせます。値はメールに載せません。通常は応答後に送り、after登録失敗時は直接送ります。無変更・正規化後の一致・対象外だけの変更・失敗・冪等再送では送りません。お客様への保存時送信は0通です。変更する予約設定行がなければ409 SETTINGS_OPERATION_BLOCKED（BOOKING_NOT_SET_UP）、読んだ保存対象列が変わっていれば409 SETTINGS_OPERATION_BLOCKED（details.blocks[].code:CONCURRENT_UPDATE）で、2表を部分保存しません。鍵やトークンの持ち主が現在このお店のメンバーでないと、同値の送信でも409 SETTINGS_OPERATION_BLOCKED（details.blocks[].code:NOT_CURRENT_MEMBER）です。任意の冪等キーを使えます。\n\n必要な範囲: `salon-settings:write`","security":[{"bearer":[]},{"oauth2":["salon-settings:write"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateSalonProfileBody"}}}},"responses":{"200":{"description":"お店の基本情報を変更する","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SalonProfileResponse"}}}},"400":{"description":"利用できないヘッダ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"鍵が無い・無効","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"範囲不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"見つからない","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"予約・冪等キーの競合","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"本文が1 MiBを超えている","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"入力の検証失敗","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"回数の上限","headers":{"RateLimit-Limit":{"description":"固定窓内の回数上限","schema":{"type":"integer","minimum":1}},"RateLimit-Remaining":{"description":"固定窓内の残り回数","schema":{"type":"integer","minimum":0}},"RateLimit-Reset":{"description":"窓終了までの秒数","schema":{"type":"integer","minimum":0}},"Retry-After":{"description":"再試行までの待機秒数","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"内部エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-goyoka-audience":"tenant","x-goyoka-required-scopes":["salon-settings:write"],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"同じ内容の再送に同じ値を使います。異なる内容との再利用や処理中の再送は409 IDEMPOTENCY_KEY_REUSEDです。"}]}},"/api/v1/settings/booking-policy":{"get":{"operationId":"salon-settings_booking_policy_get","tags":["salon-settings"],"summary":"予約の受け方を読む","description":"予約の確定方式、健康情報の同意文、通常予約の指名とおまかせの設定を読みます。設定行は作らず、メールも送りません。\n\n必要な範囲: `salon-settings:read`","security":[{"bearer":[]},{"oauth2":["salon-settings:read"]}],"responses":{"200":{"description":"予約の受け方を読む","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookingPolicyResponse"}}}},"400":{"description":"利用できないヘッダ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"鍵が無い・無効","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"範囲不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"見つからない","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"予約・冪等キーの競合","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"本文が1 MiBを超えている","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"入力の検証失敗","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"回数の上限","headers":{"RateLimit-Limit":{"description":"固定窓内の回数上限","schema":{"type":"integer","minimum":1}},"RateLimit-Remaining":{"description":"固定窓内の残り回数","schema":{"type":"integer","minimum":0}},"RateLimit-Reset":{"description":"窓終了までの秒数","schema":{"type":"integer","minimum":0}},"Retry-After":{"description":"再試行までの待機秒数","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"内部エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-goyoka-audience":"tenant","x-goyoka-required-scopes":["salon-settings:read"]},"patch":{"operationId":"salon-settings_booking_policy_update","tags":["salon-settings"],"summary":"予約の受け方を変更する","description":"省略した欄は保持し、完全一致なら業務検査より先に200で返し、保存も文面の補充もしません。default_confirmationはIMMEDIATE・APPROVAL・PAYMENTです。設定行がなければ既定値との一致だけ200、変更は409 SETTINGS_OPERATION_BLOCKED（BOOKING_NOT_SET_UP）です。保存対象列の競合は409 SETTINGS_OPERATION_BLOCKED（details.blocks[].code:CONCURRENT_UPDATE）です。\n\n409 SETTINGS_OPERATION_BLOCKEDのdetails.blocksはcodeとmessageの1要素配列です。競合したら設定を読み直してください。変更後がPAYMENTなら、asks_health_infoだけの変更でも設定保存前に不足する既定文面全体を補充します。既存文面は書き換えず、補充件数は応答しません。保存時のメール送信は0通です。補充される開始・終了基準（START/END）の文面は無効なので次回の掃引で増える送信は0通ですが、既存の有効なリマインドは動きます。補充されたBOOKED文面は掃引では遡りませんが、既存予約にも以後の状態遷移で使われ、確認・キャンセル・承認・お断り・承認期限切れのcron・入金確認などで送られるようになります。請求免除の知らせなどsystem通知の未送分も以後の処理でOWNERへ送られるようになります。asks_health_infoは新しい予約の同意文に健康・心身情報の取得・保存を含めるかを変えます。未確認PENDINGは確認時点の新しいdefault_confirmationを読む場合があり、メニューの例外が優先します。すでに申込に凍結された承認待ち・入金待ちの方式は変えません。session_provider_selectable、session_allow_auto_assign、session_reveal_auto_assigned_providerは担当者ごとに通常予約を受けるお店だけ変更できます。指名とおまかせを両方無効にはできません。session_schedulingは読み取り専用です。GETと同じ値を戻すときは受け付けます。違う値を指定すると422 VALIDATIONです。鍵やトークンの持ち主が現在このお店のメンバーでないと、同値の送信でも409 SETTINGS_OPERATION_BLOCKED（details.blocks[].code:NOT_CURRENT_MEMBER）です。任意の冪等キーを使えます。\n\n必要な範囲: `salon-settings:write`","security":[{"bearer":[]},{"oauth2":["salon-settings:write"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateBookingPolicyBody"}}}},"responses":{"200":{"description":"予約の受け方を変更する","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookingPolicyResponse"}}}},"400":{"description":"利用できないヘッダ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"鍵が無い・無効","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"範囲不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"見つからない","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"予約・冪等キーの競合","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"本文が1 MiBを超えている","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"入力の検証失敗","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"回数の上限","headers":{"RateLimit-Limit":{"description":"固定窓内の回数上限","schema":{"type":"integer","minimum":1}},"RateLimit-Remaining":{"description":"固定窓内の残り回数","schema":{"type":"integer","minimum":0}},"RateLimit-Reset":{"description":"窓終了までの秒数","schema":{"type":"integer","minimum":0}},"Retry-After":{"description":"再試行までの待機秒数","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"内部エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-goyoka-audience":"tenant","x-goyoka-required-scopes":["salon-settings:write"],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"同じ内容の再送に同じ値を使います。異なる内容との再利用や処理中の再送は409 IDEMPOTENCY_KEY_REUSEDです。"}]}},"/api/v1/settings/safety":{"get":{"operationId":"salon-settings_safety_get","tags":["salon-settings"],"summary":"予約の公開範囲を読む","description":"保存された予約の公開範囲を返します。設定行がなければPUBLICを返し、行は作りません。メールも送りません。\n\n必要な範囲: `salon-settings:read`","security":[{"bearer":[]},{"oauth2":["salon-settings:read"]}],"responses":{"200":{"description":"予約の公開範囲を読む","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SalonSafetyResponse"}}}},"400":{"description":"利用できないヘッダ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"鍵が無い・無効","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"範囲不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"見つからない","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"予約・冪等キーの競合","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"本文が1 MiBを超えている","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"入力の検証失敗","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"回数の上限","headers":{"RateLimit-Limit":{"description":"固定窓内の回数上限","schema":{"type":"integer","minimum":1}},"RateLimit-Remaining":{"description":"固定窓内の残り回数","schema":{"type":"integer","minimum":0}},"RateLimit-Reset":{"description":"窓終了までの秒数","schema":{"type":"integer","minimum":0}},"Retry-After":{"description":"再試行までの待機秒数","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"内部エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-goyoka-audience":"tenant","x-goyoka-required-scopes":["salon-settings:read"]},"patch":{"operationId":"salon-settings_safety_update","tags":["salon-settings"],"summary":"予約の公開範囲を変更する","description":"visibilityはPUBLIC・PER_SERVICE・MEMBERS_ONLYです。省略と完全一致は業務検査より先に200で返し保存しません。設定行なしのPUBLICも同じです。行がないときの変更は409 SETTINGS_OPERATION_BLOCKED（BOOKING_NOT_SET_UP）、保存対象列の競合は409 SETTINGS_OPERATION_BLOCKED（details.blocks[].code:CONCURRENT_UPDATE）です。\n\n409 SETTINGS_OPERATION_BLOCKEDのdetails.blocksはcodeとmessageの1要素配列です。競合したら設定を読み直してください。公開の空き枠と予約ページの案内に反映します。MEMBERS_ONLYでは台帳のお客様だけが予約でき、PUBLIC・PER_SERVICEでもメニューのお客様限定設定は効きます。MEMBERS_ONLYはご案内ページ全体を非公開にする設定ではなく、紹介文やアクセスが公開のままの場合があります。既存のsearchableは変えません。既存予約・購読・同意は変えず、保存時にメールは送りません。API の手動予約（booking_create）はこの制限を受けません。鍵やトークンの持ち主が現在このお店のメンバーでないと、同値の送信でも409 SETTINGS_OPERATION_BLOCKED（details.blocks[].code:NOT_CURRENT_MEMBER）です。任意の冪等キーを使えます。\n\n必要な範囲: `salon-settings:write`","security":[{"bearer":[]},{"oauth2":["salon-settings:write"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateSalonSafetyBody"}}}},"responses":{"200":{"description":"予約の公開範囲を変更する","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SalonSafetyResponse"}}}},"400":{"description":"利用できないヘッダ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"鍵が無い・無効","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"範囲不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"見つからない","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"予約・冪等キーの競合","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"本文が1 MiBを超えている","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"入力の検証失敗","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"回数の上限","headers":{"RateLimit-Limit":{"description":"固定窓内の回数上限","schema":{"type":"integer","minimum":1}},"RateLimit-Remaining":{"description":"固定窓内の残り回数","schema":{"type":"integer","minimum":0}},"RateLimit-Reset":{"description":"窓終了までの秒数","schema":{"type":"integer","minimum":0}},"Retry-After":{"description":"再試行までの待機秒数","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"内部エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-goyoka-audience":"tenant","x-goyoka-required-scopes":["salon-settings:write"],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"同じ内容の再送に同じ値を使います。異なる内容との再利用や処理中の再送は409 IDEMPOTENCY_KEY_REUSEDです。"}]}},"/api/v1/settings/blocked-contacts":{"get":{"operationId":"salon-settings_blocked_contacts_list","tags":["salon-settings"],"summary":"ブロックした連絡先を読む","description":"自店のブロックを作成日時とIDの降順に返します。limitは1〜200（既定50）、続きはnext_cursorをcursorへ渡します。customers:contactがあるとcontact内のメールアドレスと自由記述noteを返し、なければcontact全体をnullにします。電話番号の欄はありません。読み取りで保存やメール送信はしません。\n\n必要な範囲: `salon-settings:read`\n\n`customers:contact` があるとメールアドレスと自由記述noteが入る。電話番号は含まない。","security":[{"bearer":[]},{"oauth2":["salon-settings:read"]}],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":200,"default":50},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string"},"required":false,"name":"cursor","in":"query"}],"responses":{"200":{"description":"ブロックした連絡先を読む","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlockedContactsResponse"}}}},"400":{"description":"利用できないヘッダ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"鍵が無い・無効","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"範囲不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"見つからない","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"予約・冪等キーの競合","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"本文が1 MiBを超えている","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"入力の検証失敗","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"回数の上限","headers":{"RateLimit-Limit":{"description":"固定窓内の回数上限","schema":{"type":"integer","minimum":1}},"RateLimit-Remaining":{"description":"固定窓内の残り回数","schema":{"type":"integer","minimum":0}},"RateLimit-Reset":{"description":"窓終了までの秒数","schema":{"type":"integer","minimum":0}},"Retry-After":{"description":"再試行までの待機秒数","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"内部エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-goyoka-audience":"tenant","x-goyoka-required-scopes":["salon-settings:read"]},"post":{"operationId":"salon-settings_blocked_contacts_create","tags":["salon-settings"],"summary":"連絡先をブロックする","description":"emailは必須で、salon-settings:writeに加えてcustomers:contactが必要です。範囲がない場合は、空文字・新規・重複・冪等再送とも403で何も保存しません。emailは前後の空白を除き小文字化して320文字以内の形式を検査し、noteは前後の空白を除き空ならnullにします。\n\n409 SETTINGS_OPERATION_BLOCKEDのdetails.blocksはcodeとmessageの1要素配列です。新規も重複も201で返し、重複時は元のid・note・created_atを保持します。応答のcontactにメールアドレスとnoteをまとめ、返却時のcustomers:contactで伏せます。件数は返しません。公開予約、イベント申込み・待機、問い合わせ、新しいお客様返信、ログインリンク要求を入口で止めます。拒否を相手へ知らせないため、問い合わせなどは送信済みに見せて保存も配送もしません。既存予約・既存の会話・購読・同意・予定配信・既存リマインドは取り消しません。お知らせ配信の配信停止ではありません。API の手動予約（booking_create）はこの制限を受けません。保存時のメール送信は0通です。鍵やトークンの持ち主が現在このお店のメンバーでないと、同値の送信でも409 SETTINGS_OPERATION_BLOCKED（details.blocks[].code:NOT_CURRENT_MEMBER）です。任意の冪等キーを使えます。\n\n必要な範囲: `salon-settings:write`\n\n`customers:contact` があるとメールアドレスと自由記述noteが入る。電話番号は含まない。","security":[{"bearer":[]},{"oauth2":["salon-settings:write"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateBlockedContactBody"}}}},"responses":{"201":{"description":"連絡先をブロックする","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlockedContactResponse"}}}},"400":{"description":"利用できないヘッダ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"鍵が無い・無効","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"範囲不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"見つからない","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"予約・冪等キーの競合","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"本文が1 MiBを超えている","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"入力の検証失敗","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"回数の上限","headers":{"RateLimit-Limit":{"description":"固定窓内の回数上限","schema":{"type":"integer","minimum":1}},"RateLimit-Remaining":{"description":"固定窓内の残り回数","schema":{"type":"integer","minimum":0}},"RateLimit-Reset":{"description":"窓終了までの秒数","schema":{"type":"integer","minimum":0}},"Retry-After":{"description":"再試行までの待機秒数","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"内部エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-goyoka-audience":"tenant","x-goyoka-required-scopes":["salon-settings:write"],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"同じ内容の再送に同じ値を使います。異なる内容との再利用や処理中の再送は409 IDEMPOTENCY_KEY_REUSEDです。"}]}},"/api/v1/settings/blocked-contacts/{id}":{"delete":{"operationId":"salon-settings_blocked_contacts_delete","tags":["salon-settings"],"summary":"連絡先のブロックを解除する","description":"自店のブロックだけを解除し、idとdeletedだけ返します。他店・不明IDは同じ404、読み取り後の変更は409 SETTINGS_OPERATION_BLOCKED（CONCURRENT_UPDATE）です。メール送信や過去の申込みの再実行はしません。キーなしの再削除は404、同じ冪等キーの再送は成功を再生します。\n\n409 SETTINGS_OPERATION_BLOCKEDのdetails.blocksはcodeとmessageの1要素配列です。鍵やトークンの持ち主が現在このお店のメンバーでないと、同値の送信でも409 SETTINGS_OPERATION_BLOCKED（details.blocks[].code:NOT_CURRENT_MEMBER）です。任意の冪等キーを使えます。\n\n必要な範囲: `salon-settings:write`","security":[{"bearer":[]},{"oauth2":["salon-settings:write"]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"同じ内容の再送に同じ値を使います。異なる内容との再利用や処理中の再送は409 IDEMPOTENCY_KEY_REUSEDです。"}],"responses":{"200":{"description":"連絡先のブロックを解除する","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeletedBlockedContactResponse"}}}},"400":{"description":"利用できないヘッダ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"鍵が無い・無効","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"範囲不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"見つからない","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"予約・冪等キーの競合","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"本文が1 MiBを超えている","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"入力の検証失敗","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"回数の上限","headers":{"RateLimit-Limit":{"description":"固定窓内の回数上限","schema":{"type":"integer","minimum":1}},"RateLimit-Remaining":{"description":"固定窓内の残り回数","schema":{"type":"integer","minimum":0}},"RateLimit-Reset":{"description":"窓終了までの秒数","schema":{"type":"integer","minimum":0}},"Retry-After":{"description":"再試行までの待機秒数","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"内部エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-goyoka-audience":"tenant","x-goyoka-required-scopes":["salon-settings:write"]}},"/api/v1/settings/legal":{"get":{"operationId":"salon-settings_legal_documents_get","tags":["salon-settings"],"summary":"法務文書の公開状態を読む","description":"現在のお店の保存値を読みます。下書き行や初版を自動作成しません。statusは公開版番号・公開日時・未公開の変更・公開に足りない欄を表します。既存の同意記録と予約確認メールの版固定URLは変えません。 プライバシーポリシー、予約規約、特商法表記の順で3件を返します。\n\n必要な範囲: `salon-settings:read`","security":[{"bearer":[]},{"oauth2":["salon-settings:read"]}],"responses":{"200":{"description":"法務文書の公開状態を読む","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"documents":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["SALON_PRIVACY","BOOKING_TERMS","TOKUSHO"]},"published_version":{"type":["integer","null"],"exclusiveMinimum":0},"published_at":{"type":["string","null"],"format":"date-time"},"has_unpublished_changes":{"type":"boolean"},"missing_fields":{"type":"array","items":{"type":"string"}}},"required":["kind","published_version","published_at","has_unpublished_changes","missing_fields"]}}},"required":["documents"]}},"required":["data"]}}}},"400":{"description":"利用できないヘッダ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"鍵が無い・無効","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"範囲不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"見つからない","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"予約・冪等キーの競合","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"本文が1 MiBを超えている","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"入力の検証失敗","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"回数の上限","headers":{"RateLimit-Limit":{"description":"固定窓内の回数上限","schema":{"type":"integer","minimum":1}},"RateLimit-Remaining":{"description":"固定窓内の残り回数","schema":{"type":"integer","minimum":0}},"RateLimit-Reset":{"description":"窓終了までの秒数","schema":{"type":"integer","minimum":0}},"Retry-After":{"description":"再試行までの待機秒数","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"内部エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-goyoka-audience":"tenant","x-goyoka-required-scopes":["salon-settings:read"]}},"/api/v1/settings/legal/privacy":{"get":{"operationId":"salon-settings_privacy_policy_get","tags":["salon-settings"],"summary":"プライバシーポリシーの本文を読む","description":"現在のお店の保存値を読みます。下書き行や初版を自動作成しません。statusは公開版番号・公開日時・未公開の変更・公開に足りない欄を表します。既存の同意記録と予約確認メールの版固定URLは変えません。 bodyは保存された本文（未設定はnull）、effective_bodyは未設定時のお店の下敷きを含む本文です。公開・置換には別のlegal:publishが要ります。\n\n必要な範囲: `salon-settings:read`","security":[{"bearer":[]},{"oauth2":["salon-settings:read"]}],"responses":{"200":{"description":"プライバシーポリシーの本文を読む","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"body":{"type":["string","null"]},"effective_body":{"type":"string"},"status":{"type":"object","properties":{"kind":{"type":"string","enum":["SALON_PRIVACY","BOOKING_TERMS","TOKUSHO"]},"published_version":{"type":["integer","null"],"exclusiveMinimum":0},"published_at":{"type":["string","null"],"format":"date-time"},"has_unpublished_changes":{"type":"boolean"},"missing_fields":{"type":"array","items":{"type":"string"}}},"required":["kind","published_version","published_at","has_unpublished_changes","missing_fields"]}},"required":["body","effective_body","status"]}},"required":["data"]}}}},"400":{"description":"利用できないヘッダ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"鍵が無い・無効","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"範囲不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"見つからない","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"予約・冪等キーの競合","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"本文が1 MiBを超えている","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"入力の検証失敗","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"回数の上限","headers":{"RateLimit-Limit":{"description":"固定窓内の回数上限","schema":{"type":"integer","minimum":1}},"RateLimit-Remaining":{"description":"固定窓内の残り回数","schema":{"type":"integer","minimum":0}},"RateLimit-Reset":{"description":"窓終了までの秒数","schema":{"type":"integer","minimum":0}},"Retry-After":{"description":"再試行までの待機秒数","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"内部エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-goyoka-audience":"tenant","x-goyoka-required-scopes":["salon-settings:read"]},"put":{"operationId":"salon-settings_privacy_policy_replace","tags":["salon-settings"],"summary":"確認した個人情報の取扱いの本文を公開する","description":"確認済みの本文をbodyに渡すと公開版と保存本文・更新日時を一つの取引で更新します。機微scopeのlegal:publish単独で呼べます。salon-settings:read/writeを暗黙に含まず、GETで本文を読むにはsalon-settings:readが要ります。鍵やトークンの持ち主が現在のお店のメンバーであることを確認します。\n\n予約確認メールの版固定URLは変えません。409 SETTINGS_OPERATION_BLOCKEDのdetails.blocksはcodeとmessageの1要素配列です。保存本文との完全一致は、null・古い上限超過値・空白を含む値も検査前にchanged:false/published:falseで返し、初版作成や公開版との不整合の修復はしません。実変更はtrim後1〜20000字で、nullへの消去は422です。正規化後の同値も保存しません。公開版と同じ本文で旧列だけ違う場合はchanged:true/published:falseで旧列を更新します。管理画面は同値でも旧列を二重書きしますが、このAPIの完全一致では日時も再描画も変えません。任意の冪等キーを使えます。保存競合は409 SETTINGS_OPERATION_BLOCKEDで、details.blocks[].codeはCONCURRENT_UPDATEです。GETで読み直してから同じ要求をやり直してかまいません。公開直後の次の描画で公開本文と管理画面の状態を読み直します。開いた画面の自動更新はありません。この操作のメール0通、再同意の依頼も送りません。過去の予約・同意記録と過去版は残ります。実更新でprivacyPolicyUpdatedAtが変わると、新しい通常予約・イベント予約・待機・問い合わせの同意版文字列consentVersionも変わります。過去の同意版文字列は変えません。公開済み文書の取り下げはできません。\n\n必要な範囲: `legal:publish`","security":[{"bearer":[]},{"oauth2":["legal:publish"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"body":{"type":["string","null"]}},"required":["body"],"additionalProperties":false}}}},"responses":{"200":{"description":"確認した個人情報の取扱いの本文を公開する","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"kind":{"type":"string","enum":["SALON_PRIVACY","BOOKING_TERMS","TOKUSHO"]},"changed":{"type":"boolean"},"published":{"type":"boolean"},"revision_id":{"type":["string","null"],"format":"uuid"},"published_version":{"type":["integer","null"],"exclusiveMinimum":0},"published_at":{"type":["string","null"],"format":"date-time"}},"required":["kind","changed","published","revision_id","published_version","published_at"]}},"required":["data"]}}}},"400":{"description":"利用できないヘッダ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"鍵が無い・無効","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"範囲不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"見つからない","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"予約・冪等キーの競合","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"本文が1 MiBを超えている","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"入力の検証失敗","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"回数の上限","headers":{"RateLimit-Limit":{"description":"固定窓内の回数上限","schema":{"type":"integer","minimum":1}},"RateLimit-Remaining":{"description":"固定窓内の残り回数","schema":{"type":"integer","minimum":0}},"RateLimit-Reset":{"description":"窓終了までの秒数","schema":{"type":"integer","minimum":0}},"Retry-After":{"description":"再試行までの待機秒数","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"内部エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-goyoka-audience":"tenant","x-goyoka-required-scopes":["legal:publish"],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"同じ内容の再送に同じ値を使います。異なる内容との再利用や処理中の再送は409 IDEMPOTENCY_KEY_REUSEDです。"}]}},"/api/v1/settings/legal/booking-terms":{"get":{"operationId":"salon-settings_booking_terms_get","tags":["salon-settings"],"summary":"予約規約の下書きと公開前の本文を読む","description":"現在のお店の保存値を読みます。下書き行や初版を自動作成しません。statusは公開版番号・公開日時・未公開の変更・公開に足りない欄を表します。既存の同意記録と予約確認メールの版固定URLは変えません。 draftは保存値、previewは公開予定本文と本文＋構造化データのcanonical content_hashです。構造化データ自体は返しません。公開前にGETで本文を確認し、そのhashをexpected_content_hashへ渡してください。公開にはlegal:publishが要ります。\n\n必要な範囲: `salon-settings:read`","security":[{"bearer":[]},{"oauth2":["salon-settings:read"]}],"responses":{"200":{"description":"予約規約の下書きと公開前の本文を読む","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"draft":{"type":"object","properties":{"free_cancel_value":{"type":["number","null"]},"free_cancel_unit":{"type":["string","null"]},"late_cancel_fee_kind":{"type":"string"},"late_cancel_percentage":{"type":["number","null"]},"late_cancel_fixed_yen":{"type":["number","null"]},"no_show_fee_kind":{"type":"string"},"no_show_percentage":{"type":["number","null"]},"no_show_fixed_yen":{"type":["number","null"]},"event_cancel_separate":{"type":"boolean"},"event_free_cancel_value":{"type":["number","null"]},"event_free_cancel_unit":{"type":["string","null"]},"event_late_cancel_fee_kind":{"type":"string"},"event_late_cancel_percentage":{"type":["number","null"]},"event_late_cancel_fixed_yen":{"type":["number","null"]},"event_no_show_fee_kind":{"type":"string"},"event_no_show_percentage":{"type":["number","null"]},"event_no_show_fixed_yen":{"type":["number","null"]},"reschedule_deadline_hours":{"type":["number","null"]},"reschedule_max_count":{"type":["number","null"]},"application_note":{"type":["string","null"]},"cancellation_note":{"type":["string","null"]},"no_show_note":{"type":["string","null"]},"salon_cancellation_note":{"type":["string","null"]},"lateness_note":{"type":["string","null"]},"refund_note":{"type":["string","null"]},"custom_notes":{"type":["string","null"]},"disclaimer_industries":{"type":"array","items":{"type":"string"}}},"required":["free_cancel_value","free_cancel_unit","late_cancel_fee_kind","late_cancel_percentage","late_cancel_fixed_yen","no_show_fee_kind","no_show_percentage","no_show_fixed_yen","event_cancel_separate","event_free_cancel_value","event_free_cancel_unit","event_late_cancel_fee_kind","event_late_cancel_percentage","event_late_cancel_fixed_yen","event_no_show_fee_kind","event_no_show_percentage","event_no_show_fixed_yen","reschedule_deadline_hours","reschedule_max_count","application_note","cancellation_note","no_show_note","salon_cancellation_note","lateness_note","refund_note","custom_notes","disclaimer_industries"],"additionalProperties":false},"status":{"type":"object","properties":{"kind":{"type":"string","enum":["SALON_PRIVACY","BOOKING_TERMS","TOKUSHO"]},"published_version":{"type":["integer","null"],"exclusiveMinimum":0},"published_at":{"type":["string","null"],"format":"date-time"},"has_unpublished_changes":{"type":"boolean"},"missing_fields":{"type":"array","items":{"type":"string"}}},"required":["kind","published_version","published_at","has_unpublished_changes","missing_fields"]},"preview":{"type":"object","properties":{"body":{"type":"string"},"content_hash":{"type":"string","pattern":"^[0-9a-f]{64}$"}},"required":["body","content_hash"]}},"required":["draft","status","preview"]}},"required":["data"]}}}},"400":{"description":"利用できないヘッダ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"鍵が無い・無効","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"範囲不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"見つからない","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"予約・冪等キーの競合","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"本文が1 MiBを超えている","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"入力の検証失敗","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"回数の上限","headers":{"RateLimit-Limit":{"description":"固定窓内の回数上限","schema":{"type":"integer","minimum":1}},"RateLimit-Remaining":{"description":"固定窓内の残り回数","schema":{"type":"integer","minimum":0}},"RateLimit-Reset":{"description":"窓終了までの秒数","schema":{"type":"integer","minimum":0}},"Retry-After":{"description":"再試行までの待機秒数","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"内部エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-goyoka-audience":"tenant","x-goyoka-required-scopes":["salon-settings:read"]},"patch":{"operationId":"salon-settings_booking_terms_update","tags":["salon-settings"],"summary":"予約規約の下書きを保存する","description":"省略した欄は保持し、nullは解除、disclaimer_industriesの空配列は免責追記の選択を解除します。空PATCHと保存値の完全一致・正規化後の同値は保存しません。現在のメンバーだけが使え、任意の冪等キーを使えます。保存競合は409 SETTINGS_OPERATION_BLOCKEDで、details.blocks[].codeはCONCURRENT_UPDATEです。GETで読み直してから同じ要求をやり直してかまいません。公開済みのお店では下書きの保存はお客様に効かず、legal:publishによる公開後に新しい予約へ適用されます。一度も公開していないお店では、条件の欄（refund_noteを含む）が保存の時点で新しい予約に効くため、条件の実変更だけ追加のlegal:publishが要ります。本文だけの追記には追加scopeは不要です。条件は新しい予約の確定メール本文と返金予定額にも反映されます。この操作のメール0通、過去の予約・同意記録は不変です。応答は変更の有無と公開版の識別情報だけです。\n\n予約確認メールの版固定URLは変えません。409 SETTINGS_OPERATION_BLOCKEDのdetails.blocksはcodeとmessageの1要素配列です。\n\n必要な範囲: `salon-settings:write`","security":[{"bearer":[]},{"oauth2":["salon-settings:write"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"free_cancel_value":{"type":["number","null"]},"free_cancel_unit":{"type":["string","null"]},"late_cancel_fee_kind":{"type":"string"},"late_cancel_percentage":{"type":["number","null"]},"late_cancel_fixed_yen":{"type":["number","null"]},"no_show_fee_kind":{"type":"string"},"no_show_percentage":{"type":["number","null"]},"no_show_fixed_yen":{"type":["number","null"]},"event_cancel_separate":{"type":"boolean"},"event_free_cancel_value":{"type":["number","null"]},"event_free_cancel_unit":{"type":["string","null"]},"event_late_cancel_fee_kind":{"type":"string"},"event_late_cancel_percentage":{"type":["number","null"]},"event_late_cancel_fixed_yen":{"type":["number","null"]},"event_no_show_fee_kind":{"type":"string"},"event_no_show_percentage":{"type":["number","null"]},"event_no_show_fixed_yen":{"type":["number","null"]},"reschedule_deadline_hours":{"type":["number","null"]},"reschedule_max_count":{"type":["number","null"]},"application_note":{"type":["string","null"]},"cancellation_note":{"type":["string","null"]},"no_show_note":{"type":["string","null"]},"salon_cancellation_note":{"type":["string","null"]},"lateness_note":{"type":["string","null"]},"refund_note":{"type":["string","null"]},"custom_notes":{"type":["string","null"]},"disclaimer_industries":{"type":"array","items":{"type":"string"}}},"additionalProperties":false}}}},"responses":{"200":{"description":"予約規約の下書きを保存する","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"kind":{"type":"string","enum":["SALON_PRIVACY","BOOKING_TERMS","TOKUSHO"]},"changed":{"type":"boolean"},"published":{"type":"boolean"},"revision_id":{"type":["string","null"],"format":"uuid"},"published_version":{"type":["integer","null"],"exclusiveMinimum":0},"published_at":{"type":["string","null"],"format":"date-time"}},"required":["kind","changed","published","revision_id","published_version","published_at"]}},"required":["data"]}}}},"400":{"description":"利用できないヘッダ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"鍵が無い・無効","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"範囲不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"見つからない","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"予約・冪等キーの競合","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"本文が1 MiBを超えている","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"入力の検証失敗","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"回数の上限","headers":{"RateLimit-Limit":{"description":"固定窓内の回数上限","schema":{"type":"integer","minimum":1}},"RateLimit-Remaining":{"description":"固定窓内の残り回数","schema":{"type":"integer","minimum":0}},"RateLimit-Reset":{"description":"窓終了までの秒数","schema":{"type":"integer","minimum":0}},"Retry-After":{"description":"再試行までの待機秒数","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"内部エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-goyoka-audience":"tenant","x-goyoka-required-scopes":["salon-settings:write"],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"同じ内容の再送に同じ値を使います。異なる内容との再利用や処理中の再送は409 IDEMPOTENCY_KEY_REUSEDです。"}]}},"/api/v1/settings/legal/booking-terms/publish":{"post":{"operationId":"salon-settings_booking_terms_publish","tags":["salon-settings"],"summary":"確認した予約規約を公開する","description":"公開前にGET /settings/legal/booking-termsで本文を確認し、preview.content_hashをそのままexpected_content_hashへ渡してください。本文と構造化データを含むcanonical hashを取引内で照合し、違えば409 SETTINGS_OPERATION_BLOCKED（details.blocks[].code:CONTENT_HASH_MISMATCH）で公開しません。実際の本文やhashはエラーに含めません。CONTENT_HASH_MISMATCHはGETし直して本文と条件を確認し、最新のpreview.content_hashをexpected_content_hashへ渡してください。小文字hex64桁以外は422です。\n\n予約確認メールの版固定URLは変えません。409 SETTINGS_OPERATION_BLOCKEDのdetails.blocksはcodeとmessageの1要素配列です。\n\nEMPTY_BODYは本文を補ってください。機微scopeのlegal:publish単独で呼べます。salon-settings:read/writeを暗黙に含まず、GETにはsalon-settings:read、下書き保存にはsalon-settings:writeが要ります。鍵やトークンの持ち主が現在のお店のメンバーであることを確認します。同canonical hashは200/changed:false/published:falseで版・日時・参照を変えません。本文が同じでも構造化データの条件が違えば新版になります。任意の冪等キーを使えます。保存競合は409 SETTINGS_OPERATION_BLOCKEDで、details.blocks[].codeはCONCURRENT_UPDATEです。GETで読み直してから同じ要求をやり直してかまいません。公開済みのお店では下書きの条件は公開するまで適用されません。未公開のお店の条件実変更PATCHには追加のlegal:publishが要ります。公開直後の次の描画で本文と管理画面の状態を読み直し、新しい予約の条件、確定メール本文のキャンセル要約、契約要約・返金予定額に公開した条件が使われます。開いた画面の自動更新はありません。この操作のメール0通、再同意の依頼も送りません。過去の予約・同意記録・過去版と過去予約の条件や返金予定額は維持します。公開済み文書の取り下げはできません。\n\n必要な範囲: `legal:publish`","security":[{"bearer":[]},{"oauth2":["legal:publish"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"expected_content_hash":{"type":"string"}},"required":["expected_content_hash"],"additionalProperties":false}}}},"responses":{"200":{"description":"確認した予約規約を公開する","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"kind":{"type":"string","enum":["SALON_PRIVACY","BOOKING_TERMS","TOKUSHO"]},"changed":{"type":"boolean"},"published":{"type":"boolean"},"revision_id":{"type":["string","null"],"format":"uuid"},"published_version":{"type":["integer","null"],"exclusiveMinimum":0},"published_at":{"type":["string","null"],"format":"date-time"}},"required":["kind","changed","published","revision_id","published_version","published_at"]}},"required":["data"]}}}},"400":{"description":"利用できないヘッダ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"鍵が無い・無効","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"範囲不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"見つからない","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"予約・冪等キーの競合","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"本文が1 MiBを超えている","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"入力の検証失敗","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"回数の上限","headers":{"RateLimit-Limit":{"description":"固定窓内の回数上限","schema":{"type":"integer","minimum":1}},"RateLimit-Remaining":{"description":"固定窓内の残り回数","schema":{"type":"integer","minimum":0}},"RateLimit-Reset":{"description":"窓終了までの秒数","schema":{"type":"integer","minimum":0}},"Retry-After":{"description":"再試行までの待機秒数","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"内部エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-goyoka-audience":"tenant","x-goyoka-required-scopes":["legal:publish"],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"同じ内容の再送に同じ値を使います。異なる内容との再利用や処理中の再送は409 IDEMPOTENCY_KEY_REUSEDです。"}]}},"/api/v1/settings/legal/commerce":{"get":{"operationId":"salon-settings_commerce_disclosure_get","tags":["salon-settings"],"summary":"特定商取引法に基づく表記の下書きと公開前の本文を読む","description":"現在のお店の保存値を読みます。下書き行や初版を自動作成しません。statusは公開版番号・公開日時・未公開の変更・公開に足りない欄を表します。既存の同意記録と予約確認メールの版固定URLは変えません。 draftは保存値、previewは公開予定本文と本文＋構造化データのcanonical content_hashです。必須欄の不足時はpreview:nullとstatus.missing_fieldsを返します。公開本文に載らない住所等の構造化データはpreviewに返しません。公開前にGETで本文を確認し、そのhashをexpected_content_hashへ渡してください。公開にはlegal:publishが要ります。\n\n必要な範囲: `salon-settings:read`","security":[{"bearer":[]},{"oauth2":["salon-settings:read"]}],"responses":{"200":{"description":"特定商取引法に基づく表記の下書きと公開前の本文を読む","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"draft":{"type":"object","properties":{"seller_name":{"type":["string","null"]},"representative_name":{"type":["string","null"]},"address":{"type":["string","null"]},"address_display_mode":{"type":"string"},"phone":{"type":["string","null"]},"phone_display_mode":{"type":"string"},"email":{"type":["string","null"]},"additional_costs":{"type":["string","null"]},"payment_methods":{"type":"array","items":{"type":"string"}},"payment_timing":{"type":["string","null"]},"service_timing":{"type":["string","null"]},"application_period":{"type":["string","null"]},"cancellation_policy":{"type":["string","null"]},"refund_policy":{"type":["string","null"]},"disclosure_request_email":{"type":["string","null"]}},"required":["seller_name","representative_name","address","address_display_mode","phone","phone_display_mode","email","additional_costs","payment_methods","payment_timing","service_timing","application_period","cancellation_policy","refund_policy","disclosure_request_email"],"additionalProperties":false},"status":{"type":"object","properties":{"kind":{"type":"string","enum":["SALON_PRIVACY","BOOKING_TERMS","TOKUSHO"]},"published_version":{"type":["integer","null"],"exclusiveMinimum":0},"published_at":{"type":["string","null"],"format":"date-time"},"has_unpublished_changes":{"type":"boolean"},"missing_fields":{"type":"array","items":{"type":"string"}}},"required":["kind","published_version","published_at","has_unpublished_changes","missing_fields"]},"preview":{"type":["object","null"],"properties":{"body":{"type":"string"},"content_hash":{"type":"string","pattern":"^[0-9a-f]{64}$"}},"required":["body","content_hash"]}},"required":["draft","status","preview"]}},"required":["data"]}}}},"400":{"description":"利用できないヘッダ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"鍵が無い・無効","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"範囲不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"見つからない","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"予約・冪等キーの競合","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"本文が1 MiBを超えている","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"入力の検証失敗","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"回数の上限","headers":{"RateLimit-Limit":{"description":"固定窓内の回数上限","schema":{"type":"integer","minimum":1}},"RateLimit-Remaining":{"description":"固定窓内の残り回数","schema":{"type":"integer","minimum":0}},"RateLimit-Reset":{"description":"窓終了までの秒数","schema":{"type":"integer","minimum":0}},"Retry-After":{"description":"再試行までの待機秒数","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"内部エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-goyoka-audience":"tenant","x-goyoka-required-scopes":["salon-settings:read"]},"patch":{"operationId":"salon-settings_commerce_disclosure_update","tags":["salon-settings"],"summary":"特定商取引法に基づく表記の下書きを保存する","description":"省略した欄は保持し、nullは解除、payment_methodsの空配列は消去します。支払方法は自由記入・順序・重複を保持します。空PATCHと保存値の完全一致・正規化後の同値は保存しません。現在のメンバーだけが使え、任意の冪等キーを使えます。保存競合は409 SETTINGS_OPERATION_BLOCKEDで、details.blocks[].codeはCONCURRENT_UPDATEです。GETで読み直してから同じ要求をやり直してかまいません。公開の必須欄が足りなくても下書きは保存できます。公開済みのお店では下書きの保存はお客様に効かず、legal:publishによる公開で表示を変えます。住所・電話を請求時開示にしても過去の公開版は残ります。この操作のメール0通、過去の予約・同意記録は不変です。応答は変更の有無と公開版の識別情報だけです。\n\n予約確認メールの版固定URLは変えません。409 SETTINGS_OPERATION_BLOCKEDのdetails.blocksはcodeとmessageの1要素配列です。\n\n必要な範囲: `salon-settings:write`","security":[{"bearer":[]},{"oauth2":["salon-settings:write"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"seller_name":{"type":["string","null"]},"representative_name":{"type":["string","null"]},"address":{"type":["string","null"]},"address_display_mode":{"type":"string"},"phone":{"type":["string","null"]},"phone_display_mode":{"type":"string"},"email":{"type":["string","null"]},"additional_costs":{"type":["string","null"]},"payment_methods":{"type":"array","items":{"type":"string"}},"payment_timing":{"type":["string","null"]},"service_timing":{"type":["string","null"]},"application_period":{"type":["string","null"]},"cancellation_policy":{"type":["string","null"]},"refund_policy":{"type":["string","null"]},"disclosure_request_email":{"type":["string","null"]}},"additionalProperties":false}}}},"responses":{"200":{"description":"特定商取引法に基づく表記の下書きを保存する","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"kind":{"type":"string","enum":["SALON_PRIVACY","BOOKING_TERMS","TOKUSHO"]},"changed":{"type":"boolean"},"published":{"type":"boolean"},"revision_id":{"type":["string","null"],"format":"uuid"},"published_version":{"type":["integer","null"],"exclusiveMinimum":0},"published_at":{"type":["string","null"],"format":"date-time"}},"required":["kind","changed","published","revision_id","published_version","published_at"]}},"required":["data"]}}}},"400":{"description":"利用できないヘッダ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"鍵が無い・無効","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"範囲不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"見つからない","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"予約・冪等キーの競合","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"本文が1 MiBを超えている","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"入力の検証失敗","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"回数の上限","headers":{"RateLimit-Limit":{"description":"固定窓内の回数上限","schema":{"type":"integer","minimum":1}},"RateLimit-Remaining":{"description":"固定窓内の残り回数","schema":{"type":"integer","minimum":0}},"RateLimit-Reset":{"description":"窓終了までの秒数","schema":{"type":"integer","minimum":0}},"Retry-After":{"description":"再試行までの待機秒数","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"内部エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-goyoka-audience":"tenant","x-goyoka-required-scopes":["salon-settings:write"],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"同じ内容の再送に同じ値を使います。異なる内容との再利用や処理中の再送は409 IDEMPOTENCY_KEY_REUSEDです。"}]}},"/api/v1/settings/legal/commerce/publish":{"post":{"operationId":"salon-settings_commerce_disclosure_publish","tags":["salon-settings"],"summary":"確認した特定商取引法に基づく表記を公開する","description":"公開前にGET /settings/legal/commerceで本文を確認し、preview.content_hashをそのままexpected_content_hashへ渡してください。本文と構造化データを含むcanonical hashを取引内で照合し、違えば409 SETTINGS_OPERATION_BLOCKED（details.blocks[].code:CONTENT_HASH_MISMATCH）で公開しません。実際の本文やhashはエラーに含めません。CONTENT_HASH_MISMATCHはGETし直して本文と条件を確認し、最新のpreview.content_hashをexpected_content_hashへ渡してください。小文字hex64桁以外は422です。必須欄が不足している場合は409 SETTINGS_OPERATION_BLOCKED（details.blocks[].code:TOKUSHO_INCOMPLETE）とdetails.missing_fieldsを返し、何も公開しません。TOKUSHO_INCOMPLETEはmissing_fieldsの不足欄を保存して再びGETしてください。\n\n予約確認メールの版固定URLは変えません。409 SETTINGS_OPERATION_BLOCKEDのdetails.blocksはcodeとmessageの1要素配列です。\n\nEMPTY_BODYは本文を補ってください。機微scopeのlegal:publish単独で呼べます。salon-settings:read/writeを暗黙に含まず、GETにはsalon-settings:read、下書き保存にはsalon-settings:writeが要ります。鍵やトークンの持ち主が現在のお店のメンバーであることを確認します。同canonical hashは200/changed:false/published:falseで版・日時・参照を変えません。本文が同じでも構造化データが違えば新版になります。任意の冪等キーを使えます。保存競合は409 SETTINGS_OPERATION_BLOCKEDで、details.blocks[].codeはCONCURRENT_UPDATEです。GETで読み直してから同じ要求をやり直してかまいません。下書きの保存だけでは公開表示は変わりません。公開直後の次の描画で本文と管理画面の状態を読み直します。開いた画面の自動更新はありません。住所・電話をON_REQUESTにすると請求先案内を表示し、空の請求先はemailへ戻ります。過去版の住所・電話は残ります。この操作のメール0通、自動転送や再同意の依頼もありません。過去の予約・同意記録は維持します。公開済み文書の取り下げはできません。\n\n必要な範囲: `legal:publish`","security":[{"bearer":[]},{"oauth2":["legal:publish"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"expected_content_hash":{"type":"string"}},"required":["expected_content_hash"],"additionalProperties":false}}}},"responses":{"200":{"description":"確認した特定商取引法に基づく表記を公開する","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"kind":{"type":"string","enum":["SALON_PRIVACY","BOOKING_TERMS","TOKUSHO"]},"changed":{"type":"boolean"},"published":{"type":"boolean"},"revision_id":{"type":["string","null"],"format":"uuid"},"published_version":{"type":["integer","null"],"exclusiveMinimum":0},"published_at":{"type":["string","null"],"format":"date-time"}},"required":["kind","changed","published","revision_id","published_version","published_at"]}},"required":["data"]}}}},"400":{"description":"利用できないヘッダ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"鍵が無い・無効","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"範囲不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"見つからない","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"予約・冪等キーの競合","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"本文が1 MiBを超えている","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"入力の検証失敗","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"回数の上限","headers":{"RateLimit-Limit":{"description":"固定窓内の回数上限","schema":{"type":"integer","minimum":1}},"RateLimit-Remaining":{"description":"固定窓内の残り回数","schema":{"type":"integer","minimum":0}},"RateLimit-Reset":{"description":"窓終了までの秒数","schema":{"type":"integer","minimum":0}},"Retry-After":{"description":"再試行までの待機秒数","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"内部エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-goyoka-audience":"tenant","x-goyoka-required-scopes":["legal:publish"],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"同じ内容の再送に同じ値を使います。異なる内容との再利用や処理中の再送は409 IDEMPOTENCY_KEY_REUSEDです。"}]}},"/api/v1/calendar/connections":{"get":{"operationId":"calendar_connections","tags":["calendar"],"summary":"カレンダー接続の一覧","description":"Google・Apple カレンダーの接続状態を ID 昇順で返します。エラー時は固定の案内文を返します。\n\n必要な範囲: `calendar:read`","security":[{"bearer":[]},{"oauth2":["calendar:read"]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":false,"name":"cursor","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":200,"default":50},"required":false,"name":"limit","in":"query"}],"responses":{"200":{"description":"カレンダー接続の一覧","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/CalendarConnection"}},"next_cursor":{"type":["string","null"],"format":"uuid"}},"required":["data","next_cursor"]}}}},"400":{"description":"利用できないヘッダ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"鍵が無い・無効","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"範囲不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"見つからない","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"予約・冪等キーの競合","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"本文が1 MiBを超えている","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"入力の検証失敗","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"回数の上限","headers":{"RateLimit-Limit":{"description":"固定窓内の回数上限","schema":{"type":"integer","minimum":1}},"RateLimit-Remaining":{"description":"固定窓内の残り回数","schema":{"type":"integer","minimum":0}},"RateLimit-Reset":{"description":"窓終了までの秒数","schema":{"type":"integer","minimum":0}},"Retry-After":{"description":"再試行までの待機秒数","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"内部エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-goyoka-audience":"tenant","x-goyoka-required-scopes":["calendar:read"]}},"/api/v1/customers":{"get":{"operationId":"customers_list","tags":["customers"],"summary":"お客様の一覧","description":"作成日時・IDの降順。qは名前の部分一致、updated_sinceは更新日時の指定時刻以降。emailの完全一致検索にはcustomers:contactも必要です。\n\ncustomers:contactがなければcontact全体がnull、許可があればemail・phoneのobjectで、未登録の欄はnullです。\n\n必要な範囲: `customers:read`\n\n`customers:contact` があるとメール・電話が入る（会話はメールのみ）。","security":[{"bearer":[]},{"oauth2":["customers:read"]}],"parameters":[{"schema":{"type":"string","maxLength":120},"required":false,"name":"q","in":"query"},{"schema":{"type":"string","maxLength":320,"format":"email"},"required":false,"name":"email","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"updated_since","in":"query"},{"schema":{"type":"string"},"required":false,"name":"cursor","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":200,"default":50},"required":false,"name":"limit","in":"query"}],"responses":{"200":{"description":"お客様の一覧","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Customer"}},"next_cursor":{"type":["string","null"]}},"required":["data","next_cursor"]}}}},"400":{"description":"利用できないヘッダ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"鍵が無い・無効","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"範囲不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"見つからない","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"予約・冪等キーの競合","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"本文が1 MiBを超えている","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"入力の検証失敗","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"回数の上限","headers":{"RateLimit-Limit":{"description":"固定窓内の回数上限","schema":{"type":"integer","minimum":1}},"RateLimit-Remaining":{"description":"固定窓内の残り回数","schema":{"type":"integer","minimum":0}},"RateLimit-Reset":{"description":"窓終了までの秒数","schema":{"type":"integer","minimum":0}},"Retry-After":{"description":"再試行までの待機秒数","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"内部エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-goyoka-audience":"tenant","x-goyoka-required-scopes":["customers:read"]},"post":{"operationId":"customers_create","tags":["customers"],"summary":"お客様を登録する","description":"名前は必須。emailかphoneを指定する場合は空文字も含めcustomers:contactが必要です。この条件は冪等再送にも適用します。名前だけならcustomers:writeで登録できます。\n\ncustomers:contactがなければcontact全体がnull、許可があればemail・phoneのobjectで、未登録の欄はnullです。\n\n必要な範囲: `customers:write`\n\n`customers:contact` があるとメール・電話が入る（会話はメールのみ）。","security":[{"bearer":[]},{"oauth2":["customers:write"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"email":{"type":"string","maxLength":320},"phone":{"type":"string","maxLength":32}},"required":["name"],"additionalProperties":false}}}},"responses":{"201":{"description":"お客様を登録する","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Customer"}},"required":["data"]}}}},"400":{"description":"利用できないヘッダ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"鍵が無い・無効","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"範囲不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"見つからない","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"予約・冪等キーの競合","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"本文が1 MiBを超えている","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"入力の検証失敗","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"回数の上限","headers":{"RateLimit-Limit":{"description":"固定窓内の回数上限","schema":{"type":"integer","minimum":1}},"RateLimit-Remaining":{"description":"固定窓内の残り回数","schema":{"type":"integer","minimum":0}},"RateLimit-Reset":{"description":"窓終了までの秒数","schema":{"type":"integer","minimum":0}},"Retry-After":{"description":"再試行までの待機秒数","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"内部エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-goyoka-audience":"tenant","x-goyoka-required-scopes":["customers:write"],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"同じ内容の再送に同じ値を使います。異なる内容との再利用や処理中の再送は409 IDEMPOTENCY_KEY_REUSEDです。"}]}},"/api/v1/customers/{id}":{"get":{"operationId":"customers_get","tags":["customers"],"summary":"お客様1件","description":"他のお店のIDと不明なIDは404。\n\ncustomers:contactがなければcontact全体がnull、許可があればemail・phoneのobjectで、未登録の欄はnullです。\n\n必要な範囲: `customers:read`\n\n`customers:contact` があるとメール・電話が入る（会話はメールのみ）。","security":[{"bearer":[]},{"oauth2":["customers:read"]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"お客様1件","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Customer"}},"required":["data"]}}}},"400":{"description":"利用できないヘッダ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"鍵が無い・無効","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"範囲不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"見つからない","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"予約・冪等キーの競合","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"本文が1 MiBを超えている","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"入力の検証失敗","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"回数の上限","headers":{"RateLimit-Limit":{"description":"固定窓内の回数上限","schema":{"type":"integer","minimum":1}},"RateLimit-Remaining":{"description":"固定窓内の残り回数","schema":{"type":"integer","minimum":0}},"RateLimit-Reset":{"description":"窓終了までの秒数","schema":{"type":"integer","minimum":0}},"Retry-After":{"description":"再試行までの待機秒数","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"内部エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-goyoka-audience":"tenant","x-goyoka-required-scopes":["customers:read"]},"patch":{"operationId":"customers_update","tags":["customers"],"summary":"お客様を更新する","description":"名前は必須。省略した連絡先は維持し、空文字で消去します。emailかphoneを指定する場合は空文字も含めcustomers:contactが必要で、冪等再送にも適用します。名前だけならcustomers:writeで更新できます。emailを変えると、お知らせの受信同意とメール確認済みの記録は外れ、不達の記録は新しいアドレスのものに揃い、お客様は予約ページからログアウトされます。他店・不明IDは404。\n\ncustomers:contactがなければcontact全体がnull、許可があればemail・phoneのobjectで、未登録の欄はnullです。\n\n必要な範囲: `customers:write`\n\n`customers:contact` があるとメール・電話が入る（会話はメールのみ）。","security":[{"bearer":[]},{"oauth2":["customers:write"]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"同じ内容の再送に同じ値を使います。異なる内容との再利用や処理中の再送は409 IDEMPOTENCY_KEY_REUSEDです。"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"email":{"type":"string","maxLength":320},"phone":{"type":"string","maxLength":32}},"required":["name"],"additionalProperties":false}}}},"responses":{"200":{"description":"お客様を更新する","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Customer"}},"required":["data"]}}}},"400":{"description":"利用できないヘッダ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"鍵が無い・無効","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"範囲不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"見つからない","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"予約・冪等キーの競合","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"本文が1 MiBを超えている","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"入力の検証失敗","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"回数の上限","headers":{"RateLimit-Limit":{"description":"固定窓内の回数上限","schema":{"type":"integer","minimum":1}},"RateLimit-Remaining":{"description":"固定窓内の残り回数","schema":{"type":"integer","minimum":0}},"RateLimit-Reset":{"description":"窓終了までの秒数","schema":{"type":"integer","minimum":0}},"Retry-After":{"description":"再試行までの待機秒数","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"内部エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-goyoka-audience":"tenant","x-goyoka-required-scopes":["customers:write"]}},"/api/v1/customers/{id}/charts":{"get":{"operationId":"customers_charts_list","tags":["customers"],"summary":"カルテの一覧","description":"指定したお客様のカルテ本文を読みます。施術日・作成日時の降順で全件を返します。読み取りも監査に記録します。\n\n必要な範囲: `charts`","security":[{"bearer":[]},{"oauth2":["charts"]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"カルテの一覧","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ChartNote"}},"next_cursor":{"type":["string","null"]}},"required":["data","next_cursor"]}}}},"400":{"description":"利用できないヘッダ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"鍵が無い・無効","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"範囲不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"見つからない","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"予約・冪等キーの競合","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"本文が1 MiBを超えている","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"入力の検証失敗","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"回数の上限","headers":{"RateLimit-Limit":{"description":"固定窓内の回数上限","schema":{"type":"integer","minimum":1}},"RateLimit-Remaining":{"description":"固定窓内の残り回数","schema":{"type":"integer","minimum":0}},"RateLimit-Reset":{"description":"窓終了までの秒数","schema":{"type":"integer","minimum":0}},"Retry-After":{"description":"再試行までの待機秒数","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"内部エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-goyoka-audience":"tenant","x-goyoka-required-scopes":["charts"]},"post":{"operationId":"customers_charts_save","tags":["customers"],"summary":"カルテを保存する","description":"カルテを新規保存します。note_id があれば本文だけ上書きします。session_date は必須ですが既存日付の書き換えには使わず、booking_id の付け替えもしません。応答はメタデータだけで、本文は含みません。\n\n必要な範囲: `charts`","security":[{"bearer":[]},{"oauth2":["charts"]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"同じ内容の再送に同じ値を使います。異なる内容との再利用や処理中の再送は409 IDEMPOTENCY_KEY_REUSEDです。"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"session_date":{"type":"string","format":"date"},"body":{"type":"string","minLength":1},"booking_id":{"type":"string","format":"uuid"},"note_id":{"type":"string","format":"uuid"}},"required":["session_date","body"],"additionalProperties":false}}}},"responses":{"200":{"description":"カルテを保存する","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/ChartNoteSaved"}},"required":["data"]}}}},"400":{"description":"利用できないヘッダ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"鍵が無い・無効","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"範囲不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"見つからない","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"予約・冪等キーの競合","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"本文が1 MiBを超えている","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"入力の検証失敗","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"回数の上限","headers":{"RateLimit-Limit":{"description":"固定窓内の回数上限","schema":{"type":"integer","minimum":1}},"RateLimit-Remaining":{"description":"固定窓内の残り回数","schema":{"type":"integer","minimum":0}},"RateLimit-Reset":{"description":"窓終了までの秒数","schema":{"type":"integer","minimum":0}},"Retry-After":{"description":"再試行までの待機秒数","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"内部エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-goyoka-audience":"tenant","x-goyoka-required-scopes":["charts"]}},"/api/v1/conversations":{"get":{"operationId":"messages_list","tags":["messages"],"summary":"会話の一覧","description":"最終メッセージ日時・IDの降順。statusは既定でopenです。\n\ncustomers:contactがなければcontact全体がnull、許可があればemailだけのobjectで、未登録のemailはnullです。\n\n必要な範囲: `messages:read`\n\n`customers:contact` があるとメール・電話が入る（会話はメールのみ）。","security":[{"bearer":[]},{"oauth2":["messages:read"]}],"parameters":[{"schema":{"type":"string","enum":["open","closed"],"default":"open"},"required":false,"name":"status","in":"query"},{"schema":{"type":"string","format":"uuid"},"required":false,"name":"customer_id","in":"query"},{"schema":{"type":"string"},"required":false,"name":"cursor","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":200,"default":50},"required":false,"name":"limit","in":"query"}],"responses":{"200":{"description":"会話の一覧","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Conversation"}},"next_cursor":{"type":["string","null"]}},"required":["data","next_cursor"]}}}},"400":{"description":"利用できないヘッダ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"鍵が無い・無効","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"範囲不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"見つからない","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"予約・冪等キーの競合","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"本文が1 MiBを超えている","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"入力の検証失敗","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"回数の上限","headers":{"RateLimit-Limit":{"description":"固定窓内の回数上限","schema":{"type":"integer","minimum":1}},"RateLimit-Remaining":{"description":"固定窓内の残り回数","schema":{"type":"integer","minimum":0}},"RateLimit-Reset":{"description":"窓終了までの秒数","schema":{"type":"integer","minimum":0}},"Retry-After":{"description":"再試行までの待機秒数","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"内部エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-goyoka-audience":"tenant","x-goyoka-required-scopes":["messages:read"]},"post":{"operationId":"messages_start","tags":["messages"],"summary":"会話を始める","description":"登録済みのお客様へ最初のメールを送り、会話を作ります。\n\ncustomers:contactがなければcontact全体がnull、許可があればemailだけのobjectで、未登録のemailはnullです。\n\n宛先のメールアドレスなし・不達・メール機能停止・送信失敗では422 MESSAGE_UNDELIVERABLEで、details.reasonを確認してください。\n\n毎分の上限はRATE_LIMITEDで、RESTでは429とRetry-Afterヘッダー（秒）、MCPでは待ち時間を返しません。\n\n会話開始・返信と文面・お知らせのテスト送信は、お店合算の既定30通/時の固定窓を共有します。超過はRATE_LIMITEDで両経路にdetails.retry_after（秒）が付き、RESTは429とRetry-Afterヘッダーも返し、MCPはヘッダーを返しません。\n\n同じ冪等キーと内容の成功再送は枠を消費しません。\n\n必要な範囲: `messages:write`\n\n`customers:contact` があるとメール・電話が入る（会話はメールのみ）。","security":[{"bearer":[]},{"oauth2":["messages:write"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"customer_id":{"type":"string","format":"uuid"},"subject":{"type":"string","minLength":1,"maxLength":200},"body":{"type":"string","minLength":1,"maxLength":4000},"sender_profile_id":{"type":["string","null"],"format":"uuid"}},"required":["customer_id","subject","body"],"additionalProperties":false}}}},"responses":{"201":{"description":"会話を始める","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Conversation"}},"required":["data"]}}}},"400":{"description":"利用できないヘッダ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"鍵が無い・無効","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"範囲不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"見つからない","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"予約・冪等キーの競合","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"本文が1 MiBを超えている","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"入力の検証失敗","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"回数の上限","headers":{"RateLimit-Limit":{"description":"固定窓内の回数上限","schema":{"type":"integer","minimum":1}},"RateLimit-Remaining":{"description":"固定窓内の残り回数","schema":{"type":"integer","minimum":0}},"RateLimit-Reset":{"description":"窓終了までの秒数","schema":{"type":"integer","minimum":0}},"Retry-After":{"description":"再試行までの待機秒数","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"内部エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-goyoka-audience":"tenant","x-goyoka-required-scopes":["messages:write"],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"同じ内容の再送に同じ値を使います。異なる内容との再利用や処理中の再送は409 IDEMPOTENCY_KEY_REUSEDです。"}]}},"/api/v1/conversations/{id}":{"get":{"operationId":"messages_get","tags":["messages"],"summary":"会話の詳細","description":"メッセージとお問い合わせの受付内容を返します。既読印や状態は変えません。\n\ncustomers:contactがなければcontact全体がnull、許可があればemailだけのobjectで、未登録のemailはnullです。\n\n必要な範囲: `messages:read`\n\n`customers:contact` があるとメール・電話が入る（会話はメールのみ）。","security":[{"bearer":[]},{"oauth2":["messages:read"]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"会話の詳細","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/ConversationDetail"}},"required":["data"]}}}},"400":{"description":"利用できないヘッダ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"鍵が無い・無効","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"範囲不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"見つからない","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"予約・冪等キーの競合","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"本文が1 MiBを超えている","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"入力の検証失敗","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"回数の上限","headers":{"RateLimit-Limit":{"description":"固定窓内の回数上限","schema":{"type":"integer","minimum":1}},"RateLimit-Remaining":{"description":"固定窓内の残り回数","schema":{"type":"integer","minimum":0}},"RateLimit-Reset":{"description":"窓終了までの秒数","schema":{"type":"integer","minimum":0}},"Retry-After":{"description":"再試行までの待機秒数","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"内部エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-goyoka-audience":"tenant","x-goyoka-required-scopes":["messages:read"]}},"/api/v1/conversations/{id}/messages":{"post":{"operationId":"messages_reply","tags":["messages"],"summary":"会話に返信する","description":"会話に保存された差出人でメールを送り、メッセージを返します。\n\n宛先のメールアドレスなし・不達・メール機能停止・送信失敗では422 MESSAGE_UNDELIVERABLEで、details.reasonを確認してください。\n\n毎分の上限はRATE_LIMITEDで、RESTでは429とRetry-Afterヘッダー（秒）、MCPでは待ち時間を返しません。\n\n会話開始・返信と文面・お知らせのテスト送信は、お店合算の既定30通/時の固定窓を共有します。超過はRATE_LIMITEDで両経路にdetails.retry_after（秒）が付き、RESTは429とRetry-Afterヘッダーも返し、MCPはヘッダーを返しません。\n\n同じ冪等キーと内容の成功再送は枠を消費しません。\n\n必要な範囲: `messages:write`","security":[{"bearer":[]},{"oauth2":["messages:write"]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"同じ内容の再送に同じ値を使います。異なる内容との再利用や処理中の再送は409 IDEMPOTENCY_KEY_REUSEDです。"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"body":{"type":"string","minLength":1,"maxLength":4000}},"required":["body"],"additionalProperties":false}}}},"responses":{"200":{"description":"会話に返信する","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Message"}},"required":["data"]}}}},"400":{"description":"利用できないヘッダ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"鍵が無い・無効","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"範囲不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"見つからない","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"予約・冪等キーの競合","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"本文が1 MiBを超えている","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"入力の検証失敗","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"回数の上限","headers":{"RateLimit-Limit":{"description":"固定窓内の回数上限","schema":{"type":"integer","minimum":1}},"RateLimit-Remaining":{"description":"固定窓内の残り回数","schema":{"type":"integer","minimum":0}},"RateLimit-Reset":{"description":"窓終了までの秒数","schema":{"type":"integer","minimum":0}},"Retry-After":{"description":"再試行までの待機秒数","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"内部エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-goyoka-audience":"tenant","x-goyoka-required-scopes":["messages:write"]}},"/api/v1/conversations/{id}/close":{"post":{"operationId":"messages_close","tags":["messages"],"summary":"会話を対応済みにする","description":"お問い合わせ発の会話は受付の対応済み日時も更新します。同じ状態への操作も成功します。\n\ncustomers:contactがなければcontact全体がnull、許可があればemailだけのobjectで、未登録のemailはnullです。\n\n必要な範囲: `messages:write`\n\n`customers:contact` があるとメール・電話が入る（会話はメールのみ）。","security":[{"bearer":[]},{"oauth2":["messages:write"]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"同じ内容の再送に同じ値を使います。異なる内容との再利用や処理中の再送は409 IDEMPOTENCY_KEY_REUSEDです。"}],"responses":{"200":{"description":"会話を対応済みにする","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Conversation"}},"required":["data"]}}}},"400":{"description":"利用できないヘッダ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"鍵が無い・無効","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"範囲不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"見つからない","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"予約・冪等キーの競合","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"本文が1 MiBを超えている","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"入力の検証失敗","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"回数の上限","headers":{"RateLimit-Limit":{"description":"固定窓内の回数上限","schema":{"type":"integer","minimum":1}},"RateLimit-Remaining":{"description":"固定窓内の残り回数","schema":{"type":"integer","minimum":0}},"RateLimit-Reset":{"description":"窓終了までの秒数","schema":{"type":"integer","minimum":0}},"Retry-After":{"description":"再試行までの待機秒数","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"内部エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-goyoka-audience":"tenant","x-goyoka-required-scopes":["messages:write"]}},"/api/v1/conversations/{id}/reopen":{"post":{"operationId":"messages_reopen","tags":["messages"],"summary":"会話を再開する","description":"お問い合わせ発の会話は受付の対応済み日時も消します。同じ状態への操作も成功します。\n\ncustomers:contactがなければcontact全体がnull、許可があればemailだけのobjectで、未登録のemailはnullです。\n\n必要な範囲: `messages:write`\n\n`customers:contact` があるとメール・電話が入る（会話はメールのみ）。","security":[{"bearer":[]},{"oauth2":["messages:write"]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"同じ内容の再送に同じ値を使います。異なる内容との再利用や処理中の再送は409 IDEMPOTENCY_KEY_REUSEDです。"}],"responses":{"200":{"description":"会話を再開する","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Conversation"}},"required":["data"]}}}},"400":{"description":"利用できないヘッダ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"鍵が無い・無効","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"範囲不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"見つからない","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"予約・冪等キーの競合","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"本文が1 MiBを超えている","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"入力の検証失敗","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"回数の上限","headers":{"RateLimit-Limit":{"description":"固定窓内の回数上限","schema":{"type":"integer","minimum":1}},"RateLimit-Remaining":{"description":"固定窓内の残り回数","schema":{"type":"integer","minimum":0}},"RateLimit-Reset":{"description":"窓終了までの秒数","schema":{"type":"integer","minimum":0}},"Retry-After":{"description":"再試行までの待機秒数","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"内部エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-goyoka-audience":"tenant","x-goyoka-required-scopes":["messages:write"]}},"/api/v1/events":{"get":{"operationId":"events_list","tags":["events"],"summary":"イベントの一覧","description":"作成日時・IDの降順。status省略時はDRAFT/PUBLISHED/ENDED/CANCELLEDの全状態を返します。公開範囲によらず自店のイベントを読み、アーカイブ済みも含みます。limitは既定50・最大200、next_cursorがnullなら終端です。\n\n必要な範囲: `events:read`","security":[{"bearer":[]},{"oauth2":["events:read"]}],"parameters":[{"schema":{"type":"string","enum":["DRAFT","PUBLISHED","ENDED","CANCELLED"]},"required":false,"name":"status","in":"query"},{"schema":{"type":"string"},"required":false,"name":"cursor","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":200,"default":50},"required":false,"name":"limit","in":"query"}],"responses":{"200":{"description":"イベントの一覧","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ApiEvent"}},"next_cursor":{"type":["string","null"]}},"required":["data","next_cursor"]}}}},"400":{"description":"利用できないヘッダ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"鍵が無い・無効","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"範囲不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"見つからない","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"予約・冪等キーの競合","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"本文が1 MiBを超えている","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"入力の検証失敗","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"回数の上限","headers":{"RateLimit-Limit":{"description":"固定窓内の回数上限","schema":{"type":"integer","minimum":1}},"RateLimit-Remaining":{"description":"固定窓内の残り回数","schema":{"type":"integer","minimum":0}},"RateLimit-Reset":{"description":"窓終了までの秒数","schema":{"type":"integer","minimum":0}},"Retry-After":{"description":"再試行までの待機秒数","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"内部エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-goyoka-audience":"tenant","x-goyoka-required-scopes":["events:read"]},"post":{"operationId":"events_create","tags":["events"],"summary":"イベントの下書きを作る","description":"複数メニュー・選択グループ・質問・開催回を含むDRAFTを作成します。statusは指定できません。条件グラフは保存前に検査します。ORGANIZER_ALLOWEDは入力できますが、許可名簿の保存口がないため選択できない既存制約があります。任意の冪等キーを使えます。\n\n条件の対象欠落・同じグループの参照・循環・重複は422 BOOKING_INPUT_INVALIDです。details.blocksは理由の配列で、codeで分岐しmessageを表示します。\n\nBOOKING_INPUT_INVALIDは、欄名を持つ業務エラーならdetails.fieldErrors、欄名がない場合はdetailsなしとなる経路もあります。MCPでも業務エラーはstructuredContent.errorに返します。入力の形の誤りは、RESTでは422 VALIDATION（details.fieldErrors）、MCPではツールの入力検査のエラー文を返します。\n\nハンドラ内で検査するお店の中でのslugの重複（details.fieldErrors.slug）、メニュー・選択グループのkeyや開催回内のmenu_keyの重複、開催・受付期間の前後関係、参照するkeyの欠落、条件modeの混在は422 VALIDATIONです。これはMCPでもstructuredContent.errorにcode:VALIDATIONとdetails.fieldErrorsを返します。\n\n必要な範囲: `events:write`","security":[{"bearer":[]},{"oauth2":["events:write"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"sender_profile_id":{"type":["string","null"],"format":"uuid"},"slug":{"type":"string","minLength":1,"maxLength":63,"pattern":"^[a-z0-9-]{1,63}$"},"title":{"type":"string","maxLength":120},"description":{"type":["string","null"],"maxLength":2000},"visibility":{"type":"string","enum":["PUBLIC","LINK_ONLY","MEMBERS_ONLY"]},"display_mode":{"type":"string","enum":["LIST","CALENDAR"]},"delivery_mode":{"type":"string","enum":["IN_PERSON","ONLINE"]},"location_name":{"type":["string","null"],"maxLength":120},"location_address":{"type":["string","null"],"maxLength":300},"online_url":{"type":["string","null"]},"address_visibility":{"type":"string","enum":["PUBLIC","CONFIRMED_ONLY","INDIVIDUAL"]},"payment_note":{"type":["string","null"],"maxLength":2000},"notice":{"type":["string","null"],"maxLength":2000,"description":"省略またはnullは、お店の申し込み備考の初期値を写します。trim後空文字は備考なしで作ります。非空の文字列はそのまま保存します。"},"menus":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1},"service_id":{"type":["string","null"],"format":"uuid"},"name":{"type":"string","minLength":1,"maxLength":120},"price_yen":{"type":"integer","minimum":0,"maximum":2147483647},"duration_minutes":{"type":"integer","minimum":1,"maximum":2147483647},"timing_mode":{"type":"string","enum":["FIXED","INDIVIDUAL"]},"required":{"type":"boolean"},"display_order":{"type":"integer","minimum":-2147483648,"maximum":2147483647},"selection_group_key":{"type":["string","null"],"minLength":1}},"required":["key","name","price_yen","duration_minutes","timing_mode","required"],"additionalProperties":false}},"selection_groups":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1},"name":{"type":"string","minLength":1,"maxLength":120},"min_selections":{"type":"integer","minimum":0,"maximum":2147483647},"max_selections":{"type":["integer","null"],"minimum":1,"maximum":2147483647},"display_order":{"type":"integer","minimum":-2147483648,"maximum":2147483647},"conditions":{"type":"array","items":{"type":"object","properties":{"mode":{"type":"string","enum":["ALL","ANY"]},"kind":{"type":"string","enum":["PAID_MENU_SELECTED","MENU_SELECTED","SELF_CONFIRMED","ORGANIZER_ALLOWED"]},"target_menu_key":{"type":["string","null"],"minLength":1}},"required":["mode","kind"],"additionalProperties":false}}},"required":["key","name"],"additionalProperties":false}},"questions":{"type":"array","items":{"type":"object","properties":{"prompt":{"type":"string","minLength":1,"maxLength":200},"kind":{"type":"string","enum":["TEXT","SINGLE","CHECKBOX"]},"required":{"type":"boolean"},"options":{"type":"array","items":{"type":"string"}}},"required":["prompt","kind"],"additionalProperties":false}},"occurrences":{"type":"array","items":{"type":"object","properties":{"starts_at":{"type":"string","format":"date-time"},"ends_at":{"type":"string","format":"date-time"},"opens_at":{"type":["string","null"],"format":"date-time"},"closes_at":{"type":["string","null"],"format":"date-time"},"cancel_deadline_at":{"type":["string","null"],"format":"date-time"},"location_name":{"type":["string","null"],"maxLength":120},"location_address":{"type":["string","null"],"maxLength":300},"online_url":{"type":["string","null"]},"menus":{"type":"array","items":{"type":"object","properties":{"menu_key":{"type":"string","minLength":1},"starts_at":{"type":["string","null"],"format":"date-time"},"ends_at":{"type":["string","null"],"format":"date-time"},"capacity":{"type":["integer","null"],"minimum":1,"maximum":2147483647}},"required":["menu_key"],"additionalProperties":false}}},"required":["starts_at","ends_at","menus"],"additionalProperties":false}}},"required":["slug","title","visibility","display_mode","delivery_mode","menus","occurrences"],"additionalProperties":false}}}},"responses":{"201":{"description":"イベントの下書きを作る","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/ApiEvent"}},"required":["data"]}}}},"400":{"description":"利用できないヘッダ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"鍵が無い・無効","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"範囲不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"見つからない","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"予約・冪等キーの競合","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"本文が1 MiBを超えている","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"入力の検証失敗","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"回数の上限","headers":{"RateLimit-Limit":{"description":"固定窓内の回数上限","schema":{"type":"integer","minimum":1}},"RateLimit-Remaining":{"description":"固定窓内の残り回数","schema":{"type":"integer","minimum":0}},"RateLimit-Reset":{"description":"窓終了までの秒数","schema":{"type":"integer","minimum":0}},"Retry-After":{"description":"再試行までの待機秒数","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"内部エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-goyoka-audience":"tenant","x-goyoka-required-scopes":["events:write"],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"同じ内容の再送に同じ値を使います。異なる内容との再利用や処理中の再送は409 IDEMPOTENCY_KEY_REUSEDです。"}]}},"/api/v1/events/{id}":{"get":{"operationId":"events_get","tags":["events"],"summary":"イベント1件","description":"DRAFT/PUBLISHED/ENDED/CANCELLEDの全状態、すべての公開範囲とアーカイブ済みが対象です。開催回の最早開始・最遅終了と開催回・メニュー・質問の件数を返します。他店と不明なIDは404です。\n\n必要な範囲: `events:read`","security":[{"bearer":[]},{"oauth2":["events:read"]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"イベント1件","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/ApiEvent"}},"required":["data"]}}}},"400":{"description":"利用できないヘッダ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"鍵が無い・無効","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"範囲不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"見つからない","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"予約・冪等キーの競合","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"本文が1 MiBを超えている","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"入力の検証失敗","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"回数の上限","headers":{"RateLimit-Limit":{"description":"固定窓内の回数上限","schema":{"type":"integer","minimum":1}},"RateLimit-Remaining":{"description":"固定窓内の残り回数","schema":{"type":"integer","minimum":0}},"RateLimit-Reset":{"description":"窓終了までの秒数","schema":{"type":"integer","minimum":0}},"Retry-After":{"description":"再試行までの待機秒数","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"内部エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-goyoka-audience":"tenant","x-goyoka-required-scopes":["events:read"]},"patch":{"operationId":"events_update","tags":["events"],"summary":"イベントの基本情報を更新する","description":"slug/title/visibility/display_mode/delivery_modeの5欄は必須。任意欄は省略で保持し、nullを受ける欄はnullで消去、値で上書きしますが、address_visibilityはnullを受けません。sender_profile_idは自店の差出人だけを指定できる。メニュー・質問・開催回・公開状態は変更しない。応答は既存のイベント概要で、descriptionやpayment_note等の保存欄は含まない。\n\nアーカイブ済み・他店・不明なイベントは404 NOT_FOUNDで、書き込みも通知もしません。\n\n必要な範囲: `events:write`","security":[{"bearer":[]},{"oauth2":["events:write"]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"同じ内容の再送に同じ値を使います。異なる内容との再利用や処理中の再送は409 IDEMPOTENCY_KEY_REUSEDです。"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"sender_profile_id":{"type":["string","null"],"format":"uuid"},"slug":{"type":"string","minLength":1,"maxLength":63,"pattern":"^[a-z0-9-]{1,63}$"},"title":{"type":"string","maxLength":120},"description":{"type":["string","null"],"maxLength":2000},"visibility":{"type":"string","enum":["PUBLIC","LINK_ONLY","MEMBERS_ONLY"]},"display_mode":{"type":"string","enum":["LIST","CALENDAR"]},"delivery_mode":{"type":"string","enum":["IN_PERSON","ONLINE"]},"location_name":{"type":["string","null"],"maxLength":120},"location_address":{"type":["string","null"],"maxLength":300},"online_url":{"type":["string","null"]},"address_visibility":{"type":"string","enum":["PUBLIC","CONFIRMED_ONLY","INDIVIDUAL"]},"payment_note":{"type":["string","null"],"maxLength":2000}},"required":["slug","title","visibility","display_mode","delivery_mode"],"additionalProperties":false}}}},"responses":{"200":{"description":"イベントの基本情報を更新する","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/ApiEvent"}},"required":["data"]}}}},"400":{"description":"利用できないヘッダ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"鍵が無い・無効","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"範囲不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"見つからない","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"予約・冪等キーの競合","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"本文が1 MiBを超えている","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"入力の検証失敗","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"回数の上限","headers":{"RateLimit-Limit":{"description":"固定窓内の回数上限","schema":{"type":"integer","minimum":1}},"RateLimit-Remaining":{"description":"固定窓内の残り回数","schema":{"type":"integer","minimum":0}},"RateLimit-Reset":{"description":"窓終了までの秒数","schema":{"type":"integer","minimum":0}},"Retry-After":{"description":"再試行までの待機秒数","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"内部エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-goyoka-audience":"tenant","x-goyoka-required-scopes":["events:write"]}},"/api/v1/events/{id}/occurrences":{"get":{"operationId":"events_occurrences_list","tags":["events"],"summary":"開催回の一覧","description":"開始日時・IDの昇順。期間は開始日時がfrom以上・to未満の半開区間です。from省略時はお店のタイムゾーンの今日00:00以降で、今日の終了済みの回も含みます。to省略時は上限なし。status省略時は全状態を返します。taken_countは顧客の重複を除いた人数で、短期holdを含まず、購入可能な残席を保証しません。limitは既定50・最大200、next_cursorがnullなら終端です。親イベントの公開範囲・状態・アーカイブで絞りません。親不明は404、該当する回がなければ空一覧です。\n\n必要な範囲: `events:read`","security":[{"bearer":[]},{"oauth2":["events:read"]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"from","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"to","in":"query"},{"schema":{"type":"string","enum":["SCHEDULED","CANCELLED","COMPLETED"]},"required":false,"name":"status","in":"query"},{"schema":{"type":"string"},"required":false,"name":"cursor","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":200,"default":50},"required":false,"name":"limit","in":"query"}],"responses":{"200":{"description":"開催回の一覧","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ApiOccurrence"}},"next_cursor":{"type":["string","null"]}},"required":["data","next_cursor"]}}}},"400":{"description":"利用できないヘッダ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"鍵が無い・無効","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"範囲不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"見つからない","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"予約・冪等キーの競合","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"本文が1 MiBを超えている","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"入力の検証失敗","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"回数の上限","headers":{"RateLimit-Limit":{"description":"固定窓内の回数上限","schema":{"type":"integer","minimum":1}},"RateLimit-Remaining":{"description":"固定窓内の残り回数","schema":{"type":"integer","minimum":0}},"RateLimit-Reset":{"description":"窓終了までの秒数","schema":{"type":"integer","minimum":0}},"Retry-After":{"description":"再試行までの待機秒数","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"内部エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-goyoka-audience":"tenant","x-goyoka-required-scopes":["events:read"]},"put":{"operationId":"events_occurrences_replace","tags":["events"],"summary":"開催回を丸ごと置き換え（送らなかった行は削除）","description":"開催回を丸ごと置き換え、送らなかった行は削除します。idありは更新、idなしは追加です。capacityと受付3日時は省略で保持、nullで解除、値で上書きします。公開中は同じ取引で占有も取り直します。新しい日時が別の予約・担当者の予定・設備・お店の枠と重なれば、何も保存せず409 EVENT_NOT_PUBLISHABLEを返します（details.reasonsのcodeはCONFLICT）。開催回も占有も保存前のままです。全回を過去も含め日時・ID順で返します。display_modeは受けません。任意の冪等キーで同じ保存結果を再送できます。\n\n保存状態で拒否する変更は409 EVENT_EDIT_BLOCKEDです。details.blocksは理由の配列で、codeで分岐しmessageを表示します。\n\nアーカイブ済みイベントは404 NOT_FOUNDです。\n\nBOOKING_INPUT_INVALIDは、欄名を持つ業務エラーならdetails.fieldErrors、欄名がない場合はdetailsなしとなる経路もあります。MCPでも業務エラーはstructuredContent.errorに返します。入力の形の誤りは、RESTでは422 VALIDATION（details.fieldErrors）、MCPではツールの入力検査のエラー文を返します。\n\nハンドラ内で検査する開催回IDの重複、開催・受付期間の前後関係は422 VALIDATIONです。これはMCPでもstructuredContent.errorにcode:VALIDATIONとdetails.fieldErrorsを返します。\n\n先にevents_occurrences_listで、残す過去の回を含むfromを指定し、next_cursorがnullになるまで全行を集めてから送ってください。\n\n重なりの409では、既存の開催回にはoccurrence_idを付けます。idなしで足そうとした行は保存していないため、occurrence_idを付けません。時刻をずらすか、重なっている予約を調整してから送り直してください。occupancy_conflictは互換のために残し、200では常にfalseです。\n\n成功時と同じ冪等キーと内容の再送は最初の保存結果を返すだけです。\n\n必要な範囲: `events:write`","security":[{"bearer":[]},{"oauth2":["events:write"]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"同じ内容の再送に同じ値を使います。異なる内容との再利用や処理中の再送は409 IDEMPOTENCY_KEY_REUSEDです。"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"occurrences":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"starts_at":{"type":"string","format":"date-time"},"ends_at":{"type":"string","format":"date-time"},"capacity":{"type":["integer","null"],"minimum":1,"maximum":2147483647},"opens_at":{"type":["string","null"],"format":"date-time"},"closes_at":{"type":["string","null"],"format":"date-time"},"cancel_deadline_at":{"type":["string","null"],"format":"date-time"},"facility_unit_ids":{"type":["array","null"],"items":{"type":"string","format":"uuid"},"description":"読み取りの値をそのまま送り返せるよう受けるだけで、この操作では変えない。変えるには events_occurrences_update を使う。"}},"required":["starts_at","ends_at"],"additionalProperties":false}}},"required":["occurrences"],"additionalProperties":false}}}},"responses":{"200":{"description":"開催回を丸ごと置き換え（送らなかった行は削除）","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"occurrences":{"type":"array","items":{"$ref":"#/components/schemas/ApiOccurrence"}},"occupancy_conflict":{"type":["boolean","null"],"description":"互換のために残す欄で、200では常にfalse（鍵やトークンによってはnull）。重なったときは保存せず409 EVENT_NOT_PUBLISHABLEを返します。"}},"required":["occurrences","occupancy_conflict"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"利用できないヘッダ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"鍵が無い・無効","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"範囲不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"見つからない","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"予約・冪等キーの競合","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"本文が1 MiBを超えている","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"入力の検証失敗","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"回数の上限","headers":{"RateLimit-Limit":{"description":"固定窓内の回数上限","schema":{"type":"integer","minimum":1}},"RateLimit-Remaining":{"description":"固定窓内の残り回数","schema":{"type":"integer","minimum":0}},"RateLimit-Reset":{"description":"窓終了までの秒数","schema":{"type":"integer","minimum":0}},"Retry-After":{"description":"再試行までの待機秒数","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"内部エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-goyoka-audience":"tenant","x-goyoka-required-scopes":["events:write"]}},"/api/v1/events/{id}/occurrences/{occId}":{"get":{"operationId":"events_occurrences_get","tags":["events"],"summary":"開催回の詳細","description":"menus[].idはPATCH /events/{id}/occurrences/{occId}/menusのoccurrence_menu_idとして使えます。受付開始opens_at・受付締切closes_at・取消締切cancel_deadline_atも読み返せます。会場・担当者と時間帯をお店向けの値で返し、公開面の表示制限は適用しません。taken_countは顧客の重複を除いた人数で短期holdを含まず、購入可能な残席を保証しません。親イベントの公開範囲・状態・アーカイブで絞りません。他店・別イベントの開催回と不明なIDは404です。\n\n必要な範囲: `events:read`","security":[{"bearer":[]},{"oauth2":["events:read"]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","format":"uuid"},"required":true,"name":"occId","in":"path"}],"responses":{"200":{"description":"開催回の詳細","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/ApiOccurrenceDetail"}},"required":["data"]}}}},"400":{"description":"利用できないヘッダ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"鍵が無い・無効","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"範囲不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"見つからない","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"予約・冪等キーの競合","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"本文が1 MiBを超えている","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"入力の検証失敗","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"回数の上限","headers":{"RateLimit-Limit":{"description":"固定窓内の回数上限","schema":{"type":"integer","minimum":1}},"RateLimit-Remaining":{"description":"固定窓内の残り回数","schema":{"type":"integer","minimum":0}},"RateLimit-Reset":{"description":"窓終了までの秒数","schema":{"type":"integer","minimum":0}},"Retry-After":{"description":"再試行までの待機秒数","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"内部エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-goyoka-audience":"tenant","x-goyoka-required-scopes":["events:read"]},"patch":{"operationId":"events_occurrences_update","tags":["events"],"summary":"開催回の会場と使う設備を更新する","description":"会場3欄とfacility_unit_idsを更新する。設備はnullですべて、空でない配列で選択、省略で保持する。会場と設備の両方があれば設備を先に確かめる。アーカイブ済み・他店・帰属違いは404 NOT_FOUNDで、書き込みも通知もしません。入力の形の誤りはRESTでは422 VALIDATION（details.fieldErrors）、MCPではツールの入力検査のエラー文を返します。\n\n必要な範囲: `events:write`","security":[{"bearer":[]},{"oauth2":["events:write"]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","format":"uuid"},"required":true,"name":"occId","in":"path"},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"同じ内容の再送に同じ値を使います。異なる内容との再利用や処理中の再送は409 IDEMPOTENCY_KEY_REUSEDです。"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"location_name":{"type":["string","null"],"maxLength":120},"location_address":{"type":["string","null"],"maxLength":300},"online_url":{"type":["string","null"]},"facility_unit_ids":{"type":["array","null"],"items":{"type":"string","format":"uuid"},"minItems":1,"maxItems":100}},"additionalProperties":false}}}},"responses":{"200":{"description":"開催回の会場と使う設備を更新する","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/ApiOccurrenceDetail"}},"required":["data"]}}}},"400":{"description":"利用できないヘッダ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"鍵が無い・無効","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"範囲不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"見つからない","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"予約・冪等キーの競合","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"本文が1 MiBを超えている","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"入力の検証失敗","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"回数の上限","headers":{"RateLimit-Limit":{"description":"固定窓内の回数上限","schema":{"type":"integer","minimum":1}},"RateLimit-Remaining":{"description":"固定窓内の残り回数","schema":{"type":"integer","minimum":0}},"RateLimit-Reset":{"description":"窓終了までの秒数","schema":{"type":"integer","minimum":0}},"Retry-After":{"description":"再試行までの待機秒数","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"内部エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-goyoka-audience":"tenant","x-goyoka-required-scopes":["events:write"]}},"/api/v1/events/{id}/occurrences/{occId}/participants":{"get":{"operationId":"events_participants_list","tags":["events"],"summary":"開催回の参加者一覧","description":"承認待ちも同じ配列にstatus:AWAITING_APPROVALとbooking_idを含めて返し、明細が全取消しの予約は除外します。明細のstatus/liveで取消履歴を区別でき、due_yenは生きた明細ぶんの合計です。ページングはなくnext_cursorは常にnull。customerはidとnameだけで、customers:contactがなければトップレベルのcontactはnullです。許可があればcontactはemailとphoneで、未登録の欄はnullです。customers:read/writeは不要です。他店・別イベントの開催回と不明なIDは404です。\n\n必要な範囲: `events:read`\n\n`customers:contact` があるとメール・電話が入る（会話はメールのみ）。","security":[{"bearer":[]},{"oauth2":["events:read"]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","format":"uuid"},"required":true,"name":"occId","in":"path"}],"responses":{"200":{"description":"開催回の参加者一覧","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ApiParticipant"}},"next_cursor":{"type":["string","null"]}},"required":["data","next_cursor"]}}}},"400":{"description":"利用できないヘッダ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"鍵が無い・無効","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"範囲不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"見つからない","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"予約・冪等キーの競合","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"本文が1 MiBを超えている","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"入力の検証失敗","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"回数の上限","headers":{"RateLimit-Limit":{"description":"固定窓内の回数上限","schema":{"type":"integer","minimum":1}},"RateLimit-Remaining":{"description":"固定窓内の残り回数","schema":{"type":"integer","minimum":0}},"RateLimit-Reset":{"description":"窓終了までの秒数","schema":{"type":"integer","minimum":0}},"Retry-After":{"description":"再試行までの待機秒数","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"内部エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-goyoka-audience":"tenant","x-goyoka-required-scopes":["events:read"]},"post":{"operationId":"events_participants_add","tags":["events"],"summary":"イベントの参加者を追加する","description":"公開済みの開催回に参加者を手動確定で追加する。nameとoccurrence_menu_idsは必須。顧客はcustomer_id、同じお店のメール一致の順に探し、なければ作成しますが、既存顧客の氏名・連絡先は上書きしません。customers:read・customers:writeは不要です。email/phoneはnull・空文字でもcustomers:contactが必要。notify:trueかつ入力emailがある場合だけ通知する。customer_idだけなら連絡先許可は不要で、通知もしない。starts_at_by_menuは選択メニューだけを指定でき、starts_atより優先する。\n\ncustomerはidとnameだけ、contactはemailとphoneで、customers:contactの許可がなければcontact全体がnull、許可があっても未登録の欄はnullです。\n\nアーカイブ済み・他店・指定イベントや開催回や予約への帰属違いは404 NOT_FOUNDで、書き込みも通知もしません。\n\n個別コードのない業務入力エラーは422 BOOKING_INPUT_INVALIDで、理由は日本語のmessageに入ります。\n\n受付停止は403 NEW_BOOKING_SUSPENDED、顧客上限は409 CUSTOMER_LIMIT_REACHED、月間予約上限は409 MONTHLY_BOOKING_LIMIT_REACHEDです。満席・時刻の競合・押さえ変更は409 SLOT_TAKEN、二重申込・顧客の予約重複は409 CUSTOMER_BUSY、下書きなど受付不可は409 BOOKING_NOT_LIVEで、この場合details.statusはありません。\n\n必要な範囲: `events:write`\n\n`customers:contact` があるとメール・電話が入る（会話はメールのみ）。","security":[{"bearer":[]},{"oauth2":["events:write"]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","format":"uuid"},"required":true,"name":"occId","in":"path"},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"同じ内容の再送に同じ値を使います。異なる内容との再利用や処理中の再送は409 IDEMPOTENCY_KEY_REUSEDです。"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"occurrence_menu_ids":{"type":"array","items":{"type":"string","format":"uuid"},"minItems":1},"name":{"type":"string","minLength":1,"maxLength":120},"email":{"type":["string","null"],"maxLength":320},"phone":{"type":["string","null"],"maxLength":32},"customer_id":{"type":["string","null"],"format":"uuid"},"provider_id":{"type":["string","null"],"format":"uuid"},"starts_at":{"type":["string","null"],"format":"date-time"},"starts_at_by_menu":{"type":"object","additionalProperties":{"type":"string","format":"date-time"}},"notify":{"type":"boolean"}},"required":["occurrence_menu_ids","name"],"additionalProperties":false}}}},"responses":{"201":{"description":"イベントの参加者を追加する","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/ApiParticipant"}},"required":["data"]}}}},"400":{"description":"利用できないヘッダ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"鍵が無い・無効","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"範囲不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"見つからない","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"予約・冪等キーの競合","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"本文が1 MiBを超えている","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"入力の検証失敗","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"回数の上限","headers":{"RateLimit-Limit":{"description":"固定窓内の回数上限","schema":{"type":"integer","minimum":1}},"RateLimit-Remaining":{"description":"固定窓内の残り回数","schema":{"type":"integer","minimum":0}},"RateLimit-Reset":{"description":"窓終了までの秒数","schema":{"type":"integer","minimum":0}},"Retry-After":{"description":"再試行までの待機秒数","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"内部エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-goyoka-audience":"tenant","x-goyoka-required-scopes":["events:write"]}},"/api/v1/events/{id}/occurrences/{occId}/participants/{bookingId}/attendance":{"post":{"operationId":"events_attendance_set","tags":["events"],"summary":"参加者の出欠を記録する","description":"出欠は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で、書き込みも通知もしません。\n\ncustomerはidとnameだけ、contactはemailとphoneで、customers:contactの許可がなければcontact全体がnull、許可があっても未登録の欄はnullです。\n\n必要な範囲: `events:write`\n\n`customers:contact` があるとメール・電話が入る（会話はメールのみ）。","security":[{"bearer":[]},{"oauth2":["events:write"]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","format":"uuid"},"required":true,"name":"occId","in":"path"},{"schema":{"type":"string","format":"uuid"},"required":true,"name":"bookingId","in":"path"},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"同じ内容の再送に同じ値を使います。異なる内容との再利用や処理中の再送は409 IDEMPOTENCY_KEY_REUSEDです。"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"attendance":{"type":"string","enum":["UNSET","ATTENDED","NO_SHOW"]}},"required":["attendance"],"additionalProperties":false}}}},"responses":{"200":{"description":"参加者の出欠を記録する","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/ApiParticipant"}},"required":["data"]}}}},"400":{"description":"利用できないヘッダ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"鍵が無い・無効","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"範囲不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"見つからない","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"予約・冪等キーの競合","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"本文が1 MiBを超えている","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"入力の検証失敗","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"回数の上限","headers":{"RateLimit-Limit":{"description":"固定窓内の回数上限","schema":{"type":"integer","minimum":1}},"RateLimit-Remaining":{"description":"固定窓内の残り回数","schema":{"type":"integer","minimum":0}},"RateLimit-Reset":{"description":"窓終了までの秒数","schema":{"type":"integer","minimum":0}},"Retry-After":{"description":"再試行までの待機秒数","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"内部エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-goyoka-audience":"tenant","x-goyoka-required-scopes":["events:write"]}},"/api/v1/events/{id}/occurrences/{occId}/participants/{bookingId}/approve":{"post":{"operationId":"events_booking_approve","tags":["events"],"summary":"イベントの承認待ち予約を承認する","description":"AWAITING_APPROVALの予約を承認し、既存の承認通知を送る。通知状況によっては成功時もAPPROVED_PENDING_NOTICEを返す。PAYMENTの入金確認を伴う承認は対象外。状態不一致・PAYMENTは409 BOOKING_NOT_APPROVABLE、details.statusに現在の状態、details.awaiting_paymentに申込時の確定方法がPAYMENTかを返す。アーカイブ済み・他店・指定イベントや開催回や予約への帰属違いは404 NOT_FOUNDで、書き込みも通知もしません。\n\ncustomerはidとnameだけ、contactはemailとphoneで、customers:contactの許可がなければcontact全体がnull、許可があっても未登録の欄はnullです。\n\n必要な範囲: `events:write`\n\n`customers:contact` があるとメール・電話が入る（会話はメールのみ）。","security":[{"bearer":[]},{"oauth2":["events:write"]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","format":"uuid"},"required":true,"name":"occId","in":"path"},{"schema":{"type":"string","format":"uuid"},"required":true,"name":"bookingId","in":"path"},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"同じ内容の再送に同じ値を使います。異なる内容との再利用や処理中の再送は409 IDEMPOTENCY_KEY_REUSEDです。"}],"responses":{"200":{"description":"イベントの承認待ち予約を承認する","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/ApiParticipant"}},"required":["data"]}}}},"400":{"description":"利用できないヘッダ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"鍵が無い・無効","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"範囲不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"見つからない","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"予約・冪等キーの競合","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"本文が1 MiBを超えている","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"入力の検証失敗","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"回数の上限","headers":{"RateLimit-Limit":{"description":"固定窓内の回数上限","schema":{"type":"integer","minimum":1}},"RateLimit-Remaining":{"description":"固定窓内の残り回数","schema":{"type":"integer","minimum":0}},"RateLimit-Reset":{"description":"窓終了までの秒数","schema":{"type":"integer","minimum":0}},"Retry-After":{"description":"再試行までの待機秒数","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"内部エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-goyoka-audience":"tenant","x-goyoka-required-scopes":["events:write"]}},"/api/v1/events/{id}/occurrences/{occId}/participants/{bookingId}/decline":{"post":{"operationId":"events_booking_decline","tags":["events"],"summary":"イベントの承認待ち予約を見送る","description":"AWAITING_APPROVALの予約を見送り、理由付きの辞退通知・席の解放・既存の待機繰上げを行う。reasonは必須でtrim後1〜500字。省略・空白・501字以上は、RESTでは422 VALIDATION（details.fieldErrors.reason）、MCPではツールの入力検査のエラー文を返します。状態不一致は409 BOOKING_NOT_APPROVABLE、details.statusとdetails.awaiting_payment（申込時の確定方法がPAYMENTならtrue）を返す。PAYMENTの辞退は可能だが、入金確認を伴う承認はこのAPIの対象外。成功時は一覧から消えた予約も単体で読み直し、DECLINED、取消済み明細のstatus/live:false、due_yen:0と実残高のpaid_yenを返す。アーカイブ済み・他店・指定イベントや開催回や予約への帰属違いは404 NOT_FOUNDで、書き込みも通知もしません。\n\ncustomerはidとnameだけ、contactはemailとphoneで、customers:contactの許可がなければcontact全体がnull、許可があっても未登録の欄はnullです。\n\n必要な範囲: `events:write`\n\n`customers:contact` があるとメール・電話が入る（会話はメールのみ）。","security":[{"bearer":[]},{"oauth2":["events:write"]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","format":"uuid"},"required":true,"name":"occId","in":"path"},{"schema":{"type":"string","format":"uuid"},"required":true,"name":"bookingId","in":"path"},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"同じ内容の再送に同じ値を使います。異なる内容との再利用や処理中の再送は409 IDEMPOTENCY_KEY_REUSEDです。"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","minLength":1,"maxLength":500}},"required":["reason"],"additionalProperties":false}}}},"responses":{"200":{"description":"イベントの承認待ち予約を見送る","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/ApiParticipant"}},"required":["data"]}}}},"400":{"description":"利用できないヘッダ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"鍵が無い・無効","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"範囲不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"見つからない","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"予約・冪等キーの競合","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"本文が1 MiBを超えている","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"入力の検証失敗","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"回数の上限","headers":{"RateLimit-Limit":{"description":"固定窓内の回数上限","schema":{"type":"integer","minimum":1}},"RateLimit-Remaining":{"description":"固定窓内の残り回数","schema":{"type":"integer","minimum":0}},"RateLimit-Reset":{"description":"窓終了までの秒数","schema":{"type":"integer","minimum":0}},"Retry-After":{"description":"再試行までの待機秒数","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"内部エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-goyoka-audience":"tenant","x-goyoka-required-scopes":["events:write"]}},"/api/v1/events/{id}/occurrences/{occId}/participants/{bookingId}/items/{itemId}/cancel":{"post":{"operationId":"events_participant_item_cancel","tags":["events"],"summary":"イベント参加者の明細を取り消す","description":"指定予約に属する1明細を取り消す。依存明細がある場合は422 BOOKING_INPUT_INVALIDとreason:NEEDS_DEPENDENT_CONFIRMATION、dependent_item_ids、total_after_yenを返す。confirm_dependents:trueで依存明細も取り消す。返金予定・枠解放・既存通知を行い、全取消しでも更新後の単体参加者を返す。\n\ncustomerはidとnameだけ、contactはemailとphoneで、customers:contactの許可がなければcontact全体がnull、許可があっても未登録の欄はnullです。\n\nアーカイブ済み・他店・指定イベントや開催回や予約への帰属違いは404 NOT_FOUNDで、書き込みも通知もしません。\n\n個別コードのない業務入力エラーは422 BOOKING_INPUT_INVALIDで、理由は日本語のmessageに入ります。\n\n必要な範囲: `events:write`\n\n`customers:contact` があるとメール・電話が入る（会話はメールのみ）。","security":[{"bearer":[]},{"oauth2":["events:write"]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","format":"uuid"},"required":true,"name":"occId","in":"path"},{"schema":{"type":"string","format":"uuid"},"required":true,"name":"bookingId","in":"path"},{"schema":{"type":"string","format":"uuid"},"required":true,"name":"itemId","in":"path"},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"同じ内容の再送に同じ値を使います。異なる内容との再利用や処理中の再送は409 IDEMPOTENCY_KEY_REUSEDです。"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":["string","null"]},"confirm_dependents":{"type":"boolean"}},"additionalProperties":false}}}},"responses":{"200":{"description":"イベント参加者の明細を取り消す","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/ApiParticipant"}},"required":["data"]}}}},"400":{"description":"利用できないヘッダ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"鍵が無い・無効","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"範囲不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"見つからない","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"予約・冪等キーの競合","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"本文が1 MiBを超えている","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"入力の検証失敗","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"回数の上限","headers":{"RateLimit-Limit":{"description":"固定窓内の回数上限","schema":{"type":"integer","minimum":1}},"RateLimit-Remaining":{"description":"固定窓内の残り回数","schema":{"type":"integer","minimum":0}},"RateLimit-Reset":{"description":"窓終了までの秒数","schema":{"type":"integer","minimum":0}},"Retry-After":{"description":"再試行までの待機秒数","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"内部エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-goyoka-audience":"tenant","x-goyoka-required-scopes":["events:write"]}},"/api/v1/events/{id}/occurrences/{occId}/participants/{bookingId}/payments":{"post":{"operationId":"events_payment_record","tags":["events"],"summary":"イベント参加者の入金・返金を記録する","description":"URLで指定した1予約へ正の整数円を記録する。booking_item_idは同じ予約の明細だけを指定できる。RECEIVED/REFUNDEDはpaid_yenを増減し、EXPECTED_CHARGE/EXPECTED_REFUNDは予定額へ反映する。methodは前後の空白を除いて60文字以内、occurred_atはYYYY-MM-DD。\n\ncustomerはidとnameだけ、contactはemailとphoneで、customers:contactの許可がなければcontact全体がnull、許可があっても未登録の欄はnullです。\n\nアーカイブ済み・他店・指定イベントや開催回や予約への帰属違いは404 NOT_FOUNDで、書き込みも通知もしません。\n\n個別コードのない業務入力エラーは422 BOOKING_INPUT_INVALIDで、理由は日本語のmessageに入ります。\n\n必要な範囲: `events:write`\n\n`customers:contact` があるとメール・電話が入る（会話はメールのみ）。","security":[{"bearer":[]},{"oauth2":["events:write"]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","format":"uuid"},"required":true,"name":"occId","in":"path"},{"schema":{"type":"string","format":"uuid"},"required":true,"name":"bookingId","in":"path"},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"同じ内容の再送に同じ値を使います。異なる内容との再利用や処理中の再送は409 IDEMPOTENCY_KEY_REUSEDです。"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"type":"string","enum":["EXPECTED_CHARGE","EXPECTED_REFUND","RECEIVED","REFUNDED"]},"amount_yen":{"type":"integer","minimum":1,"maximum":2147483647},"booking_item_id":{"type":["string","null"],"format":"uuid"},"method":{"type":["string","null"],"maxLength":60},"occurred_at":{"type":["string","null"],"format":"date"},"note":{"type":["string","null"]}},"required":["kind","amount_yen"],"additionalProperties":false}}}},"responses":{"200":{"description":"イベント参加者の入金・返金を記録する","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/ApiParticipant"}},"required":["data"]}}}},"400":{"description":"利用できないヘッダ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"鍵が無い・無効","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"範囲不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"見つからない","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"予約・冪等キーの競合","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"本文が1 MiBを超えている","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"入力の検証失敗","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"回数の上限","headers":{"RateLimit-Limit":{"description":"固定窓内の回数上限","schema":{"type":"integer","minimum":1}},"RateLimit-Remaining":{"description":"固定窓内の残り回数","schema":{"type":"integer","minimum":0}},"RateLimit-Reset":{"description":"窓終了までの秒数","schema":{"type":"integer","minimum":0}},"Retry-After":{"description":"再試行までの待機秒数","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"内部エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-goyoka-audience":"tenant","x-goyoka-required-scopes":["events:write"]}},"/api/v1/events/{id}/occurrences/{occId}/participants/{bookingId}/confirm-payment":{"post":{"operationId":"events_payment_confirm","tags":["events"],"summary":"イベント予約の入金を確認して承認する","description":"AWAITING_APPROVALかつ申込時の確定方法がPAYMENTの予約に入金を記録し、承認通知を送る。金額は正の整数円、methodは前後の空白を除いて60文字以内、occurred_atはYYYY-MM-DD。状態不一致は409 BOOKING_NOT_APPROVABLEでstatus/awaiting_paymentを返す。通知状況によっては成功時もAPPROVED_PENDING_NOTICEになる。\n\ncustomerはidとnameだけ、contactはemailとphoneで、customers:contactの許可がなければcontact全体がnull、許可があっても未登録の欄はnullです。\n\nアーカイブ済み・他店・指定イベントや開催回や予約への帰属違いは404 NOT_FOUNDで、書き込みも通知もしません。\n\n必要な範囲: `events:write`\n\n`customers:contact` があるとメール・電話が入る（会話はメールのみ）。","security":[{"bearer":[]},{"oauth2":["events:write"]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","format":"uuid"},"required":true,"name":"occId","in":"path"},{"schema":{"type":"string","format":"uuid"},"required":true,"name":"bookingId","in":"path"},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"同じ内容の再送に同じ値を使います。異なる内容との再利用や処理中の再送は409 IDEMPOTENCY_KEY_REUSEDです。"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"amount_yen":{"type":"integer","minimum":1,"maximum":2147483647},"method":{"type":["string","null"],"maxLength":60},"occurred_at":{"type":["string","null"],"format":"date"},"note":{"type":["string","null"]}},"required":["amount_yen"],"additionalProperties":false}}}},"responses":{"200":{"description":"イベント予約の入金を確認して承認する","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/ApiParticipant"}},"required":["data"]}}}},"400":{"description":"利用できないヘッダ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"鍵が無い・無効","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"範囲不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"見つからない","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"予約・冪等キーの競合","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"本文が1 MiBを超えている","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"入力の検証失敗","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"回数の上限","headers":{"RateLimit-Limit":{"description":"固定窓内の回数上限","schema":{"type":"integer","minimum":1}},"RateLimit-Remaining":{"description":"固定窓内の残り回数","schema":{"type":"integer","minimum":0}},"RateLimit-Reset":{"description":"窓終了までの秒数","schema":{"type":"integer","minimum":0}},"Retry-After":{"description":"再試行までの待機秒数","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"内部エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-goyoka-audience":"tenant","x-goyoka-required-scopes":["events:write"]}},"/api/v1/events/{id}/occurrences/{occId}/cancel":{"post":{"operationId":"events_occurrences_cancel","tags":["events"],"summary":"開催回を中止する","description":"開催回を中止し、占有を解放する。notifyは省略時にtrueとして扱い、参加者へ既存の中止通知を送る。notify:falseでも状態変更と枠解放は行う。既に中止済みでも200で開催回を返す。\n\nアーカイブ済み・他店・指定イベントや開催回への帰属違いは404 NOT_FOUNDで、書き込みも通知もしません。\n\n必要な範囲: `events:write`","security":[{"bearer":[]},{"oauth2":["events:write"]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","format":"uuid"},"required":true,"name":"occId","in":"path"},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"同じ内容の再送に同じ値を使います。異なる内容との再利用や処理中の再送は409 IDEMPOTENCY_KEY_REUSEDです。"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"notify":{"type":"boolean"}},"additionalProperties":false}}}},"responses":{"200":{"description":"開催回を中止する","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/ApiOccurrenceDetail"}},"required":["data"]}}}},"400":{"description":"利用できないヘッダ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"鍵が無い・無効","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"範囲不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"見つからない","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"予約・冪等キーの競合","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"本文が1 MiBを超えている","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"入力の検証失敗","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"回数の上限","headers":{"RateLimit-Limit":{"description":"固定窓内の回数上限","schema":{"type":"integer","minimum":1}},"RateLimit-Remaining":{"description":"固定窓内の残り回数","schema":{"type":"integer","minimum":0}},"RateLimit-Reset":{"description":"窓終了までの秒数","schema":{"type":"integer","minimum":0}},"Retry-After":{"description":"再試行までの待機秒数","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"内部エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-goyoka-audience":"tenant","x-goyoka-required-scopes":["events:write"]}},"/api/v1/events/{id}/publish":{"post":{"operationId":"events_publish","tags":["events"],"summary":"イベントを公開する","description":"DRAFTの公開準備を管理画面と同じ基準で確認して公開する。公開できない場合は409 EVENT_NOT_PUBLISHABLEでdetails.reasonsに理由を返します。details.reasons[].codeは、NO_MENUS（メニューなし）、NO_OCCURRENCES（回なし）、ALL_PAST（公開できる今後の開催回なし）、NO_PROVIDER_FOR_INDIVIDUAL（個別メニューの担当者なし）、NOT_PUBLISHABLE（状態不適合）で準備不足を示します。\n\nEXTERNAL_BUSY（外部予定）とCONFLICT（予約枠競合）にだけoccurrence_idが付き、それ以外には付きません。\n\nconfirmed_external_overlap:trueで外部予定との重なりを確認しても予約枠の競合は解除されず、外部予定の生データは返さないほか、件名・時刻は返しません。PUBLISHEDの再実行は開催回を再同期する。\n\nアーカイブ済み・他店・不明なイベントは404 NOT_FOUNDで、書き込みも通知もしません。\n\n成功時と同じ冪等キーでは保存済みの結果を返すだけです。\n\n必要な範囲: `events:write`","security":[{"bearer":[]},{"oauth2":["events:write"]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"同じ内容の再送に同じ値を使います。異なる内容との再利用や処理中の再送は409 IDEMPOTENCY_KEY_REUSEDです。"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"confirmed_external_overlap":{"type":"boolean"}},"additionalProperties":false}}}},"responses":{"200":{"description":"イベントを公開する","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/ApiEvent"}},"required":["data"]}}}},"400":{"description":"利用できないヘッダ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"鍵が無い・無効","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"範囲不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"見つからない","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"予約・冪等キーの競合","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"本文が1 MiBを超えている","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"入力の検証失敗","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"回数の上限","headers":{"RateLimit-Limit":{"description":"固定窓内の回数上限","schema":{"type":"integer","minimum":1}},"RateLimit-Remaining":{"description":"固定窓内の残り回数","schema":{"type":"integer","minimum":0}},"RateLimit-Reset":{"description":"窓終了までの秒数","schema":{"type":"integer","minimum":0}},"Retry-After":{"description":"再試行までの待機秒数","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"内部エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-goyoka-audience":"tenant","x-goyoka-required-scopes":["events:write"]}},"/api/v1/events/{id}/menus":{"get":{"operationId":"events_menus_list","tags":["events"],"summary":"イベントのメニュー一覧","description":"全メニューと箱の出どころを返します。cursor・limitはありません。空箱は行に現れません。書き戻すときにboxesを省略すると空箱と所属を保持します。アーカイブ済みは404です。\n\n必要な範囲: `events:read`","security":[{"bearer":[]},{"oauth2":["events:read"]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"イベントのメニュー一覧","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"service_id":{"type":["string","null"],"format":"uuid"},"name":{"type":"string","minLength":1,"maxLength":120},"price_yen":{"type":"integer","minimum":0,"maximum":2147483647},"duration_minutes":{"type":"integer","minimum":1,"maximum":2147483647},"timing_mode":{"type":"string","enum":["FIXED","INDIVIDUAL"]},"required":{"type":"boolean"},"display_order":{"type":"integer","minimum":-2147483648,"maximum":2147483647},"buffer_before_minutes":{"type":"integer","minimum":0,"maximum":2147483647},"buffer_after_minutes":{"type":"integer","minimum":0,"maximum":2147483647},"menu_category":{"type":["object","null"],"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string","maxLength":60},"open_by_default":{"type":"boolean"},"sort_order":{"type":"integer","minimum":-2147483648,"maximum":2147483647}},"required":["id","name","open_by_default","sort_order"],"additionalProperties":false},"selection_group_id":{"type":["string","null"],"format":"uuid"}},"required":["id","service_id","name","price_yen","duration_minutes","timing_mode","required","display_order","buffer_before_minutes","buffer_after_minutes","menu_category","selection_group_id"],"additionalProperties":false}},"menu_category_source":{"type":"string","enum":["LEDGER","EVENT"]}},"required":["data","menu_category_source"],"additionalProperties":false}}}},"400":{"description":"利用できないヘッダ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"鍵が無い・無効","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"範囲不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"見つからない","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"予約・冪等キーの競合","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"本文が1 MiBを超えている","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"入力の検証失敗","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"回数の上限","headers":{"RateLimit-Limit":{"description":"固定窓内の回数上限","schema":{"type":"integer","minimum":1}},"RateLimit-Remaining":{"description":"固定窓内の残り回数","schema":{"type":"integer","minimum":0}},"RateLimit-Reset":{"description":"窓終了までの秒数","schema":{"type":"integer","minimum":0}},"Retry-After":{"description":"再試行までの待機秒数","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"内部エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-goyoka-audience":"tenant","x-goyoka-required-scopes":["events:read"]},"put":{"operationId":"events_menus_replace","tags":["events"],"summary":"メニューを丸ごと置き換え（送らなかった行は削除）","description":"メニューを丸ごと置き換え、送らなかった行は削除します。先にGETして全行を読んでください。配列順を優先します。boxes省略は箱と所属を保持します。EVENT箱ではmenu_category_key省略時にmenu_category.idからkeyを補います。menu_categoryは読取投影で、箱の変更はboxesとmenu_category_keyを使います。selection_group_idは既存値の往復だけを受けます。service_id付き行のname・price_yen・duration_minutesは台帳のメニューが正本でbody値を無視し、料金変更はservices_updateを使ってください。完全一致の往復は書き込みません。任意の冪等キーを使えます。\n\n保存状態で拒否する変更は409 EVENT_EDIT_BLOCKEDです。details.blocksは理由の配列で、codeで分岐しmessageを表示します。\n\nアーカイブ済みイベントは404 NOT_FOUNDです。\n\nBOOKING_INPUT_INVALIDは、欄名を持つ業務エラーならdetails.fieldErrors、欄名がない場合はdetailsなしとなる経路もあります。MCPでも業務エラーはstructuredContent.errorに返します。入力の形の誤りは、RESTでは422 VALIDATION（details.fieldErrors）、MCPではツールの入力検査のエラー文を返します。\n\nハンドラ内で検査するメニューID・箱のIDやkeyの重複、selection_group_idの変更、箱の指定と所属の不整合は422 VALIDATIONです。これはMCPでもstructuredContent.errorにcode:VALIDATIONとdetails.fieldErrorsを返します。\n\n必要な範囲: `events:write`","security":[{"bearer":[]},{"oauth2":["events:write"]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"同じ内容の再送に同じ値を使います。異なる内容との再利用や処理中の再送は409 IDEMPOTENCY_KEY_REUSEDです。"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"menus":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"service_id":{"type":["string","null"],"format":"uuid"},"name":{"type":"string","minLength":1,"maxLength":120},"price_yen":{"type":"integer","minimum":0,"maximum":2147483647},"duration_minutes":{"type":"integer","minimum":1,"maximum":2147483647},"timing_mode":{"type":"string","enum":["FIXED","INDIVIDUAL"]},"required":{"type":"boolean"},"display_order":{"type":"integer","minimum":-2147483648,"maximum":2147483647},"buffer_before_minutes":{"type":"integer","minimum":0,"maximum":2147483647},"buffer_after_minutes":{"type":"integer","minimum":0,"maximum":2147483647},"menu_category":{"type":["object","null"],"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string","maxLength":60},"open_by_default":{"type":"boolean"},"sort_order":{"type":"integer","minimum":-2147483648,"maximum":2147483647}},"required":["id","name","open_by_default","sort_order"],"additionalProperties":false},"menu_category_key":{"type":["string","null"],"minLength":1},"selection_group_id":{"type":["string","null"],"format":"uuid"}},"required":["name","price_yen","duration_minutes","timing_mode","required"],"additionalProperties":false}},"boxes":{"oneOf":[{"type":"object","properties":{"source":{"type":"string","enum":["LEDGER"]}},"required":["source"],"additionalProperties":false},{"type":"object","properties":{"source":{"type":"string","enum":["EVENT"]},"boxes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"key":{"type":"string","minLength":1},"name":{"type":"string","minLength":1,"maxLength":60},"open_by_default":{"type":"boolean"}},"required":["key","name","open_by_default"],"additionalProperties":false}}},"required":["source","boxes"],"additionalProperties":false}]}},"required":["menus"],"additionalProperties":false}}}},"responses":{"200":{"description":"メニューを丸ごと置き換え（送らなかった行は削除）","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"service_id":{"type":["string","null"],"format":"uuid"},"name":{"type":"string","minLength":1,"maxLength":120},"price_yen":{"type":"integer","minimum":0,"maximum":2147483647},"duration_minutes":{"type":"integer","minimum":1,"maximum":2147483647},"timing_mode":{"type":"string","enum":["FIXED","INDIVIDUAL"]},"required":{"type":"boolean"},"display_order":{"type":"integer","minimum":-2147483648,"maximum":2147483647},"buffer_before_minutes":{"type":"integer","minimum":0,"maximum":2147483647},"buffer_after_minutes":{"type":"integer","minimum":0,"maximum":2147483647},"menu_category":{"type":["object","null"],"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string","maxLength":60},"open_by_default":{"type":"boolean"},"sort_order":{"type":"integer","minimum":-2147483648,"maximum":2147483647}},"required":["id","name","open_by_default","sort_order"],"additionalProperties":false},"selection_group_id":{"type":["string","null"],"format":"uuid"}},"required":["id","service_id","name","price_yen","duration_minutes","timing_mode","required","display_order","buffer_before_minutes","buffer_after_minutes","menu_category","selection_group_id"],"additionalProperties":false}},"menu_category_source":{"type":"string","enum":["LEDGER","EVENT"]}},"required":["data","menu_category_source"],"additionalProperties":false}}}},"400":{"description":"利用できないヘッダ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"鍵が無い・無効","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"範囲不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"見つからない","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"予約・冪等キーの競合","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"本文が1 MiBを超えている","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"入力の検証失敗","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"回数の上限","headers":{"RateLimit-Limit":{"description":"固定窓内の回数上限","schema":{"type":"integer","minimum":1}},"RateLimit-Remaining":{"description":"固定窓内の残り回数","schema":{"type":"integer","minimum":0}},"RateLimit-Reset":{"description":"窓終了までの秒数","schema":{"type":"integer","minimum":0}},"Retry-After":{"description":"再試行までの待機秒数","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"内部エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-goyoka-audience":"tenant","x-goyoka-required-scopes":["events:write"]}},"/api/v1/events/{id}/questions":{"get":{"operationId":"events_questions_list","tags":["events"],"summary":"イベントの質問一覧","description":"質問定義の全行を返します。回答本文は含まず、cursor・limitはありません。アーカイブ済みは404です。\n\n必要な範囲: `events:read`","security":[{"bearer":[]},{"oauth2":["events:read"]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"イベントの質問一覧","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"prompt":{"type":"string","minLength":1,"maxLength":200},"kind":{"type":"string","enum":["TEXT","SINGLE","CHECKBOX"]},"required":{"type":"boolean"},"options":{"type":"array","items":{"type":"string"}},"sort_order":{"type":"integer","minimum":-2147483648,"maximum":2147483647}},"required":["id","prompt","kind","required","options","sort_order"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"利用できないヘッダ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"鍵が無い・無効","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"範囲不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"見つからない","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"予約・冪等キーの競合","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"本文が1 MiBを超えている","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"入力の検証失敗","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"回数の上限","headers":{"RateLimit-Limit":{"description":"固定窓内の回数上限","schema":{"type":"integer","minimum":1}},"RateLimit-Remaining":{"description":"固定窓内の残り回数","schema":{"type":"integer","minimum":0}},"RateLimit-Reset":{"description":"窓終了までの秒数","schema":{"type":"integer","minimum":0}},"Retry-After":{"description":"再試行までの待機秒数","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"内部エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-goyoka-audience":"tenant","x-goyoka-required-scopes":["events:read"]},"put":{"operationId":"events_questions_replace","tags":["events"],"summary":"質問を丸ごと置き換え（送らなかった行は削除）","description":"質問を丸ごと置き換え、送らなかった行は削除します。先にGETしてください。sort_orderより配列順を優先します。完全一致ならIDと保存日時を保持します。変更時は全行を再作成しIDも変わります。過去の回答スナップショットは変えません。任意の冪等キーを使えます。\n\nアーカイブ済みイベントは404 NOT_FOUNDです。\n\n公開入力の形の誤りは、RESTでは422 VALIDATION（details.fieldErrorsの最上位の欄名を確認）、MCPではツールの入力検査のエラー文を返します。\n\nハンドラ内で検査する質問IDの重複は422 VALIDATIONです。これはMCPでもstructuredContent.errorにcode:VALIDATIONとdetails.fieldErrorsを返します。\n\n必要な範囲: `events:write`","security":[{"bearer":[]},{"oauth2":["events:write"]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"同じ内容の再送に同じ値を使います。異なる内容との再利用や処理中の再送は409 IDEMPOTENCY_KEY_REUSEDです。"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"questions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"prompt":{"type":"string","minLength":1,"maxLength":200},"kind":{"type":"string","enum":["TEXT","SINGLE","CHECKBOX"]},"required":{"type":"boolean"},"options":{"type":"array","items":{"type":"string"}},"sort_order":{"type":"integer","minimum":-2147483648,"maximum":2147483647}},"required":["prompt","kind"],"additionalProperties":false}}},"required":["questions"],"additionalProperties":false}}}},"responses":{"200":{"description":"質問を丸ごと置き換え（送らなかった行は削除）","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"prompt":{"type":"string","minLength":1,"maxLength":200},"kind":{"type":"string","enum":["TEXT","SINGLE","CHECKBOX"]},"required":{"type":"boolean"},"options":{"type":"array","items":{"type":"string"}},"sort_order":{"type":"integer","minimum":-2147483648,"maximum":2147483647}},"required":["id","prompt","kind","required","options","sort_order"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"利用できないヘッダ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"鍵が無い・無効","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"範囲不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"見つからない","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"予約・冪等キーの競合","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"本文が1 MiBを超えている","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"入力の検証失敗","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"回数の上限","headers":{"RateLimit-Limit":{"description":"固定窓内の回数上限","schema":{"type":"integer","minimum":1}},"RateLimit-Remaining":{"description":"固定窓内の残り回数","schema":{"type":"integer","minimum":0}},"RateLimit-Reset":{"description":"窓終了までの秒数","schema":{"type":"integer","minimum":0}},"Retry-After":{"description":"再試行までの待機秒数","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"内部エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-goyoka-audience":"tenant","x-goyoka-required-scopes":["events:write"]}},"/api/v1/events/{id}/selection-groups":{"get":{"operationId":"events_selection_groups_list","tags":["events"],"summary":"イベントの選択グループ一覧","description":"条件と所属メニューを含む全行を返します。cursor・limitはありません。アーカイブ済みは404です。\n\n必要な範囲: `events:read`","security":[{"bearer":[]},{"oauth2":["events:read"]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"イベントの選択グループ一覧","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string","minLength":1,"maxLength":120},"min_selections":{"type":"integer","minimum":0,"maximum":2147483647},"max_selections":{"type":["integer","null"],"minimum":1,"maximum":2147483647},"display_order":{"type":"integer","minimum":-2147483648,"maximum":2147483647},"conditions":{"type":"array","items":{"type":"object","properties":{"mode":{"type":"string","enum":["ALL","ANY"]},"kind":{"type":"string","enum":["PAID_MENU_SELECTED","MENU_SELECTED","SELF_CONFIRMED","ORGANIZER_ALLOWED"]},"target_menu_id":{"type":["string","null"],"format":"uuid"}},"required":["mode","kind","target_menu_id"],"additionalProperties":false}},"menu_ids":{"type":"array","items":{"type":"string","format":"uuid"}}},"required":["id","name","min_selections","max_selections","display_order","conditions","menu_ids"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"利用できないヘッダ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"鍵が無い・無効","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"範囲不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"見つからない","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"予約・冪等キーの競合","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"本文が1 MiBを超えている","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"入力の検証失敗","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"回数の上限","headers":{"RateLimit-Limit":{"description":"固定窓内の回数上限","schema":{"type":"integer","minimum":1}},"RateLimit-Remaining":{"description":"固定窓内の残り回数","schema":{"type":"integer","minimum":0}},"RateLimit-Reset":{"description":"窓終了までの秒数","schema":{"type":"integer","minimum":0}},"Retry-After":{"description":"再試行までの待機秒数","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"内部エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-goyoka-audience":"tenant","x-goyoka-required-scopes":["events:read"]},"put":{"operationId":"events_selection_groups_replace","tags":["events"],"summary":"選択グループを丸ごと置き換え（送らなかった行は削除）","description":"選択グループを丸ごと置き換え、送らなかった行は削除します。メニュー本体は保持します。先にGETしてください。既存idをkeyの既定値にし、新規はkey必須です。所属はassignments省略時はgroups[].menu_idsから組み立て、menu_idsも省略した所属は保持します。assignmentsがあればそちらが正本で、未指定メニューを外し、空配列は全解除します。menu_idsも送る場合は正本と一致させてください。配列順を優先し、完全一致の往復は書きません。ORGANIZER_ALLOWEDは完全一致だけを保持し変更入力は422です。任意の冪等キーを使えます。\n\n保存状態で拒否する変更は409 EVENT_EDIT_BLOCKEDです。details.blocksは理由の配列で、codeで分岐しmessageを表示します。\n\nアーカイブ済みイベントは404 NOT_FOUNDです。\n\n条件の対象欠落・同じグループの参照・循環・重複だけが問題なら422 BOOKING_INPUT_INVALIDです。条件の問題と保存状態の問題が混在すれば全理由を含む409 EVENT_EDIT_BLOCKEDで、公開のdetails.reasonsとは別形式です。\n\nBOOKING_INPUT_INVALIDは、欄名を持つ業務エラーならdetails.fieldErrors、欄名がない場合はdetailsなしとなる経路もあります。MCPでも業務エラーはstructuredContent.errorに返します。入力の形の誤りは、RESTでは422 VALIDATION（details.fieldErrors）、MCPではツールの入力検査のエラー文を返します。\n\nハンドラ内で検査するグループIDやkey・所属メニューの重複、新規keyの欠落、条件modeの混在、所属指定の不整合、ORGANIZER_ALLOWEDの変更入力は422 VALIDATIONです。これはMCPでもstructuredContent.errorにcode:VALIDATIONとdetails.fieldErrorsを返します。\n\n必要な範囲: `events:write`","security":[{"bearer":[]},{"oauth2":["events:write"]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"同じ内容の再送に同じ値を使います。異なる内容との再利用や処理中の再送は409 IDEMPOTENCY_KEY_REUSEDです。"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"groups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"key":{"type":"string","minLength":1},"name":{"type":"string","minLength":1,"maxLength":120},"min_selections":{"type":"integer","minimum":0,"maximum":2147483647},"max_selections":{"type":["integer","null"],"minimum":1,"maximum":2147483647},"display_order":{"type":"integer","minimum":-2147483648,"maximum":2147483647},"conditions":{"type":"array","items":{"type":"object","properties":{"mode":{"type":"string","enum":["ALL","ANY"]},"kind":{"type":"string","enum":["PAID_MENU_SELECTED","MENU_SELECTED","SELF_CONFIRMED","ORGANIZER_ALLOWED"]},"target_menu_id":{"type":["string","null"],"format":"uuid"}},"required":["mode","kind","target_menu_id"],"additionalProperties":false}},"menu_ids":{"type":"array","items":{"type":"string","format":"uuid"}}},"required":["name","min_selections","max_selections","conditions"],"additionalProperties":false}},"assignments":{"type":"array","items":{"type":"object","properties":{"menu_id":{"type":"string","format":"uuid"},"group_key":{"type":["string","null"],"minLength":1}},"required":["menu_id","group_key"],"additionalProperties":false}}},"required":["groups"],"additionalProperties":false}}}},"responses":{"200":{"description":"選択グループを丸ごと置き換え（送らなかった行は削除）","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string","minLength":1,"maxLength":120},"min_selections":{"type":"integer","minimum":0,"maximum":2147483647},"max_selections":{"type":["integer","null"],"minimum":1,"maximum":2147483647},"display_order":{"type":"integer","minimum":-2147483648,"maximum":2147483647},"conditions":{"type":"array","items":{"type":"object","properties":{"mode":{"type":"string","enum":["ALL","ANY"]},"kind":{"type":"string","enum":["PAID_MENU_SELECTED","MENU_SELECTED","SELF_CONFIRMED","ORGANIZER_ALLOWED"]},"target_menu_id":{"type":["string","null"],"format":"uuid"}},"required":["mode","kind","target_menu_id"],"additionalProperties":false}},"menu_ids":{"type":"array","items":{"type":"string","format":"uuid"}}},"required":["id","name","min_selections","max_selections","display_order","conditions","menu_ids"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"利用できないヘッダ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"鍵が無い・無効","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"範囲不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"見つからない","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"予約・冪等キーの競合","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"本文が1 MiBを超えている","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"入力の検証失敗","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"回数の上限","headers":{"RateLimit-Limit":{"description":"固定窓内の回数上限","schema":{"type":"integer","minimum":1}},"RateLimit-Remaining":{"description":"固定窓内の残り回数","schema":{"type":"integer","minimum":0}},"RateLimit-Reset":{"description":"窓終了までの秒数","schema":{"type":"integer","minimum":0}},"Retry-After":{"description":"再試行までの待機秒数","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"内部エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-goyoka-audience":"tenant","x-goyoka-required-scopes":["events:write"]}},"/api/v1/events/{id}/occurrences/{occId}/menus":{"patch":{"operationId":"events_occurrence_menus_update","tags":["events"],"summary":"開催回のメニュー枠を更新する","description":"指定行の定員と時間帯だけを更新します。開催回詳細のmenus[].idをoccurrence_menu_idに使います。省略は保持、nullは解除です。FIXED窓の制約を適用します。空配列は無更新です。他回のIDが1行でもあれば404で何も保存しません。応答は指定行だけを入力順で返します。メニュー本体と未指定行は保持します。任意の冪等キーを使えます。\n\n保存状態で拒否する変更は409 EVENT_EDIT_BLOCKEDです。details.blocksは理由の配列で、codeで分岐しmessageを表示します。\n\nアーカイブ済みイベントは404 NOT_FOUNDです。\n\nBOOKING_INPUT_INVALIDは、欄名を持つ業務エラーならdetails.fieldErrors、欄名がない場合はdetailsなしとなる経路もあります。MCPでも業務エラーはstructuredContent.errorに返します。入力の形の誤りは、RESTでは422 VALIDATION（details.fieldErrors）、MCPではツールの入力検査のエラー文を返します。\n\nハンドラ内で検査するoccurrence_menu_idの重複は422 VALIDATIONです。これはMCPでもstructuredContent.errorにcode:VALIDATIONとdetails.fieldErrorsを返します。\n\n必要な範囲: `events:write`","security":[{"bearer":[]},{"oauth2":["events:write"]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","format":"uuid"},"required":true,"name":"occId","in":"path"},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"同じ内容の再送に同じ値を使います。異なる内容との再利用や処理中の再送は409 IDEMPOTENCY_KEY_REUSEDです。"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"object","properties":{"occurrence_menu_id":{"type":"string","format":"uuid"},"capacity":{"type":["integer","null"],"minimum":1,"maximum":2147483647},"starts_at":{"type":["string","null"],"format":"date-time"},"ends_at":{"type":["string","null"],"format":"date-time"}},"required":["occurrence_menu_id"],"additionalProperties":false}}},"required":["rows"],"additionalProperties":false}}}},"responses":{"200":{"description":"開催回のメニュー枠を更新する","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"occurrence_menu_id":{"type":"string","format":"uuid"},"event_menu_id":{"type":"string","format":"uuid"},"capacity":{"type":["integer","null"],"minimum":1,"maximum":2147483647},"starts_at":{"type":["string","null"],"format":"date-time"},"ends_at":{"type":["string","null"],"format":"date-time"}},"required":["occurrence_menu_id","event_menu_id","capacity","starts_at","ends_at"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"利用できないヘッダ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"鍵が無い・無効","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"範囲不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"見つからない","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"予約・冪等キーの競合","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"本文が1 MiBを超えている","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"入力の検証失敗","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"回数の上限","headers":{"RateLimit-Limit":{"description":"固定窓内の回数上限","schema":{"type":"integer","minimum":1}},"RateLimit-Remaining":{"description":"固定窓内の残り回数","schema":{"type":"integer","minimum":0}},"RateLimit-Reset":{"description":"窓終了までの秒数","schema":{"type":"integer","minimum":0}},"Retry-After":{"description":"再試行までの待機秒数","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"内部エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-goyoka-audience":"tenant","x-goyoka-required-scopes":["events:write"]}},"/api/v1/events/{id}/occurrences/{occId}/providers":{"get":{"operationId":"events_providers_list","tags":["events"],"summary":"開催回の担当者名簿","description":"開催回の担当者名簿を優先順で返します。event_provider_idとnameは応答専用です。この2欄を除いた行をproviders PUTへ戻せます。日時はミリ秒を保持し、完全一致の往復では保存しません。\n\nアーカイブ済み・他店・指定イベントや開催回や予約への帰属違いは404 NOT_FOUNDで、EVENT_EDIT_BLOCKEDは返しません。\n\n全行をdataに返し、cursor・limit・next_cursorはありません。\n\n必要な範囲: `events:read`","security":[{"bearer":[]},{"oauth2":["events:read"]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","format":"uuid"},"required":true,"name":"occId","in":"path"}],"responses":{"200":{"description":"開催回の担当者名簿","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"event_provider_id":{"type":"string","format":"uuid"},"provider_id":{"type":"string","format":"uuid"},"name":{"type":"string","maxLength":120},"priority_order":{"type":"integer","minimum":0,"maximum":2147483647},"starts_at":{"type":"string","format":"date-time"},"ends_at":{"type":"string","format":"date-time"},"breaks":{"type":"array","items":{"type":"object","properties":{"starts_at":{"type":"string","format":"date-time"},"ends_at":{"type":"string","format":"date-time"}},"required":["starts_at","ends_at"],"additionalProperties":false}},"occurrence_menu_ids":{"type":"array","items":{"type":"string","format":"uuid"}}},"required":["event_provider_id","provider_id","name","priority_order","starts_at","ends_at","breaks","occurrence_menu_ids"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"利用できないヘッダ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"鍵が無い・無効","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"範囲不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"見つからない","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"予約・冪等キーの競合","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"本文が1 MiBを超えている","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"入力の検証失敗","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"回数の上限","headers":{"RateLimit-Limit":{"description":"固定窓内の回数上限","schema":{"type":"integer","minimum":1}},"RateLimit-Remaining":{"description":"固定窓内の残り回数","schema":{"type":"integer","minimum":0}},"RateLimit-Reset":{"description":"窓終了までの秒数","schema":{"type":"integer","minimum":0}},"Retry-After":{"description":"再試行までの待機秒数","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"内部エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-goyoka-audience":"tenant","x-goyoka-required-scopes":["events:read"]},"put":{"operationId":"events_providers_roster_save","tags":["events"],"summary":"担当者名簿を丸ごと置き換え（送らなかった担当者は外れる）","description":"開催回の名簿を丸ごと置き換え、送らなかった担当者はその回から外れます。先にGETし、event_provider_idとnameを除いた全行を送ってください。priority_orderの昇順で保存し、変更時は0から振り直します。完全一致の往復では保存せず、既存のアーカイブ済み担当者も保持します。空のprovidersは名簿を空にします。任意の冪等キーを使えます。\n\nアーカイブ済み・他店・指定イベントや開催回や予約への帰属違いは404 NOT_FOUNDで、EVENT_EDIT_BLOCKEDは返しません。\n\n日時はミリ秒まで保ち、同じ時刻のoffset表記や休憩・担当メニューの配列順が違っても同値として比較します。\n\n名簿の業務入力エラーは422 BOOKING_INPUT_INVALIDで、details.blocksはcodeと日本語messageの1要素配列です。理由はINVALID_WINDOW（開始終了の逆転）、OUTSIDE_OCCURRENCE（開催時間外）、BREAK_OUTSIDE_WINDOW（担当時間外の休憩）、OVERLAPPING_BREAKS（休憩の重複）、DUPLICATE_PROVIDER（担当者の重複）です。\n\n開催回・メニュー・担当者が不明、帰属が違う、またはアーカイブ済み担当者を新規追加すると404 NOT_FOUNDで、detailsは付けません。\n\n必要な範囲: `events:write`","security":[{"bearer":[]},{"oauth2":["events:write"]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","format":"uuid"},"required":true,"name":"occId","in":"path"},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"同じ内容の再送に同じ値を使います。異なる内容との再利用や処理中の再送は409 IDEMPOTENCY_KEY_REUSEDです。"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"providers":{"type":"array","items":{"type":"object","properties":{"provider_id":{"type":"string","format":"uuid"},"priority_order":{"type":"integer","minimum":0,"maximum":2147483647},"starts_at":{"type":"string","format":"date-time"},"ends_at":{"type":"string","format":"date-time"},"breaks":{"type":"array","items":{"type":"object","properties":{"starts_at":{"type":"string","format":"date-time"},"ends_at":{"type":"string","format":"date-time"}},"required":["starts_at","ends_at"],"additionalProperties":false}},"occurrence_menu_ids":{"type":"array","items":{"type":"string","format":"uuid"}}},"required":["provider_id","priority_order","starts_at","ends_at","breaks","occurrence_menu_ids"],"additionalProperties":false}}},"required":["providers"],"additionalProperties":false}}}},"responses":{"200":{"description":"担当者名簿を丸ごと置き換え（送らなかった担当者は外れる）","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"event_provider_id":{"type":"string","format":"uuid"},"provider_id":{"type":"string","format":"uuid"},"name":{"type":"string","maxLength":120},"priority_order":{"type":"integer","minimum":0,"maximum":2147483647},"starts_at":{"type":"string","format":"date-time"},"ends_at":{"type":"string","format":"date-time"},"breaks":{"type":"array","items":{"type":"object","properties":{"starts_at":{"type":"string","format":"date-time"},"ends_at":{"type":"string","format":"date-time"}},"required":["starts_at","ends_at"],"additionalProperties":false}},"occurrence_menu_ids":{"type":"array","items":{"type":"string","format":"uuid"}}},"required":["event_provider_id","provider_id","name","priority_order","starts_at","ends_at","breaks","occurrence_menu_ids"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"利用できないヘッダ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"鍵が無い・無効","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"範囲不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"見つからない","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"予約・冪等キーの競合","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"本文が1 MiBを超えている","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"入力の検証失敗","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"回数の上限","headers":{"RateLimit-Limit":{"description":"固定窓内の回数上限","schema":{"type":"integer","minimum":1}},"RateLimit-Remaining":{"description":"固定窓内の残り回数","schema":{"type":"integer","minimum":0}},"RateLimit-Reset":{"description":"窓終了までの秒数","schema":{"type":"integer","minimum":0}},"Retry-After":{"description":"再試行までの待機秒数","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"内部エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-goyoka-audience":"tenant","x-goyoka-required-scopes":["events:write"]}},"/api/v1/events/{id}/occurrences/{occId}/waitlist":{"get":{"operationId":"events_waitlist_list","tags":["events"],"summary":"開催回の待機一覧","description":"開催回の待機一覧をcreated_at・entry_idの昇順で返します。全6状態をそのまま返し、modeは待機登録時の方式です。繰り上げ応答のoffered_modeは呼び出した時点の設定なので、modeとは異なる場合があります。連絡先はcustomers:contactの許可がある場合だけcontactに返します。\n\nアーカイブ済み・他店・指定イベントや開催回や予約への帰属違いは404 NOT_FOUNDで、EVENT_EDIT_BLOCKEDは返しません。\n\n全行をdataに返し、cursor・limit・next_cursorはありません。\n\nSEQUENTIALは案内時に席を押さえ、BROADCASTは一斉に案内して席を押さえず、受諾時の先着順で確保します。\n\n必要な範囲: `events:read`\n\n`customers:contact` があるとメール・電話が入る（会話はメールのみ）。","security":[{"bearer":[]},{"oauth2":["events:read"]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","format":"uuid"},"required":true,"name":"occId","in":"path"}],"responses":{"200":{"description":"開催回の待機一覧","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"entry_id":{"type":"string","format":"uuid"},"booking_item_id":{"type":"string","format":"uuid"},"occurrence_menu_id":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["PENDING_CONFIRMATION","WAITING","OFFERED","ACCEPTED","EXPIRED","CANCELLED"]},"mode":{"type":"string","enum":["SEQUENTIAL","BROADCAST"],"description":"この人が待機登録した時点のEventWaitlistEntry.mode。現在のイベントの設定とは異なる場合がある。"},"offered_at":{"type":["string","null"],"format":"date-time"},"offer_expires_at":{"type":["string","null"],"format":"date-time"},"created_at":{"type":"string","format":"date-time"},"customer":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string","maxLength":120}},"required":["id","name"],"additionalProperties":false},"contact":{"type":["object","null"],"properties":{"email":{"type":["string","null"],"maxLength":320},"phone":{"type":["string","null"],"maxLength":32}},"required":["email","phone"],"additionalProperties":false}},"required":["entry_id","booking_item_id","occurrence_menu_id","status","mode","offered_at","offer_expires_at","created_at","customer","contact"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"利用できないヘッダ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"鍵が無い・無効","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"範囲不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"見つからない","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"予約・冪等キーの競合","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"本文が1 MiBを超えている","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"入力の検証失敗","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"回数の上限","headers":{"RateLimit-Limit":{"description":"固定窓内の回数上限","schema":{"type":"integer","minimum":1}},"RateLimit-Remaining":{"description":"固定窓内の残り回数","schema":{"type":"integer","minimum":0}},"RateLimit-Reset":{"description":"窓終了までの秒数","schema":{"type":"integer","minimum":0}},"Retry-After":{"description":"再試行までの待機秒数","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"内部エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-goyoka-audience":"tenant","x-goyoka-required-scopes":["events:read"]}},"/api/v1/events/{id}/occurrences/{occId}/waitlist/advance":{"post":{"operationId":"events_waitlist_advance","tags":["events"],"summary":"待機しているお客様へ空き枠を案内する","description":"指定メニューの待機を現在のお店の設定で繰り上げます。入力本文はoccurrence_menu_idだけで、待機方式や案内の有効時間は指定できません。\n\noffered_modeは呼び出した時点の方式で、待機一覧の登録時のmodeとは異なる場合があります。SEQUENTIALは案内時に席を押さえ、BROADCASTは一斉に案内して席を押さえず、受諾時の先着順で確保します。\n\noffered_countは案内件数、notified_customer_countは送信処理に成功した重複なしのお客様人数、unnotified_offer_countは宛先なし・情報の読取失敗を含む未送信案内件数です。人数と件数は一致するとは限らず、送信成功は受信箱への到達を保証しません。\n\n案内後の送信失敗も200で、情報の一括読取に失敗すれば全案内がunnotified_offer_countに入ります。案内とSEQUENTIALの押さえは残るので、メール再送のために同じ要求を送らないでください。\n\n成功時と同じ冪等キー・内容は保存済みの結果を返し、キーなし・別キーでも案内済みの人へ未送信メールを再送しません。SEQUENTIALの席が押さえ済み、または新たに案内できる人がいなければ0件の成功で、未送信分を再送するAPIはありません。\n\n待機の失敗にdetailsは付かず、公開codeで種類を確認します。空き枠を案内できない失敗は409 SLOT_TAKEN、対象のメニューが見つからない失敗は404 NOT_FOUNDへ対応します。\n\n受付が閉じた回や空席がない場合も、新たに案内できなければ0件の成功です。アーカイブ済み・他店・指定イベントや開催回への帰属違いは404 NOT_FOUNDで、EVENT_EDIT_BLOCKEDは返しません。任意の冪等キーを使えます。\n\n必要な範囲: `events:write`","security":[{"bearer":[]},{"oauth2":["events:write"]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","format":"uuid"},"required":true,"name":"occId","in":"path"},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"同じ内容の再送に同じ値を使います。異なる内容との再利用や処理中の再送は409 IDEMPOTENCY_KEY_REUSEDです。"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"occurrence_menu_id":{"type":"string","format":"uuid"}},"required":["occurrence_menu_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"待機しているお客様へ空き枠を案内する","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"offered_mode":{"type":"string","enum":["SEQUENTIAL","BROADCAST"],"description":"今回の繰り上げで使った、このイベントの現在の方式。案内0件でも返す。"},"offered_count":{"type":"integer","minimum":0},"notified_customer_count":{"type":"integer","minimum":0},"unnotified_offer_count":{"type":"integer","minimum":0,"description":"送信処理の成功を確認できなかった案内件数。宛先なし・通知読取失敗も含む。人数ではない。"}},"required":["offered_mode","offered_count","notified_customer_count","unnotified_offer_count"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"利用できないヘッダ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"鍵が無い・無効","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"範囲不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"見つからない","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"予約・冪等キーの競合","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"本文が1 MiBを超えている","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"入力の検証失敗","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"回数の上限","headers":{"RateLimit-Limit":{"description":"固定窓内の回数上限","schema":{"type":"integer","minimum":1}},"RateLimit-Remaining":{"description":"固定窓内の残り回数","schema":{"type":"integer","minimum":0}},"RateLimit-Reset":{"description":"窓終了までの秒数","schema":{"type":"integer","minimum":0}},"Retry-After":{"description":"再試行までの待機秒数","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"内部エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-goyoka-audience":"tenant","x-goyoka-required-scopes":["events:write"]}},"/api/v1/events/{id}/occurrences/{occId}/participants/{bookingId}/menus":{"post":{"operationId":"events_participant_menu_add","tags":["events"],"summary":"参加者にメニューを追加する","description":"既存の参加者に同じ開催回のメニューを追加し、追加後の参加者を返します。starts_at_by_menuは選択したメニューだけ指定できます。notifyの省略はfalseです。notify:trueかつ予約のお客様にメールがある場合は、追加メニューと差額を通知します。customers:contactがなくても追加できます。customerはidとnameだけ、contactはemailとphoneで、customers:contactの許可がなければcontact全体がnull、許可があっても未登録の欄はnullです。任意の冪等キーを使えます。\n\nアーカイブ済み・他店・指定イベントや開催回や予約への帰属違いは404 NOT_FOUNDで、EVENT_EDIT_BLOCKEDは返しません。\n\n業務入力エラーは422 BOOKING_INPUT_INVALIDで、detailsは付かずmessageで理由を説明します。\n\n必要な範囲: `events:write`\n\n`customers:contact` があるとメール・電話が入る（会話はメールのみ）。","security":[{"bearer":[]},{"oauth2":["events:write"]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","format":"uuid"},"required":true,"name":"occId","in":"path"},{"schema":{"type":"string","format":"uuid"},"required":true,"name":"bookingId","in":"path"},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"同じ内容の再送に同じ値を使います。異なる内容との再利用や処理中の再送は409 IDEMPOTENCY_KEY_REUSEDです。"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"occurrence_menu_ids":{"type":"array","items":{"type":"string","format":"uuid"},"minItems":1},"provider_id":{"type":["string","null"],"format":"uuid"},"starts_at_by_menu":{"type":"object","additionalProperties":{"type":"string","format":"date-time"}},"notify":{"type":"boolean"}},"required":["occurrence_menu_ids"],"additionalProperties":false}}}},"responses":{"200":{"description":"参加者にメニューを追加する","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/ApiParticipant"}},"required":["data"]}}}},"400":{"description":"利用できないヘッダ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"鍵が無い・無効","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"範囲不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"見つからない","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"予約・冪等キーの競合","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"本文が1 MiBを超えている","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"入力の検証失敗","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"回数の上限","headers":{"RateLimit-Limit":{"description":"固定窓内の回数上限","schema":{"type":"integer","minimum":1}},"RateLimit-Remaining":{"description":"固定窓内の残り回数","schema":{"type":"integer","minimum":0}},"RateLimit-Reset":{"description":"窓終了までの秒数","schema":{"type":"integer","minimum":0}},"Retry-After":{"description":"再試行までの待機秒数","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"内部エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-goyoka-audience":"tenant","x-goyoka-required-scopes":["events:write"]}},"/api/v1/events/{id}/occurrences/{occId}/participants/{bookingId}/items/{itemId}/provider":{"post":{"operationId":"events_participant_provider_change","tags":["events"],"summary":"参加者の担当者を変更する","description":"おまかせの同時刻変更は即時に適用し、result:changedではprovider_nameとcustomer_notifiedを返します。伏せていた担当者の変更は通知しません。時刻変更または指名した担当者の変更は、お客様の承認待ちとなり、新しい枠を30分押さえる。result:awaiting_customer_approvalではexpires_atとdifference_yenを返し、承認までは元の予約を保持します。任意の冪等キーを使えます。\n\nアーカイブ済み・他店・指定イベントや開催回や予約への帰属違いは404 NOT_FOUNDで、EVENT_EDIT_BLOCKEDは返しません。\n\n業務入力エラーは422 BOOKING_INPUT_INVALIDで、detailsは付かずmessageで理由を説明します。\n\n必要な範囲: `events:write`","security":[{"bearer":[]},{"oauth2":["events:write"]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","format":"uuid"},"required":true,"name":"occId","in":"path"},{"schema":{"type":"string","format":"uuid"},"required":true,"name":"bookingId","in":"path"},{"schema":{"type":"string","format":"uuid"},"required":true,"name":"itemId","in":"path"},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"同じ内容の再送に同じ値を使います。異なる内容との再利用や処理中の再送は409 IDEMPOTENCY_KEY_REUSEDです。"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"provider_id":{"type":"string","format":"uuid"},"starts_at":{"type":["string","null"],"format":"date-time"}},"required":["provider_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"参加者の担当者を変更する","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"oneOf":[{"type":"object","properties":{"result":{"type":"string","enum":["changed"]},"provider_name":{"type":"string","maxLength":120},"customer_notified":{"type":"boolean"}},"required":["result","provider_name","customer_notified"],"additionalProperties":false},{"type":"object","properties":{"result":{"type":"string","enum":["awaiting_customer_approval"]},"expires_at":{"type":"string","format":"date-time"},"difference_yen":{"type":"integer"}},"required":["result","expires_at","difference_yen"],"additionalProperties":false}]}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"利用できないヘッダ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"鍵が無い・無効","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"範囲不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"見つからない","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"予約・冪等キーの競合","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"本文が1 MiBを超えている","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"入力の検証失敗","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"回数の上限","headers":{"RateLimit-Limit":{"description":"固定窓内の回数上限","schema":{"type":"integer","minimum":1}},"RateLimit-Remaining":{"description":"固定窓内の残り回数","schema":{"type":"integer","minimum":0}},"RateLimit-Reset":{"description":"窓終了までの秒数","schema":{"type":"integer","minimum":0}},"Retry-After":{"description":"再試行までの待機秒数","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"内部エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-goyoka-audience":"tenant","x-goyoka-required-scopes":["events:write"]}},"/api/v1/events/{id}/occurrences/{occId}/participants/export":{"get":{"operationId":"events_participants_export","tags":["events"],"summary":"開催回の受付表","description":"返すのはCSV文字列ではなく、受付表CSVと同じ内容のJSON行です。連絡先の伏せは行のcontactに働くため、ファイルは管理画面で書き出すか取得行から作ってください。\n\ncustomer・contact・attendance・payment_status・customer_total_yenは顧客ごとの先頭行、booking_idは各予約の先頭行だけに入り、後続行はnullです。連絡先はcustomers:contactの許可がある場合だけcontactに返します。\n\nアーカイブ済み・他店・指定イベントや開催回や予約への帰属違いは404 NOT_FOUNDで、EVENT_EDIT_BLOCKEDは返しません。\n\n全行をdataに返し、cursor・limit・next_cursorはありません。\n\n必要な範囲: `events:read`\n\n`customers:contact` があるとメール・電話が入る（会話はメールのみ）。","security":[{"bearer":[]},{"oauth2":["events:read"]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","format":"uuid"},"required":true,"name":"occId","in":"path"}],"responses":{"200":{"description":"開催回の受付表","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"occurrence_date":{"type":"string","format":"date"},"booking_id":{"type":["string","null"],"format":"uuid"},"customer":{"type":["object","null"],"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string","maxLength":120}},"required":["id","name"],"additionalProperties":false},"contact":{"type":["object","null"],"properties":{"email":{"type":["string","null"],"maxLength":320},"phone":{"type":["string","null"],"maxLength":32}},"required":["email","phone"],"additionalProperties":false},"menu_name":{"type":"string"},"provider_name":{"type":["string","null"],"maxLength":120},"starts_at":{"type":"string","format":"date-time"},"ends_at":{"type":"string","format":"date-time"},"status":{"type":"string","enum":["HELD","CONFIRMED","WAITLISTED","OFFERED","CANCELLED"]},"attendance":{"type":["string","null"],"enum":["UNSET","ATTENDED","NO_SHOW",null]},"payment_status":{"type":["string","null"],"enum":["NOT_APPLICABLE","UNPAID","PAID","PARTIAL",null]},"price_yen":{"type":"integer"},"customer_total_yen":{"type":["integer","null"]}},"required":["occurrence_date","booking_id","customer","contact","menu_name","provider_name","starts_at","ends_at","status","attendance","payment_status","price_yen","customer_total_yen"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"利用できないヘッダ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"鍵が無い・無効","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"範囲不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"見つからない","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"予約・冪等キーの競合","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"本文が1 MiBを超えている","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"入力の検証失敗","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"回数の上限","headers":{"RateLimit-Limit":{"description":"固定窓内の回数上限","schema":{"type":"integer","minimum":1}},"RateLimit-Remaining":{"description":"固定窓内の残り回数","schema":{"type":"integer","minimum":0}},"RateLimit-Reset":{"description":"窓終了までの秒数","schema":{"type":"integer","minimum":0}},"Retry-After":{"description":"再試行までの待機秒数","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"内部エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-goyoka-audience":"tenant","x-goyoka-required-scopes":["events:read"]}},"/api/v1/events/{id}/embed-presets":{"get":{"operationId":"events_embed_presets_list","tags":["events"],"summary":"イベントの貼り付けコード一覧","description":"保存済みコードを作成日時・IDの昇順で返します。空集合はdata:[]です。機能停止中や非公開でも読めます。アーカイブ済み・他店のイベントは404です。menu_idsは追加の初期選択で、公開メニューを制限しません。\n\n保存済みの全行をdataに返し、cursor・limit・next_cursorはありません。\n\nembed_urlはリンク先、snippetはホームページのHTMLへ貼るscriptです。\n\nlast_seenは許可・非表示に関係なくコードの最終読込を表し、未記録ならnullです。検知は表示成功・訪問人数・本人確認・サイト所有の証明ではなく、許可前にお店の方がアドレスを確認してください。\n\n必要な範囲: `events:read`","security":[{"bearer":[]},{"oauth2":["events:read"]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"イベントの貼り付けコード一覧","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventEmbedPresetListResponse"}}}},"400":{"description":"利用できないヘッダ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"鍵が無い・無効","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"範囲不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"見つからない","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"予約・冪等キーの競合","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"本文が1 MiBを超えている","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"入力の検証失敗","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"回数の上限","headers":{"RateLimit-Limit":{"description":"固定窓内の回数上限","schema":{"type":"integer","minimum":1}},"RateLimit-Remaining":{"description":"固定窓内の残り回数","schema":{"type":"integer","minimum":0}},"RateLimit-Reset":{"description":"窓終了までの秒数","schema":{"type":"integer","minimum":0}},"Retry-After":{"description":"再試行までの待機秒数","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"内部エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-goyoka-audience":"tenant","x-goyoka-required-scopes":["events:read"]},"post":{"operationId":"events_embed_presets_create","tags":["events"],"summary":"イベントの貼り付けコードを作る","description":"公開中のイベントに作成します。作成時の予約機能停止は409 EMBED_EDIT_BLOCKED（details.blocks[].code:FEATURE_DISABLED）、未公開イベントの作成は409 EMBED_EDIT_BLOCKED（details.blocks[].code:EVENT_NOT_PUBLISHED）です。理由はdetails.blocksの1要素にcodeとmessageで返します。アーカイブ済みは404です。名前の省略時は自動命名します。新しい貼り付け先は、コードを貼って自動検知した後、お店の方が管理画面の設定の『お店』のタブにある『埋め込みを貼ってよいサイト』で許可します。検知されなければアドレスを入力して許可し、コードの作成・取得だけでは未許可サイトに表示できません。任意の冪等キーを使えます。\n\nembed_urlはリンク先、snippetはホームページのHTMLへ貼るscriptです。\n\nlast_seenは許可・非表示に関係なくコードの最終読込を表し、未記録ならnullです。検知は表示成功・訪問人数・本人確認・サイト所有の証明ではなく、許可前にお店の方がアドレスを確認してください。\n\noriginは指定できず、APIは貼り付け先の許可を増減しません。許可の追加・削除と検知の非表示は管理画面でお店の方が行います。\n\nACCENT_CONTRASTは色とテーマの不適合、target:OCCURRENCEで回の指定がなければOCCURRENCE_REQUIREDです。入力だけで決まる不適合は422 BOOKING_INPUT_INVALIDで、details.blocksは1要素です。\n\n明示したメニュー・開催回が不明・他店・別イベントならdetailsなしの404 NOT_FOUNDです。\n\noriginなどの未知キーやUUID・色・文字数など入力の形の誤りは、RESTでは422 VALIDATION（未知キーだけならerror.messageにキー名が入り、details.fieldErrorsは空object）、MCPではツールの入力検査のエラー文を返します。\n\n必要な範囲: `events:write`","security":[{"bearer":[]},{"oauth2":["events:write"]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"同じ内容の再送に同じ値を使います。異なる内容との再利用や処理中の再送は409 IDEMPOTENCY_KEY_REUSEDです。"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateEventEmbedPresetBody"}}}},"responses":{"201":{"description":"イベントの貼り付けコードを作る","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventEmbedPresetResponse"}}}},"400":{"description":"利用できないヘッダ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"鍵が無い・無効","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"範囲不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"見つからない","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"予約・冪等キーの競合","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"本文が1 MiBを超えている","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"入力の検証失敗","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"回数の上限","headers":{"RateLimit-Limit":{"description":"固定窓内の回数上限","schema":{"type":"integer","minimum":1}},"RateLimit-Remaining":{"description":"固定窓内の残り回数","schema":{"type":"integer","minimum":0}},"RateLimit-Reset":{"description":"窓終了までの秒数","schema":{"type":"integer","minimum":0}},"Retry-After":{"description":"再試行までの待機秒数","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"内部エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-goyoka-audience":"tenant","x-goyoka-required-scopes":["events:write"]}},"/api/v1/events/{id}/embed-presets/{presetId}":{"patch":{"operationId":"events_embed_presets_update","tags":["events"],"summary":"イベントの貼り付けコードを更新する","description":"省略した欄は保存値を保持します。空objectや同じ値の往復は保存しません。target:EVENTはイベント全体、target:OCCURRENCEは指定した開催回を対象にし、EVENTへ変更するとoccurrence_idはnullになります。所属のevent_idは変更できません。\n\naccent_color:nullは標準色へ戻します。menu_idsの空配列は追加の初期選択なしで、公開範囲を制限せず必須選択のルールも変えません。機能停止中・非公開でも更新でき、アーカイブ済み・帰属違いは404です。任意の冪等キーを使えます。\n\nembed_urlはリンク先、snippetはホームページのHTMLへ貼るscriptです。\n\nlast_seenは許可・非表示に関係なくコードの最終読込を表し、未記録ならnullです。検知は表示成功・訪問人数・本人確認・サイト所有の証明ではなく、許可前にお店の方がアドレスを確認してください。\n\noriginは指定できず、APIは貼り付け先の許可を増減しません。許可の追加・削除と検知の非表示は管理画面でお店の方が行います。\n\n読戻しではid・created_at・embed_url・snippet・last_seenとevent_idを外してください。変更時にmenu_idsを省略して保存済みメニューの参照切れがあれば409 EMBED_EDIT_BLOCKED（details.blocks[].code:UNKNOWN_MENU）なので、使えるメニューの配列を送り直してください。\n\n保存済みIDは自動で消しません。\n\nACCENT_CONTRASTは色とテーマの不適合、target:OCCURRENCEで回の指定がなければOCCURRENCE_REQUIREDです。入力だけで決まる不適合は422 BOOKING_INPUT_INVALID、PATCHで色・テーマや回の指定を省略して保存値との組合せで決まる不適合は409 EMBED_EDIT_BLOCKEDで、details.blocksは1要素です。\n\n明示したメニュー・開催回が不明・他店・別イベントならdetailsなしの404 NOT_FOUNDです。\n\noriginなどの未知キーやUUID・色・文字数など入力の形の誤りは、RESTでは422 VALIDATION（未知キーだけならerror.messageにキー名が入り、details.fieldErrorsは空object）、MCPではツールの入力検査のエラー文を返します。\n\n必要な範囲: `events:write`","security":[{"bearer":[]},{"oauth2":["events:write"]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","format":"uuid"},"required":true,"name":"presetId","in":"path"},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"同じ内容の再送に同じ値を使います。異なる内容との再利用や処理中の再送は409 IDEMPOTENCY_KEY_REUSEDです。"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateEventEmbedPresetBody"}}}},"responses":{"200":{"description":"イベントの貼り付けコードを更新する","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventEmbedPresetResponse"}}}},"400":{"description":"利用できないヘッダ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"鍵が無い・無効","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"範囲不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"見つからない","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"予約・冪等キーの競合","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"本文が1 MiBを超えている","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"入力の検証失敗","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"回数の上限","headers":{"RateLimit-Limit":{"description":"固定窓内の回数上限","schema":{"type":"integer","minimum":1}},"RateLimit-Remaining":{"description":"固定窓内の残り回数","schema":{"type":"integer","minimum":0}},"RateLimit-Reset":{"description":"窓終了までの秒数","schema":{"type":"integer","minimum":0}},"Retry-After":{"description":"再試行までの待機秒数","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"内部エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-goyoka-audience":"tenant","x-goyoka-required-scopes":["events:write"]},"delete":{"operationId":"events_embed_presets_delete","tags":["events"],"summary":"イベントの貼り付けコードを削除する","description":"指定コードを削除し、貼り付け先のフォームを停止します。サンプル・デモ用に用意された埋め込み設定は、削除だけ409 EMBED_EDIT_BLOCKEDで、details.blocks[].codeはSEED_OWNED_PRESETです。理由はdetails.blocksの1要素にcodeとmessageで返します。機能停止中・非公開でも削除でき、アーカイブ済み・帰属違いは404です。許可済みサイトは変更しません。bodyは不要です。任意の冪等キーを使えます。\n\n必要な範囲: `events:write`","security":[{"bearer":[]},{"oauth2":["events:write"]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","format":"uuid"},"required":true,"name":"presetId","in":"path"},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"同じ内容の再送に同じ値を使います。異なる内容との再利用や処理中の再送は409 IDEMPOTENCY_KEY_REUSEDです。"}],"responses":{"200":{"description":"イベントの貼り付けコードを削除する","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteEmbedPresetResponse"}}}},"400":{"description":"利用できないヘッダ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"鍵が無い・無効","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"範囲不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"見つからない","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"予約・冪等キーの競合","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"本文が1 MiBを超えている","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"入力の検証失敗","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"回数の上限","headers":{"RateLimit-Limit":{"description":"固定窓内の回数上限","schema":{"type":"integer","minimum":1}},"RateLimit-Remaining":{"description":"固定窓内の残り回数","schema":{"type":"integer","minimum":0}},"RateLimit-Reset":{"description":"窓終了までの秒数","schema":{"type":"integer","minimum":0}},"Retry-After":{"description":"再試行までの待機秒数","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"内部エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-goyoka-audience":"tenant","x-goyoka-required-scopes":["events:write"]}},"/api/v1/events/{id}/booking-form-settings":{"get":{"operationId":"events_booking_form_settings_get","tags":["events"],"summary":"イベントの予約フォーム設定を読む","description":"予約フォームで時間・担当者を選ばせるか、おまかせを許すか、おまかせの担当者を見せるか、備考、キャンセル待ちの方式と回答期限。イベントは自分の値をそのまま持ち、お店の標準は作成時に写した初期値でしかありません——以後は読みません。overrideとeffectiveは同じ値です（旧契約との互換で両方返しますが、overrideで包まず、応答専用のeffectiveも送らないでください）。nullは返しません。4つの真偽値・waitlist_mode・waitlist_offer_hoursは必ず値があり、noticeだけ備考なしのときnullです。PUT本文はGETのdata.overrideにあるtime_selectable・provider_selectable・allow_auto_assign・reveal_auto_assigned_provider・noticeの5欄が必須、waitlist_mode・waitlist_offer_hoursは省略できます。他店・不明・アーカイブ済みは404です。\n\nfalseは明示的な無効として保存し、trueに化けません。書き戻し時の型違い・必須欄の欠落は無変更判定より先に、RESTでは422 VALIDATION（details.fieldErrorsの最上位の欄名を確認）、MCPではツールの入力検査のエラー文を返します。\n\n必要な範囲: `events:read`","security":[{"bearer":[]},{"oauth2":["events:read"]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"イベントの予約フォーム設定を読む","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventBookingFormSettingsResponse"}}}},"400":{"description":"利用できないヘッダ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"鍵が無い・無効","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"範囲不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"見つからない","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"予約・冪等キーの競合","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"本文が1 MiBを超えている","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"入力の検証失敗","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"回数の上限","headers":{"RateLimit-Limit":{"description":"固定窓内の回数上限","schema":{"type":"integer","minimum":1}},"RateLimit-Remaining":{"description":"固定窓内の残り回数","schema":{"type":"integer","minimum":0}},"RateLimit-Reset":{"description":"窓終了までの秒数","schema":{"type":"integer","minimum":0}},"Retry-After":{"description":"再試行までの待機秒数","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"内部エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-goyoka-audience":"tenant","x-goyoka-required-scopes":["events:read"]},"put":{"operationId":"events_booking_form_settings_replace","tags":["events"],"summary":"イベントの予約フォーム設定を置き換える","description":"予約フォームで時間・担当者を選ばせるか、おまかせを許すか、おまかせの担当者を見せるか、備考、キャンセル待ちの方式と回答期限。PUT本文はGETのdata.overrideにあるtime_selectable・provider_selectable・allow_auto_assign・reveal_auto_assigned_provider・noticeの5欄が必須で、overrideで包まず、応答専用のeffectiveも送らないでください。4つの真偽値はそれぞれnullで今のイベントの値を保ちます（お店の初期値はイベントを作った時にしか写らず、既存イベントへは戻ってきません）。noticeはnullで今の値を保ち、空文字またはtrim後空文字は備考なしにします。非空の文字列は変更時trim後2000字以内で保存し、完全一致の保存値は2000字を超えていても保持します。waitlist_mode・waitlist_offer_hoursは省略可能で、省くとこのイベントの今の値を保ちます。waitlist_offer_hoursの変更は1・2・4・6・12・24時間の候補から選んでください。置換した結果が今の値と一致すれば、業務検査より先に書き込みを省いて200を返します（GETしたoverrideをどの部分集合でそのまま戻しても無変更です）。お店の標準は更新しません。他店・不明・アーカイブ済みは404です。任意の冪等キーを使えます。\n\nfalseは明示的な無効として保存し、trueに化けません。型違い・必須欄の欠落は無変更判定より先に、RESTでは422 VALIDATION（details.fieldErrorsの最上位の欄名を確認）、MCPではツールの入力検査のエラー文を返します。\n\nnoticeの2000字超え・waitlist_offer_hoursの候補外などの業務エラーはVALIDATIONで、details.fieldErrorsの最上位の欄名が入ります。MCPでもstructuredContent.errorに返します。\n\n必要な範囲: `events:write`","security":[{"bearer":[]},{"oauth2":["events:write"]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"同じ内容の再送に同じ値を使います。異なる内容との再利用や処理中の再送は409 IDEMPOTENCY_KEY_REUSEDです。"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReplaceEventBookingFormSettingsBody"}}}},"responses":{"200":{"description":"イベントの予約フォーム設定を置き換える","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventBookingFormSettingsResponse"}}}},"400":{"description":"利用できないヘッダ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"鍵が無い・無効","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"範囲不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"見つからない","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"予約・冪等キーの競合","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"本文が1 MiBを超えている","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"入力の検証失敗","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"回数の上限","headers":{"RateLimit-Limit":{"description":"固定窓内の回数上限","schema":{"type":"integer","minimum":1}},"RateLimit-Remaining":{"description":"固定窓内の残り回数","schema":{"type":"integer","minimum":0}},"RateLimit-Reset":{"description":"窓終了までの秒数","schema":{"type":"integer","minimum":0}},"Retry-After":{"description":"再試行までの待機秒数","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"内部エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-goyoka-audience":"tenant","x-goyoka-required-scopes":["events:write"]}},"/api/v1/events/{id}/confirmation":{"get":{"operationId":"events_confirmation_get","tags":["events"],"summary":"イベントの確定の方式と期限を読む","description":"確定の方式（即時・承認・入金確認）と期限（24・48・72・120・168時間）。メール確認前の申し込みは、確認した時点の方式で確定する。承認待ち以降の予約は、申し込み時の方式・期限・送信済みのメールが変わらない。保存された2欄をそのまま返します。アーカイブ済み・他店・不明なIDは404です。\n\nPUTにはGETのdataからconfirmation_modeとconfirmation_window_hoursの2欄をすべて戻します。方式はIMMEDIATE・APPROVAL・PAYMENTです。\n\n設定変更で既存予約を承認・取消ししたり期限を再計算したりせず、メールは0通です。お店の予約フォーム標準と待機案内の方式・回答期限は管理画面で設定します。\n\n必要な範囲: `events:read`","security":[{"bearer":[]},{"oauth2":["events:read"]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"イベントの確定の方式と期限を読む","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventConfirmationResponse"}}}},"400":{"description":"利用できないヘッダ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"鍵が無い・無効","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"範囲不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"見つからない","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"予約・冪等キーの競合","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"本文が1 MiBを超えている","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"入力の検証失敗","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"回数の上限","headers":{"RateLimit-Limit":{"description":"固定窓内の回数上限","schema":{"type":"integer","minimum":1}},"RateLimit-Remaining":{"description":"固定窓内の残り回数","schema":{"type":"integer","minimum":0}},"RateLimit-Reset":{"description":"窓終了までの秒数","schema":{"type":"integer","minimum":0}},"Retry-After":{"description":"再試行までの待機秒数","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"内部エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-goyoka-audience":"tenant","x-goyoka-required-scopes":["events:read"]},"put":{"operationId":"events_confirmation_replace","tags":["events"],"summary":"イベントの確定の方式と期限を置き換える","description":"確定の方式（即時・承認・入金確認）と期限（24・48・72・120・168時間）。メール確認前の申し込みは、確認した時点の方式で確定する。承認待ち以降の予約は、申し込み時の方式・期限・送信済みのメールが変わらない。2欄全部を置き換える。読んだ保存値をそのまま戻すと、候補外の既存期限も無変更。変更時の候補外の期限は422 VALIDATIONです。アーカイブ済み・他店・不明なIDは404です。任意の冪等キーを使えます。\n\nPUTにはGETのdataからconfirmation_modeとconfirmation_window_hoursの2欄をすべて戻します。方式はIMMEDIATE・APPROVAL・PAYMENTです。\n\n設定を変えても、既存予約の期限や通知は変更しない（承認・取消し・期限の再計算をしない）。メールは0通です。お店の予約フォーム標準と待機案内の方式・回答期限は管理画面で設定します。\n\n型違い・必須欄の欠落は、RESTでは422 VALIDATION（details.fieldErrorsの最上位の欄名を確認）、MCPではツールの入力検査のエラー文を返します。候補外の期限を変更する業務エラーは、MCPでもstructuredContent.errorにVALIDATIONとdetails.fieldErrorsを返します。\n\n必要な範囲: `events:write`","security":[{"bearer":[]},{"oauth2":["events:write"]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"同じ内容の再送に同じ値を使います。異なる内容との再利用や処理中の再送は409 IDEMPOTENCY_KEY_REUSEDです。"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReplaceEventConfirmationBody"}}}},"responses":{"200":{"description":"イベントの確定の方式と期限を置き換える","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventConfirmationResponse"}}}},"400":{"description":"利用できないヘッダ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"鍵が無い・無効","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"範囲不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"見つからない","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"予約・冪等キーの競合","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"本文が1 MiBを超えている","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"入力の検証失敗","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"回数の上限","headers":{"RateLimit-Limit":{"description":"固定窓内の回数上限","schema":{"type":"integer","minimum":1}},"RateLimit-Remaining":{"description":"固定窓内の残り回数","schema":{"type":"integer","minimum":0}},"RateLimit-Reset":{"description":"窓終了までの秒数","schema":{"type":"integer","minimum":0}},"Retry-After":{"description":"再試行までの待機秒数","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"内部エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-goyoka-audience":"tenant","x-goyoka-required-scopes":["events:write"]}},"/api/v1/events/{id}/unpublish":{"post":{"operationId":"events_unpublish","tags":["events"],"summary":"イベントの公開を取り下げる","description":"PUBLISHEDをDRAFTへ戻し、公開一覧と新規申込から外す。お客様が新規申込の手続き中の押さえを取り消す。順番案内中のキャンセル待ちの押さえも取り消す（送信済みの案内メールはそのまま、行は OFFERED のまま）。取り消した押さえの占有は解放する。既存予約・予約変更用の押さえ・開催回の占有は保ち、新たな通知は送らない。DRAFT/ENDED/CANCELLEDへの再実行は現在の状態のまま200を返す。他店・不明・アーカイブ済みは404。\n\n必要な範囲: `events:write`","security":[{"bearer":[]},{"oauth2":["events:write"]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"同じ内容の再送に同じ値を使います。異なる内容との再利用や処理中の再送は409 IDEMPOTENCY_KEY_REUSEDです。"}],"responses":{"200":{"description":"イベントの公開を取り下げる","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/ApiEvent"}},"required":["data"]}}}},"400":{"description":"利用できないヘッダ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"鍵が無い・無効","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"範囲不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"見つからない","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"予約・冪等キーの競合","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"本文が1 MiBを超えている","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"入力の検証失敗","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"回数の上限","headers":{"RateLimit-Limit":{"description":"固定窓内の回数上限","schema":{"type":"integer","minimum":1}},"RateLimit-Remaining":{"description":"固定窓内の残り回数","schema":{"type":"integer","minimum":0}},"RateLimit-Reset":{"description":"窓終了までの秒数","schema":{"type":"integer","minimum":0}},"Retry-After":{"description":"再試行までの待機秒数","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"内部エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-goyoka-audience":"tenant","x-goyoka-required-scopes":["events:write"]}},"/api/v1/events/{id}/archive":{"post":{"operationId":"events_archive","tags":["events"],"summary":"イベントを終了としてアーカイブする","description":"このプロダクトでは終了とアーカイブは同じ操作。statusはENDEDになる。開催日がない場合や、終了時刻が現在より後のSCHEDULEDの開催回がある場合は409 EVENT_EDIT_BLOCKEDでdetails.blocksに理由を返す。お客様が新規申込の手続き中の押さえを取り消す。順番案内中のキャンセル待ちの押さえも取り消す（送信済みの案内メールはそのまま、行は OFFERED のまま）。取り消した押さえの占有は解放する。既存予約・予約変更用の押さえ・開催回の占有は保ち、新たな通知は送らない。既にアーカイブ済みなら 404。GET /events/{id} の archived_at で確かめられる。同じ冪等キーで成功を再送した場合は保存済みの200応答を返す。他店・不明は404。\n\n409 EVENT_EDIT_BLOCKEDのdetails.blocks[].codeはNO_OCCURRENCES（開催回なし）またはUPCOMING_OCCURRENCE（SCHEDULEDの終了時刻が未来）で、CANCELLED・COMPLETEDは後者に入りません。\n\n完全削除のAPIはありません。取り消せない完全削除は、管理画面でお店の方が題名を確認して行います。\n\n必要な範囲: `events:write`","security":[{"bearer":[]},{"oauth2":["events:write"]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"同じ内容の再送に同じ値を使います。異なる内容との再利用や処理中の再送は409 IDEMPOTENCY_KEY_REUSEDです。"}],"responses":{"200":{"description":"イベントを終了としてアーカイブする","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/ApiEvent"}},"required":["data"]}}}},"400":{"description":"利用できないヘッダ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"鍵が無い・無効","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"範囲不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"見つからない","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"予約・冪等キーの競合","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"本文が1 MiBを超えている","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"入力の検証失敗","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"回数の上限","headers":{"RateLimit-Limit":{"description":"固定窓内の回数上限","schema":{"type":"integer","minimum":1}},"RateLimit-Remaining":{"description":"固定窓内の残り回数","schema":{"type":"integer","minimum":0}},"RateLimit-Reset":{"description":"窓終了までの秒数","schema":{"type":"integer","minimum":0}},"Retry-After":{"description":"再試行までの待機秒数","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"内部エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-goyoka-audience":"tenant","x-goyoka-required-scopes":["events:write"]}},"/api/v1/events/{id}/restore":{"post":{"operationId":"events_restore","tags":["events"],"summary":"イベントをアーカイブから復元する","description":"archived_atだけを外して通常一覧へ戻す。アーカイブで設定されたENDEDは保持し、公開ページは戻らない。現在のpublishではENDEDを再公開できない（409 EVENT_NOT_PUBLISHABLE、理由NOT_PUBLISHABLE）。取り消した押さえや占有は復活させず、新たな通知も送らない。未アーカイブへの再実行は現在の状態のまま200。他店・不明は404。\n\n必要な範囲: `events:write`","security":[{"bearer":[]},{"oauth2":["events:write"]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"同じ内容の再送に同じ値を使います。異なる内容との再利用や処理中の再送は409 IDEMPOTENCY_KEY_REUSEDです。"}],"responses":{"200":{"description":"イベントをアーカイブから復元する","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/ApiEvent"}},"required":["data"]}}}},"400":{"description":"利用できないヘッダ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"鍵が無い・無効","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"範囲不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"見つからない","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"予約・冪等キーの競合","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"本文が1 MiBを超えている","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"入力の検証失敗","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"回数の上限","headers":{"RateLimit-Limit":{"description":"固定窓内の回数上限","schema":{"type":"integer","minimum":1}},"RateLimit-Remaining":{"description":"固定窓内の残り回数","schema":{"type":"integer","minimum":0}},"RateLimit-Reset":{"description":"窓終了までの秒数","schema":{"type":"integer","minimum":0}},"Retry-After":{"description":"再試行までの待機秒数","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"内部エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-goyoka-audience":"tenant","x-goyoka-required-scopes":["events:write"]}},"/api/v1/events/{id}/menus/order":{"put":{"operationId":"events_menus_reorder","tags":["events"],"summary":"イベントのメニュー順を変更する","description":"GET /events/{id}/menusで読んだ全メニューのIDをmenu_idsへ希望の順で送ってください。UUIDの大小文字だけ違う重複も422 VALIDATION（details.fieldErrors.menu_ids）です。別イベント・他店・消失したメニューや開催回メニューのIDはdetailsなしの404 NOT_FOUNDです。同じID順ならdisplay_orderが飛び飛びでも書き込みません。変更するのはdisplay_orderだけで、名前・価格・箱への所属・選択条件・既存予約は変えません。箱（カテゴリ）の中の並びはdisplay_orderで変わりますが、箱は子孫メニューの最小display_orderの位置にまとまって出ます。箱をまたいで交互に並べても箱は割れません。各階層で同点は箱が先、空箱は表示しません。アーカイブ済みは404です。任意の冪等キーを使えます。\n\nIDの欠けや保存時までの集合変更は409 EVENT_EDIT_BLOCKED（details.blocks[].code:MENU_ORDER_MISMATCH）なので、全メニューを読み直し全IDを送ってください。空のイベントへmenu_ids:[]を送ると無変更の200です。\n\n必要な範囲: `events:write`","security":[{"bearer":[]},{"oauth2":["events:write"]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"同じ内容の再送に同じ値を使います。異なる内容との再利用や処理中の再送は409 IDEMPOTENCY_KEY_REUSEDです。"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReorderEventMenusBody"}}}},"responses":{"200":{"description":"イベントのメニュー順を変更する","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"service_id":{"type":["string","null"],"format":"uuid"},"name":{"type":"string","minLength":1,"maxLength":120},"price_yen":{"type":"integer","minimum":0,"maximum":2147483647},"duration_minutes":{"type":"integer","minimum":1,"maximum":2147483647},"timing_mode":{"type":"string","enum":["FIXED","INDIVIDUAL"]},"required":{"type":"boolean"},"display_order":{"type":"integer","minimum":-2147483648,"maximum":2147483647},"buffer_before_minutes":{"type":"integer","minimum":0,"maximum":2147483647},"buffer_after_minutes":{"type":"integer","minimum":0,"maximum":2147483647},"menu_category":{"type":["object","null"],"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string","maxLength":60},"open_by_default":{"type":"boolean"},"sort_order":{"type":"integer","minimum":-2147483648,"maximum":2147483647}},"required":["id","name","open_by_default","sort_order"],"additionalProperties":false},"selection_group_id":{"type":["string","null"],"format":"uuid"}},"required":["id","service_id","name","price_yen","duration_minutes","timing_mode","required","display_order","buffer_before_minutes","buffer_after_minutes","menu_category","selection_group_id"],"additionalProperties":false}},"menu_category_source":{"type":"string","enum":["LEDGER","EVENT"]}},"required":["data","menu_category_source"],"additionalProperties":false}}}},"400":{"description":"利用できないヘッダ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"鍵が無い・無効","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"範囲不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"見つからない","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"予約・冪等キーの競合","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"本文が1 MiBを超えている","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"入力の検証失敗","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"回数の上限","headers":{"RateLimit-Limit":{"description":"固定窓内の回数上限","schema":{"type":"integer","minimum":1}},"RateLimit-Remaining":{"description":"固定窓内の残り回数","schema":{"type":"integer","minimum":0}},"RateLimit-Reset":{"description":"窓終了までの秒数","schema":{"type":"integer","minimum":0}},"Retry-After":{"description":"再試行までの待機秒数","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"内部エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-goyoka-audience":"tenant","x-goyoka-required-scopes":["events:write"]}},"/api/v1/email/sender":{"get":{"operationId":"email_sender_get","tags":["email"],"summary":"標準の差出人を読む","description":"senderは保存4欄の生値、effective_senderは実際にメールへ使われる名前・返信先です。差出人名が未設定（null）の行もそのまま返し、お店の名前への補完はeffective_senderだけで行います。\n\n必要な範囲: `email:read`","security":[{"bearer":[]},{"oauth2":["email:read"]}],"responses":{"200":{"description":"標準の差出人を読む","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailSenderGetResponse"}}}},"400":{"description":"利用できないヘッダ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"鍵が無い・無効","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"範囲不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"見つからない","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"予約・冪等キーの競合","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"本文が1 MiBを超えている","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"入力の検証失敗","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"回数の上限","headers":{"RateLimit-Limit":{"description":"固定窓内の回数上限","schema":{"type":"integer","minimum":1}},"RateLimit-Remaining":{"description":"固定窓内の残り回数","schema":{"type":"integer","minimum":0}},"RateLimit-Reset":{"description":"窓終了までの秒数","schema":{"type":"integer","minimum":0}},"Retry-After":{"description":"再試行までの待機秒数","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"内部エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-goyoka-audience":"tenant","x-goyoka-required-scopes":["email:read"]},"put":{"operationId":"email_sender_replace","tags":["email"],"summary":"標準の差出人を置き換える","description":"鍵やトークンの持ち主が今のこのお店のメンバーでないと409 EMAIL_OPERATION_BLOCKED（NOT_CURRENT_MEMBER）です。data.senderの保存4欄すべてを送ります。4欄ともnullを受け、sender_nameがnullならお店の名前で表示します（表示専用の投影はeffective_senderにあります）。返信先（reply_to_email）がnullまたは空文字なら、以後の送信でReply-Toを付けません（お店名のような既定値へのfallbackはありません）。legal_name・legal_addressのnullは法定表示の解除です。返信先・法定表示の空文字もnullとして保存します。完全一致の往復は業務検査より先に200で書き込みません。legal_name・legal_addressが空欄なら、新しいお知らせの予約を拒否し、予約に連動するお知らせの送信も止めます。すでに予約済み（SCHEDULED）の配信は後続の取消し処理でDRAFTへ戻ることがありますが、配信サービスへの登録が進んだ分や送信中のものは止まりません。任意の冪等キーを使えます。\n\n保存時のメールは0通で、既存予約の状態は変えません。\n\n保存競合は409 EMAIL_OPERATION_BLOCKEDで、details.blocks[].codeはCONCURRENT_UPDATEです。\n\n必要な範囲: `email:write`","security":[{"bearer":[]},{"oauth2":["email:write"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReplaceEmailSenderBody"}}}},"responses":{"200":{"description":"標準の差出人を置き換える","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailSenderReplaceResponse"}}}},"400":{"description":"利用できないヘッダ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"鍵が無い・無効","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"範囲不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"見つからない","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"予約・冪等キーの競合","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"本文が1 MiBを超えている","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"入力の検証失敗","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"回数の上限","headers":{"RateLimit-Limit":{"description":"固定窓内の回数上限","schema":{"type":"integer","minimum":1}},"RateLimit-Remaining":{"description":"固定窓内の残り回数","schema":{"type":"integer","minimum":0}},"RateLimit-Reset":{"description":"窓終了までの秒数","schema":{"type":"integer","minimum":0}},"Retry-After":{"description":"再試行までの待機秒数","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"内部エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-goyoka-audience":"tenant","x-goyoka-required-scopes":["email:write"],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"同じ内容の再送に同じ値を使います。異なる内容との再利用や処理中の再送は409 IDEMPOTENCY_KEY_REUSEDです。"}]}},"/api/v1/email/sender-profiles":{"get":{"operationId":"email_sender_profiles_list","tags":["email"],"summary":"追加差出人の一覧","description":"保存済みの追加差出人を作成日時・IDの昇順で返します。cursor・limitはありません。\n\n必要な範囲: `email:read`","security":[{"bearer":[]},{"oauth2":["email:read"]}],"responses":{"200":{"description":"追加差出人の一覧","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailSenderProfileListResponse"}}}},"400":{"description":"利用できないヘッダ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"鍵が無い・無効","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"範囲不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"見つからない","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"予約・冪等キーの競合","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"本文が1 MiBを超えている","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"入力の検証失敗","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"回数の上限","headers":{"RateLimit-Limit":{"description":"固定窓内の回数上限","schema":{"type":"integer","minimum":1}},"RateLimit-Remaining":{"description":"固定窓内の残り回数","schema":{"type":"integer","minimum":0}},"RateLimit-Reset":{"description":"窓終了までの秒数","schema":{"type":"integer","minimum":0}},"Retry-After":{"description":"再試行までの待機秒数","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"内部エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-goyoka-audience":"tenant","x-goyoka-required-scopes":["email:read"]},"post":{"operationId":"email_sender_profiles_create","tags":["email"],"summary":"追加差出人を作る","description":"鍵やトークンの持ち主が今のこのお店のメンバーでないと409 EMAIL_OPERATION_BLOCKED（NOT_CURRENT_MEMBER）です。nameは必須、reply_to_emailはnull可（未設定なら標準の返信先を使います）。1つのお店につき20件までで、上限は409 EMAIL_OPERATION_BLOCKED（details.blocks[].code:SENDER_PROFILE_LIMIT_REACHED）です。\n\n保存時のメールは0通で、既存予約の状態は変えません。\n\n必要な範囲: `email:write`","security":[{"bearer":[]},{"oauth2":["email:write"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateEmailSenderProfileBody"}}}},"responses":{"201":{"description":"追加差出人を作る","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailSenderProfileResponse"}}}},"400":{"description":"利用できないヘッダ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"鍵が無い・無効","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"範囲不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"見つからない","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"予約・冪等キーの競合","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"本文が1 MiBを超えている","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"入力の検証失敗","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"回数の上限","headers":{"RateLimit-Limit":{"description":"固定窓内の回数上限","schema":{"type":"integer","minimum":1}},"RateLimit-Remaining":{"description":"固定窓内の残り回数","schema":{"type":"integer","minimum":0}},"RateLimit-Reset":{"description":"窓終了までの秒数","schema":{"type":"integer","minimum":0}},"Retry-After":{"description":"再試行までの待機秒数","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"内部エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-goyoka-audience":"tenant","x-goyoka-required-scopes":["email:write"],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"同じ内容の再送に同じ値を使います。異なる内容との再利用や処理中の再送は409 IDEMPOTENCY_KEY_REUSEDです。"}]}},"/api/v1/email/sender-profiles/{id}":{"patch":{"operationId":"email_sender_profiles_update","tags":["email"],"summary":"追加差出人を更新する","description":"鍵やトークンの持ち主が今のこのお店のメンバーでないと409 EMAIL_OPERATION_BLOCKED（NOT_CURRENT_MEMBER）です。省略した欄は保持します。空objectや同じ値の往復は書き込みません。reply_to_emailはnullで標準の返信先へ戻せます。他店・不明のidは404です。\n\n保存時のメールは0通で、既存予約の状態は変えません。\n\n保存競合は409 EMAIL_OPERATION_BLOCKEDで、details.blocks[].codeはCONCURRENT_UPDATEです。\n\n必要な範囲: `email:write`","security":[{"bearer":[]},{"oauth2":["email:write"]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"同じ内容の再送に同じ値を使います。異なる内容との再利用や処理中の再送は409 IDEMPOTENCY_KEY_REUSEDです。"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateEmailSenderProfileBody"}}}},"responses":{"200":{"description":"追加差出人を更新する","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailSenderProfileResponse"}}}},"400":{"description":"利用できないヘッダ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"鍵が無い・無効","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"範囲不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"見つからない","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"予約・冪等キーの競合","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"本文が1 MiBを超えている","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"入力の検証失敗","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"回数の上限","headers":{"RateLimit-Limit":{"description":"固定窓内の回数上限","schema":{"type":"integer","minimum":1}},"RateLimit-Remaining":{"description":"固定窓内の残り回数","schema":{"type":"integer","minimum":0}},"RateLimit-Reset":{"description":"窓終了までの秒数","schema":{"type":"integer","minimum":0}},"Retry-After":{"description":"再試行までの待機秒数","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"内部エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-goyoka-audience":"tenant","x-goyoka-required-scopes":["email:write"]},"delete":{"operationId":"email_sender_profiles_delete","tags":["email"],"summary":"追加差出人を削除する","description":"鍵やトークンの持ち主が今のこのお店のメンバーでないと409 EMAIL_OPERATION_BLOCKED（NOT_CURRENT_MEMBER）です。この差出人を参照していたイベント・お知らせ・埋め込みコード・会話は標準の差出人へ戻ります（参照はnullになります）。配信サービスへ登録済みのメールは登録時の差出人が残る場合があります。bodyは不要です。他店・不明のidは404です。任意の冪等キーで再送できます。\n\n保存時のメールは0通で、既存予約の状態は変えません。\n\n必要な範囲: `email:write`","security":[{"bearer":[]},{"oauth2":["email:write"]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"同じ内容の再送に同じ値を使います。異なる内容との再利用や処理中の再送は409 IDEMPOTENCY_KEY_REUSEDです。"}],"responses":{"200":{"description":"追加差出人を削除する","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteEmailResourceResponse"}}}},"400":{"description":"利用できないヘッダ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"鍵が無い・無効","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"範囲不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"見つからない","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"予約・冪等キーの競合","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"本文が1 MiBを超えている","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"入力の検証失敗","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"回数の上限","headers":{"RateLimit-Limit":{"description":"固定窓内の回数上限","schema":{"type":"integer","minimum":1}},"RateLimit-Remaining":{"description":"固定窓内の残り回数","schema":{"type":"integer","minimum":0}},"RateLimit-Reset":{"description":"窓終了までの秒数","schema":{"type":"integer","minimum":0}},"Retry-After":{"description":"再試行までの待機秒数","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"内部エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-goyoka-audience":"tenant","x-goyoka-required-scopes":["email:write"]}},"/api/v1/email/templates":{"get":{"operationId":"email_templates_list","tags":["email"],"summary":"メールの文面一覧","description":"お店が編集できる種別だけを、種別・形態・作成日時の順で返します。cursor・limitはありません。まだ配られていない既定の標準文面があれば、読む前に補完してから返すため、初めて呼んだ直後に行が増えることがあります。補完で有効になった標準文面は、以後の予約・イベントの出来事や掃引で実際に送られます。お知らせ（ANNOUNCEMENT）はここで読めますが、5つの書込み操作では扱えません。\n\n必要な範囲: `email:read`","security":[{"bearer":[]},{"oauth2":["email:read"]}],"responses":{"200":{"description":"メールの文面一覧","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailTemplateListResponse"}}}},"400":{"description":"利用できないヘッダ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"鍵が無い・無効","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"範囲不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"見つからない","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"予約・冪等キーの競合","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"本文が1 MiBを超えている","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"入力の検証失敗","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"回数の上限","headers":{"RateLimit-Limit":{"description":"固定窓内の回数上限","schema":{"type":"integer","minimum":1}},"RateLimit-Remaining":{"description":"固定窓内の残り回数","schema":{"type":"integer","minimum":0}},"RateLimit-Reset":{"description":"窓終了までの秒数","schema":{"type":"integer","minimum":0}},"Retry-After":{"description":"再試行までの待機秒数","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"内部エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-goyoka-audience":"tenant","x-goyoka-required-scopes":["email:read"]},"post":{"operationId":"email_templates_create","tags":["email"],"summary":"メールの文面を追加する","description":"鍵やトークンの持ち主が今のこのお店のメンバーでないと409 EMAIL_OPERATION_BLOCKED（NOT_CURRENT_MEMBER）です。作成直後はenabled:falseです。target_service_idsは作成bodyでは受け付けず、常に空配列で作られます（空は全メニューの予約が対象という意味そのもので、あとから対象を絞るには更新を使ってください）。ANNOUNCEMENTは409 EMAIL_OPERATION_BLOCKED（details.blocks[].code:TEMPLATE_KIND_NOT_WRITABLE）です。掃引でしか送らない種別（リマインド・お礼・フォローアップ等）は開始/終了のどちらを基準にするか必須です。個別の出来事に合わせて即時に送る種別は、anchorに何を送ってもBOOKED・offset_minutes 0・send_at_local_time nullへ揃えます。イベント（booking_kind:EVENT）にリモート（出張）は選べません。プランの追加上限に達している場合は409 EMAIL_OPERATION_BLOCKED（details.blocks[].code:TEMPLATE_LIMIT_REACHED）です。任意の冪等キーを使えます。\n\nkind・scope・booking_kindは作成時の必須入力です。\n\n応答前に不足する形態別の標準文面を補います。\n\n保存競合は409 EMAIL_OPERATION_BLOCKEDで、details.blocks[].codeはCONCURRENT_UPDATEです。\n\n必要な範囲: `email:write`","security":[{"bearer":[]},{"oauth2":["email:write"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateEmailTemplateBody"}}}},"responses":{"201":{"description":"メールの文面を追加する","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailTemplateResponse"}}}},"400":{"description":"利用できないヘッダ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"鍵が無い・無効","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"範囲不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"見つからない","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"予約・冪等キーの競合","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"本文が1 MiBを超えている","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"入力の検証失敗","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"回数の上限","headers":{"RateLimit-Limit":{"description":"固定窓内の回数上限","schema":{"type":"integer","minimum":1}},"RateLimit-Remaining":{"description":"固定窓内の残り回数","schema":{"type":"integer","minimum":0}},"RateLimit-Reset":{"description":"窓終了までの秒数","schema":{"type":"integer","minimum":0}},"Retry-After":{"description":"再試行までの待機秒数","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"内部エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-goyoka-audience":"tenant","x-goyoka-required-scopes":["email:write"],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"同じ内容の再送に同じ値を使います。異なる内容との再利用や処理中の再送は409 IDEMPOTENCY_KEY_REUSEDです。"}]}},"/api/v1/email/templates/{id}":{"get":{"operationId":"email_templates_get","tags":["email"],"summary":"メールの文面を1件読む","description":"お店が編集できる種別だけを読めます。応答前に不足する形態別の標準文面を補います。他店・不明・お店が編集しない内部種別のIDは404です。\n\n必要な範囲: `email:read`","security":[{"bearer":[]},{"oauth2":["email:read"]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"メールの文面を1件読む","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailTemplateResponse"}}}},"400":{"description":"利用できないヘッダ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"鍵が無い・無効","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"範囲不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"見つからない","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"予約・冪等キーの競合","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"本文が1 MiBを超えている","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"入力の検証失敗","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"回数の上限","headers":{"RateLimit-Limit":{"description":"固定窓内の回数上限","schema":{"type":"integer","minimum":1}},"RateLimit-Remaining":{"description":"固定窓内の残り回数","schema":{"type":"integer","minimum":0}},"RateLimit-Reset":{"description":"窓終了までの秒数","schema":{"type":"integer","minimum":0}},"Retry-After":{"description":"再試行までの待機秒数","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"内部エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-goyoka-audience":"tenant","x-goyoka-required-scopes":["email:read"]},"patch":{"operationId":"email_templates_update","tags":["email"],"summary":"メールの文面を部分更新する","description":"鍵やトークンの持ち主が今のこのお店のメンバーでないと409 EMAIL_OPERATION_BLOCKED（NOT_CURRENT_MEMBER）です。省略した欄は保存値を保持します（false・0・null・空配列は明示値として保存します）。省略補完した生値が保存値と完全一致するとき、空bodyも含めて何も保存しません。有効にすると、次の掃引から、送る予定の時刻を過ぎてから7日（＋時差の余裕）以内の予約にも送ります。それより古い予約には送りません。件名・本文・時刻・対象メニューの変更は、これから送るメールに反映されます。保存時には送信しません。ANNOUNCEMENTは409 EMAIL_OPERATION_BLOCKED（details.blocks[].code:TEMPLATE_KIND_NOT_WRITABLE）です。同値・空PATCHでも拒否します。掃引でしか送らない種別のanchorを基準なし（BOOKED）へは戻せません。対象メニュー（target_service_ids）は個人セッション用だけ変更でき、空配列はそのお店の全メニューの予約が対象という意味です（target_service_idsが空なら全メニュー）。イベント用・お問い合わせ用は送った値にかかわらず空配列へ揃えます。新しく加えた対象メニューIDだけ、アーカイブされていないこのお店のものか確認します（保存済みの削除済み・アーカイブ済みの参照はそのまま残せます）。同じIDの重複は422です。任意の冪等キーを使えます。\n\nkind・scope・booking_kindは更新できません。\n\n送信済みの予約と文面の組には再送せず、BOOKEDの文面は保存だけで過去の予約に送らず、以後の予約・承認・取消しなどの出来事で送ります。\n\n応答前に不足する形態別の標準文面を補います。\n\n保存競合は409 EMAIL_OPERATION_BLOCKEDで、details.blocks[].codeはCONCURRENT_UPDATEです。\n\n必要な範囲: `email:write`","security":[{"bearer":[]},{"oauth2":["email:write"]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"同じ内容の再送に同じ値を使います。異なる内容との再利用や処理中の再送は409 IDEMPOTENCY_KEY_REUSEDです。"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateEmailTemplateBody"}}}},"responses":{"200":{"description":"メールの文面を部分更新する","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailTemplateResponse"}}}},"400":{"description":"利用できないヘッダ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"鍵が無い・無効","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"範囲不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"見つからない","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"予約・冪等キーの競合","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"本文が1 MiBを超えている","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"入力の検証失敗","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"回数の上限","headers":{"RateLimit-Limit":{"description":"固定窓内の回数上限","schema":{"type":"integer","minimum":1}},"RateLimit-Remaining":{"description":"固定窓内の残り回数","schema":{"type":"integer","minimum":0}},"RateLimit-Reset":{"description":"窓終了までの秒数","schema":{"type":"integer","minimum":0}},"Retry-After":{"description":"再試行までの待機秒数","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"内部エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-goyoka-audience":"tenant","x-goyoka-required-scopes":["email:write"]},"delete":{"operationId":"email_templates_delete","tags":["email"],"summary":"メールの文面を削除する","description":"鍵やトークンの持ち主が今のこのお店のメンバーでないと409 EMAIL_OPERATION_BLOCKED（NOT_CURRENT_MEMBER）です。お店が追加した文面（is_custom:true）だけ削除できます。カスタム以外は409 EMAIL_OPERATION_BLOCKED（details.blocks[].code:TEMPLATE_NOT_CUSTOM）です。ANNOUNCEMENTは409 EMAIL_OPERATION_BLOCKED（details.blocks[].code:TEMPLATE_KIND_NOT_WRITABLE）です。削除で以後の送信は自動で止まりますが、すでに送信済みのメールは変わりません。COMMON（共通）でお店が独自に置き換えていた文面を削除すると、削除の直後に対面・オンライン・出張の形態別の標準が補完されます（初めから有効なものは、次の出来事から送られます）。削除そのものはメールを送りません。bodyは不要です。任意の冪等キーを使えます。\n\n応答前に不足する形態別の標準文面を補います。\n\n必要な範囲: `email:write`","security":[{"bearer":[]},{"oauth2":["email:write"]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"同じ内容の再送に同じ値を使います。異なる内容との再利用や処理中の再送は409 IDEMPOTENCY_KEY_REUSEDです。"}],"responses":{"200":{"description":"メールの文面を削除する","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteEmailResourceResponse"}}}},"400":{"description":"利用できないヘッダ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"鍵が無い・無効","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"範囲不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"見つからない","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"予約・冪等キーの競合","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"本文が1 MiBを超えている","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"入力の検証失敗","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"回数の上限","headers":{"RateLimit-Limit":{"description":"固定窓内の回数上限","schema":{"type":"integer","minimum":1}},"RateLimit-Remaining":{"description":"固定窓内の残り回数","schema":{"type":"integer","minimum":0}},"RateLimit-Reset":{"description":"窓終了までの秒数","schema":{"type":"integer","minimum":0}},"Retry-After":{"description":"再試行までの待機秒数","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"内部エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-goyoka-audience":"tenant","x-goyoka-required-scopes":["email:write"]}},"/api/v1/email/templates/{id}/reset":{"post":{"operationId":"email_templates_reset","tags":["email"],"summary":"メールの文面を初期設定へ戻す","description":"鍵やトークンの持ち主が今のこのお店のメンバーでないと409 EMAIL_OPERATION_BLOCKED（NOT_CURRENT_MEMBER）です。件名と本文だけを台帳の初期値へ戻します。有効/無効・タイミングの基準・ずらし幅・送信時刻・対象メニューは変えません。編集済みの件名・本文は失われます。初期設定がない文面（お店が追加した文面など）は409 EMAIL_OPERATION_BLOCKED（details.blocks[].code:TEMPLATE_DEFAULT_NOT_FOUND）です。ANNOUNCEMENTは409 EMAIL_OPERATION_BLOCKED（details.blocks[].code:TEMPLATE_KIND_NOT_WRITABLE）です。bodyは不要です。任意の冪等キーを使えます。\n\n応答前に不足する形態別の標準文面を補います。\n\n保存競合は409 EMAIL_OPERATION_BLOCKEDで、details.blocks[].codeはCONCURRENT_UPDATEです。\n\n必要な範囲: `email:write`","security":[{"bearer":[]},{"oauth2":["email:write"]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"同じ内容の再送に同じ値を使います。異なる内容との再利用や処理中の再送は409 IDEMPOTENCY_KEY_REUSEDです。"}],"responses":{"200":{"description":"メールの文面を初期設定へ戻す","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailTemplateResponse"}}}},"400":{"description":"利用できないヘッダ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"鍵が無い・無効","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"範囲不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"見つからない","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"予約・冪等キーの競合","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"本文が1 MiBを超えている","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"入力の検証失敗","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"回数の上限","headers":{"RateLimit-Limit":{"description":"固定窓内の回数上限","schema":{"type":"integer","minimum":1}},"RateLimit-Remaining":{"description":"固定窓内の残り回数","schema":{"type":"integer","minimum":0}},"RateLimit-Reset":{"description":"窓終了までの秒数","schema":{"type":"integer","minimum":0}},"Retry-After":{"description":"再試行までの待機秒数","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"内部エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-goyoka-audience":"tenant","x-goyoka-required-scopes":["email:write"]}},"/api/v1/email/templates/{id}/test-send":{"post":{"operationId":"email_templates_test_send","tags":["email"],"summary":"文面を自分宛にテスト送信する","description":"APIキー・OAuthでは、鍵やトークンの持ち主（APIキーを発行した人、OAuthは同意した人）本人の現在のメンバーシップのアドレスへ1通送り、任意の宛先は指定できません。お客様へは送りません。通常の文面は変数を展開せずenabledに関係なく送れます。\n\nANNOUNCEMENTは409 EMAIL_OPERATION_BLOCKED（details.blocks[].code:TEMPLATE_KIND_NOT_WRITABLE）です。\n\n応答前に不足する形態別の標準文面を補います。\n\n422 EMAIL_TEST_UNDELIVERABLEのdetails.reasonはno-email（本人の未登録・不正アドレス）、suspended（配信停止）、send-failed（送信失敗）です。not-current-memberは通常は返りませんが、入口の所属確認と宛先解決の間に所属を失うと返る場合があります。\n\n入口で所属がなければ409 EMAIL_OPERATION_BLOCKED（details.blocks[].code:NOT_CURRENT_MEMBER）、scope不足は配送前に403 INSUFFICIENT_SCOPEです。\n\n会話開始・返信と文面・お知らせのテスト送信は、お店合算の既定30通/時の固定窓を共有します。超過はRATE_LIMITEDで両経路にdetails.retry_after（秒）が付き、RESTは429とRetry-Afterヘッダーも返し、MCPはヘッダーを返しません。同じ冪等キーと内容の成功再送は枠を消費しません。\n\n毎分の上限はRATE_LIMITEDで、RESTでは429とRetry-Afterヘッダー（秒）、MCPでは待ち時間を返しません。\n\n必要な範囲: `email:write`","security":[{"bearer":[]},{"oauth2":["email:write"]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"同じ内容の再送に同じ値を使います。異なる内容との再利用や処理中の再送は409 IDEMPOTENCY_KEY_REUSEDです。"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailTestSendBody"}}}},"responses":{"200":{"description":"文面を自分宛にテスト送信する","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailTestSendResponse"}}}},"400":{"description":"利用できないヘッダ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"鍵が無い・無効","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"範囲不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"見つからない","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"予約・冪等キーの競合","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"本文が1 MiBを超えている","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"入力の検証失敗","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"回数の上限","headers":{"RateLimit-Limit":{"description":"固定窓内の回数上限","schema":{"type":"integer","minimum":1}},"RateLimit-Remaining":{"description":"固定窓内の残り回数","schema":{"type":"integer","minimum":0}},"RateLimit-Reset":{"description":"窓終了までの秒数","schema":{"type":"integer","minimum":0}},"Retry-After":{"description":"再試行までの待機秒数","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"内部エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-goyoka-audience":"tenant","x-goyoka-required-scopes":["email:write"]}},"/api/v1/email/announcements":{"get":{"operationId":"email_announcements_list","tags":["email"],"summary":"お知らせの一覧","description":"作成日時・IDの降順。statusを省略するとDRAFT/SCHEDULED/SENDING/SENTの全状態を返します。本文は含みません。limitは既定50・最大200、next_cursorがnullなら終端です。この機能（お知らせ配信）が無効なお店では409 EMAIL_OPERATION_BLOCKEDになります。予約されたお知らせでも、誰が予約したか（管理画面かAPIか）は記録していません。\n\nsummaryはemail:readがある場合だけ返し、なければnullです。\n\n必要な範囲: `email:read`","security":[{"bearer":[]},{"oauth2":["email:read"]}],"parameters":[{"schema":{"type":"string","enum":["DRAFT","SCHEDULED","SENDING","SENT"]},"required":false,"name":"status","in":"query"},{"schema":{"type":"string"},"required":false,"name":"cursor","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":200,"default":50},"required":false,"name":"limit","in":"query"}],"responses":{"200":{"description":"お知らせの一覧","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailAnnouncementListResponse"}}}},"400":{"description":"利用できないヘッダ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"鍵が無い・無効","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"範囲不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"見つからない","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"予約・冪等キーの競合","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"本文が1 MiBを超えている","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"入力の検証失敗","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"回数の上限","headers":{"RateLimit-Limit":{"description":"固定窓内の回数上限","schema":{"type":"integer","minimum":1}},"RateLimit-Remaining":{"description":"固定窓内の残り回数","schema":{"type":"integer","minimum":0}},"RateLimit-Reset":{"description":"窓終了までの秒数","schema":{"type":"integer","minimum":0}},"Retry-After":{"description":"再試行までの待機秒数","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"内部エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-goyoka-audience":"tenant","x-goyoka-required-scopes":["email:read"]},"post":{"operationId":"email_announcements_create","tags":["email"],"summary":"お知らせの下書きを作る","description":"件名(1〜200字)・本文(1〜20000字)・宛先・event_id・sender_profile_idからDRAFTを作ります。作成だけではメールを送りません。audienceがEVENT_PARTICIPANTSならevent_idが必須、他の宛先へevent_idを送るとnullに揃えて保存します。event_idは自店の未アーカイブのイベント、sender_profile_idは自店の差出人だけを指せます。違えば404です。鍵やトークンの持ち主が今のこのお店のメンバーでないと409 EMAIL_OPERATION_BLOCKED（NOT_CURRENT_MEMBER）です。この機能（お知らせ配信）が無効なお店では409 EMAIL_OPERATION_BLOCKED（ANNOUNCEMENT_UNAVAILABLE）です。任意の冪等キーを使えます。\n\nsummaryはemail:readがある場合だけ返し、なければnullです。\n\n必要な範囲: `email:write`","security":[{"bearer":[]},{"oauth2":["email:write"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateEmailAnnouncementBody"}}}},"responses":{"201":{"description":"お知らせの下書きを作る","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailAnnouncementResponse"}}}},"400":{"description":"利用できないヘッダ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"鍵が無い・無効","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"範囲不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"見つからない","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"予約・冪等キーの競合","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"本文が1 MiBを超えている","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"入力の検証失敗","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"回数の上限","headers":{"RateLimit-Limit":{"description":"固定窓内の回数上限","schema":{"type":"integer","minimum":1}},"RateLimit-Remaining":{"description":"固定窓内の残り回数","schema":{"type":"integer","minimum":0}},"RateLimit-Reset":{"description":"窓終了までの秒数","schema":{"type":"integer","minimum":0}},"Retry-After":{"description":"再試行までの待機秒数","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"内部エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-goyoka-audience":"tenant","x-goyoka-required-scopes":["email:write"],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"同じ内容の再送に同じ値を使います。異なる内容との再利用や処理中の再送は409 IDEMPOTENCY_KEY_REUSEDです。"}]}},"/api/v1/email/announcements/{id}":{"get":{"operationId":"email_announcements_get","tags":["email"],"summary":"お知らせを1件読む","description":"本文と集計を返します。送れなかった宛先のメールアドレスは返しません。他店・不明のIDは404です。この機能（お知らせ配信）が無効なお店では409 EMAIL_OPERATION_BLOCKEDになります。\n\nsummaryはemail:readがある場合だけ返し、なければnullです。\n\n必要な範囲: `email:read`","security":[{"bearer":[]},{"oauth2":["email:read"]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"お知らせを1件読む","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailAnnouncementResponse"}}}},"400":{"description":"利用できないヘッダ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"鍵が無い・無効","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"範囲不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"見つからない","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"予約・冪等キーの競合","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"本文が1 MiBを超えている","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"入力の検証失敗","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"回数の上限","headers":{"RateLimit-Limit":{"description":"固定窓内の回数上限","schema":{"type":"integer","minimum":1}},"RateLimit-Remaining":{"description":"固定窓内の残り回数","schema":{"type":"integer","minimum":0}},"RateLimit-Reset":{"description":"窓終了までの秒数","schema":{"type":"integer","minimum":0}},"Retry-After":{"description":"再試行までの待機秒数","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"内部エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-goyoka-audience":"tenant","x-goyoka-required-scopes":["email:read"]},"patch":{"operationId":"email_announcements_update","tags":["email"],"summary":"お知らせの下書きを部分更新する","description":"戻せるのはsubject・body・audience・event_id・sender_profile_idの5欄だけです。省略した欄は保持し、他の読取専用欄（id・status・日時・集計など）を本文へ混ぜると422です。5欄の生値が保存値と一致する（空PATCHを含む）なら業務検査より先に200を返し、何も書き込みません。DRAFTでないお知らせへ値を変えるPATCHは409 EMAIL_OPERATION_BLOCKED（ANNOUNCEMENT_NOT_DRAFT）です。audienceをEVENT_PARTICIPANTS以外にするとevent_idはnullに揃います。event_idはEVENT_PARTICIPANTSで必須です。新しく指すevent_idは自店の未アーカイブのイベント、sender_profile_idは自店の差出人だけで、違えば404です。鍵やトークンの持ち主が今のこのお店のメンバーでないと409 EMAIL_OPERATION_BLOCKED（NOT_CURRENT_MEMBER）です。公開中のお知らせを直すと、公開ページ（/news・詳細）の件名と本文もすぐ変わります。任意の冪等キーを使えます。\n\nsummaryはemail:readがある場合だけ返し、なければnullです。\n\n保存競合は409 EMAIL_OPERATION_BLOCKEDで、details.blocks[].codeはCONCURRENT_UPDATEです。\n\n必要な範囲: `email:write`","security":[{"bearer":[]},{"oauth2":["email:write"]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"同じ内容の再送に同じ値を使います。異なる内容との再利用や処理中の再送は409 IDEMPOTENCY_KEY_REUSEDです。"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateEmailAnnouncementBody"}}}},"responses":{"200":{"description":"お知らせの下書きを部分更新する","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailAnnouncementResponse"}}}},"400":{"description":"利用できないヘッダ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"鍵が無い・無効","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"範囲不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"見つからない","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"予約・冪等キーの競合","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"本文が1 MiBを超えている","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"入力の検証失敗","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"回数の上限","headers":{"RateLimit-Limit":{"description":"固定窓内の回数上限","schema":{"type":"integer","minimum":1}},"RateLimit-Remaining":{"description":"固定窓内の残り回数","schema":{"type":"integer","minimum":0}},"RateLimit-Reset":{"description":"窓終了までの秒数","schema":{"type":"integer","minimum":0}},"Retry-After":{"description":"再試行までの待機秒数","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"内部エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-goyoka-audience":"tenant","x-goyoka-required-scopes":["email:write"]},"delete":{"operationId":"email_announcements_delete","tags":["email"],"summary":"お知らせの下書きを削除する","description":"DRAFTのお知らせだけ削除できます。SCHEDULED（予約済み）は先にcancel-scheduleで取り消してから削除してください。削除は取り消せません。他店・不明・削除済みのIDは404です。DRAFTでないお知らせへの削除は409 EMAIL_OPERATION_BLOCKED（ANNOUNCEMENT_NOT_DRAFT）です。鍵やトークンの持ち主が今のこのお店のメンバーでないと409 EMAIL_OPERATION_BLOCKED（NOT_CURRENT_MEMBER）です。公開中だったお知らせを削除すると、公開ページ（/news・詳細）からもすぐ消えます。bodyは不要です。任意の冪等キーを使えます。\n\n必要な範囲: `email:write`","security":[{"bearer":[]},{"oauth2":["email:write"]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"同じ内容の再送に同じ値を使います。異なる内容との再利用や処理中の再送は409 IDEMPOTENCY_KEY_REUSEDです。"}],"responses":{"200":{"description":"お知らせの下書きを削除する","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteEmailResourceResponse"}}}},"400":{"description":"利用できないヘッダ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"鍵が無い・無効","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"範囲不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"見つからない","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"予約・冪等キーの競合","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"本文が1 MiBを超えている","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"入力の検証失敗","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"回数の上限","headers":{"RateLimit-Limit":{"description":"固定窓内の回数上限","schema":{"type":"integer","minimum":1}},"RateLimit-Remaining":{"description":"固定窓内の残り回数","schema":{"type":"integer","minimum":0}},"RateLimit-Reset":{"description":"窓終了までの秒数","schema":{"type":"integer","minimum":0}},"Retry-After":{"description":"再試行までの待機秒数","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"内部エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-goyoka-audience":"tenant","x-goyoka-required-scopes":["email:write"]}},"/api/v1/email/announcements/{id}/audience":{"get":{"operationId":"email_announcements_audience_preview","tags":["email"],"summary":"一斉送信の下見（人数の確認）","description":"お客様の名前・メールアドレスは返さず、人数だけを返します。DRAFTのお知らせだけ下見できます。下見は予約の時点で数え直します。scheduled_atを渡すと予約と同じ期で数え、前後24時間未満に送る予定・送信済みのお知らせがあればblocksにANNOUNCEMENT_SCHEDULE_TOO_CLOSEを足します（ちょうど24時間は可。この間隔の上限はAPIの予約だけに掛かり、管理画面の予約には掛かりません）。scheduled_atを省略すると現在時刻で数え、その場合はANNOUNCEMENT_SCHEDULE_TOO_CLOSEを出しません。\n\n配信直前には対象を作り直し、同意の取消し・除外・不達の人は外れ、新しく同意した人は枠が残れば加わるため、予約時と届く人数は変わることがあります。\n\n必要な範囲: `email:read`","security":[{"bearer":[]},{"oauth2":["email:read"]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"scheduled_at","in":"query"}],"responses":{"200":{"description":"一斉送信の下見（人数の確認）","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailAnnouncementAudienceResponse"}}}},"400":{"description":"利用できないヘッダ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"鍵が無い・無効","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"範囲不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"見つからない","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"予約・冪等キーの競合","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"本文が1 MiBを超えている","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"入力の検証失敗","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"回数の上限","headers":{"RateLimit-Limit":{"description":"固定窓内の回数上限","schema":{"type":"integer","minimum":1}},"RateLimit-Remaining":{"description":"固定窓内の残り回数","schema":{"type":"integer","minimum":0}},"RateLimit-Reset":{"description":"窓終了までの秒数","schema":{"type":"integer","minimum":0}},"Retry-After":{"description":"再試行までの待機秒数","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"内部エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-goyoka-audience":"tenant","x-goyoka-required-scopes":["email:read"]}},"/api/v1/email/announcements/{id}/test-send":{"post":{"operationId":"email_announcements_test_send","tags":["email"],"summary":"お知らせを自分宛にテスト送信する","description":"APIキー・OAuthでは、鍵やトークンの持ち主（APIキーを発行した人、OAuthは同意した人）本人の現在のメンバーシップのアドレスへ1通送り、任意の宛先は指定できません。お客様や他のオーナーへは送りません。件名は「[テスト] 」で始まり、配信停止リンクは仮の文言です。お知らせの状態（DRAFT/SCHEDULED/SENT等）は問わず、常に1通送れます。事業者名・住所が未設定のときは409 EMAIL_OPERATION_BLOCKED（SENDER_IDENTITY_MISSING）で、この場合は送信枠を消費しません。配信が停止されているお店では422 EMAIL_TEST_UNDELIVERABLE（details.reason:suspended）で、送信枠は消費します。\n\n422 EMAIL_TEST_UNDELIVERABLEのdetails.reasonはno-email（本人の未登録・不正アドレス）、suspended（配信停止）、send-failed（送信失敗）です。not-current-memberは通常は返りませんが、入口の所属確認と宛先解決の間に所属を失うと返る場合があります。\n\n入口で所属がなければ409 EMAIL_OPERATION_BLOCKED（details.blocks[].code:NOT_CURRENT_MEMBER）、scope不足は配送前に403 INSUFFICIENT_SCOPEです。\n\n会話開始・返信と文面・お知らせのテスト送信は、お店合算の既定30通/時の固定窓を共有します。超過はRATE_LIMITEDで両経路にdetails.retry_after（秒）が付き、RESTは429とRetry-Afterヘッダーも返し、MCPはヘッダーを返しません。同じ冪等キーと内容の成功再送は枠を消費しません。\n\n毎分の上限はRATE_LIMITEDで、RESTでは429とRetry-Afterヘッダー（秒）、MCPでは待ち時間を返しません。\n\n必要な範囲: `email:write`","security":[{"bearer":[]},{"oauth2":["email:write"]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"同じ内容の再送に同じ値を使います。異なる内容との再利用や処理中の再送は409 IDEMPOTENCY_KEY_REUSEDです。"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailAnnouncementActionBody"}}}},"responses":{"200":{"description":"お知らせを自分宛にテスト送信する","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailTestSendResponse"}}}},"400":{"description":"利用できないヘッダ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"鍵が無い・無効","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"範囲不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"見つからない","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"予約・冪等キーの競合","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"本文が1 MiBを超えている","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"入力の検証失敗","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"回数の上限","headers":{"RateLimit-Limit":{"description":"固定窓内の回数上限","schema":{"type":"integer","minimum":1}},"RateLimit-Remaining":{"description":"固定窓内の残り回数","schema":{"type":"integer","minimum":0}},"RateLimit-Reset":{"description":"窓終了までの秒数","schema":{"type":"integer","minimum":0}},"Retry-After":{"description":"再試行までの待機秒数","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"内部エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-goyoka-audience":"tenant","x-goyoka-required-scopes":["email:write"]}},"/api/v1/email/announcements/{id}/schedule":{"post":{"operationId":"email_announcements_schedule","tags":["email"],"summary":"お知らせの一斉送信を予約する","description":"同意したお客様へのお知らせの一斉送信を、scheduled_atの日時に予約します。今すぐ送る操作はAPIにありません。scheduled_atは今から30分後〜30日先（30分ちょうど・30日ちょうどを含む）で、外れると422 VALIDATION（fieldErrors.scheduled_at）です。\n\nexpected_recipient_count（必須、0以上の整数）には下見（email_announcements_audience_preview）のrecipient_countを渡します。予約の時点で数え直した送る相手の人数（プランごとの1人あたりの月間通数に達して見送る人は含めない）と違えば409 EMAIL_OPERATION_BLOCKED（details.blocks[].code:RECIPIENT_COUNT_MISMATCH）です。\n\n409の業務拒否はEMAIL_OPERATION_BLOCKEDで、理由はdetails.blocks[].codeに入ります。配信枠超過のANNOUNCEMENT_QUOTA_EXCEEDEDではdetails.quota_limitを返し、quota_used・quota_adding・target_countはemail:readがある場合だけ返します。\n\nRECIPIENT_COUNT_MISMATCHのdetails.expected_recipient_countは常に返し、実際のdetails.recipient_countはemail:readがある場合だけ返します。人数不一致と配信枠超過のどちらも下書きのまま受信者を作らず、配信枠を消費しません。\n\n同じお店の予約済み・送信中・送信済みのお知らせと予定日時が前後24時間未満なら409 EMAIL_OPERATION_BLOCKED（details.blocks[].code:ANNOUNCEMENT_SCHEDULE_TOO_CLOSE、details.min_interval_hours:24）です（ちょうど24時間は可）。この間隔の上限はAPIの予約だけに掛かります。予約の試行はお店ごと24時間に10回までで、成否を問わず数え、超えると429 RATE_LIMITED（details.retry_after）です。鍵やトークンの持ち主のメンバー確認・機能の有効性・他店や不明のIDで断られた要求は数えません。\n\nこの操作はemail:broadcastの範囲だけで呼べます（下書きの作成・編集にはemail:writeが要ります）。鍵やトークンの持ち主（APIキーを発行した人、OAuthは同意した人）が今もお店のメンバーでないときは409 EMAIL_OPERATION_BLOCKED（details.blocks[].code:NOT_CURRENT_MEMBER）です。DRAFTのお知らせだけ予約でき、キーなしで再送しても二重には予約されません（409 EMAIL_OPERATION_BLOCKED、details.blocks[].code:ANNOUNCEMENT_NOT_DRAFT）。\n\n予約に成功するたびに、お店のすべてのオーナーへ各1通、Goyoka名義で予約の知らせ（件名・送信予定・人数・連携先の名前・確認・取消し画面へのリンク）がメールで届きます。課金スイッチONではよかプラン以上で送れ、1人あたりの月間通数はプランごとの3・5・10通です。人数枠はありません。課金スイッチOFFでは従来の配信枠と1人月5回の上限が適用されます。配信直前（予定の60分前以降の最初の処理）に対象を作り直し、同意の取消し・除外・不達の人は外れ、新しく同意した人は枠が残れば加わるため、届く人数は予約時の数から増減し得ます。取り消しはemail:writeのemail_announcements_cancel_scheduleか管理画面から行え、お知らせ配信の機能を無効にした後でも取り消せます。\n\nsummaryはemail:readがある場合だけ返し、なければnullです。\n\n必要な範囲: `email:broadcast`","security":[{"bearer":[]},{"oauth2":["email:broadcast"]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"同じ内容の再送に同じ値を使います。異なる内容との再利用や処理中の再送は409 IDEMPOTENCY_KEY_REUSEDです。"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScheduleEmailAnnouncementBody"}}}},"responses":{"200":{"description":"お知らせの一斉送信を予約する","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailAnnouncementResponse"}}}},"400":{"description":"利用できないヘッダ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"鍵が無い・無効","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"範囲不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"見つからない","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"予約・冪等キーの競合","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"本文が1 MiBを超えている","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"入力の検証失敗","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"回数の上限","headers":{"RateLimit-Limit":{"description":"固定窓内の回数上限","schema":{"type":"integer","minimum":1}},"RateLimit-Remaining":{"description":"固定窓内の残り回数","schema":{"type":"integer","minimum":0}},"RateLimit-Reset":{"description":"窓終了までの秒数","schema":{"type":"integer","minimum":0}},"Retry-After":{"description":"再試行までの待機秒数","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"内部エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-goyoka-audience":"tenant","x-goyoka-required-scopes":["email:broadcast"]}},"/api/v1/email/announcements/{id}/cancel-schedule":{"post":{"operationId":"email_announcements_cancel_schedule","tags":["email"],"summary":"お知らせの予約を取り消す","description":"予約済み（SCHEDULED）のお知らせを取り消してDRAFTへ戻します。予定日時と送る相手の記録を消し、配信枠の確保も戻します。再び予約すると送る相手を数え直します。\n\nお知らせ配信の機能を無効にしたお店でも、鍵やトークンの持ち主が今のメンバーでなくても取り消せます。予約の試行の回数にも数えません。\n\nSCHEDULEDでないお知らせは409 EMAIL_OPERATION_BLOCKED（details.blocks[].code:ANNOUNCEMENT_NOT_SCHEDULED）、配信サービスが送信を始めた後も409 EMAIL_OPERATION_BLOCKED（details.blocks[].code:ANNOUNCEMENT_ALREADY_SENDING）で、状態はSENDINGになります。他店・不明のIDは404です。\n\n500でも、取消しの意図を保存できていれば毎時の処理が続きを行います。500のときは別の冪等キー（またはキーなし）でもう一度呼んでも安全です。同じ冪等キーでは保存済みの500が返ります。\n\nsummaryはemail:readがある場合だけ返し、なければnullです。\n\n必要な範囲: `email:write`","security":[{"bearer":[]},{"oauth2":["email:write"]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"同じ内容の再送に同じ値を使います。異なる内容との再利用や処理中の再送は409 IDEMPOTENCY_KEY_REUSEDです。"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailAnnouncementActionBody"}}}},"responses":{"200":{"description":"お知らせの予約を取り消す","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailAnnouncementResponse"}}}},"400":{"description":"利用できないヘッダ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"鍵が無い・無効","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"範囲不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"見つからない","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"予約・冪等キーの競合","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"本文が1 MiBを超えている","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"入力の検証失敗","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"回数の上限","headers":{"RateLimit-Limit":{"description":"固定窓内の回数上限","schema":{"type":"integer","minimum":1}},"RateLimit-Remaining":{"description":"固定窓内の残り回数","schema":{"type":"integer","minimum":0}},"RateLimit-Reset":{"description":"窓終了までの秒数","schema":{"type":"integer","minimum":0}},"Retry-After":{"description":"再試行までの待機秒数","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"内部エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-goyoka-audience":"tenant","x-goyoka-required-scopes":["email:write"]}},"/api/v1/email/announcements/{id}/publish":{"post":{"operationId":"email_announcements_publish","tags":["email"],"summary":"お知らせを公開する","description":"公開すると、お店の公開ページ /{slug}/news に件名と本文が誰でも見られる形で載ります。メールは送りません。下書き（DRAFT）でも公開できます（管理画面と同じ）。送信状態・受信者行は変わりません。鍵やトークンの持ち主が今のメンバーでないときは409 EMAIL_OPERATION_BLOCKED（NOT_CURRENT_MEMBER）です。既に公開済みのお知らせへ呼んでも公開日時は打ち直さず、現在の状態のまま200を返します。\n\nsummaryはemail:readがある場合だけ返し、なければnullです。\n\n必要な範囲: `email:write`","security":[{"bearer":[]},{"oauth2":["email:write"]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"同じ内容の再送に同じ値を使います。異なる内容との再利用や処理中の再送は409 IDEMPOTENCY_KEY_REUSEDです。"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailAnnouncementActionBody"}}}},"responses":{"200":{"description":"お知らせを公開する","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailAnnouncementResponse"}}}},"400":{"description":"利用できないヘッダ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"鍵が無い・無効","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"範囲不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"見つからない","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"予約・冪等キーの競合","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"本文が1 MiBを超えている","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"入力の検証失敗","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"回数の上限","headers":{"RateLimit-Limit":{"description":"固定窓内の回数上限","schema":{"type":"integer","minimum":1}},"RateLimit-Remaining":{"description":"固定窓内の残り回数","schema":{"type":"integer","minimum":0}},"RateLimit-Reset":{"description":"窓終了までの秒数","schema":{"type":"integer","minimum":0}},"Retry-After":{"description":"再試行までの待機秒数","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"内部エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-goyoka-audience":"tenant","x-goyoka-required-scopes":["email:write"]}},"/api/v1/email/announcements/{id}/unpublish":{"post":{"operationId":"email_announcements_unpublish","tags":["email"],"summary":"お知らせの公開を取り下げる","description":"非公開にすると、公開ページ /{slug}/news と個別ページから外れます。メールは送りません。送信状態・受信者行は変わりません。鍵やトークンの持ち主が今のメンバーでないときは409 EMAIL_OPERATION_BLOCKED（NOT_CURRENT_MEMBER）です。既に非公開のお知らせへ呼んでも200のno-opです。\n\nお知らせ配信の機能を無効にしたお店でも非公開にできます（公開ページは機能の有無を見ずに公開済みを出すため、外す口を塞ぎません）。\n\nsummaryはemail:readがある場合だけ返し、なければnullです。\n\n必要な範囲: `email:write`","security":[{"bearer":[]},{"oauth2":["email:write"]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"同じ内容の再送に同じ値を使います。異なる内容との再利用や処理中の再送は409 IDEMPOTENCY_KEY_REUSEDです。"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailAnnouncementActionBody"}}}},"responses":{"200":{"description":"お知らせの公開を取り下げる","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailAnnouncementResponse"}}}},"400":{"description":"利用できないヘッダ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"鍵が無い・無効","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"範囲不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"見つからない","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"予約・冪等キーの競合","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"本文が1 MiBを超えている","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"入力の検証失敗","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"回数の上限","headers":{"RateLimit-Limit":{"description":"固定窓内の回数上限","schema":{"type":"integer","minimum":1}},"RateLimit-Remaining":{"description":"固定窓内の残り回数","schema":{"type":"integer","minimum":0}},"RateLimit-Reset":{"description":"窓終了までの秒数","schema":{"type":"integer","minimum":0}},"Retry-After":{"description":"再試行までの待機秒数","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"内部エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-goyoka-audience":"tenant","x-goyoka-required-scopes":["email:write"]}},"/api/v1/guide-page":{"get":{"operationId":"guide-page_get","tags":["guide-page"],"summary":"ご案内ページの下書き・公開版・画像を読む","description":"保存済みの下書きと公開版、検索設定、自店の画像を返します。欠落・型破損した欄だけ補い、旧リンク・色・7枚以上のギャラリー・未知の順序は正規化しません。data.draftはそのまま下書きPUTのdraftへ戻せます。行が無い場合は既定の下書きを返し、searchableはお店の公開範囲がMEMBERS_ONLYならfalse、それ以外はtrueです。ページの作成・画像の掃除・メール文面の補充はしません。メールは送りません。\n\n画像の追加は管理画面で行ってください。\n\n必要な範囲: `guide-page:read`","security":[{"bearer":[]},{"oauth2":["guide-page:read"]}],"responses":{"200":{"description":"ご案内ページの下書き・公開版・画像を読む","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"draft":{"type":"object","properties":{"hero_image_id":{"type":["string","null"]},"headline":{"type":"string"},"intro":{"type":"string"},"about":{"type":"string"},"profile":{"type":"object","properties":{"image_id":{"type":["string","null"]},"name":{"type":"string"},"title":{"type":"string"},"bio":{"type":"string"}},"required":["image_id","name","title","bio"],"additionalProperties":false},"links":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"url":{"type":"string"},"visible":{"type":"boolean"}},"required":["id","label","url","visible"],"additionalProperties":false},"maxItems":50},"gallery_image_ids":{"type":"array","items":{"type":"string"}},"colors":{"type":"object","properties":{"preset_id":{"type":["string","null"],"maxLength":32},"primary":{"type":"string","maxLength":32},"secondary":{"type":"string","maxLength":32},"accent":{"type":"string","maxLength":32}},"required":["preset_id","primary","secondary","accent"],"additionalProperties":false},"sections":{"type":"object","properties":{"about":{"type":"boolean"},"profile":{"type":"boolean"},"links":{"type":"boolean"},"gallery":{"type":"boolean"},"testimonials":{"type":"boolean"},"menu":{"type":"boolean"},"events":{"type":"boolean"},"news":{"type":"boolean"},"access":{"type":"boolean"},"contact":{"type":"boolean"}},"required":["about","profile","links","gallery","testimonials","menu","events","news","access","contact"],"additionalProperties":false},"section_order":{"type":"array","items":{"type":"string"}},"seo":{"type":"object","properties":{"title":{"type":["string","null"]},"description":{"type":["string","null"]}},"required":["title","description"],"additionalProperties":false}},"required":["hero_image_id","headline","intro","about","profile","links","gallery_image_ids","colors","sections","section_order","seo"],"additionalProperties":false},"published":{"type":["object","null"],"properties":{"hero_image_id":{"type":["string","null"]},"headline":{"type":"string"},"intro":{"type":"string"},"about":{"type":"string"},"profile":{"type":"object","properties":{"image_id":{"type":["string","null"]},"name":{"type":"string"},"title":{"type":"string"},"bio":{"type":"string"}},"required":["image_id","name","title","bio"],"additionalProperties":false},"links":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"url":{"type":"string"},"visible":{"type":"boolean"}},"required":["id","label","url","visible"],"additionalProperties":false},"maxItems":50},"gallery_image_ids":{"type":"array","items":{"type":"string"}},"colors":{"type":"object","properties":{"preset_id":{"type":["string","null"],"maxLength":32},"primary":{"type":"string","maxLength":32},"secondary":{"type":"string","maxLength":32},"accent":{"type":"string","maxLength":32}},"required":["preset_id","primary","secondary","accent"],"additionalProperties":false},"sections":{"type":"object","properties":{"about":{"type":"boolean"},"profile":{"type":"boolean"},"links":{"type":"boolean"},"gallery":{"type":"boolean"},"testimonials":{"type":"boolean"},"menu":{"type":"boolean"},"events":{"type":"boolean"},"news":{"type":"boolean"},"access":{"type":"boolean"},"contact":{"type":"boolean"}},"required":["about","profile","links","gallery","testimonials","menu","events","news","access","contact"],"additionalProperties":false},"section_order":{"type":"array","items":{"type":"string"}},"seo":{"type":"object","properties":{"title":{"type":["string","null"]},"description":{"type":["string","null"]}},"required":["title","description"],"additionalProperties":false}},"required":["hero_image_id","headline","intro","about","profile","links","gallery_image_ids","colors","sections","section_order","seo"],"additionalProperties":false},"published_at":{"type":["string","null"],"format":"date-time"},"searchable":{"type":"boolean"},"images":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"slot":{"type":"string"},"url":{"type":"string"}},"required":["id","slot","url"]}}},"required":["draft","published","published_at","searchable","images"]}},"required":["data"]}}}},"400":{"description":"利用できないヘッダ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"鍵が無い・無効","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"範囲不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"見つからない","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"予約・冪等キーの競合","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"本文が1 MiBを超えている","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"入力の検証失敗","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"回数の上限","headers":{"RateLimit-Limit":{"description":"固定窓内の回数上限","schema":{"type":"integer","minimum":1}},"RateLimit-Remaining":{"description":"固定窓内の残り回数","schema":{"type":"integer","minimum":0}},"RateLimit-Reset":{"description":"窓終了までの秒数","schema":{"type":"integer","minimum":0}},"Retry-After":{"description":"再試行までの待機秒数","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"内部エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-goyoka-audience":"tenant","x-goyoka-required-scopes":["guide-page:read"]}},"/api/v1/guide-page/draft":{"put":{"operationId":"guide-page_draft_replace","tags":["guide-page"],"summary":"ご案内ページの下書きを置き換える","description":"draftの全欄を送ります。保存値と完全一致なら業務検査より先に200を返し、未知の保存欄や削除済み画像の参照も保持します。変更時は新しい画像参照のUUID形式と自店での存在を確認し、不正形式は422、他店・不明は404です。不変の旧参照は維持できます。ギャラリーは先頭6枚、使えないURLのリンクは除外し、リンクの空白・色・節の順序を管理画面と同じ規則で正規化します。正規化後も同値なら保存しません。公開版と公開日時は変えず、画像一覧や件数は返しません。\n\n409 SETTINGS_OPERATION_BLOCKEDのdetails.blocksはcodeとmessageの1要素配列です。鍵やトークンの持ち主が現在このお店のメンバーでない場合は、同値でも409 SETTINGS_OPERATION_BLOCKED（NOT_CURRENT_MEMBER）です。読取後の保存競合は409 SETTINGS_OPERATION_BLOCKED（CONCURRENT_UPDATE）です。任意の冪等キーを使えます。メールは送りません。\n\n必要な範囲: `guide-page:write`","security":[{"bearer":[]},{"oauth2":["guide-page:write"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"draft":{"type":"object","properties":{"hero_image_id":{"type":["string","null"]},"headline":{"type":"string"},"intro":{"type":"string"},"about":{"type":"string"},"profile":{"type":"object","properties":{"image_id":{"type":["string","null"]},"name":{"type":"string"},"title":{"type":"string"},"bio":{"type":"string"}},"required":["image_id","name","title","bio"],"additionalProperties":false},"links":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"url":{"type":"string"},"visible":{"type":"boolean"}},"required":["id","label","url","visible"],"additionalProperties":false},"maxItems":50},"gallery_image_ids":{"type":"array","items":{"type":"string"}},"colors":{"type":"object","properties":{"preset_id":{"type":["string","null"],"maxLength":32},"primary":{"type":"string","maxLength":32},"secondary":{"type":"string","maxLength":32},"accent":{"type":"string","maxLength":32}},"required":["preset_id","primary","secondary","accent"],"additionalProperties":false},"sections":{"type":"object","properties":{"about":{"type":"boolean"},"profile":{"type":"boolean"},"links":{"type":"boolean"},"gallery":{"type":"boolean"},"testimonials":{"type":"boolean"},"menu":{"type":"boolean"},"events":{"type":"boolean"},"news":{"type":"boolean"},"access":{"type":"boolean"},"contact":{"type":"boolean"}},"required":["about","profile","links","gallery","testimonials","menu","events","news","access","contact"],"additionalProperties":false},"section_order":{"type":"array","items":{"type":"string"}},"seo":{"type":"object","properties":{"title":{"type":["string","null"]},"description":{"type":["string","null"]}},"required":["title","description"],"additionalProperties":false}},"required":["hero_image_id","headline","intro","about","profile","links","gallery_image_ids","colors","sections","section_order","seo"],"additionalProperties":false}},"required":["draft"],"additionalProperties":false}}}},"responses":{"200":{"description":"ご案内ページの下書きを置き換える","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"draft":{"type":"object","properties":{"hero_image_id":{"type":["string","null"]},"headline":{"type":"string"},"intro":{"type":"string"},"about":{"type":"string"},"profile":{"type":"object","properties":{"image_id":{"type":["string","null"]},"name":{"type":"string"},"title":{"type":"string"},"bio":{"type":"string"}},"required":["image_id","name","title","bio"],"additionalProperties":false},"links":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"url":{"type":"string"},"visible":{"type":"boolean"}},"required":["id","label","url","visible"],"additionalProperties":false},"maxItems":50},"gallery_image_ids":{"type":"array","items":{"type":"string"}},"colors":{"type":"object","properties":{"preset_id":{"type":["string","null"],"maxLength":32},"primary":{"type":"string","maxLength":32},"secondary":{"type":"string","maxLength":32},"accent":{"type":"string","maxLength":32}},"required":["preset_id","primary","secondary","accent"],"additionalProperties":false},"sections":{"type":"object","properties":{"about":{"type":"boolean"},"profile":{"type":"boolean"},"links":{"type":"boolean"},"gallery":{"type":"boolean"},"testimonials":{"type":"boolean"},"menu":{"type":"boolean"},"events":{"type":"boolean"},"news":{"type":"boolean"},"access":{"type":"boolean"},"contact":{"type":"boolean"}},"required":["about","profile","links","gallery","testimonials","menu","events","news","access","contact"],"additionalProperties":false},"section_order":{"type":"array","items":{"type":"string"}},"seo":{"type":"object","properties":{"title":{"type":["string","null"]},"description":{"type":["string","null"]}},"required":["title","description"],"additionalProperties":false}},"required":["hero_image_id","headline","intro","about","profile","links","gallery_image_ids","colors","sections","section_order","seo"],"additionalProperties":false}},"required":["draft"]}},"required":["data"]}}}},"400":{"description":"利用できないヘッダ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"鍵が無い・無効","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"範囲不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"見つからない","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"予約・冪等キーの競合","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"本文が1 MiBを超えている","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"入力の検証失敗","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"回数の上限","headers":{"RateLimit-Limit":{"description":"固定窓内の回数上限","schema":{"type":"integer","minimum":1}},"RateLimit-Remaining":{"description":"固定窓内の残り回数","schema":{"type":"integer","minimum":0}},"RateLimit-Reset":{"description":"窓終了までの秒数","schema":{"type":"integer","minimum":0}},"Retry-After":{"description":"再試行までの待機秒数","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"内部エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-goyoka-audience":"tenant","x-goyoka-required-scopes":["guide-page:write"],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"同じ内容の再送に同じ値を使います。異なる内容との再利用や処理中の再送は409 IDEMPOTENCY_KEY_REUSEDです。"}]}},"/api/v1/guide-page/publish":{"post":{"operationId":"guide-page_publish","tags":["guide-page"],"summary":"ご案内ページの下書きを公開する","description":"現在の下書きを管理画面と同じ規則で正規化し、下書きと公開版へ写します。公開ページはすぐに変わります。行が無ければ既定の本文を公開します。正規化した下書きと公開版が同じで既に公開中なら200を返し、公開日時を進めません。画像・予約・埋め込みの許可先は変えません。返すのは公開版と公開日時だけです。文字数・件数の上限を超える下書きは、管理画面の公開と同じく422 VALIDATIONで公開しません（同値の再公開でも検査します）。\n\n409 SETTINGS_OPERATION_BLOCKEDのdetails.blocksはcodeとmessageの1要素配列です。鍵やトークンの持ち主が現在このお店のメンバーでない場合は、同値でも409 SETTINGS_OPERATION_BLOCKED（NOT_CURRENT_MEMBER）です。読取後の保存競合は409 SETTINGS_OPERATION_BLOCKED（CONCURRENT_UPDATE）です。任意の冪等キーを使えます。メールは送りません。\n\n必要な範囲: `guide-page:write`","security":[{"bearer":[]},{"oauth2":["guide-page:write"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"responses":{"200":{"description":"ご案内ページの下書きを公開する","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"published":{"type":["object","null"],"properties":{"hero_image_id":{"type":["string","null"]},"headline":{"type":"string"},"intro":{"type":"string"},"about":{"type":"string"},"profile":{"type":"object","properties":{"image_id":{"type":["string","null"]},"name":{"type":"string"},"title":{"type":"string"},"bio":{"type":"string"}},"required":["image_id","name","title","bio"],"additionalProperties":false},"links":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"url":{"type":"string"},"visible":{"type":"boolean"}},"required":["id","label","url","visible"],"additionalProperties":false},"maxItems":50},"gallery_image_ids":{"type":"array","items":{"type":"string"}},"colors":{"type":"object","properties":{"preset_id":{"type":["string","null"],"maxLength":32},"primary":{"type":"string","maxLength":32},"secondary":{"type":"string","maxLength":32},"accent":{"type":"string","maxLength":32}},"required":["preset_id","primary","secondary","accent"],"additionalProperties":false},"sections":{"type":"object","properties":{"about":{"type":"boolean"},"profile":{"type":"boolean"},"links":{"type":"boolean"},"gallery":{"type":"boolean"},"testimonials":{"type":"boolean"},"menu":{"type":"boolean"},"events":{"type":"boolean"},"news":{"type":"boolean"},"access":{"type":"boolean"},"contact":{"type":"boolean"}},"required":["about","profile","links","gallery","testimonials","menu","events","news","access","contact"],"additionalProperties":false},"section_order":{"type":"array","items":{"type":"string"}},"seo":{"type":"object","properties":{"title":{"type":["string","null"]},"description":{"type":["string","null"]}},"required":["title","description"],"additionalProperties":false}},"required":["hero_image_id","headline","intro","about","profile","links","gallery_image_ids","colors","sections","section_order","seo"],"additionalProperties":false},"published_at":{"type":["string","null"],"format":"date-time"}},"required":["published","published_at"]}},"required":["data"]}}}},"400":{"description":"利用できないヘッダ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"鍵が無い・無効","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"範囲不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"見つからない","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"予約・冪等キーの競合","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"本文が1 MiBを超えている","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"入力の検証失敗","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"回数の上限","headers":{"RateLimit-Limit":{"description":"固定窓内の回数上限","schema":{"type":"integer","minimum":1}},"RateLimit-Remaining":{"description":"固定窓内の残り回数","schema":{"type":"integer","minimum":0}},"RateLimit-Reset":{"description":"窓終了までの秒数","schema":{"type":"integer","minimum":0}},"Retry-After":{"description":"再試行までの待機秒数","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"内部エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-goyoka-audience":"tenant","x-goyoka-required-scopes":["guide-page:write"],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"同じ内容の再送に同じ値を使います。異なる内容との再利用や処理中の再送は409 IDEMPOTENCY_KEY_REUSEDです。"}]}},"/api/v1/guide-page/unpublish":{"post":{"operationId":"guide-page_unpublish","tags":["guide-page"],"summary":"ご案内ページの公開を取り下げる","description":"公開版と公開日時を空にします。通常、お店のページは予約ページへ転送されますが、停止案内が先に出る既存の例外は変わりません。下書き・画像・検索設定・既存予約は残り、予約ウィジェットと埋め込みの許可先は変えません。既に未公開なら200を返し、保存しません。返すのは公開版と公開日時だけです。\n\n409 SETTINGS_OPERATION_BLOCKEDのdetails.blocksはcodeとmessageの1要素配列です。鍵やトークンの持ち主が現在このお店のメンバーでない場合は、同値でも409 SETTINGS_OPERATION_BLOCKED（NOT_CURRENT_MEMBER）です。読取後の保存競合は409 SETTINGS_OPERATION_BLOCKED（CONCURRENT_UPDATE）です。任意の冪等キーを使えます。メールは送りません。\n\n必要な範囲: `guide-page:write`","security":[{"bearer":[]},{"oauth2":["guide-page:write"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"responses":{"200":{"description":"ご案内ページの公開を取り下げる","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"published":{"type":["object","null"],"properties":{"hero_image_id":{"type":["string","null"]},"headline":{"type":"string"},"intro":{"type":"string"},"about":{"type":"string"},"profile":{"type":"object","properties":{"image_id":{"type":["string","null"]},"name":{"type":"string"},"title":{"type":"string"},"bio":{"type":"string"}},"required":["image_id","name","title","bio"],"additionalProperties":false},"links":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"url":{"type":"string"},"visible":{"type":"boolean"}},"required":["id","label","url","visible"],"additionalProperties":false},"maxItems":50},"gallery_image_ids":{"type":"array","items":{"type":"string"}},"colors":{"type":"object","properties":{"preset_id":{"type":["string","null"],"maxLength":32},"primary":{"type":"string","maxLength":32},"secondary":{"type":"string","maxLength":32},"accent":{"type":"string","maxLength":32}},"required":["preset_id","primary","secondary","accent"],"additionalProperties":false},"sections":{"type":"object","properties":{"about":{"type":"boolean"},"profile":{"type":"boolean"},"links":{"type":"boolean"},"gallery":{"type":"boolean"},"testimonials":{"type":"boolean"},"menu":{"type":"boolean"},"events":{"type":"boolean"},"news":{"type":"boolean"},"access":{"type":"boolean"},"contact":{"type":"boolean"}},"required":["about","profile","links","gallery","testimonials","menu","events","news","access","contact"],"additionalProperties":false},"section_order":{"type":"array","items":{"type":"string"}},"seo":{"type":"object","properties":{"title":{"type":["string","null"]},"description":{"type":["string","null"]}},"required":["title","description"],"additionalProperties":false}},"required":["hero_image_id","headline","intro","about","profile","links","gallery_image_ids","colors","sections","section_order","seo"],"additionalProperties":false},"published_at":{"type":["string","null"],"format":"date-time"}},"required":["published","published_at"]}},"required":["data"]}}}},"400":{"description":"利用できないヘッダ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"鍵が無い・無効","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"範囲不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"見つからない","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"予約・冪等キーの競合","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"本文が1 MiBを超えている","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"入力の検証失敗","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"回数の上限","headers":{"RateLimit-Limit":{"description":"固定窓内の回数上限","schema":{"type":"integer","minimum":1}},"RateLimit-Remaining":{"description":"固定窓内の残り回数","schema":{"type":"integer","minimum":0}},"RateLimit-Reset":{"description":"窓終了までの秒数","schema":{"type":"integer","minimum":0}},"Retry-After":{"description":"再試行までの待機秒数","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"内部エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-goyoka-audience":"tenant","x-goyoka-required-scopes":["guide-page:write"],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"同じ内容の再送に同じ値を使います。異なる内容との再利用や処理中の再送は409 IDEMPOTENCY_KEY_REUSEDです。"}]}},"/api/v1/guide-page/settings":{"patch":{"operationId":"guide-page_searchable_update","tags":["guide-page"],"summary":"ご案内ページの検索設定を変える","description":"searchable:falseは公開ページのrobotsをnoindex/nofollowにし、trueは通常のmetadataへ戻します。閲覧を禁止する機能ではなく、検索結果やSNSカードの即時削除も保証しません。下書き・公開版・公開日時・予約・埋め込みは変えません。省略または同値なら200を返し、保存しません。画像一覧や件数は返しません。\n\n409 SETTINGS_OPERATION_BLOCKEDのdetails.blocksはcodeとmessageの1要素配列です。鍵やトークンの持ち主が現在このお店のメンバーでない場合は、同値でも409 SETTINGS_OPERATION_BLOCKED（NOT_CURRENT_MEMBER）です。読取後の保存競合は409 SETTINGS_OPERATION_BLOCKED（CONCURRENT_UPDATE）です。任意の冪等キーを使えます。メールは送りません。\n\n必要な範囲: `guide-page:write`","security":[{"bearer":[]},{"oauth2":["guide-page:write"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"searchable":{"type":"boolean"}},"additionalProperties":false}}}},"responses":{"200":{"description":"ご案内ページの検索設定を変える","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"searchable":{"type":"boolean"}},"required":["searchable"]}},"required":["data"]}}}},"400":{"description":"利用できないヘッダ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"鍵が無い・無効","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"範囲不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"見つからない","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"予約・冪等キーの競合","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"本文が1 MiBを超えている","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"入力の検証失敗","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"回数の上限","headers":{"RateLimit-Limit":{"description":"固定窓内の回数上限","schema":{"type":"integer","minimum":1}},"RateLimit-Remaining":{"description":"固定窓内の残り回数","schema":{"type":"integer","minimum":0}},"RateLimit-Reset":{"description":"窓終了までの秒数","schema":{"type":"integer","minimum":0}},"Retry-After":{"description":"再試行までの待機秒数","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"内部エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-goyoka-audience":"tenant","x-goyoka-required-scopes":["guide-page:write"],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"同じ内容の再送に同じ値を使います。異なる内容との再利用や処理中の再送は409 IDEMPOTENCY_KEY_REUSEDです。"}]}},"/api/v1/guide-page/images/{imageId}":{"delete":{"operationId":"guide-page_images_delete","tags":["guide-page"],"summary":"ご案内ページの画像を削除する","description":"自店の画像を行・元画像・表示用画像ごと削除します。他店・不明の画像は同じ404です。下書きや公開版から参照中でも削除でき、本文内の参照IDは残ります。本文の編集や再公開をしなくても、次の描画で公開画像が消えます。DB削除後に画像storeで失敗した場合は500となり、画像の実体が残る場合があります。キーなしの再送は404、同じ冪等キーの成功再送は200を再生します。返すのはidとdeletedだけで、画像一覧や件数は返しません。\n\n409 SETTINGS_OPERATION_BLOCKEDのdetails.blocksはcodeとmessageの1要素配列です。\n\n画像の追加は管理画面で行ってください。鍵やトークンの持ち主が現在このお店のメンバーでない場合は、同値でも409 SETTINGS_OPERATION_BLOCKED（NOT_CURRENT_MEMBER）です。読取後の保存競合は409 SETTINGS_OPERATION_BLOCKED（CONCURRENT_UPDATE）です。任意の冪等キーを使えます。メールは送りません。\n\n必要な範囲: `guide-page:write`","security":[{"bearer":[]},{"oauth2":["guide-page:write"]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"imageId","in":"path"},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"同じ内容の再送に同じ値を使います。異なる内容との再利用や処理中の再送は409 IDEMPOTENCY_KEY_REUSEDです。"}],"responses":{"200":{"description":"ご案内ページの画像を削除する","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"deleted":{"type":"boolean","enum":[true]}},"required":["id","deleted"]}},"required":["data"]}}}},"400":{"description":"利用できないヘッダ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"鍵が無い・無効","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"範囲不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"見つからない","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"予約・冪等キーの競合","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"本文が1 MiBを超えている","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"入力の検証失敗","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"回数の上限","headers":{"RateLimit-Limit":{"description":"固定窓内の回数上限","schema":{"type":"integer","minimum":1}},"RateLimit-Remaining":{"description":"固定窓内の残り回数","schema":{"type":"integer","minimum":0}},"RateLimit-Reset":{"description":"窓終了までの秒数","schema":{"type":"integer","minimum":0}},"Retry-After":{"description":"再試行までの待機秒数","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"内部エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-goyoka-audience":"tenant","x-goyoka-required-scopes":["guide-page:write"]}},"/api/v1/facilities":{"get":{"operationId":"facilities_list","tags":["facilities"],"summary":"設備の一覧","description":"設備の種類と、その設備（部屋・ベッドなど）の一覧です。メニューの facility_type_id で使います。\n\n必要な範囲: `services:read`","security":[{"bearer":[]},{"oauth2":["services:read"]}],"responses":{"200":{"description":"設備の一覧","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Facility"}}},"required":["data"]}}}},"400":{"description":"利用できないヘッダ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"鍵が無い・無効","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"範囲不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"見つからない","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"予約・冪等キーの競合","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"本文が1 MiBを超えている","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"入力の検証失敗","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"回数の上限","headers":{"RateLimit-Limit":{"description":"固定窓内の回数上限","schema":{"type":"integer","minimum":1}},"RateLimit-Remaining":{"description":"固定窓内の残り回数","schema":{"type":"integer","minimum":0}},"RateLimit-Reset":{"description":"窓終了までの秒数","schema":{"type":"integer","minimum":0}},"Retry-After":{"description":"再試行までの待機秒数","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"内部エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-goyoka-audience":"tenant","x-goyoka-required-scopes":["services:read"]},"post":{"operationId":"facilities_create","tags":["facilities"],"summary":"設備の種類を追加する","description":"名前と数を指定すると、その数の設備を作ります。メニューの facility_type_id で使えます。\n\n必要な範囲: `services:write`","security":[{"bearer":[]},{"oauth2":["services:write"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":60},"count":{"type":"integer","minimum":1,"maximum":50}},"required":["name","count"],"additionalProperties":false}}}},"responses":{"201":{"description":"設備の種類を追加する","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Facility"}},"required":["data"]}}}},"400":{"description":"利用できないヘッダ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"鍵が無い・無効","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"範囲不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"見つからない","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"予約・冪等キーの競合","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"本文が1 MiBを超えている","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"入力の検証失敗","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"回数の上限","headers":{"RateLimit-Limit":{"description":"固定窓内の回数上限","schema":{"type":"integer","minimum":1}},"RateLimit-Remaining":{"description":"固定窓内の残り回数","schema":{"type":"integer","minimum":0}},"RateLimit-Reset":{"description":"窓終了までの秒数","schema":{"type":"integer","minimum":0}},"Retry-After":{"description":"再試行までの待機秒数","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"内部エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-goyoka-audience":"tenant","x-goyoka-required-scopes":["services:write"],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"同じ内容の再送に同じ値を使います。異なる内容との再利用や処理中の再送は409 IDEMPOTENCY_KEY_REUSEDです。"}]}},"/api/v1/facilities/{id}":{"patch":{"operationId":"facilities_update","tags":["facilities"],"summary":"設備の名前と並びを変える","description":"名前・設備の配列は省略できます。設備の配列を指定した場合は全置換し、含めなかった設備を外します。先の予約がある設備は外せません。\n\n必要な範囲: `services:write`","security":[{"bearer":[]},{"oauth2":["services:write"]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"同じ内容の再送に同じ値を使います。異なる内容との再利用や処理中の再送は409 IDEMPOTENCY_KEY_REUSEDです。"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":60},"units":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string","minLength":1,"maxLength":60}},"required":["name"],"additionalProperties":false},"minItems":1,"maxItems":50}},"additionalProperties":false}}}},"responses":{"200":{"description":"設備の名前と並びを変える","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Facility"}},"required":["data"]}}}},"400":{"description":"利用できないヘッダ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"鍵が無い・無効","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"範囲不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"見つからない","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"予約・冪等キーの競合","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"本文が1 MiBを超えている","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"入力の検証失敗","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"回数の上限","headers":{"RateLimit-Limit":{"description":"固定窓内の回数上限","schema":{"type":"integer","minimum":1}},"RateLimit-Remaining":{"description":"固定窓内の残り回数","schema":{"type":"integer","minimum":0}},"RateLimit-Reset":{"description":"窓終了までの秒数","schema":{"type":"integer","minimum":0}},"Retry-After":{"description":"再試行までの待機秒数","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"内部エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-goyoka-audience":"tenant","x-goyoka-required-scopes":["services:write"]}},"/api/v1/facilities/{id}/archive":{"post":{"operationId":"facilities_archive","tags":["facilities"],"summary":"設備の種類をしまう","description":"メニューや先の予約が使っている種類はしまえません。しまった種類は一覧に出ません。\n\n必要な範囲: `services:write`","security":[{"bearer":[]},{"oauth2":["services:write"]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"同じ内容の再送に同じ値を使います。異なる内容との再利用や処理中の再送は409 IDEMPOTENCY_KEY_REUSEDです。"}],"responses":{"200":{"description":"設備の種類をしまう","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Facility"}},"required":["data"]}}}},"400":{"description":"利用できないヘッダ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"鍵が無い・無効","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"範囲不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"見つからない","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"予約・冪等キーの競合","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"本文が1 MiBを超えている","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"入力の検証失敗","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"回数の上限","headers":{"RateLimit-Limit":{"description":"固定窓内の回数上限","schema":{"type":"integer","minimum":1}},"RateLimit-Remaining":{"description":"固定窓内の残り回数","schema":{"type":"integer","minimum":0}},"RateLimit-Reset":{"description":"窓終了までの秒数","schema":{"type":"integer","minimum":0}},"Retry-After":{"description":"再試行までの待機秒数","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"内部エラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-goyoka-audience":"tenant","x-goyoka-required-scopes":["services:write"]}}},"webhooks":{}}