> 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/api-can-kao/webhook-yu-shi-jian-api/webhook-zhu-ce-yu-shi-jian.md).

# Webhook 注册与事件

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

用这个页面注册 webhook 地址，并在 API 参考层查询事件记录。

{% hint style="warning" %}
本页展示的完整接口地址默认用于 `sandbox` 示例。

生产环境不要直接沿用这些完整地址。

请登录 **ATRIP → 资料管理 → 企业信息** 查看你的生产 API 地址。

生产环境请以 ATRIP 中展示的地址为准。
{% endhint %}

### 本页包含内容

* `updateWebhookURL.do`：注册 webhook 地址
* `event/getPageList.do`：查询事件记录

### 典型流程

{% stepper %}
{% step %}

### 注册 webhook 地址

保存 Atlas 要回调的 webhook 地址。
{% endstep %}

{% step %}

### 接收 webhook 事件

处理出票、航变、废票、航司状态、邮件和事件通知。
{% endstep %}

{% step %}

### 必要时查询事件

用事件查询接口对账漏收或未解决的事件。
{% endstep %}
{% endstepper %}

### 适用场景

* 初次配置 webhook
* 更新 webhook 地址
* 事件对账
* 接收 `order.void` 废票状态通知
* 航变或取消后的运营跟进

### 相关页面

* [Webhook 概览](/api-wen-dang/readme/webhook-gai-lan.md)
* [废票通知](/api-wen-dang/readme/webhook-gai-lan/fei-piao-tong-zhi.md)
* [事件查询](/api-wen-dang/readme/webhook-gai-lan/shi-jian-cha-xun.md)
* [事件通知](/api-wen-dang/readme/webhook-gai-lan/incident-notification.md)

## Register Webhook

> \*\*Endpoint:\*\*\
> <https://sandbox.atriptech.com/updateWebhookURL.do>

```json
{"openapi":"3.0.1","info":{"title":"Default module","version":"1.0.0"},"security":[],"paths":{"/updateWebhookURL.do":{"post":{"summary":"Register Webhook","deprecated":false,"description":"**Endpoint:**\nhttps://sandbox.atriptech.com/updateWebhookURL.do","tags":[],"parameters":[{"name":"Accept","in":"header","description":"","required":true,"schema":{"type":"string"}},{"name":"Content-Type","in":"header","description":"","required":true,"schema":{"type":"string"}},{"name":"Accept-Encoding","in":"header","description":"","required":true,"schema":{"type":"string"}},{"name":"x-atlas-client-id","in":"header","description":"","required":true,"schema":{"type":"string"}},{"name":"x-atlas-client-secret","in":"header","description":"","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","description":"The URL for receiving webhook notifications"}},"required":["url"]}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"integer"},"msg":{"$ref":"#/components/schemas/ResponseMessage","nullable":true}},"required":["status"]}}},"headers":{}}}}}},"components":{"schemas":{"ResponseMessage":{"type":"string","description":"It serves as an additional description of the response result. Especially when the interface reports an error (`status` !=`0`), it is usually a human-readable error message. Note: Do not use this field in any programming scenarios. For example, do not judge whether the interface responds successfully based on this field. Instead, you should only determine it by checking whether the status is equal to`0`at any time."}}}}
```

## Incident List

> \*\*Endpoint:\*\*\
> <https://sandbox.atriptech.com/event/getPageList.do>

