Request a Booking (sends SMS confirmation code)
request_bookingUse this only after the user explicitly asks to start a Johnson Bros. booking and confirms their own contact details, service address, issue, and preferred windows. It sends a six-digit SMS code and does not schedule a visit. Do not claim an appointment exists until confirm_booking returns status:confirmed and booked:true.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Customer full name | |
| No | Customer email as given. Required when customer_type is new; optional for returning customers. Never invent it. | ||
| notes | No | Issue description / anything the technician should know | |
| phone | Yes | Customer mobile number — receives the 6-digit confirmation code | |
| address | Yes | Full service address: street, optional unit, city, two-letter state (default MA) and five-digit ZIP. The ZIP decides service-area eligibility; the booking is placed at this address. | |
| service | Yes | Requested service, e.g. "water heater replacement" | |
| confirmed | Yes | True only after the user explicitly asks to start this booking request and send the SMS code | |
| customer_type | No | Required for booking: answer to Have you used us before? | |
| referral_code | No | Referral code the customer supplied, exactly as given; omit when none was offered. | |
| heard_about_us | No | Required for new customers: where they found us | |
| time_preference | No | Fallback time-of-day preference if none of the preferred windows is open | any |
| preferred_windows | No | Preferred arrival windows from get_availability (start_time/end_time ISO strings) | |
| promotion_review_requested | No | True only when the customer asked for a current promotion to be reviewed with this visit; the office reviews it, nothing is applied automatically. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| error | No | ||
| status | Yes | ||
| success | Yes | ||
| next_step | Yes | ||
| booking_id | No | ||
| error_code | No | ||
| expires_at | No | ||
| code_sent_to | No | ||
| review_sandbox | No | ||
| in_service_area | No | ||
| attempts_allowed | No | ||
| service_area_notice | No | ||
| sandbox_verification_code | No |