認証
APIはBearer JWTトークンを使用します。検索・閲覧ツールは認証不要です。予約・管理ツールには有効なトークンが必要です。
トークンの取得
guest_login(メールのみ、即時)またはlogin(メール+パスワード)を使用してJWTトークンを取得します。
トークンの使用
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9...
ツールの分類
| パブリック(認証なし) | 認証済み(Bearer token) |
|---|---|
| search_location, hotel_search, get_search_results, get_hotel_rooms, get_hotel_details, check_cancellation_policy, login, guest_login | prepare_booking, confirm_booking, create_checkout, get_payment_url, list_bookings, get_booking_details, cancel_booking |
ベースURL&トランスポート
すべてのエンドポイントはhttps://locktrip.com/mcp/から提供されます。3つのトランスポートモードに対応しています:
| トランスポート | メソッド | エンドポイント |
|---|---|---|
| REST | POST | https://locktrip.com/mcp/tools/{tool_name} |
| JSON-RPC 2.0 | POST | https://locktrip.com/mcp/rpc |
| SSE | GET | https://locktrip.com/mcp/sse |
ディスカバリーエンドポイント
| URL | 説明 |
|---|---|
| GET /mcp/openapi.json | OpenAPI 3.1仕様 |
| GET /mcp/tools | スキーマ付きの全ツール一覧 |
| GET /mcp/discovery | MCPディスカバリードキュメント |
すべてのPOSTリクエストにContent-Type: application/jsonを使用してください。
エラー処理
RESTエラー
| ステータス | 意味 |
|---|---|
| 200 | 成功 |
| 400 | バリデーションエラー(不正な入力) |
| 401 | Bearer tokenが見つからないか無効です |
| 404 | 不明なツール名 |
| 429 | レート制限超過 |
JSON-RPCエラー
{
"jsonrpc": "2.0",
"id": 1,
"error": {
"code": -32001,
"message": "Authentication required for this tool.",
"data": {
"loginUrl": "https://users.locktrip.com/api/auth/login",
"signupTool": "guest_login"
}
}
}| コード | 意味 |
|---|---|
| -32600 | 無効なJSON-RPCリクエスト |
| -32601 | 不明なツール / メソッドが見つかりません |
| -32001 | 認証が必要またはトークンが無効です |
| -32007 | レート制限超過 |
| -32603 | 内部サーバーエラー |
レート制限
IP単位(匿名)またはユーザーID単位(認証済み)のスライディングウィンドウ方式のレート制限。制限超過時はHTTP 429またはJSON-RPCエラーコード-32007が返されます。
| ツール | 匿名 | 認証済み |
|---|---|---|
| hotel_search | 5/ 分 | 20/ 分 |
| その他すべてのツール | 30/ 分 | 120/ 分 |
ツールリファレンス
推奨ワークフロー順に並べた15のツール。
search_location
パブリックロケーション(都市、地域、ホテル)を検索してホテル検索用のIDを取得します。タイプとフルネーム付きのマッチするロケーションを返します。
リクエスト
| フィールド | 型 | 必須 | 説明 |
|---|---|---|---|
| query | string | Yes | Search query (city name, region, or hotel name) |
| language | string | No | Language code (default: "en") |
レスポンス
| フィールド | 型 | 説明 | |
|---|---|---|---|
| locations | Location[] | Array of matching locations | |
| locations[].id | string | Location ID (use as regionId in hotel_search) | |
| locations[].name | string | Location name | |
| locations[].type | string | Location type (e.g., "CITY") | |
| locations[].fullName | string | Full location name with country | |
| locations[].country | string | Country name | |
| totalCount | number | Total number of matches returned |
例
curl -X POST https://locktrip.com/mcp/tools/search_location \
-H "Content-Type: application/json" \
-d '{"query": "Paris"}'
# Response (200 OK):
{
"locations": [
{
"id": "5f078e431fd614748f9037f9",
"name": "Paris, France",
"country": "",
"type": "CITY",
"fullName": "Paris, France"
},
{
"id": "5f080b92b8f3040a9045c3e8",
"name": "Disneyland Paris, Boulevard de Parc, Coupvray, France",
"country": "",
"type": "CITY",
"fullName": "Disneyland Paris, Boulevard de Parc, Coupvray, France"
}
],
"totalCount": 10
}hotel_search
パブリックホテル検索を開始します。search_locationからのregionIdまたは緯度/経度の座標を指定します。get_search_resultsでポーリングするためのsearchKeyを返します。検索は非同期で実行されます。
リクエスト
| フィールド | 型 | 必須 | 説明 |
|---|---|---|---|
| regionId | string | No | Location ID from search_location. Required unless lat/lng provided. |
| startDate | string | Yes | Check-in date (YYYY-MM-DD) |
| endDate | string | Yes | Check-out date (YYYY-MM-DD) |
| currency | string | No | Currency code (default: "USD") |
| rooms | Room[] | Yes | Room configurations |
| rooms[].adults | number | Yes | Number of adults (1-4) |
| rooms[].childrenAges | number[] | No | Ages of children (0-17) |
| nationality | string | Yes | 2-letter country code (e.g., US, GB) |
| latitude | number | No | Latitude (-90 to 90). Use with longitude instead of regionId. |
| longitude | number | No | Longitude (-180 to 180). Use with latitude instead of regionId. |
| radiusInMeters | number | No | Search radius in meters (default: 30000, max: 100000). Only with lat/lng. |
レスポンス
| フィールド | 型 | 説明 | |
|---|---|---|---|
| searchKey | string | Key to poll results with get_search_results | |
| sessionId | string | Internal session identifier | |
| status | string | Search status (e.g., "IN_PROGRESS") |
例
curl -X POST https://locktrip.com/mcp/tools/hotel_search \
-H "Content-Type: application/json" \
-d '{
"regionId": "5f078e431fd614748f9037f9",
"startDate": "2026-04-15",
"endDate": "2026-04-17",
"currency": "EUR",
"rooms": [{"adults": 2}],
"nationality": "US"
}'
# Response (200 OK):
{
"searchKey": "47de06e3262ea3822bdc384a04470783",
"sessionId": "/280/137970/D20260228T093158/4fcf789dd1294b4194cdb2c263bdf264",
"status": "IN_PROGRESS"
}get_search_results
パブリックページ分割されたホテル検索結果を取得します。searchStatusが"COMPLETED"になるまでポーリングします。価格、星評価、アメニティ、食事タイプによるフィルタリングに対応。価格、評価、距離でのソートが可能です。
料金インテリジェンス
各ホテル結果にはdiscountScoreが含まれます。これはLockTrip独自の機械学習スコアで、他の旅行サイトと比較してどれだけ安いかを計算します。V8 MLモデルは複数のホテルサプライヤーからのリアルタイム料金データを分析して節約額を予測します。minPrice(LockTripの価格)とoriginalPrice(競合サイトでの最新の最安値)をdiscountScoreと組み合わせて、ユーザーに最良のお得情報を提示しましょう。
リクエスト
| フィールド | 型 | 必須 | 説明 |
|---|---|---|---|
| searchKey | string | Yes | Search key from hotel_search |
| page | number | No | Page number, 0-indexed (default: 0) |
| size | number | No | Results per page (default: 100, max: 5000) |
| currency | string | No | Currency code from hotel_search |
| sortBy | string | No | PRICE_ASC, PRICE_DESC, RATING_DESC, or DISTANCE |
| filters | object | No | Optional filters (see below) |
| filters.minPrice | number | No | Minimum price |
| filters.maxPrice | number | No | Maximum price |
| filters.starRatings | number[] | No | Star ratings to include (1-5) |
| filters.amenities | string[] | No | Required amenities |
| filters.mealTypes | string[] | No | Required meal types |
| filters.hotelName | string | No | Hotel name search |
レスポンス
| フィールド | 型 | 説明 | |
|---|---|---|---|
| hotels | Hotel[] | Array of matching hotels | |
| hotels[].hotelId | string | Hotel ID (use in get_hotel_rooms, get_hotel_details) | |
| hotels[].name | string | Hotel name | |
| hotels[].starRating | number | Star rating (1-5) | |
| hotels[].address | string | Street address | |
| hotels[].latitude | number | Latitude coordinate | |
| hotels[].longitude | number | Longitude coordinate | |
| hotels[].images | string[] | Hotel image URLs | |
| hotels[].amenities | string[] | Available amenities | |
| hotels[].minPrice | number | LockTrip's price for this hotel (lowest available rate) | |
| hotels[].originalPrice | number | Last best price found on competing travel websites (e.g. Booking.com, Expedia). When equal to minPrice, no discount was detected. | |
| hotels[].currency | string | Price currency code | |
| hotels[].discountScore | number | LockTrip's proprietary machine learning score (0-10) indicating how much cheaper this offer is compared to other travel websites. Powered by a V8 ML model that analyzes real-time pricing data from multiple hotel suppliers. Higher scores = bigger savings vs competitors. A score of 0 means no significant discount was detected. | |
| hotels[].quality | number | Overall quality score (0-1) combining star rating, reviews, amenities, and other factors | |
| hotels[].reviewScore | number | Guest review score (0-10) | |
| hotels[].reviewCount | number|null | Number of guest reviews | |
| hotels[].hasFreeCancellation | boolean | Whether any room has free cancellation | |
| hotels[].isRefundable | boolean | Whether any room is refundable | |
| hotels[].refundableUntil | string|null | ISO date until which free cancellation is available | |
| hotels[].payment | string | Payment type (e.g., "Cash") | |
| hotels[].distance | number | Distance from search center (km) | |
| hotels[].boardType | string|null | Default board type | |
| hotels[].availableMealTypes | string[] | Available meal types | |
| totalCount | number | Total hotels matching search | |
| page | number | Current page number | |
| pageSize | number | Results per page | |
| hasMore | boolean | Whether more pages are available | |
| searchStatus | string | "IN_PROGRESS" or "COMPLETED" |
例
curl -X POST https://locktrip.com/mcp/tools/get_search_results \
-H "Content-Type: application/json" \
-d '{
"searchKey": "47de06e3262ea3822bdc384a04470783",
"page": 0,
"size": 2
}'
# Response (200 OK):
{
"hotels": [
{
"hotelId": "4703420",
"name": "Premiere Classe Boissy Saint Leger",
"starRating": 1,
"address": "P.A De La Haie Griselle 4 Rue Pompadour, Boissy-Saint-Leger",
"latitude": 48.759967,
"longitude": 2.501443,
"images": [
"https://imagecontent.net/images/full/5a0d94a0-5f7e-4e4e-b457-5e0673a96a95.jpeg"
],
"amenities": ["Family rooms", "Free Wifi", "Parking", "Air conditioning"],
"minPrice": 71.51,
"originalPrice": 71.51,
"currency": "EUR",
"discountScore": 0,
"quality": 0.19,
"reviewScore": 2.5,
"reviewCount": null,
"hasFreeCancellation": false,
"isRefundable": false,
"refundableUntil": null,
"payment": "Cash",
"distance": 15.32,
"boardType": null,
"availableMealTypes": []
}
],
"totalCount": 2403,
"page": 1,
"pageSize": 2,
"hasMore": true,
"searchStatus": "COMPLETED"
}get_hotel_rooms
パブリック特定のホテルの利用可能な客室パッケージを取得します。予約に必要なquoteIdsを返します。各パッケージには価格、食事タイプ、アメニティ、キャンセル情報が含まれます。
リクエスト
| フィールド | 型 | 必須 | 説明 |
|---|---|---|---|
| hotelId | string | Yes | Hotel ID from search results |
| searchKey | string | Yes | Search key from hotel_search |
| startDate | string | Yes | Check-in date (YYYY-MM-DD) |
| endDate | string | Yes | Check-out date (YYYY-MM-DD) |
| rooms | Room[] | Yes | Room occupancy (same as hotel_search) |
| nationality | string | Yes | 2-letter country code |
| regionId | string | Yes | Region ID from search_location |
| currency | string | No | Currency code (default: "USD") |
レスポンス
| フィールド | 型 | 説明 | |
|---|---|---|---|
| hotelId | string | Hotel ID | |
| hotelName | string | Hotel name | |
| checkIn | string | Check-in date (YYYY-MM-DD) | |
| checkOut | string | Check-out date (YYYY-MM-DD) | |
| packages | Package[] | Available room packages | |
| packages[].quoteId | string | Quote ID (use in prepare_booking) | |
| packages[].packageId | string | Package identifier | |
| packages[].roomName | string | Room type name (e.g., "Standard, 3 Beds") | |
| packages[].roomDescription | string | HTML description of room features | |
| packages[].mealType | string | "Room Only", "Breakfast Included", etc. | |
| packages[].mealDescription | string | Meal plan description | |
| packages[].maxOccupancy | number | Maximum guests per room | |
| packages[].amenities | string[] | Room amenities list | |
| packages[].price | number | Total price for all nights | |
| packages[].currency | string | Price currency | |
| packages[].pricePerNight | number | Price per night | |
| packages[].totalNights | number | Number of nights | |
| packages[].isRefundable | boolean | Whether room is refundable |
例
curl -X POST https://locktrip.com/mcp/tools/get_hotel_rooms \
-H "Content-Type: application/json" \
-d '{"hotelId":"4384127","searchKey":"47de06e3262ea3822bdc384a04470783","startDate":"2026-04-15","endDate":"2026-04-17","rooms":[{"adults":2}],"nationality":"US","regionId":"5f078e431fd614748f9037f9","currency":"EUR"}'
# Response (200 OK):
{
"hotelId": "4384127",
"hotelName": "",
"checkIn": "2026-04-15",
"checkOut": "2026-04-17",
"packages": [
{
"quoteId": "3e242771-1c15-4356-9a3b-1cd4bfc6d9fc_4384127",
"packageId": "3e242771-1c15-4356-9a3b-1cd4bfc6d9fc_4384127",
"roomName": "Standard, 3 Beds",
"mealType": "Room Only",
"price": 71.34,
"currency": "EUR",
"pricePerNight": 35.67,
"totalNights": 2,
"isRefundable": false
}
]
}get_hotel_details
パブリック説明、アメニティ、レビュー、写真、所在地を含むホテルの詳細情報を取得します。予約前にホテルの完全な情報を得るために検索後に使用します。
リクエスト
| フィールド | 型 | 必須 | 説明 |
|---|---|---|---|
| hotelId | number | Yes | Hotel ID (numeric, from search results) |
| language | string | No | Language code (default: "en") |
| includeImages | boolean | No | Fetch additional images (default: false) |
| imageLimit | number | No | Max additional images (default: 20, max: 100) |
レスポンス
| フィールド | 型 | 説明 | |
|---|---|---|---|
| hotel | object | Hotel details object | |
| hotel.id | number | Hotel ID | |
| hotel.name | string | Hotel name | |
| hotel.country | string | Country | |
| hotel.city | string | City | |
| hotel.star | number | Star rating (1-5) | |
| hotel.address | string | Street address | |
| hotel.latitude | number | Latitude | |
| hotel.longitude | number | Longitude | |
| hotel.description | string | HTML description with sections | |
| hotel.phone | string|null | Phone number | |
| hotel.hotelPhotos | Photo[] | Photo URLs (relative paths) | |
| hotel.reviews | object | Review summary with score, count, keywords | |
| hotel.hotelAmenities | Category[] | Amenities grouped by category | |
| additionalImages | Photo[] | Extra images (if includeImages=true) |
例
curl -X POST https://locktrip.com/mcp/tools/get_hotel_details \
-H "Content-Type: application/json" \
-d '{"hotelId": 4384127}'
# Response (200 OK):
{
"hotel": {
"id": 4384127,
"name": "Premiere Classe Plaisir",
"country": "France",
"city": "Plaisir",
"star": 1,
"address": "Za De Sainte Apolline Rue Des Poiriers",
"description": "<h2>Hotel Details</h2><p>Property Location...</p>",
"hotelPhotos": [{"url": "/gmx/full/d174a039-ebf9-4e42-8b42-5e31a6950b0e.jpeg"}],
"reviews": {"scoreSummary": 0, "reviewsCount": 0, "keyWords": []},
"hotelAmenities": [{"categoryName": "Hotel Facilities & Services", "features": [{"name": "Free Wifi"}]}]
}
}check_cancellation_policy
パブリック客室パッケージの詳細なキャンセルポリシーを取得します。無料キャンセルの期限と日付範囲ごとのペナルティ料金を表示します。
リクエスト
| フィールド | 型 | 必須 | 説明 |
|---|---|---|---|
| searchKey | string | Yes | Search key from hotel_search |
| hotelId | string | Yes | Hotel ID |
| packageIds | string[] | Yes | Package IDs to check (from get_hotel_rooms) |
レスポンス
| フィールド | 型 | 説明 | |
|---|---|---|---|
| hotelId | string | Hotel ID | |
| policies | Policy[] | Cancellation policy per package | |
| policies[].packageId | string | Package identifier | |
| policies[].isRefundable | boolean | Whether package is refundable | |
| policies[].freeCancellationUntil | string|null | Last date for free cancellation (YYYY-MM-DD) | |
| policies[].fees | Fee[] | Cancellation penalty fees | |
| policies[].fees[].fromDate | string | Penalty period start (YYYY-MM-DD) | |
| policies[].fees[].toDate | string|null | Penalty period end | |
| policies[].fees[].amount | number | Penalty amount | |
| policies[].fees[].currency | string | Currency code | |
| policies[].fees[].percentage | number|null | Percentage of booking price | |
| policies[].remarks | string[]|null | Additional policy notes |
例
curl -X POST https://locktrip.com/mcp/tools/check_cancellation_policy \
-H "Content-Type: application/json" \
-d '{"searchKey":"47de06e3262ea3822bdc384a04470783","hotelId":"4384127","packageIds":["e3fca710-0a05-4b96-a472-a93c941a58fc_4384127"]}'
# Response (200 OK):
{
"hotelId": "4384127",
"policies": [{
"packageId": "e3fca710-0a05-4b96-a472-a93c941a58fc_4384127",
"isRefundable": true,
"freeCancellationUntil": "2026-04-13",
"fees": [{"fromDate":"2026-04-13","toDate":"2026-04-15","amount":77.53,"currency":"EUR","percentage":100}],
"remarks": ["Room: Standard, 3 Beds", "Board: Room Only"]
}]
}guest_login
パブリックメールアドレスのみでゲストとして登録またはログインします。認証済みツール用のBearer tokenを返します。新規ユーザーには確認メールが送信され、後からパスワードを設定できます。
リクエスト
| フィールド | 型 | 必須 | 説明 |
|---|---|---|---|
| string | Yes | User email address |
レスポンス
| フィールド | 型 | 説明 | |
|---|---|---|---|
| token | string | JWT Bearer token for authenticated API calls | |
| userId | number | Numeric user ID | |
| string | User email address | ||
| isNewUser | boolean | Whether a new account was created |
例
curl -X POST https://locktrip.com/mcp/tools/guest_login \
-H "Content-Type: application/json" \
-d '{"email": "[email protected]"}'
# Response (200 OK):
{"token":"eyJhbGciOiJIUzUxMiJ9...","userId":413900,"email":"[email protected]","isNewUser":true}login
パブリックメールアドレスとパスワードでログインしてBearer tokenを取得します。アカウント確認済みの登録ユーザー用です。
リクエスト
| フィールド | 型 | 必須 | 説明 |
|---|---|---|---|
| string | Yes | User email address | |
| password | string | Yes | User password |
レスポンス
| フィールド | 型 | 説明 | |
|---|---|---|---|
| token | string | JWT Bearer token for authenticated API calls | |
| userId | number | Numeric user ID | |
| string | User email address |
例
curl -X POST https://locktrip.com/mcp/tools/login \
-H "Content-Type: application/json" \
-d '{"email":"[email protected]","password":"yourpassword"}'
# Response (200 OK):
{"token":"eyJhbGciOiJIUzUxMiJ9...","userId":12345,"email":"[email protected]"}prepare_booking
認証必要ゲスト情報を使って予約を作成します。確認用のpreparedBookingIdを返します。予約は約15分で期限切れになります。各部屋のゲスト数は検索時の大人数と一致する必要があります。
リクエスト
| フィールド | 型 | 必須 | 説明 |
|---|---|---|---|
| quoteId | string | Yes | Quote ID from get_hotel_rooms |
| searchKey | string | No | Search key (validates cancellation policy) |
| rooms | Room[] | Yes | Guest assignments per room |
| rooms[].roomIndex | number | Yes | Room index (0-based) |
| rooms[].guests | Guest[] | Yes | Adult guests in this room |
| rooms[].guests[].firstName | string | Yes | First name |
| rooms[].guests[].lastName | string | Yes | Last name |
| rooms[].guests[].title | string | No | "Mr", "Mrs", or "Ms" (default: "Mr") |
| rooms[].guests[].email | string | No | Email address |
| rooms[].guests[].phone | string | No | Phone number |
| rooms[].guests[].isLeadGuest | boolean | No | Whether this is the lead guest |
| rooms[].children | Child[] | No | Children in this room |
| rooms[].children[].firstName | string | Yes | First name |
| rooms[].children[].lastName | string | Yes | Last name |
| rooms[].children[].age | number | Yes | Child age (0-17) |
| contactPerson | object | Yes | Contact person details |
| contactPerson.firstName | string | Yes | First name |
| contactPerson.lastName | string | Yes | Last name |
| contactPerson.email | string | Yes | Email address |
| contactPerson.phone | string | Yes | Phone number (min 5 chars) |
| contactPerson.title | string | No | "Mr", "Mrs", or "Ms" |
| contactPerson.countryCode | string | No | 2-letter country code |
| specialRequests | string | No | Special requests for the hotel |
レスポンス
| フィールド | 型 | 説明 | |
|---|---|---|---|
| preparedBookingId | string | Booking ID for confirm_booking | |
| bookingInternalId | string | Internal booking identifier | |
| price | number | Total price | |
| currency | string | Price currency | |
| payment | string | Payment type (e.g., "Cash") | |
| discount | object | Discount details (amount, currency) | |
| taxes | Tax[] | Itemized taxes and fees | |
| essentialInformation | string[] | Check-in instructions, mandatory fees, policies |
例
curl -X POST https://locktrip.com/mcp/tools/prepare_booking \
-H "Content-Type: application/json" \
-H "Authorization: Bearer eyJhbGciOiJIUzUxMiJ9..." \
-d '{"quoteId":"3e242771-1c15-4356-9a3b-1cd4bfc6d9fc_4384127","rooms":[{"roomIndex":0,"guests":[{"firstName":"John","lastName":"Smith","title":"Mr","email":"[email protected]","phone":"+1234567890","isLeadGuest":true}]}],"contactPerson":{"firstName":"John","lastName":"Smith","email":"[email protected]","phone":"+1234567890"}}'
# Response (200 OK):
{"preparedBookingId":"69a2b7540a93415a4b4dbf13","price":71.34,"currency":"EUR","payment":"Cash","discount":{"amount":0,"currency":"EUR"},"taxes":[{"feeTitle":"Taxes and Fees","value":"1.59","currency":"EUR","isIncludedInPrice":true}],"essentialInformation":["CheckIn instructions: ..."]}confirm_booking
認証必要B2Bクレジットラインを使用して準備済みの予約を確認・支払いします。バウチャーURL付きの予約確認を返します。消費者向け支払いにはcreate_checkoutまたはget_payment_urlを使用してください。
リクエスト
| フィールド | 型 | 必須 | 説明 |
|---|---|---|---|
| bookingInternalId | string | Yes | Booking ID from prepare_booking (preparedBookingId) |
| quoteId | string | Yes | Quote ID used in prepare_booking |
| paymentMethod | string | No | Payment method (default: "CREDIT_LINE" for B2B) |
レスポンス
| フィールド | 型 | 説明 | |
|---|---|---|---|
| accepted | boolean | Whether booking confirmation was accepted | |
| message | string|null | Confirmation status message | |
| voucherUrl | string|null | URL to booking voucher (if accepted) |
例
curl -X POST https://locktrip.com/mcp/tools/confirm_booking \
-H "Content-Type: application/json" \
-H "Authorization: Bearer eyJhbGciOiJIUzUxMiJ9..." \
-d '{"bookingInternalId":"69a2b7540a93415a4b4dbf13","quoteId":"3e242771-1c15-4356-9a3b-1cd4bfc6d9fc_4384127"}'
# Response (200 OK):
{"accepted":true,"message":"Booking confirmed successfully","voucherUrl":"https://locktrip.com/booking/hotel/voucher/69a2b7540a93415a4b4dbf13"}create_checkout
認証必要準備済みの予約用にRevolutの決済チェックアウトURLを作成します。ユーザーがクリックして支払えるホスティングチェックアウトリンクを返します。支払い完了後、webhookにより予約が自動確認されます。B2C消費者向けに使用します。
リクエスト
| フィールド | 型 | 必須 | 説明 |
|---|---|---|---|
| bookingId | string | Yes | Booking ID from prepare_booking (preparedBookingId) |
| currency | string | Yes | 3-letter currency code (e.g., USD, EUR, GBP) |
| backUrl | string | No | Cancel/back redirect URL (defaults to locktrip.com) |
| successUrl | string | No | Success redirect URL |
レスポンス
| フィールド | 型 | 説明 | |
|---|---|---|---|
| checkoutUrl | string | Revolut hosted checkout URL for payment | |
| checkoutToken | string | Payment token for tracking | |
| expiresInMinutes | number | Token expiration time (20 minutes) | |
| message | string | User instruction message |
例
curl -X POST https://locktrip.com/mcp/tools/create_checkout \
-H "Content-Type: application/json" \
-H "Authorization: Bearer eyJhbGciOiJIUzUxMiJ9..." \
-d '{"bookingId":"69a2b7540a93415a4b4dbf13","currency":"EUR"}'
# Response (200 OK):
{"checkoutUrl":"https://checkout.revolut.com/pay/abc123...","checkoutToken":"rev_tok_abc123...","expiresInMinutes":20,"message":"Payment checkout link created. Share this URL with the user to complete payment."}get_payment_url
認証必要準備済みの予約の支払い用にStripeチェックアウトURLを取得します。クレジットカードでの支払いを完了するためにカスタマーをリダイレクトするURLを返します。
リクエスト
| フィールド | 型 | 必須 | 説明 |
|---|---|---|---|
| bookingId | string | Yes | Booking ID from prepare_booking (preparedBookingId) |
| currency | string | Yes | Payment currency code (e.g., USD, EUR) |
| backUrl | string | Yes | URL to redirect on cancel/back |
| successUrl | string | No | Custom URL to redirect on success |
レスポンス
| フィールド | 型 | 説明 | |
|---|---|---|---|
| url | string | Stripe checkout URL to redirect customer to | |
| sessionId | string | Stripe session ID for tracking |
例
curl -X POST https://locktrip.com/mcp/tools/get_payment_url \
-H "Content-Type: application/json" \
-H "Authorization: Bearer eyJhbGciOiJIUzUxMiJ9..." \
-d '{"bookingId":"69a2b7540a93415a4b4dbf13","currency":"EUR","backUrl":"https://example.com/cancel"}'
# Response (200 OK):
{"url":"https://checkout.stripe.com/c/pay/cs_live_abc123...","sessionId":"cs_live_abc123..."}list_bookings
認証必要認証済みユーザーの予約一覧を取得します。ステータスでフィルタリング:UPCOMING、COMPLETED、CANCELLED、またはPENDING。
リクエスト
| フィールド | 型 | 必須 | 説明 |
|---|---|---|---|
| type | string | No | "UPCOMING", "COMPLETED", "CANCELLED", or "PENDING" (default: "UPCOMING") |
| page | number | No | Page number (0-indexed) |
| size | number | No | Results per page |
レスポンス
| フィールド | 型 | 説明 | |
|---|---|---|---|
| bookings | BookingSummary[] | Array of booking summaries | |
| bookings[].bookingId | string | Booking identifier | |
| bookings[].bookingReferenceId | string | Provider reference ID | |
| bookings[].hotelName | string | Hotel name | |
| bookings[].hotelCity | string | City | |
| bookings[].checkIn | string | Check-in date (YYYY-MM-DD) | |
| bookings[].checkOut | string | Check-out date (YYYY-MM-DD) | |
| bookings[].status | string | Booking status (DONE, PENDING, CANCELLED) | |
| bookings[].totalPrice | number | Total booking price | |
| bookings[].currency | string | Currency code | |
| bookings[].guestName | string | Lead guest name | |
| bookings[].roomCount | number | Number of rooms | |
| bookings[].createdAt | string | Booking creation timestamp (ISO 8601) | |
| bookings[].hotelPhoto | string|null | Hotel image URL | |
| totalCount | number | Total number of bookings | |
| page | number | Current page number | |
| pageSize | number | Results per page |
例
curl -X POST https://locktrip.com/mcp/tools/list_bookings \
-H "Content-Type: application/json" \
-H "Authorization: Bearer eyJhbGciOiJIUzUxMiJ9..." \
-d '{"type": "UPCOMING"}'
# Response (200 OK):
{"bookings":[{"bookingId":"69a2b7540a93415a4b4dbf13","bookingReferenceId":"LT-2026-AB12CD","hotelName":"Premiere Classe Plaisir","hotelCity":"Plaisir","checkIn":"2026-04-15","checkOut":"2026-04-17","status":"DONE","totalPrice":71.34,"currency":"EUR","guestName":"John Smith","roomCount":1,"createdAt":"2026-02-28T09:35:00.000Z","hotelPhoto":"https://imagecontent.net/images/full/d174a039.jpeg"}],"totalCount":1,"page":0,"pageSize":10}get_booking_details
認証必要ホテル情報、ゲスト、客室、支払い状況、キャンセルポリシーを含む特定の予約の完全な詳細を取得します。
リクエスト
| フィールド | 型 | 必須 | 説明 |
|---|---|---|---|
| bookingId | string | Yes | Booking ID to retrieve |
レスポンス
| フィールド | 型 | 説明 | |
|---|---|---|---|
| bookingId | string | Booking identifier | |
| bookingReferenceId | string | Provider reference ID | |
| status | string | Booking status (DONE, PENDING, CANCELLED) | |
| hotel | object | Hotel details | |
| hotel.name | string | Hotel name | |
| hotel.address | string | Street address | |
| hotel.city | string | City | |
| hotel.country | string | Country | |
| hotel.starRating | number | Star rating (1-5) | |
| checkIn | string | Check-in date (YYYY-MM-DD) | |
| checkOut | string | Check-out date (YYYY-MM-DD) | |
| rooms | Room[] | Booked rooms with guests | |
| contactPerson | object | Contact person (firstName, lastName, email, phone) | |
| totalPrice | number | Total booking price | |
| currency | string | Currency code | |
| paymentStatus | string | Payment status (PAID, PENDING) | |
| cancellationPolicy | object|null | Cancellation policy with fees and deadlines | |
| createdAt | string | Booking creation date | |
| confirmedAt | string|null | Confirmation date (null if pending) |
例
curl -X POST https://locktrip.com/mcp/tools/get_booking_details \
-H "Content-Type: application/json" \
-H "Authorization: Bearer eyJhbGciOiJIUzUxMiJ9..." \
-d '{"bookingId": "69a2b7540a93415a4b4dbf13"}'
# Response (200 OK):
{"bookingId":"69a2b7540a93415a4b4dbf13","bookingReferenceId":"LT-2026-AB12CD","status":"DONE","hotel":{"id":4384127,"name":"Premiere Classe Plaisir","city":"Plaisir","country":"France","starRating":1},"checkIn":"2026-04-15","checkOut":"2026-04-17","totalPrice":71.34,"currency":"EUR","paymentStatus":"PAID","createdAt":"2026-02-28","confirmedAt":"2026-02-28"}cancel_booking
認証必要予約キャンセルをリクエストします。まずconfirmed=falseでキャンセル料をプレビューし、次にconfirmed=trueで実行します。返金額とキャンセル料を返します。
リクエスト
| フィールド | 型 | 必須 | 説明 |
|---|---|---|---|
| bookingId | string | Yes | Booking ID to cancel |
| confirmed | boolean | Yes | Set true to execute cancellation |
| reason | string | No | Reason for cancellation |
レスポンス
| フィールド | 型 | 説明 | |
|---|---|---|---|
| success | boolean | Whether cancellation was executed | |
| message | string | Status message (preview or confirmation) |
例
# Step 1: Preview cancellation (dry run)
curl -X POST https://locktrip.com/mcp/tools/cancel_booking \
-H "Content-Type: application/json" \
-H "Authorization: Bearer eyJhbGciOiJIUzUxMiJ9..." \
-d '{"bookingId":"69a2b7540a93415a4b4dbf13","confirmed":false}'
# Response (200 OK):
{"success":false,"message":"Cancellation not confirmed. Set confirmed=true to proceed."}
# Step 2: Execute cancellation
curl -X POST https://locktrip.com/mcp/tools/cancel_booking \
-H "Content-Type: application/json" \
-H "Authorization: Bearer eyJhbGciOiJIUzUxMiJ9..." \
-d '{"bookingId":"69a2b7540a93415a4b4dbf13","confirmed":true,"reason":"Change of plans"}'
# Response (200 OK):
{"success":true,"message":"Booking cancelled successfully"}機械可読仕様: OpenAPI 3.1 | Tool List | MCP Discovery
LockTrip Hotel Booking MCP API v1.0.0