```json
{"openapi":"3.0.1","info":{"title":"Default module","version":"1.0.0"},"security":[],"paths":{"/event/getPageList.do":{"post":{"summary":"Incident List","deprecated":false,"description":"**Endpoint:**\nhttps://sandbox.atriptech.com/event/getPageList.do","tags":[],"parameters":[{"name":"Accept","in":"header","description":"","required":true,"schema":{"type":"string"}},{"name":"Content-Type","in":"header","description":"","required":true,"schema":{"type":"string"}},{"name":"Accept-Encoding","in":"header","description":"","required":true,"schema":{"type":"string"}},{"name":"x-atlas-client-id","in":"header","description":"","required":true,"schema":{"type":"string"}},{"name":"x-atlas-client-secret","in":"header","description":"","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"eventId":{"type":"string","description":"Incident ID"},"orderNo":{"type":"string","description":"Order number"},"eventType":{"type":"string","description":"Incident type:\n- `email.schedulechange`: Schedule Change-Email Notification\n- `abnormal.cancelled`: Unacounted Cancellation\n- `order.schedulechange`: Schedule Change-API Notification"},"pnr":{"type":"string","description":"Order's pnr."},"paxName":{"type":"string","description":"Order's passenger names."},"paxEmail":{"type":"string","description":"Order's passenger Email. Email address passed to the Airline."},"airline":{"type":"string","description":"Airline IATA code."},"eventStatus":{"type":"array","items":{"type":"integer"},"description":"A list containing incident stauses\n- `0`: Unconfirmed\n- `1`: Confirmed"},"eventTimeStart":{"type":"string","description":"Incident Receiving Time Start\nFormat: yyyy-MM-dd HH:mm:ss UTC+08:00"},"eventTimeEnd":{"type":"string","description":"Incident Receiving Time End\nFormat: yyyy-MM-dd HH:mm:ss UTC+08:00"},"depTimeStart":{"type":"string","description":"Departure Time Start(Departure local time)\nFormat: yyyy-MM-dd HH:mm:ss"},"depTimeEnd":{"type":"string","description":"Departure Time End(Departure local time)\nFormat: yyyy-MM-dd HH:mm:ss"},"updateTimeStart":{"type":"string"},"pageIndex":{"type":"integer","default":1,"description":"Pagination","nullable":true},"pageSize":{"type":"integer","description":"Number of records per page"}},"required":["pageSize"]}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"integer"},"msg":{"type":"string","nullable":true},"records":{"type":"array","items":{"type":"object","properties":{"eventId":{"type":"string","description":"Incident Id."},"orderNo":{"type":"string","description":"Order Number."},"eventType":{"type":"string","description":"Incident type\n-`email.schedulechange`: Schedule Change-Email Notification\n-`abnormal.cancelled`: Unacounted Cancellation\n-`order.schedulechange`: Schedule Change-API Notification"},"eventStatus":{"type":"integer","description":"Incident staus\n-`0`: Unconfirmed\n-`1`: Confirmed"},"eventTime":{"type":"string","description":"Incident recieving time.\nFormat: yyyy-MM-dd HH:mm:ss UTC+08:00"},"confirmedResult":{"type":"string","description":"Incident Reason. Schedule Change Type & Cancelled Type.","nullable":true},"confirmedRemark":{"type":"string","description":"Remark.","nullable":true},"createTime":{"type":"string","description":"Incident create time.\nFormat: yyyy-MM-dd HH:mm:ss UTC+08:00"},"airline":{"type":"string","description":"Airline IATA code."},"depTime":{"type":"string","description":"Flight depature time. Depature local time."},"confirmTime":{"type":"string","description":"Confirmed Time.\nFormat: yyyy-MM-dd HH:mm:ss UTC+08:00","nullable":true},"notified":{"type":"integer","description":"Send the notification or not. 1: YES. 0: No","nullable":true},"pnr":{"type":"string","description":"Order's pnr."},"paxName":{"type":"string","description":"Order's passenger names."},"paxEmail":{"type":"string","description":"Order's passenger Email. Email address passed to the Airline."}},"required":["eventId","orderNo","eventType","eventStatus","eventTime","createTime","airline","depTime","pnr","paxName","paxEmail"]}},"pageIndex":{"type":"string","description":"Current pagination"},"pageSize":{"type":"string","description":"Page size"},"total":{"type":"string","description":"Total number of records"}},"required":["status","pageIndex","pageSize","total","records"]}}},"headers":{}}}}}}}
```


---

# 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, and the optional `goal` query parameter:

```
GET https://resources.atriptech.com/api-wen-dang/api-can-kao/webhook-yu-shi-jian-api/webhook-zhu-ce-yu-shi-jian.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
