For the complete documentation index, see llms.txt. This page is also available as Markdown.

Webhook 注册与事件

Atlas API webhook 注册和事件查询参考,用于端点设置、更新和事件对账。

💬 需要帮助? 如果遇到问题,请在帮助中心咨询 Eva,快速获取诊断建议。

咨询 Eva

使用此页面从 API 参考层注册你的 webhook 端点和查询事件记录。

在需要以下内容时从此处开始:

  • 在上线前注册或更新 webhook URL

  • 在错过或未解决的事件后查询事件记录

  • 将 webhook 投递与事件记录进行对账

常见问题

何时应注册 webhook URL?

在上线前注册 webhook URL。

然后在接收端点发生变更时更新它。

同一 URL 接收所有支持的事件,包括 order.void

何时应查询事件?

当 webhook 投递、航班时刻变更处理或运营跟进需要更深层次对账时,查询事件。

当事件轨迹不完整或在 webhook 处理后仍不清楚时,使用事件查询。

履约流程订单应如何使用 webhook 和事件查询?

将 webhook 用作早期信号。

当事件轨迹不完整时,使用事件查询。

在 5 分钟履约窗口期间保持主动订单轮询。

本页面涵盖内容

  • updateWebhookURL.do 用于 webhook 注册

  • event/getPageList.do 用于事件查询

后续步骤

使用 Webhook 概述了解运营模式和事件覆盖范围。

当需要更深入的事件跟进时,使用事件查询事件通知

典型流程

1

注册你的 webhook URL

保存 Atlas 应调用的端点以进行 webhook 投递。

2

接收 webhook 事件

处理出票、作废、航班时刻变更、航司状态、邮件和事件通知。

对于履约流程订单,使用这些事件减少响应时间,而非替代订单查询。

3

在需要时查询事件

使用事件查询来对账错过或未解决的事件。

在需要时使用此功能

  • 初始 webhook 设置

  • webhook 端点更新

  • 事件对账

  • 航班时刻变更或取消后的运营跟进

注册范围

使用 updateWebhookURL.do 注册一个 webhook URL。

Atlas 将该 URL 用于所有支持的 webhook 事件类型。

包括 order.void

在开始使用 getOfferPrice.do 进行履约流量之前,应已完成同一注册。

相关页面

Register Webhook

post

Endpoint: https://sandbox.atriptech.com/updateWebhookURL.do

Header parameters
AcceptstringRequiredExample: application/json
Content-TypestringRequiredExample: application/json
Accept-EncodingstringRequiredExample: gzip
x-atlas-client-idstringRequiredExample: <YOUR_CLIENT_ID>
x-atlas-client-secretstringRequiredExample: <YOUR_CLIENT_SECRET>
Body
urlstringRequired

The URL for receiving webhook notifications

Responses
200Success
application/json
statusintegerRequired
msgstring · nullableOptional

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 to0at any time.

post/updateWebhookURL.do
200Success

Incident List

post

Endpoint: https://sandbox.atriptech.com/event/getPageList.do

Header parameters
AcceptstringRequiredExample: application/json
Content-TypestringRequiredExample: application/json
Accept-EncodingstringRequiredExample: gzip
x-atlas-client-idstringRequiredExample: <YOUR_CLIENT_ID>
x-atlas-client-secretstringRequiredExample: <YOUR_CLIENT_SECRET>
Body
eventIdstringOptional

Incident ID

orderNostringOptional

Order number

eventTypestringOptional

Incident type:

  • email.schedulechange: Schedule Change-Email Notification
  • abnormal.cancelled: Unacounted Cancellation
  • order.schedulechange: Schedule Change-API Notification
pnrstringOptional

Order's pnr.

paxNamestringOptional

Order's passenger names.

paxEmailstringOptional

Order's passenger Email. Email address passed to the Airline.

airlinestringOptional

Airline IATA code.

eventStatusinteger[]Optional

A list containing incident stauses

  • 0: Unconfirmed
  • 1: Confirmed
eventTimeStartstringOptional

Incident Receiving Time Start Format: yyyy-MM-dd HH:mm:ss UTC+08:00

eventTimeEndstringOptional

Incident Receiving Time End Format: yyyy-MM-dd HH:mm:ss UTC+08:00

depTimeStartstringOptional

Departure Time Start(Departure local time) Format: yyyy-MM-dd HH:mm:ss

depTimeEndstringOptional

Departure Time End(Departure local time) Format: yyyy-MM-dd HH:mm:ss

updateTimeStartstringOptional
pageIndexinteger · nullableOptional

Pagination

Default: 1
pageSizeintegerRequired

Number of records per page

Responses
200Success
application/json
statusintegerRequired
msgstring · nullableOptional
pageIndexstringRequired

Current pagination

pageSizestringRequired

Page size

totalstringRequired

Total number of records

post/event/getPageList.do
200Success

Last updated

Was this helpful?