> ## Documentation Index
> Fetch the complete documentation index at: https://docs.gojinko.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Cancel Car Rental Booking

> Preview the cancellation fee, cancel a car rental, or re-read the latest attempt

Cancel a car rental booked through Jinko and tell the customer what it costs before anything happens. The fee in force is quoted first and the quote is persisted, so the cancellation that follows is bound to the terms the customer actually saw; the refund is the amount paid less that fee, issued on Jinko's side. Guest auth, booking\_ref + item\_id (plus last\_name for guests) from the confirmation email. Changing a rental (dates, vehicle, extras) is not available; the only path to a different rental is to cancel and book again.

<Accordion title="Tool description (what the LLM sees)" defaultOpen={false}>
  ```text theme={null}
  First call get_booking with booking_ref (and last_name for guests), choose the intended items[] entry, and inspect its servicing eligibility and refusal reasons. Use the SAME booking_ref + item_id for every action, including commit and status. item_id is the stable booked item, even after an exchange. last_name is required for guests and optional for authenticated owners. If a 409 returns items[], ask the customer to choose and retry with that item_id.

  Cancel a car rental booking (Auto Europe) and refund the customer's payment less the cancellation fee. No login required, authenticate with the Jinko booking reference and the driver's last name. Use this when the customer wants to CANCEL. If they want to change dates, change the vehicle, upgrade, or amend the rental, say plainly that modifications are not available: the options are keeping the booking as is, or cancelling it (this tool, fee shown first) and booking a new rental with car_search.

  PREREQUISITES:
  - booking_ref (JNK-XXXXXX) and last_name of the driver, from the booking confirmation email.

  WORKFLOW:
  1. action="preview" with booking_ref + item_id (plus last_name for guests) → quotes the fee in force and the refund it would leave, and returns a cancellation_id. NOTHING is cancelled. Where the quote carries an expires_at it is committable until then; preview again after it.
  2. Show the customer the fee and the refund and get explicit confirmation.
  3. action="commit" with booking_ref + item_id (plus last_name for guests) + cancellation_id → cancels at the supplier and refunds. Safe to repeat: a committed cancellation is reported as it stands rather than cancelled twice, and the customer's email is never re-sent.
  4. action="status" with booking_ref + item_id (plus last_name for guests) → re-reads the latest attempt at any time. Read-only; polling it can never start a cancellation.

  WHEN A PERSON HAS TO COMPLETE IT (manual_required):
  - A preview with cancellable: false AND manual_required: true cannot be completed online, the fee could not be established, the rental was changed after it was paid for, or the fee is in another currency or above the rental; refund_review_reason says which. No refund figure is given and none may be quoted.
  - It is not a dead end: if the customer explicitly agrees to hand the cancellation to a Jinko agent, call action="commit" with the same cancellation_id and manual_ok: true. The cancellation is then recorded for the agent (state "pending", refund_pending_review true); nothing is sent to the rental company by that call, and the agent completes it and settles the refund by hand.
  - A commit of such a preview WITHOUT manual_ok is refused as manual_required, the tool's answer then tells you exactly that. Never send manual_ok pre-emptively, and never without the customer's agreement: it is their consent, not a retry flag.

  READING THE MONEY, this is the part that goes wrong:
  - fee_known: false means the supplier published NO fee schedule we could resolve. The fee and refund fields are then ABSENT, not zero. Say "we will confirm the cancellation fee". NEVER present that as free cancellation.
  - refund_pending_review: true means the booking IS cancelled (or, with state "pending", recorded for a Jinko agent) but a human still owes the customer the refund answer, do not quote refund_amount as final.
  - Amounts are {value, currency, decimal_places} in MINOR units: divide by 10^decimal_places to display.

  IMPORTANT:
  - Always preview before committing, the cancellation_id from preview is REQUIRED for commit, and it is what binds the charge to the quoted fee.
  - Always get explicit customer confirmation before calling commit. This ends the rental.
  - state is preview | pending | confirmed | rejected | failed. "pending" means recorded but not finished, the platform is still completing it, or a person has it, so follow it with status and do not commit again. "rejected" means the supplier declined and the booking still stands, surface rejected_reason; it is an outcome, not an error.
  - A commit can be REFUSED without anything happening, and the answer says why and what to do: the quote expired (preview again), the refund moved since the preview (a fresh cancellation_id is given, show the new figure, then commit that one), an exchange or another cancellation is in flight (wait for it), the rental is no longer cancellable, or the refund cannot be covered yet. None of these means the booking reference or last name is wrong.
  - A wrong booking_ref / last_name pair answers "not found" and never reveals which half was wrong. Re-check both with the customer.
  - A booking with no cancellation on record answers "no attempt" on status, run preview first.
  ```
</Accordion>

## Parameters

| Name              | Type                                       | Required | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| ----------------- | ------------------------------------------ | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `action`          | `enum ("preview" \| "commit" \| "status")` | Yes      | Action to perform: "preview" to quote the cancellation fee and the refund it would leave (nothing is cancelled) and obtain a cancellation\_id, "commit" to cancel at the supplier and refund, "status" to read the latest attempt.                                                                                                                                                                                                                                                                                                                                                                                                            |
| `booking_ref`     | `string`                                   | Yes      | Jinko booking reference returned by get\_booking.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| `item_id`         | `integer`                                  | No       | Stable booked item\_id from get\_booking.items\[]. Select the item to service and send its item\_id on every action. May be omitted only when the booking has exactly one item in this domain.                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| `last_name`       | `string`                                   | No       | Primary traveler last name. Required for guests; optional for an authenticated owner of the booking.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| `cancellation_id` | `string`                                   | No       | The "ccl\_…" reference a prior `action: "preview"` returned. REQUIRED for `action: "commit"`. It binds the cancellation to the fee the customer was quoted; one belonging to another booking is refused as not-found.                                                                                                                                                                                                                                                                                                                                                                                                                         |
| `reason`          | `string`                                   | No       | Optional free-text cancellation reason. Carried into the cancellation email the customer receives. Accepted on `action: "commit"` only.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| `manual_ok`       | `boolean`                                  | No       | Accepted on `action: "commit"` only. Send `true` ONLY when the preview answered `manual_required: true` (or the commit was refused with `manual_required`) AND the customer has explicitly agreed to hand the cancellation to a Jinko agent. The cancellation is then recorded for a person to complete, nothing is sent to the rental company by that call, the answer is state "pending" with refund\_pending\_review true, and the agent settles the refund by hand. Never send it pre-emptively: on a preview that can be committed online it changes nothing, and on a manual one it is a consent the customer must actually have given. |
| `user_intent`     | `string`                                   | No       | The end user's current request in their own words, e.g. "find a cheap flight to Tokyo in mid-June". Pass it as-is when short; otherwise condense the goal and constraints into 1-2 sentences. Strip personal identifiers (names, emails, phone numbers, addresses, payment details), replace them with placeholders like "\[name]". Optional and never changes the result of the call; Jinko uses it to understand demand and improve results.                                                                                                                                                                                                |
