HTTP APIReference
Get order
One of the user's orders by orderId: its status, the payment status and, while it awaits payment, payment.url; the stay and its terms; and the hotel's confirmation number once there is one.
The full rules agents follow for this call are on its MCP tool's page, get_order.
GET
bearerAuthheader
AuthorizationBearer <token>A Fortrip OAuth access token from the device authorization flow (RFC 8628). GET /v1/auth/config returns the flow's endpoints.
orderId*stringThe order's orderId.
Match
^ord_[0-9A-Za-z]{20}$locale?stringLanguage for names and text in the response: en or zh.
Value in
"en""zh"Get order
application/json- response
orderId*stringMatch
^ord_[0-9A-Za-z]{20}$reference*stringMatch
^FT-[2-9A-HJ-NP-Z]{6}$status*|stringcreatedAt*stringMatch
^\d{4}-\d{2}-\d{2}T(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?Z$updatedAt*stringMatch
^\d{4}-\d{2}-\d{2}T(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?Z$items*array<|>Items
1 <= itemsprice*payment*cancel*Whether the order can be cancelled now, and for what penalty and refund.
manageUrl*string[key: string]?unknowncurl -X GET 'https://api.fortrip.ai/v1/orders/string'Example Response
{ "orderId": "string", "reference": "string", "status": "awaiting_payment", "createdAt": "string", "updatedAt": "string", "items": [ { "type": "hotel", "hotel": { "hotelId": "string", "name": "string", "names": { "en": "string", "zh": "string", "property1": null, "property2": null }, "checkIn": "string", "checkOut": "string", "timeZone": "string", "rooms": [ { "adults": -9007199254740991, "childrenAges": [ -9007199254740991 ], "property1": null, "property2": null } ], "room": { "name": { "text": "string", "locale": "en", "property1": null, "property2": null }, "beds": { "text": "string", "locale": "en", "property1": null, "property2": null }, "property1": null, "property2": null }, "meals": { "known": true, "included": [ "breakfast" ], "unspecifiedMainMeals": -9007199254740991, "allInclusive": true, "guestsCoveredPerRoom": -9007199254740991, "label": { "text": "string", "locale": "en", "property1": null, "property2": null }, "property1": null, "property2": null }, "cancellation": { "status": "free", "asOf": "string", "freeCancellationEndsAt": "string", "penalties": [ { "startsAt": "string", "amount": { "amount": "string", "currency": "string", "property1": null, "property2": null }, "property1": null, "property2": null } ], "timeZone": "string", "property1": null, "property2": null }, "payAtProperty": { "disclosure": "complete", "items": [ { "label": { "text": "string", "locale": "en", "property1": null, "property2": null }, "amount": { "amount": "string", "currency": "string", "property1": null, "property2": null }, "mandatory": true, "basis": "per_stay", "collectedAt": "property", "property1": null, "property2": null } ], "property1": null, "property2": null }, "confirmationNumber": "string", "property1": null, "property2": null }, "property1": null, "property2": null } ], "price": { "total": { "amount": "string", "currency": "string", "property1": null, "property2": null }, "property1": null, "property2": null }, "payment": { "status": "unpaid", "url": "string", "requiresSignIn": true, "expiresAt": "string", "chargeCurrency": "string", "localCurrencyAtCheckout": true, "localCharge": { "amount": "string", "currency": "string", "property1": null, "property2": null }, "handlers": [ { "id": "string", "type": "string", "version": "string", "spec": "string", "schema": "string", "available_instruments": [ { "type": "string", "config": { "property1": null, "property2": null }, "property1": null, "property2": null } ], "config": { "environment": "livemode", "business_profile": "string", "property1": null, "property2": null }, "property1": null, "property2": null } ], "credentialLimits": { "maxAmount": -9007199254740991, "currency": "string", "expiresAt": "string", "property1": null, "property2": null }, "wallets": { "open": true, "current": "wechat_pay", "wechatPay": { "qrData": "string", "qrImageUrl": "string", "url": "string", "property1": null, "property2": null }, "alipay": { "url": "string", "property1": null, "property2": null }, "property1": null, "property2": null }, "property1": null, "property2": null }, "cancel": { "available": true, "reason": "cancellable", "penalty": { "amount": "string", "currency": "string", "property1": null, "property2": null }, "refund": { "amount": "string", "currency": "string", "property1": null, "property2": null }, "property1": null, "property2": null }, "manageUrl": "string", "property1": null, "property2": null}