> 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/airline-status-update-notification.md).

# 航司状态更新通知

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

当你需要响应航司可用性变化时，使用这个 webhook。

### 触发时机

当航司在 `Active`、`Maintenance` 和 `Inactive` 之间切换时，Atlas 会发送 `airline.status`。

### 收到后建议处理

When you receive this event:

* 更新内部航司可用性状态
* 调整搜索缓存或路由策略
* 对维护中或不可用航司暂停预订流程

### 推送方式

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

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

* `type`
* `data.airline`
* `data.airlineStatus`

### 航司状态值

* `Active`
* `Maintenance`
* `Inactive`

### 典型载荷

```json
{
  "data": {
    "airline": ["TO", "HV"],
    "airlineStatus": "Active"
  },
  "status": -1,
  "type": "airline.status"
}
```

### 说明

* `status` 是内部字段，不要作为业务判断依据
* 这是运营事件，不是订单级事件
* `Maintenance` 和 `Inactive` 应视为暂不可售

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

* **类型：** Object
* **是否必填：** 是
* **说明：** 包含航司代码和对应状态。
* **默认值：** 无
* **示例：**

  ```json
  {
    "airline": ["TO", "HV"],
    "airlineStatus": "Active"
  }
  ```

**data.airline**

* **类型：** String 数组
* **是否必填：** 是
* **说明：** 本次状态更新涉及的航司代码列表。
* **默认值：** 无
* **示例：** `["TO", "HV"]`

**data.airlineStatus**

* **类型：** String
* **是否必填：** 是
* **说明：** 航司当前运行状态。
* **可选值：**
  * `Active` = 正常可用
  * `Maintenance` = 维护中
  * `Inactive` = 不可用
* **默认值：** 无
* **示例：** `"Active"`

**status**

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

**type**

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

{% tab title="示例" %}

```json
{
  "data":{
     "airline":["TO","HV"],
     "airlineStatus":"Active"},
  "status":-1,
  "type":"airline.status"
}
```

{% endtab %}
{% endtabs %}

### 相关页面

* [Webhook 概览](/api-wen-dang/readme/webhook-gai-lan.md)
* [搜索错误](/api-wen-dang/pai-zhang-yu-zhi-chi/errors-handing/sou-suo-cuo-wu.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/airline-status-update-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.
