> For the complete documentation index, see [llms.txt](https://resources.atriptech.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://resources.atriptech.com/api-wen-dang/product-guides/booking/lin-jin-qi-fei-hang-ban.md).

# 临近起飞航班

使用 LastMinuteFlight 响应字段处理临近起飞航班及其严格的确认时限。

## 临近起飞航班

当 API 响应返回 `lastMinuteFlight: true` 时，使用本指南。

### 适用条件

计划起飞时间在未来 15 小时内的航班属于临近起飞航班。

计划在当天日历日结束前起飞的航班也属于此类航班。

### API 响应字段

Atlas 会为符合条件的航班返回 `lastMinuteFlight: true`。

字段位于以下响应对象：

* `search.do` 的 `routings` 节点，以及 `verify.do` 的 `routing` 节点
* `getOffers.do` 和 `getOfferPrice.do` 的 `offer` 节点
* `order.do` 和 `queryOrderDetails.do` 的响应根节点

请使用该字段在支付前展示临近起飞提醒。

```json
{
  "status": 0,
  "orderNo": "TESTA20260826160000123",
  "lastMinuteFlight": true
}
```

### 确认时限

仅在可以立即开始支付时创建订单。

提交后，Atlas 会核验票价和可用性。

临近起飞订单只有两种结果：

* Atlas 在五分钟内确认预订并返回 PNR。
* 五分钟后仍未确认时，Atlas 自动取消订单。

Atlas 不保证一定出票成功。

支付成功不代表出票已经确认。

### 订单跟进与恢复

调用 `pay.do` 后，持续轮询 `queryOrderDetails.do`，直至返回最终结果。

检查 `orderStatus`、`ticketStatus`、PNR 和票号。

如订单已取消，可调用 `regenerateOrder.do` 创建新订单。

新订单继续适用原临近起飞订单处理规则。

### 相关接口

* [搜索](/api-wen-dang/api-reference/booking-apis/search.md)
* [支付与出票](/api-wen-dang/api-reference/booking-apis/payment-and-ticketing.md)
* [查询订单](/api-wen-dang/api-reference/booking-apis/query-order.md)
