# Webhook 概览

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

用这一组页面注册 webhook 地址，并消费事件通知。

### 概览

Webhook 会在航司变化影响到预订时自动通知你。

例如某个订单发生航变时，Atlas API 会把事件发送到你的服务端。

你可以据此更新数据库，或触发给旅客的通知。

> Atlas 仅以“尽最大努力”方式提供 webhook。它不保证所有通知都能送达。对于航变，请始终以航司发送到预订邮箱的邮件为准。

### 典型流程

{% stepper %}
{% step %}

### 注册 webhook 地址

在上线前，通过 [Webhook 注册与事件](https://resources.atriptech.com/api-wen-dang/api-can-kao/webhook-yu-shi-jian-api/webhook-zhu-ce-yu-shi-jian) 保存 webhook URL。
{% endstep %}

{% step %}

### 接收并处理事件

处理出票、航变、航司状态、邮件和事件通知。

当前主要覆盖四类 webhook：

1. 出票完成：[出票完成通知](https://resources.atriptech.com/api-wen-dang/ji-cheng-zhi-nan/webhook-gai-lan/ticketing-complete-notification)
2. 航班时刻变化：[航变通知](https://resources.atriptech.com/api-wen-dang/ji-cheng-zhi-nan/webhook-gai-lan/schedule-change-notification)
3. 航司状态变化：[航司状态更新通知](https://resources.atriptech.com/api-wen-dang/ji-cheng-zhi-nan/webhook-gai-lan/airline-status-update-notification)
4. 邮件捕获：[邮件通知](https://resources.atriptech.com/api-wen-dang/ji-cheng-zhi-nan/webhook-gai-lan/email-notification)
   {% endstep %}

{% step %}

### 必要时做对账确认

配合事件查询和订单查询，确认最终状态。

1. 事件通知：[事件通知](https://resources.atriptech.com/api-wen-dang/ji-cheng-zhi-nan/webhook-gai-lan/incident-notification)
2. 事件查询：[事件查询](https://resources.atriptech.com/api-wen-dang/ji-cheng-zhi-nan/webhook-gai-lan/shi-jian-cha-xun)
   {% endstep %}
   {% endstepper %}
