Cancel a booking
cancel_bookingCancel a booking this connection made, for the customer, under HomeMaster's usual rules. Two calls. (1) Send reference (the hmb_ or hmr_ request_booking returned), no phone needed; for one visit of a weekly or every-2-weeks plan add visit_date, without it the whole booking is cancelled. The answer (outcome confirm_needed) says what will be cancelled, the fee, the refund and why, with a confirm_code; nothing changes. Tell the customer all of it and get their yes. (2) Call again with the same fields, confirm_code and customer_confirmed: true; the answer (outcome cancelled) says what was refunded or kept. A paid booking our team has not placed an expert on yet cancels free, refunded in full. Other outcomes say why nothing changed and what to do: refused (for a booking not made on this connection or a visit under 2 hours away, the customer manages it on My Bookings or with HomeMaster on WhatsApp; refund_failed: nothing was cancelled, try again in a few minutes). A repeat of a used code returns the first answer, never a second cancel.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| phone | No | Optional: only this connection's own bookings can be changed. If sent, the customer's number as they booked with it; it must match. Leave it out rather than ask the customer again. | |
| reference | Yes | The reference request_booking returned for this booking (starts with hmb_ or hmr_). | |
| visit_date | No | Optional: the date of the one visit to cancel, YYYY-MM-DD, from booking_status. Without it, the whole booking. | |
| confirm_code | No | Second call only: the confirm_code the first call returned. Good for 15 minutes. | |
| customer_confirmed | No | Second call only: true when the customer heard the change, its cost and why, and said yes. |