> 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/readme/webhook-gai-lan/ticketing-complete-notification.md).

# 出票完成通知

{% hint style="info" %}
遇到 API 接入问题时，可登录 [Eva](https://www.atriptech.com/) 寻求帮助。
{% endhint %}

当你需要拿到订单最终出票结果时，使用这个 webhook。

### 触发时机

出票完成后，Atlas 会发送 `order.ticketed`。

### 收到后建议处理

收到事件后，建议：

* 把订单标记为已出票
* 保存票号和航司 PNR
* 更新面向旅客的行程信息
* 按需触发预订确认通知

### 推送方式

Atlas 会向你已注册的 webhook 地址发起 `POST` 请求。

### 建议优先读取的字段

* `type`
* `data.orderNo`
* `data.orderStatus`
* `data.paxTicketInfos[].ticketNos`
* `data.paxTicketInfos[].airlinePNRs`

### 典型载荷

```json
{
  "cid": "XXXXXXX",
  "data": {
    "orderNo": "TESTL20230922153224323",
    "orderStatus": 2,
    "paxTicketInfos": [
      {
        "name": "zhang/lisi",
        "passengerType": 1,
        "ticketNos": ["S30814"],
        "airlinePNRs": ["S30814"],
        "ancillaries": []
      }
    ]
  },
  "status": -1,
  "type": "order.ticketed"
}
```

### 说明

* `orderStatus=2` 表示已出票
* `status` 是内部字段，不要作为业务判断依据
* 对账时优先使用订单号和票号

{% tabs %}
{% tab title="字段说明" %}
**cid**

* **类型：** String
* **是否必填：** 是
* **说明：** 用于跟踪请求的客户唯一标识。
* **默认值：** 无
* **示例：** `"XXXXXXX"`

**data**

* **类型：** Object
* **是否必填：** 是
* **说明：** 包含订单相关信息。
* **默认值：** 无
* **示例：**

```
{
  "orderNo": "TESTL20230922153224323",
  "orderStatus": 2,
  "paxTicketInfos": [ ... ]
}
```

**data.orderNo**

* **类型：** String
* **是否必填：** 是
* **说明：** 订单唯一编号。
* **默认值：** 无
* **示例：** `"TESTL20230922153224323"`

**data.orderStatus**

* **类型：** Integer
* **是否必填：** 是
* **说明：** 订单状态。
* **可选值：**
  * `0`：未支付
  * `1`：出票中
  * `2`：已出票
  * `-3`：已取消
* **默认值：** 无
* **示例：** `2`

**data.paxTicketInfos**

* **类型：** Object 数组
* **是否必填：** 是
* **说明：** 乘客及其票务信息列表。
* **默认值：** 无

**data.paxTicketInfos\[]**

* **类型：** Object
* **是否必填：** 是
* **说明：** 单个乘客的票务信息。
* **示例：**

```
{
  "name": "zhang/lisi",
  "passengerType": 1,
  "birthday": "20160202",
  "gender": "F",
  "cardNum": "123458",
  "cardType": "PP",
  "cardIssuePlace": "CN",
  "cardExpired": "20400101",
  "nationality": "CN",
  "ticketNos": ["S30814"],
  "airlinePNRs": ["S30814"],
  "ancillaries": []
}
```

**data.paxTicketInfos\[].name**

* **类型：** String
* **是否必填：** 是
* **说明：** 乘客姓名，采用航司标准格式。
* **默认值：** 无
* **示例：** `"zhang/lisi"`

**data.paxTicketInfos\[].passengerType**

* **类型：** Integer
* **是否必填：** 是
* **说明：** 乘客类型。
* **可选值：**
  * `0` = 成人
  * `1` = 儿童
  * `2` = 婴儿
* **默认值：** 无
* **示例：** `1`

**data.paxTicketInfos\[].birthday**

* **类型：** String
* **是否必填：** 是
* **说明：** 出生日期，格式为 `YYYYMMDD`。
* **默认值：** 无
* **示例：** `"20160202"`

**data.paxTicketInfos\[].gender**

* **类型：** String
* **是否必填：** 是
* **说明：** 性别。
  * `M`：男
  * `F`：女
* **默认值：** 无
* **示例：** `"F"`

**data.paxTicketInfos\[].cardNum**

* **类型：** String
* **是否必填：** 是
* **说明：** 证件号码。
* **默认值：** 无
* **示例：** `"123458"`

**data.paxTicketInfos\[].cardType**

* **类型：** String
* **是否必填：** 是
* **说明：** 证件类型。
* **可选值：**
  * `PP`：护照
  * `GA`：港澳通行证
  * `TW`：台湾通行证
  * `TB`：台湾居民来往大陆通行证
  * `HY`：国际海员证
* **默认值：** 无
* **示例：** `"PP"`

**data.paxTicketInfos\[].cardIssuePlace**

* **类型：** String
* **是否必填：** 是
* **说明：** 证件签发国家或机构。
* **默认值：** 无
* **示例：** `"CN"`

**data.paxTicketInfos\[].cardExpired**

* **类型：** String
* **是否必填：** 是
* **说明：** 证件有效期，格式为 `YYYYMMDD`。
* **默认值：** 无
* **示例：** `"20400101"`

**data.paxTicketInfos\[].nationality**

* **类型：** String
* **是否必填：** 是
* **说明：** 旅客国籍，使用 ISO 3166-1 alpha-2 国家码。
* **默认值：** 无
* **示例：** `"CN"`

**data.paxTicketInfos\[].ticketNos**

* **类型：** String 数组
* **是否必填：** 是
* **说明：** 该乘客对应的已出票票号。
* **默认值：** 无
* **示例：** `["S30814"]`

**data.paxTicketInfos\[].airlinePNRs**

* **类型：** String 数组
* **是否必填：** 是
* **说明：** 航司 PNR 列表。
* **默认值：** 无
* **示例：** `["S30814"]`

**data.paxTicketInfos\[].ancillaries**

* **类型：** Array
* **是否必填：** 是
* **说明：** 乘客的附加服务列表。
* **默认值：** `[]`
* **示例：** `[]`

**status**

* **类型：** Integer
* **是否必填：** 是
* **说明：** 返回状态，仅供内部使用。
* **默认值：** 无
* **示例：** `-1`

**type**

* **类型：** String
* **是否必填：** 是
* **说明：** 事件类型。
* **默认值：** 无
* **示例：** `"order.ticketed"`
  {% endtab %}

{% tab title="示例" %}

```json
{
  "cid": "XXXXXXX",
  "data": {
    "orderNo": "TESTL20230922153224323",
    "orderStatus": 2,
    "paxTicketInfos": [
      {
        "airlinePNRs": [
          "S30814"
        ],
        "ancillaries": [],
        "birthday": "20160202",
        "cardExpired": "20400101",
        "cardIssuePlace": "CN",
        "cardNum": "123458",
        "cardType": "PP",
        "gender": "F",
        "name": "zhang/lisi",
        "nationality": "CN",
        "passengerType": 1,
        "ticketNos": [
          "S30814"
        ]
      },
      {
        "airlinePNRs": [
          "S30814"
        ],
        "ancillaries": [],
        "birthday": "19920202",
        "cardExpired": "20400101",
        "cardIssuePlace": "CN",
        "cardNum": "123457",
        "cardType": "PP",
        "gender": "F",
        "name": "li/si",
        "nationality": "CN",
        "passengerType": 0,
        "ticketNos": [
          "S30814"
        ]
      },
      {
        "airlinePNRs": [
          "S30814"
        ],
        "ancillaries": [],
        "birthday": "19910101",
        "cardExpired": "20400101",
        "cardIssuePlace": "CN",
        "cardNum": "123456",
        "cardType": "PP",
        "gender": "M",
        "name": "zhang/san",
        "nationality": "CN",
        "passengerType": 0,
        "ticketNos": [
          "S30814"
        ]
      }
    ]
  },
  "status": -1,
  "type": "order.ticketed"
}
```

{% endtab %}
{% endtabs %}

### 相关页面

* [Webhook 概览](/api-wen-dang/readme/webhook-gai-lan.md)
* [查询订单](/api-wen-dang/readme/yu-ding-liu-cheng-gai-lan/cha-xun-ding-dan.md)
* [事件查询](/api-wen-dang/readme/webhook-gai-lan/shi-jian-cha-xun.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://resources.atriptech.com/api-wen-dang/readme/webhook-gai-lan/ticketing-complete-notification.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
