行程歷史記錄

透過 Rapid 的「行程擷取 API」中的行程歷史記錄部分,您可以輕鬆查看與每筆個別客房預訂相關的歷史詳情

簡介

行程歷史記錄能在所有預訂派上用場,特別是那些已進行變更的預訂,可用於因故障、各種問題、問題回報等情況下進行對帳與驗證。該解決方案非常彈性,您可以外掛至客服專員/服務工具以及旅客導向的網站、App 等。

行程歷史記錄可藉由傳遞 include=history 標幟的方式納入現有的「行程擷取 API」回應中,並將包含有關預訂行程的歷史詳情。預訂中的所有客房皆具有一個獨立的歷史記錄部分,每部分會包含三個預訂活動物件:createdmodifiedcanceled。此外,您還會看到 itinerary_history 部分,該部分提供由 Expedia Group 客服專員所做的行程等級調整。

createdmodifiedcanceled
活動物件將包含原始預訂的詳情。活動物件將包含變更預訂的詳情*。活動物件將包含取消預訂的詳情。

如果您在同一流程中同時進行多個有價差變更 (會對財務造成影響的變更),則歷史記錄只會顯示一個 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 的「行程擷取」端點的範例。

這個頁面有幫助嗎?
我們能如何改善內容?
感謝您協助我們進行改善!