行程历史记录
通过 Rapid 检索 API 的行程历史记录部分,您可以查看与预订相关的各个客房的历史详细信息
概述
行程历史记录对于所有预订都很有帮助,尤其是那些进行过变更的预订,因为它可用于在出现故障、问题、上报等情况下进行对账和验证。该解决方案十分灵活,您可以在代理/服务工具以及面向客户的网站、App 等中使用。
通过传递 include=history
标记,行程历史记录可以包含在现有的检索 API 响应中,并且将包含有关预订行程的历史详细信息。预订中的所有客房都将有一个单独的历史记录部分,每个部分将包含三个预订事件对象 - created
、modified
和 canceled
。此外,您还将看到 itinerary_history
部分,其中提供由 Expedia Group 客服进行的行程级别调整。
created | modified | canceled |
---|---|---|
该事件对象将包含原始预订的详细信息。 | 该事件对象将包含预订变更的详细信息。* | 该事件对象将包含任何预订取消的详细信息。 |
如果您在同一流程中同时进行多项硬性变更(会产生财务影响的变更),那么历史记录中将只有一个 modified
事件。但是,如果逐个单独进行硬性变更,那么历史记录中将显示多个 modified
对象。
*只有通过我们的 API 或 Expedia Group 服务/客服工具对客房进行硬性变更时,才会在特定客房的行程历史记录中生成 modified
事件。通过 变更详细信息 API 或 Expedia Group 服务/客服工具对客房进行不产生财务影响的变更(例如姓名变更、吸烟偏好、特殊要求变更等)将被视为软性变更,不会作为新的修改事件加以反映,但它们将合并到该客房的最新事件中。
例如,以下操作将生成这些行程历史记录详细信息:
- 创建单间客房预订会生成
created
事件。 - 通过变更详细信息 API 或 Expedia Group 服务/客服工具更新特殊要求不会生成
modified
事件,上一步创建的现有created
事件将显示更新/最新的special_request
。 - 通过硬性变更 API 或 Expedia Group 服务/客服工具要求将客房变更为其他入住日期将生成包含新入住日期的
modified
事件。 - 通过变更详细信息 API 或 Expedia Group 服务/客服工具更新
given_name
不会生成modified
事件,来自上一步的现有modified
事件将显示更新/最新的given_name
。 - 取消客房会生成
canceled
事件。
要查看预订的历史记录,您应使用 include=history
标记调用行程检索 API。响应将返回行程级别和客房级别的详细信息。
示例:
{
"itinerary_id": "8999989898988",
"rooms": [ ... ],
...
"itinerary_history": [
{
"history_id": "842737548",
"event_timestamp": "2023-06-27T13:31:15.523Z",
"event_type": "adjustment",
"amount": {
"value": "-32.10",
"currency": "USD"
},
"agent_id": "10203"
}
],
"room_history": [
[
{
"history_id": "42b4240c-109d-4bd6-a141-1db50619b700",
"event_timestamp": "2023-06-27T20:54:47.551Z",
"event_type": "created",
"event_source": "rapid_api",
"confirmation_id": {
"expedia": "34222139"
},
"status": "canceled",
"checkin": "2023-06-27",
"checkout": "2023-06-29",
"number_of_adults": 1,
"given_name": "Jane",
"family_name": "Doe",
"bed_group_id": "37310",
"smoking": false,
"special_request": "Top floor or away from street please",
"rate": {
"id": "240273974",
"merchant_of_record": "property",
"refundable": false,
"cancel_refund": {
"amount": "-76.71",
"currency": "USD"
},
"cancel_penalties": [
{
"currency": "USD",
"nights": "1",
"start": "2023-06-27T14:00:00.000-07:00",
"end": "2023-06-27T15:00:00.000-07:00"
}
],
"pricing": {
"nightly": [
[
{
"value": "66.02",
"type": "base_rate",
"currency": "USD"
},
{
"value": "10.69",
"type": "tax_and_service_fee",
"currency": "USD"
}
],
[
{
"value": "66.02",
"type": "base_rate",
"currency": "USD"
},
{
"value": "10.69",
"type": "tax_and_service_fee",
"currency": "USD"
}
]
],
"totals": {
"inclusive": {
"billable_currency": {
"value": "153.42",
"currency": "USD"
}
},
"exclusive": {
"billable_currency": {
"value": "132.04",
"currency": "USD"
}
}
}
}
},
"amount_charged": {
"billable_currency": {
"value": "153.42",
"currency": "USD"
}
},
"room_id": "213014272"
},
{
"history_id": "e5f4221f-31bc-406c-a8e5-00aa46d13564",
"event_timestamp": "2023-06-27T21:11:31.578Z",
"event_type": "modified",
"event_source": "rapid_api",
"confirmation_id": {
"expedia": "34232470"
},
"status": "canceled",
"checkin": "2023-06-27",
"checkout": "2023-06-30",
"number_of_adults": 1,
"given_name": "Jane",
"family_name": "Doe",
"bed_group_id": "37310",
"smoking": false,
"special_request": "Top floor or away from street please",
"rate": {
"id": "240242975",
"merchant_of_record": "property",
"refundable": false,
"cancel_refund": {
"amount": "-191.100",
"currency": "USD"
},
"cancel_penalties": [
{
"currency": "USD",
"nights": "1",
"start": "2023-06-27T14:00:00.000-07:00",
"end": "2023-06-27T15:00:00.000-07:00"
}
],
"amenities": [
"2192",
"2109"
],
"pricing": {
"nightly": [
[
{
"value": "83.000",
"type": "base_rate",
"currency": "USD"
},
{
"value": "12.550",
"type": "tax_and_service_fee",
"currency": "USD"
}
],
[
{
"value": "83.000",
"type": "base_rate",
"currency": "USD"
},
{
"value": "12.550",
"type": "tax_and_service_fee",
"currency": "USD"
}
],
[
{
"value": "83.000",
"type": "base_rate",
"currency": "USD"
},
{
"value": "12.550",
"type": "tax_and_service_fee",
"currency": "USD"
}
]
],
"totals": {
"inclusive": {
"billable_currency": {
"value": "286.650",
"currency": "USD"
}
},
"exclusive": {
"billable_currency": {
"value": "249.000",
"currency": "USD"
}
}
}
}
},
"amount_charged": {
"billable_currency": {
"value": "209.940",
"currency": "USD"
}
},
"penalty": {
"billable_currency": {
"value": "76.71",
"currency": "USD"
}
},
"room_id": "213018273"
},
{
"history_id": "e5f4221f-31bc-406c-a8e5-00aa46d13564",
"event_timestamp": "2023-06-27T21:12:35.827852619Z",
"event_type": "canceled",
"event_source": "rapid_api",
"confirmation_id": {
"expedia": "34232470"
},
"status": "canceled",
"checkin": "2023-06-27",
"checkout": "2023-06-30",
"number_of_adults": 1,
"given_name": "Jane",
"family_name": "Doe",
"bed_group_id": "37310",
"smoking": false,
"special_request": "Top floor or away from street please",
"rate": {
"id": "242273975",
"merchant_of_record": "property",
"refundable": false,
"cancel_refund": {
"amount": "-191.100",
"currency": "USD"
},
"cancel_penalties": [
{
"currency": "USD",
"nights": "1",
"start": "2023-06-27T14:00:00.000-07:00",
"end": "2023-06-27T15:00:00.000-07:00"
}
],
"amenities": [
"2192",
"2109"
],
"pricing": {
"nightly": [
[
{
"value": "83.000",
"type": "base_rate",
"currency": "USD"
},
{
"value": "12.550",
"type": "tax_and_service_fee",
"currency": "USD"
}
],
[
{
"value": "83.000",
"type": "base_rate",
"currency": "USD"
},
{
"value": "12.550",
"type": "tax_and_service_fee",
"currency": "USD"
}
],
[
{
"value": "83.000",
"type": "base_rate",
"currency": "USD"
},
{
"value": "12.550",
"type": "tax_and_service_fee",
"currency": "USD"
}
]
],
"totals": {
"inclusive": {
"billable_currency": {
"value": "286.650",
"currency": "USD"
}
},
"exclusive": {
"billable_currency": {
"value": "249.000",
"currency": "USD"
}
}
}
}
},
"amount_refunded": {
"billable_currency": {
"value": "191.100",
"currency": "USD"
}
},
"penalty": {
"billable_currency": {
"value": "95.550",
"currency": "USD"
}
},
"room_id": "213014273"
}
]
]
}
有关包含历史记录的行程响应的完整示例,请查看行程检索端点名为 Itinerary with History
的示例。