1. 酒店
龙虾开放平台(通用版)
  • 欢迎语
  • 快速开始
    • 接入流程
    • 公共请求头
    • 注意事项
    • 速率限制与配额策略
    • 鉴权说明
    • 错误码
  • 机票
    • 机票接口说明
    • 机场搜索
      GET
    • 创建机票订单
      POST
    • 机票验价
      POST
    • 机票查询列表
      POST
  • 酒店
    • 酒店接口说明
    • 酒店查询列表
      POST
    • 酒店房型详情
      POST
    • 创建酒店订单
      POST
  • 数据模型
    • response.Response
    • schema.AirportSearchResponse
    • schema.FlightOrderCreateRequest
    • schema.FlightOrderCreateResponse
    • schema.FlightPricingRequest
    • schema.FlightPricingResponse
    • schema.FlightSearchResponse
    • schema.HotelOrderCreateRequest
    • schema.HotelOrderCreateResponse
    • schema.HotelRoomsRequest
    • schema.HotelRoomsResponse
    • schema.HotelSearchRequest
    • schema.HotelSearchResponse
    • schema.AirportItem
    • schema.ContactInfo
    • schema.InvoiceAddress
    • schema.PassengerInfo
    • schema.PassengerFareItem
    • schema.FlightItem
    • schema.GuestInfo
    • schema.RoomType
    • schema.HotelSearchFilters
    • schema.HotelItem
    • schema.PageInfo
    • schema.CabinFareItem
    • schema.RoomTypeProduct
  1. 酒店

创建酒店订单

POST
/open/v1/hotel/order/create
使用房型详情返回的产品级 offer_id 创建酒店订单。
幂等键为 app_id + out_trade_no;成功后返回平台订单号 order_no,初始状态为 pending_payment。

请求参数

Authorization
Header 参数

Body 参数application/json必填

示例
{
    "approval_id": "string",
    "arrival_time": "18:00",
    "callback_url": "https://merchant.example.com/hotel/callback",
    "contact": {
        "email": "zhangsan@example.com",
        "name": "张三",
        "phone": "13800138000"
    },
    "cost_center": "string",
    "external_user_id": "string",
    "external_user_name": "string",
    "guests": [
        {
            "id_number": "330106199001011234",
            "id_type": "ID_CARD",
            "name": "张三",
            "name_en": "ZHANG/SAN"
        }
    ],
    "invoice_address": {
        "city": "杭州市",
        "detail_address": "文三路XX号",
        "district": "西湖区",
        "phone": "13800138000",
        "province": "浙江省",
        "recipient_name": "张三"
    },
    "need_invoice": true,
    "offer_id": "eyJhbGciOiJBMjU2R0NNIi...",
    "out_trade_no": "MERCHANT_20260528_001",
    "pay_mode": "user_pay",
    "special_request": "高楼层,安静房间"
}

请求示例代码

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location 'https://open.longxiachuxing.com/api/open/v1/hotel/order/create' \
--header 'Authorization;' \
--header 'Content-Type: application/json' \
--data-raw '{
    "approval_id": "string",
    "arrival_time": "18:00",
    "callback_url": "https://merchant.example.com/hotel/callback",
    "contact": {
        "email": "zhangsan@example.com",
        "name": "张三",
        "phone": "13800138000"
    },
    "cost_center": "string",
    "external_user_id": "string",
    "external_user_name": "string",
    "guests": [
        {
            "id_number": "330106199001011234",
            "id_type": "ID_CARD",
            "name": "张三",
            "name_en": "ZHANG/SAN"
        }
    ],
    "invoice_address": {
        "city": "杭州市",
        "detail_address": "文三路XX号",
        "district": "西湖区",
        "phone": "13800138000",
        "province": "浙江省",
        "recipient_name": "张三"
    },
    "need_invoice": true,
    "offer_id": "eyJhbGciOiJBMjU2R0NNIi...",
    "out_trade_no": "MERCHANT_20260528_001",
    "pay_mode": "user_pay",
    "special_request": "高楼层,安静房间"
}'

返回响应

🟢200
application/json
OK
Bodyapplication/json

示例
{
    "code": 0,
    "data": {
        "check_in": "2026-06-11",
        "check_out": "2026-06-13",
        "created_at": "2026-05-28T10:30:00Z",
        "currency": "CNY",
        "expires_at": "2026-05-28T10:45:00Z",
        "external_user_id": "string",
        "hotel_name": "杭州西湖希尔顿酒店",
        "nights": 2,
        "order_no": "RCA20260528001234567890",
        "out_trade_no": "MERCHANT_20260528_001",
        "pay_mode": "string",
        "room_count": 1,
        "room_name": "豪华大床房",
        "status": "pending_payment",
        "total_amount": 1360
    },
    "message": "success",
    "request_id": "req_a1b2c3"
}
🟠400
修改于 2026-06-10 04:01:22
上一页
酒店房型详情
下一页
response.Response
Built with