航班 API

从搜索到出票,端到端的航班预订

跨多个来源搜索实时票价,二次校验价格,预订并出票。一套 REST 接口,价格统一为美元。

POST /Air/AirLowFareSearch
{
  "AdultCount": 1,
  "TravelPreference": { "CabinType": 3 },
  "OriginDestinationInformations": [
    { "OriginLocationCode": "TBS",
      "DestinationLocationCode": "DXB",
      "DepartureDateTime": "2026-11-14T00:00:00" }
  ]
}
概览

航司内容零散,各来源格式各异。此机票预订 API 将搜索、退改规则、行李、预订、出票与退款统一在一致的 JSON 契约之下。

端点背后是一套归一化的运价引擎,通过单一 JSON 契约与全球分销系统和低成本航司对话。无论内容来自 GDS 还是航司直连,你都能获得一致的行程、运价规则、行李与座位数据,让你的机票预订 App 或 OTA 一次接入、处处扩展。

你将获得

1

按航班组搜索最低价行程,或通过服务器推送事件(SSE)流式返回结果,实现快速首屏。

2

在预订前二次校验票价,让你收取的价格与实际一致。

3

掌控完整生命周期:锁定座位、出票,随后查询、取消或退款。

4

通过 server-sent events 流式返回行程,在慢速航线上也能快速首屏渲染。

5

完整的出票后处理:获取凭证、在时限内作废、取消与退款。

流程如何运作

01

Search

Post routes and dates, get priced itineraries back, or stream them over server-sent events.

02

Revalidate

Re-price the chosen itinerary right before booking so the fare you charge is the fare you get.

03

Book

Create the booking, hold the seats, and receive a booking reference.

04

Issue

Issue the ticket against your balance, then track, void, cancel, or refund.

关键接口

POST/Air/AirLowFareSearchSearch the cheapest itinerary per flight group.
POST/Air/AirLowFareSearchStreamStream itineraries over server-sent events.
POST/Air/AirRevalidateRe-price and validate an itinerary before booking.
POST/Air/AirBookCreate the booking and hold seats.
POST/Air/AirTicketIssue the ticket for a booking.
GET/Air/AirBookingDetailsRetrieve a booking, its status, and documents.

请求与响应

Request · POST /Air/AirLowFareSearch
{
  "AdultCount": 1,
  "TravelPreference": { "CabinType": 3 },
  "OriginDestinationInformations": [
    { "OriginLocationCode": "TBS",
      "DestinationLocationCode": "DXB",
      "DepartureDateTime": "2026-11-14T00:00:00" }
  ]
}
Response · 200 OK
{
  "itineraries": [
    {
      "fareCode": "TBSDXB-Y-412",
      "total": { "amount": 412.00, "currency": "USD" },
      "seatsRemaining": 5,
      "segments": [
        { "from": "TBS", "to": "DXB",
          "depart": "2026-11-14T09:40",
          "carrier": "EK", "flight": "2201" }
      ]
    }
  ]
}

响应包含什么

fareCode
Opaque identifier you pass to revalidate and book.
total
Final price with currency, already normalized to USD.
seatsRemaining
Bookable seats left at this fare.
segments
Each flight leg with carrier, flight number, times, and airports.
baggage
Included allowance and paid options per segment.
1,000+

航空公司

常见问题

航班搜索返回什么?

带价格的行程,每条含票价代码、航段、美元总价与剩余座位。

可以流式返回结果吗?

可以。增量搜索接口会在结果到达时通过服务器推送事件逐条返回行程。

如何安全测试?

把客户端指向沙盒。搜索是真实的;出票调用会对独立钱包进行模拟。

支持单程、往返和多程吗?

支持。在同一搜索体中发送一个或多个出发-到达对;单程、往返与多程使用相同的结构。

如何处理退款?

在航司作废时限内作废,或在出票后申请退款。API 会返回可退金额与结果状态。

用一个 API 打造你的旅游产品。

接入免费。每张票 1%,每单最高 10 美元。航班、酒店与活动的实时覆盖。