{"openapi":"3.0.3","info":{"title":"Loku read API subset","version":"2026-11-07.read.2","description":"SDK対応の読取9操作の仕様。SDKは試験版で正式配布・実API受入は未完了です。対象環境の有効化・主体・権限は別途確認してください。"},"servers":[{"url":"https://l.oku-ai.co.jp/api/v1"}],"x-loku-integration":{"apiVersion":"v1","sdkVersion":"0.2.0","contractVersion":"2026-11-07.read.2","updatedAt":"2026-11-07","distribution":"local_preview","verifiedRelease":null,"environmentVerification":"not_performed"},"paths":{"/friends":{"get":{"x-loku-scopes-any-of":["friends:read"],"x-loku-credential-profiles":["tenant_api_key","app_operator"],"x-loku-effect":"read","operationId":"listFriends","summary":"店舗の顧客一覧を取得","description":"推奨入力は正の整数page/limit。サーバーはpage/limitを数値化・clampしますが整数検査や不正queryの400を保証しません。未知statusは無視されます。SDKはより厳格に入力を検査します。","security":[{"tenantApiKey":[]},{"appOperator":[]}],"parameters":[{"name":"page","in":"query","schema":{"type":"integer","minimum":1,"default":1}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":20}},{"name":"search","in":"query","description":"表示名の部分一致。","schema":{"type":"string"}},{"name":"status","in":"query","schema":{"type":"string","enum":["following","blocked","unfollowed"]}}],"responses":{"200":{"description":"顧客とpagination。SDKは顧客のid/displayName/statusのみを公開します。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FriendsPage"}}}},"401":{"description":"認証不可。失効/期限/店舗/プラン/導入/ゲート等を確認します。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"必要scopeまたは主体が許可されていません。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"呼出を制限しました。Retry-Afterは保証しません。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"default":{"description":"その他の失敗。JSON bodyを保証しません。生bodyをログへ出さないでください。"}}}},"/tags":{"get":{"x-loku-scopes-any-of":["tags:read"],"x-loku-credential-profiles":["tenant_api_key","app_operator"],"x-loku-effect":"read","operationId":"listTags","summary":"店舗のタグ一覧を取得","description":"offset方式。hasMore=trueならoffsetに返却limitを加えて次を取得します。順序は保証されません。RESTは数値化・上限処理をしますが、負のlimitや小数等の入力検査・400を保証しません。SDKはより厳格に検査します。","security":[{"tenantApiKey":[]},{"appOperator":[]}],"parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":500,"default":100}},{"name":"offset","in":"query","schema":{"type":"integer","minimum":0,"default":0}}],"responses":{"200":{"description":"タグとoffset方式の取得状況。paginationオブジェクトはありません。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TagsPage"}}}},"401":{"description":"認証不可。失効/期限/店舗/プラン/導入/ゲート等を確認します。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"必要scopeまたは主体が許可されていません。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"呼出を制限しました。Retry-Afterは保証しません。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"default":{"description":"その他の失敗。JSON bodyを保証しません。生bodyをログへ出さないでください。"}}}},"/reservations":{"get":{"x-loku-scopes-any-of":["reservations:read"],"x-loku-credential-profiles":["tenant_api_key","app_operator"],"x-loku-effect":"read","operationId":"listReservations","summary":"店舗の予約一覧を取得","description":"id降順のcursor方式。次回はnext_cursorをstarting_afterに指定します。予約のfieldと取得状況はsnake_caseです。日付はRESTではYYYY-MM-DDの形式を検査し、実在日までの検証は保証しません。","security":[{"tenantApiKey":[]},{"appOperator":[]}],"parameters":[{"name":"friendId","in":"query","schema":{"type":"string","minLength":26,"maxLength":26,"description":"26文字のID。RESTは長さを検証します。"}},{"name":"eventId","in":"query","schema":{"type":"string","minLength":26,"maxLength":26,"description":"26文字のID。RESTは長さを検証します。"}},{"name":"status","in":"query","schema":{"type":"string","enum":["pending","confirmed","canceled","no_show","completed","cancel_requested"]}},{"name":"from","in":"query","description":"予約日の開始。to以下。","schema":{"type":"string","format":"date"}},{"name":"to","in":"query","description":"予約日の終了。from以上。","schema":{"type":"string","format":"date"}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":50}},{"name":"starting_after","in":"query","schema":{"type":"string","minLength":26,"maxLength":26,"description":"26文字のID。RESTは長さを検証します。"}}],"responses":{"200":{"description":"予約とcursor。単体と同じ予約shapeです。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReservationsPage"}}}},"400":{"description":"絞込ID・status・日付形式/順序・limit・cursorが不正。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"認証不可。失効/期限/店舗/プラン/導入/ゲート等を確認します。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"必要scopeまたは主体が許可されていません。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"呼出を制限しました。Retry-Afterは保証しません。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"default":{"description":"その他の失敗。JSON bodyを保証しません。生bodyをログへ出さないでください。"}}}},"/reservations/{id}":{"get":{"x-loku-scopes-any-of":["reservations:read"],"x-loku-credential-profiles":["tenant_api_key","app_operator"],"x-loku-effect":"read","operationId":"getReservation","summary":"店舗の予約1件を取得","description":"data wrapperを持たない予約オブジェクトを返します。他の店舗のIDも404です。","security":[{"tenantApiKey":[]},{"appOperator":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":26,"maxLength":26,"description":"26文字のID。RESTは長さを検証します。"}}],"responses":{"200":{"description":"予約オブジェクト。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Reservation"}}}},"400":{"description":"idが26文字ではありません。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"認証不可。失効/期限/店舗/プラン/導入/ゲート等を確認します。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"必要scopeまたは主体が許可されていません。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"対象店舗で予約が見つかりません。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"呼出を制限しました。Retry-Afterは保証しません。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"default":{"description":"その他の失敗。JSON bodyを保証しません。生bodyをログへ出さないでください。"}}}},"/reservation_events":{"get":{"x-loku-scopes-any-of":["reservations:read"],"x-loku-credential-profiles":["tenant_api_key","app_operator"],"x-loku-effect":"read","operationId":"listReservationEvents","summary":"有効な予約イベント定義を取得","description":"activeのみ、作成日時降順。ページングはありません。予約履歴やWebhook配信履歴ではありません。","security":[{"tenantApiKey":[]},{"appOperator":[]}],"parameters":[],"responses":{"200":{"description":"予約イベント定義の配列。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReservationEvents"}}}},"401":{"description":"認証不可。失効/期限/店舗/プラン/導入/ゲート等を確認します。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"必要scopeまたは主体が許可されていません。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"呼出を制限しました。Retry-Afterは保証しません。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"default":{"description":"その他の失敗。JSON bodyを保証しません。生bodyをログへ出さないでください。"}}}},"/reservation_slots":{"get":{"x-loku-scopes-any-of":["reservations:read"],"x-loku-credential-profiles":["tenant_api_key","app_operator"],"x-loku-effect":"read","operationId":"listReservationSlots","summary":"予約イベントの日付範囲の枠を取得","description":"有効な枠を日付/開始時刻昇順に最大500件返します。続きのcursor/hasMoreはなく、500件未満でも予約可能性を保証しません。空き数だけを絞り、イベントstatus・予約締切・最長予約期間等の予約受付条件は評価しません。日付範囲を絞って利用してください。","security":[{"tenantApiKey":[]},{"appOperator":[]}],"parameters":[{"name":"eventId","in":"query","required":true,"schema":{"type":"string","minLength":26,"maxLength":26,"description":"26文字のID。RESTは長さを検証します。"}},{"name":"from","in":"query","description":"未指定は今日（JST）。","schema":{"type":"string","format":"date"}},{"name":"to","in":"query","description":"未指定はfromの30日後。from以上。","schema":{"type":"string","format":"date"}},{"name":"availableOnly","in":"query","description":"falseだけが空き数による絞込を解除します。無効枠は常に除外。","schema":{"type":"boolean","default":true}}],"responses":{"200":{"description":"枠と適用日付範囲、イベントの既定定員。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReservationSlots"}}}},"400":{"description":"eventId・日付形式/順序が不正。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"認証不可。失効/期限/店舗/プラン/導入/ゲート等を確認します。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"必要scopeまたは主体が許可されていません。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"対象店舗でイベントが見つかりません。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"呼出を制限しました。Retry-Afterは保証しません。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"default":{"description":"その他の失敗。JSON bodyを保証しません。生bodyをログへ出さないでください。"}}}},"/memberships":{"get":{"x-loku-scopes-any-of":["memberships:read"],"x-loku-credential-profiles":["tenant_api_key","app_operator"],"x-loku-effect":"read","operationId":"listMemberships","summary":"店舗の会員スナップショットを取得","description":"店舗APIキーまたはowner/system installation token専用。更新日時/id降順のpage方式で総件数は返しません。pageは最大10000へclampされます。上限時のnextPageを追い続けず停止してください。同時更新下で全件の一貫したスナップショットを保証しません。利用資格はsubscriptionActiveを使います。","security":[{"tenantApiKey":[]},{"appOperator":[]}],"parameters":[{"name":"page","in":"query","schema":{"type":"integer","minimum":1,"maximum":10000,"default":1}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":20}}],"responses":{"200":{"description":"会員とpagination。nextPageはhasMore時にpage+1、それ以外null。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MembershipsPage"}}}},"400":{"description":"page/limitが正の整数表記ではありません。上限超過はclampします。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"認証不可。失効/期限/店舗/プラン/導入/ゲート等を確認します。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"必要scopeまたは主体が許可されていません。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"呼出を制限しました。Retry-Afterは保証しません。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"default":{"description":"その他の失敗。JSON bodyを保証しません。生bodyをログへ出さないでください。"}}}},"/memberships/lookup":{"post":{"x-loku-scopes-any-of":["memberships:read"],"x-loku-credential-profiles":["tenant_api_key","app_operator"],"x-loku-effect":"read","operationId":"lookupMembership","summary":"店舗側から確認済みLINE IDの会員資格を照会","description":"読み取り専用POST。同じLINE providerのIDが必要です。未登録は200のfalse/nullで返します。","security":[{"tenantApiKey":[]},{"appOperator":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MembershipLookupInput"}}}},"responses":{"200":{"description":"正本の会員資格","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MembershipLookup"}}}},"400":{"description":"JSONまたは入力が不正。detailsは可変の検証情報。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"認証不可。失効/期限/店舗/プラン/導入/ゲート等を確認します。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"必要scopeまたは主体が許可されていません。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"呼出を制限しました。Retry-Afterは保証しません。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"default":{"description":"その他の失敗。JSON bodyを保証しません。生bodyをログへ出さないでください。"}}}},"/me/membership":{"get":{"x-loku-scopes-any-of":["memberships:read"],"x-loku-credential-profiles":["app_member"],"x-loku-effect":"read","operationId":"getMyMembership","summary":"tokenに束縛された会員本人の資格を照会","description":"対象者IDを受け取りません。店舗APIキー・運営用tokenでは利用できません。","security":[{"appMember":[]}],"parameters":[],"responses":{"200":{"description":"本人の会員資格。未登録はfalse/null。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MembershipEligibility"}}}},"401":{"description":"認証不可。失効/期限/店舗/プラン/導入/ゲート等を確認します。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"必要scopeまたは主体が許可されていません。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"呼出を制限しました。Retry-Afterは保証しません。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"default":{"description":"その他の失敗。JSON bodyを保証しません。生bodyをログへ出さないでください。"}}}}},"components":{"securitySchemes":{"tenantApiKey":{"type":"http","scheme":"bearer","description":"店舗APIキー。店舗/アカウント状態・実効planのapiAccess等を検査。scopeはx-loku-scopes-any-of参照。"},"appOperator":{"type":"http","scheme":"bearer","description":"owner/system installation token。導入/version同意/世代/失効/runtime等を検査。更新grantはこの仕様に含めません。"},"appMember":{"type":"http","scheme":"bearer","description":"本人に束縛されたmember installation token。発行scopeはmemberships:read。credentialProfileの自己申告だけでは認可されません。"}},"schemas":{"Tag":{"type":"object","required":["id","name","color","createdAt"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"color":{"type":"string"},"createdAt":{"type":"string","description":"ISO 8601 date-time"}}},"TagsPage":{"type":"object","required":["data","hasMore","limit","offset"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Tag"}},"hasMore":{"type":"boolean"},"limit":{"type":"number"},"offset":{"type":"number"}}},"Reservation":{"type":"object","required":["id","event_id","slot_id","friend_id","status","payment_status","reservation_date","start_time","end_time","number_of_guests","staff_id","note","canceled_at","created_at"],"properties":{"id":{"type":"string"},"event_id":{"type":"string"},"slot_id":{"type":"string","nullable":true},"friend_id":{"type":"string","nullable":true},"status":{"type":"string","enum":["pending","confirmed","canceled","no_show","completed","cancel_requested"]},"payment_status":{"type":"string"},"reservation_date":{"type":"string","format":"date"},"start_time":{"type":"string"},"end_time":{"type":"string"},"number_of_guests":{"type":"integer"},"staff_id":{"type":"string","nullable":true},"note":{"type":"string","nullable":true},"canceled_at":{"type":"string","description":"ISO 8601 date-time","nullable":true},"created_at":{"type":"string","description":"ISO 8601 date-time"}}},"ReservationsPage":{"type":"object","required":["object","data","has_more","next_cursor"],"properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/Reservation"}},"has_more":{"type":"boolean"},"next_cursor":{"type":"string","nullable":true}}},"ReservationEvent":{"type":"object","required":["id","name","description","duration","price","maxCapacity","minNotice","bookingCutoff","maxAdvance","color","status"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"duration":{"type":"integer","description":"所要時間（分）。"},"price":{"type":"integer","nullable":true},"maxCapacity":{"type":"integer"},"minNotice":{"type":"integer","description":"最短予約可能時間（分）。予約可否はサーバーの判定に従います。"},"bookingCutoff":{"type":"object","nullable":true,"properties":{"daysBefore":{"type":"integer"},"time":{"type":"string"}},"additionalProperties":true},"maxAdvance":{"type":"integer","description":"最大予約可能日数（日）。予約可否はサーバーの判定に従います。"},"color":{"type":"string"},"status":{"type":"string","enum":["active"]}}},"ReservationEvents":{"type":"object","required":["data"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ReservationEvent"}}}},"ReservationSlot":{"type":"object","required":["id","eventId","date","startTime","endTime","maxCapacity","bookedCount"],"properties":{"id":{"type":"string"},"eventId":{"type":"string"},"date":{"type":"string","format":"date"},"startTime":{"type":"string"},"endTime":{"type":"string"},"maxCapacity":{"type":"integer","nullable":true},"bookedCount":{"type":"integer"}}},"ReservationSlots":{"type":"object","required":["data","range","eventMaxCapacity"],"properties":{"data":{"type":"array","maxItems":500,"items":{"$ref":"#/components/schemas/ReservationSlot"}},"range":{"type":"object","required":["from","to"],"properties":{"from":{"type":"string","format":"date"},"to":{"type":"string","format":"date"}}},"eventMaxCapacity":{"type":"integer"}}},"MembershipSnapshot":{"type":"object","required":["id","memberNumber","friendId","memberUserId","tierId","tier","totalPoints","currentPoints","visitCount","totalSpent","subscriptionStatus","subscriptionActive","registrationPaidAt","joinedAt","expiresAt","updatedAt","friend"],"properties":{"id":{"type":"string"},"memberNumber":{"type":"string"},"friendId":{"type":"string","nullable":true},"memberUserId":{"type":"string","nullable":true},"tierId":{"type":"string","nullable":true},"tier":{"type":"object","nullable":true,"required":["id","name","sortOrder"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"sortOrder":{"type":"integer"}}},"totalPoints":{"type":"integer"},"currentPoints":{"type":"integer"},"visitCount":{"type":"integer"},"totalSpent":{"type":"integer"},"subscriptionStatus":{"type":"string","nullable":true},"subscriptionActive":{"type":"boolean"},"registrationPaidAt":{"type":"string","description":"ISO 8601 date-time","nullable":true},"joinedAt":{"type":"string","description":"ISO 8601 date-time"},"expiresAt":{"type":"string","description":"ISO 8601 date-time","nullable":true},"updatedAt":{"type":"string","description":"ISO 8601 date-time"},"friend":{"type":"object","nullable":true,"required":["id","lineUserId","displayName","pictureUrl","status"],"properties":{"id":{"type":"string"},"lineUserId":{"type":"string"},"displayName":{"type":"string","nullable":true},"pictureUrl":{"type":"string","nullable":true},"status":{"type":"string","enum":["following","blocked","unfollowed"]}}}}},"MembershipsPage":{"type":"object","required":["data","pagination"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/MembershipSnapshot"}},"pagination":{"type":"object","required":["page","limit","hasMore","nextPage"],"properties":{"page":{"type":"integer","minimum":1,"maximum":10000},"limit":{"type":"integer","minimum":1,"maximum":100},"hasMore":{"type":"boolean"},"nextPage":{"type":"integer","minimum":2,"nullable":true}}}}},"FriendsPage":{"type":"object","required":["data","pagination"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Friend"}},"pagination":{"type":"object","required":["page","limit","total","totalPages"],"properties":{"page":{"type":"number"},"limit":{"type":"number"},"total":{"type":"integer","minimum":0},"totalPages":{"type":"integer","minimum":0}}}}},"Friend":{"type":"object","required":["id","lineUserId","displayName","pictureUrl","status","score","followedAt","lastMessageAt","messageCount","createdAt"],"properties":{"id":{"type":"string"},"lineUserId":{"type":"string"},"displayName":{"type":"string","nullable":true},"pictureUrl":{"type":"string","nullable":true},"status":{"type":"string","enum":["following","blocked","unfollowed"]},"score":{"type":"integer"},"followedAt":{"type":"string","description":"ISO 8601 date-time","nullable":true},"lastMessageAt":{"type":"string","description":"ISO 8601 date-time","nullable":true},"messageCount":{"type":"integer"},"createdAt":{"type":"string","description":"ISO 8601 date-time"}}},"MembershipEligibility":{"type":"object","required":["isMember","subscriptionActive","tierId","memberSince"],"properties":{"isMember":{"type":"boolean","description":"会員レコードの存在。これだけでは利用資格を示しません。"},"subscriptionActive":{"type":"boolean","description":"サーバーが判定した利用資格の正本。"},"tierId":{"type":"string","nullable":true},"memberSince":{"type":"string","description":"ISO 8601 date-time","nullable":true}}},"MembershipLookup":{"type":"object","required":["lineUserId","isMember","subscriptionActive","tierId","memberSince"],"properties":{"lineUserId":{"type":"string"},"isMember":{"type":"boolean","description":"会員レコードの存在。これだけでは利用資格を示しません。"},"subscriptionActive":{"type":"boolean","description":"サーバーが判定した利用資格の正本。"},"tierId":{"type":"string","nullable":true},"memberSince":{"type":"string","description":"ISO 8601 date-time","nullable":true}}},"MembershipLookupInput":{"type":"object","required":["lineUserId"],"description":"lineUserIdはtrim後1〜100文字。追加fieldはサーバーが除去します。","properties":{"lineUserId":{"type":"string","description":"前後空白除去後の長さが1〜100文字。"}},"additionalProperties":true},"ApiError":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"details":{"type":"array","items":{"type":"object","additionalProperties":true}}},"additionalProperties":true}}}}