cancel-booking

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

cancel-booking

取消预订

Cancel a hotel booking. Destructive action — confirm first.
取消酒店预订。破坏性操作——请先确认。

When to use

使用场景

The user explicitly asks to cancel:
  • "Cancel BK_2026_05_001"
  • "I want to cancel my hotel"
  • "Refund my booking"
For checking status only, use
manage-booking
instead.
当用户明确提出取消请求时:
  • "Cancel BK_2026_05_001"
  • "我想取消我的酒店预订"
  • "退还我的预订费用"
若仅需查询预订状态,请使用
manage-booking

Prerequisites

前置条件

  1. bookingId
  2. Last name on the booking
  3. Email on the booking
If unsure whether the booking is still cancellable for free, run
manage-booking
first to see the
cancellationDeadline
and
isCancellable
flag.
  1. bookingId
  2. 预订人姓氏
  3. 预订关联邮箱
若不确定是否仍可免费取消,请先调用
manage-booking
查看
cancellationDeadline
isCancellable
标识。

Pre-cancellation confirmation

取消前确认

Before cancelling, especially if the free-cancellation window has passed:
About to cancel BK_2026_05_001 — Park Hyatt Tokyo, May 1–5. ⚠️ Free cancellation expired on April 29. A cancellation fee may apply.
Are you sure you want to cancel? (yes/no)
If still inside the free window, a lighter confirmation is fine:
About to cancel BK_2026_05_001 — Park Hyatt Tokyo, May 1–5. You're inside the free cancellation window — no fee.
Confirm? (yes/no)
Only proceed after the user says yes.
取消前,尤其是已过免费取消窗口期时:
即将取消BK_2026_05_001——东京柏悦酒店,5月1日至5日。 ⚠️ 免费取消期限已于4月29日到期,可能会收取取消费用。
您确定要取消吗?(是/否)
若仍在免费取消窗口期内,可简化确认流程:
即将取消BK_2026_05_001——东京柏悦酒店,5月1日至5日。 您仍处于免费取消窗口期内——无需支付费用。
确认取消?(是/否)
仅在用户回复“是”后继续执行取消操作。

How to call

调用方式

bash
npx @tvl-justin/travel-cli@latest cancel \
  --booking-id "<bookingId>" \
  --last-name "<lastName>" \
  --email "<email>"
bash
npx @tvl-justin/travel-cli@latest cancel \
  --booking-id "<bookingId>" \
  --last-name "<lastName>" \
  --email "<email>"

Output

输出结果

json
{
  "bookingId": "BK_2026_05_001",
  "status": "CANCELLED",
  "refundAmountUSD": 1800,
  "refundEta": "5-7 business days",
  "cancellationFeeUSD": 0
}
json
{
  "bookingId": "BK_2026_05_001",
  "status": "CANCELLED",
  "refundAmountUSD": 1800,
  "refundEta": "5-7 business days",
  "cancellationFeeUSD": 0
}

Presenting to the user

向用户展示结果

✅ Booking BK_2026_05_001 cancelled. Refund of $1,800 USD will appear on your card in 5–7 business days. No cancellation fee.
If a fee was charged:
✅ Booking cancelled. Refund: $1,440 USD (a $360 cancellation fee was applied because we're past the free-cancellation deadline).
✅ 预订BK_2026_05_001已取消。 1800美元退款将在5-7个工作日内到账至您的银行卡。 未收取取消费用。
若已收取费用:
✅ 预订已取消。 退款金额:1440美元(因已过免费取消期限,已收取360美元取消费用)。

Errors

错误处理

  • 404 Not Found
    — Booking ID not found, or last name / email mismatch.
  • 409 Already Cancelled
    — Booking was already cancelled. Tell the user, don't retry.
  • Network error
    — Tell the user the cancellation didn't go through and ask whether to retry.
  • 404 Not Found
    ——未找到预订ID,或姓氏/邮箱不匹配。
  • 409 Already Cancelled
    ——预订已取消。告知用户即可,无需重试。
  • Network error
    ——告知用户取消操作未成功,并询问是否重试。