> 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/schedule-change-notification.md).

# 航变通知

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

当已出票行程发生变化时，使用这个 webhook。

### 触发时机

当航段发生变化或被取消时，Atlas 会发送 `order.schedulechange`。

### 收到后建议处理

收到事件后，建议：

* 对比 `previousSegs`、`revisedSegs` 和 `originalSegs`
* 判断是时刻变更还是航班取消
* 通知受影响旅客
* 按需触发改签、退款或客服流程

### 推送方式

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

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

* `type`
* `data.orderNo`
* `data.scheduleChangeType`
* `data.previousSegs`
* `data.revisedSegs`
* `data.originalSegs`

### 航变类型

* `1`：航变
* `2`：航班取消

### 典型载荷

```json
{
  "cid": "XXXXXXX",
  "notificationId": "20230917143240511TATVO",
  "status": 0,
  "type": "order.schedulechange",
  "data": {
    "orderNo": "ATXFQ20230720193244809",
    "scheduleChangeType": 1,
    "previousSegs": [],
    "revisedSegs": [],
    "originalSegs": []
  }
}
```

### 说明

* `status` 表示事件确认状态，不代表订单成功状态
* 取消场景下，`revisedSegs` 可能为空
* `originalSegs` 保留旅客最初预订的行程

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

* **类型：** String
* **是否必填：** 是
* **说明：** 用于跟踪请求的客户唯一标识。

**notificationId**

* **类型：** String
* **是否必填：** 是
* **说明：** 通知事件唯一标识。

**status**

* **类型：** Integer
* **是否必填：** 是
* **说明：** 事件状态。
* **可选值：**
  * `0`：未确认
  * `1`：已确认

**type**

* **类型：** String
* **是否必填：** 是
* **说明：** 固定为 `order.schedulechange`。

**data.orderNo**

* **类型：** String
* **是否必填：** 是
* **说明：** 订单唯一编号。

**data.scheduleChangeType**

* **类型：** Integer
* **是否必填：** 是
* **说明：** 航变类型。
* **可选值：**
  * `1`：航变
  * `2`：航班取消

**data.previousSegs**

* **类型：** Object 数组
* **说明：** 本次变更前的航段信息。

**data.revisedSegs**

* **类型：** Object 数组
* **说明：** 本次变更后的航段信息。取消场景可能为空数组。

**data.originalSegs**

* **类型：** Object 数组
* **说明：** 旅客下单时的原始航段信息。
  {% endtab %}

{% tab title="示例" %}

```json
{
    "cid": "XXXXXXX",
    "notificationId": "20230917143240511TATVO",
    "status": 0,
    "type": "order.schedulechange",
    "data": {
        "orderNo": "ATXFQ20230720193244809",
        "scheduleChangeType": 1,
        "previousSegs": [
            {
                "arrAirport": "SGN",
                "arrTerminal": "",
                "arrTime": "2023-07-24 21:30:00",
                "carrier": "VJ",
                "codeShare": false,
                "depAirport": "HKG",
                "depTerminal": "",
                "depTime": "2023-07-24 19:50:00",
                "flightNumber": "VJ877",
                "direction": 1
            }
        ],
        "revisedSegs": [
            {
                "arrAirport": "SGN",
                "arrTerminal": "",
                "arrTime": "2023-07-24 21:30:00",
                "carrier": "VJ",
                "codeShare": false,
                "depAirport": "HKG",
                "depTerminal": "",
                "depTime": "2023-07-24 19:50:00",
                "flightNumber": "VJ877",
                "direction": 1
            }
        ],
        "originalSegs": [
            {
                "arrAirport": "SGN",
                "arrTerminal": "",
                "arrTime": "2023-07-24 21:30:00",
                "carrier": "VJ",
                "codeShare": false,
                "depAirport": "HKG",
                "depTerminal": "",
                "depTime": "2023-07-24 19:50:00",
                "flightNumber": "VJ877",
                "direction": 1
            }
        ]
    }
}
```

{% endtab %}
{% endtabs %}

### 相关页面

* [Webhook 概览](/api-wen-dang/readme/webhook-gai-lan.md)
* [事件通知](/api-wen-dang/readme/webhook-gai-lan/incident-notification.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/schedule-change-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.
