# 邮件查询

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

用这页查询与订单关联的 Atlas 邮件记录。

本页统一使用 `邮件查询` 作为主名称。

你也可能看到这个 API 被称为 `Email List`。

### 主要 API

* `queryMail.do`

### 适用场景

* 排查某个订单的航司邮件
* 检查 Atlas 是否收到了通知邮件
* 在支持跟进前查看邮件分类
* 获取短时效的邮件查看链接

### 调用前要求

至少发送一个查询条件：

* `orderNo`
* `emailReceivingDateStart` 和 `emailReceivingDateEnd`
* `createTimeStart` 和 `createTimeEnd`

每个时间范围都需控制在 `1 month` 以内。

### 主要筛选条件

* `orderNo`：精确查询订单
* 接收时间范围：查询航司邮件到达时间
* 创建时间范围：查询 Atlas 记录创建时间
* `emailCategories`：按分类过滤
* `pageIndex` 和 `pageSize`：分页

### 支持的邮件分类

常见值包括：

* `Travel Itinerary`
* `Schedule Change`
* `Payment Due`
* `Payment Success`
* `Receipt`
* `Trip Reminder`
* `PNR Cancellation Success`
* `Advertisement`
* `Duplicated Schedule Change`
* `Verification`
* `Unaccounted Cancellation`
* `Promo code`

### 注意事项

* 时间字段使用 `UTC+08:00`
* `emailReceivingDate` 是 Atlas 收到航司邮件的时间
* `createTime` 是 Atlas 创建该记录的时间
* `emailLink` 仅在 `10 minutes` 内有效
* Atlas 会对邮件分类，但不保证分类绝对准确

### 最佳实践

* 已知订单时，优先用 `orderNo`
* 排查航司通知时，用接收时间
* 对 Atlas 记录做对账时，用创建时间
* 若需要长期留痕，请自行存储邮件元数据
* 不要把 `emailLink` 当作长期访问地址

### 完整 API 参考

完整 schema 和示例见：

[邮件查询](https://resources.atriptech.com/api-wen-dang/api-can-kao/gong-ju-api/you-jian-cha-xun)
