> 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/booking-step-guides/create-order.md).

# 创建订单

{% hint style="info" %}
💬 **需要帮助？** 如果遇到问题，请在帮助中心咨询 Eva，快速获取诊断建议。

<a href="https://www.atriptech.com/" class="button primary" data-icon="comments">咨询 Eva</a>
{% endhint %}

在定价或验证后使用此页面进行预订。

{% hint style="info" %}
在调用 `order.do` 之前，从当前定价或验证响应中读取 `bookingRequirement`。

使用它来决定此预订需要哪些旅客和证件字段。
{% endhint %}

当您需要以下内容时从这里开始：

* 在 `verify.do`、`getOffers.do` 或 `getOfferPrice.do` 之后创建预订
* 从当前的 `sessionId` 或 `OfferId` 构建请求
* 捕获用于支付和跟进的 `orderNo`

### 常见问题

#### 在 `order.do` 之前需要什么？

您需要新鲜的 `sessionId` 或 `OfferId`、当前的 `bookingRequirement`、旅客详情、联系详情以及在需要时的附加服务选择。

使用当前的预订上下文，不要长时间延迟。

如果包含座位选择，在 `order.do` 之前决定座位履约处理模式。

#### 在 `order.do` 之后应保留什么？

保留返回的 `orderNo`。

将其用于支付、订单查询和后续跟进。

### 主要 API

* `order.do`

### 输入

* 来自验证的 `sessionId` 或来自获取报价/获取报价价格的 `OfferId`
* 来自当前定价上下文的 `bookingRequirement`
* 旅客详情
* 联系详情
* 需要时的附加服务选择
* 包含座位选择时的座位履约处理模式

### 关键输出

* `orderNo`
* 初始预订状态
* 与订单关联的航司和定价详情

### 常见构建规则

使用 `bookingRequirement` 决定哪些旅客和证件字段是必填的。

保持附加服务映射与当前预订上下文一致。

不要使用过期的 `sessionId` 或 `OfferId`。

不要基于过时的定价或验证数据构建订单。

如果包含座位选择，在订单请求中传递座位履约处理模式。

使用同一订单请求定义 Atlas 应如何处理座位履约失败。

如果订单来自履约流程，仅在支付可以立即开始时创建。

履约流程的订单在订单创建后使用 5 分钟支付和出票窗口。

支持的模式：

* `STOP_TICKET` — 停止出票，取消整个订单并退款
* `STOP_SEAT` — 出票，移除座位并退还座位金额
* `SIMILAR_SEAT` — 出票，由运营选择类似座位

对于充值客户，`STOP_SEAT` 可能需要分账订单和 `credit note`。

### 在以下情况下使用此部分

* 标准订单创建
* FR 订单创建（在确认前）
* 带附加服务的预订

### 接下来是什么？

#### 标准支付路径

使用 `orderNo` 继续到[支付与出票](/api-wen-dang/product-guides/booking/booking-step-guides/payment-and-ticketing.md)。

#### FR 流程

如果航司是 FR，在支付前完成[确认订单](/api-wen-dang/product-guides/booking/booking-step-guides/confirm-order.md)。

### 相关页面

* [验证](/api-wen-dang/product-guides/booking/booking-step-guides/verify.md)
* [获取报价](/api-wen-dang/product-guides/booking/booking-step-guides/get-offer.md)
* [获取报价价格](/api-wen-dang/product-guides/booking/booking-step-guides/get-offer-price.md)
* [支付与出票](/api-wen-dang/product-guides/booking/booking-step-guides/payment-and-ticketing.md)
* [预订 API](/api-wen-dang/api-reference/booking-apis.md)

### 完整 API 参考

在此查看端点级详情：

* [创建订单](/api-wen-dang/api-reference/booking-apis/create-order.md)
