Request a free trial class (the parent confirms on WhatsApp)
request_trial_bookingRequest a FREE Codinzy trial class for a parent's child at a time from get_free_trial_times. Use it only after the parent chose the time and agreed. Nothing is booked yet: the time is held for about 30 minutes and the parent confirms from their own WhatsApp (a Confirm button in a WhatsApp message, or the confirm_url you show them, where they enter a code we send to their WhatsApp). Inputs: phone (the parent's WhatsApp number in E.164, e.g. +8801712345678), grade (1-12), timezone (IANA, e.g. Asia/Dhaka), slot_token (from the free times), optional child_name. Returns request_id, status ("pending"), expires_at and confirmation (channel "whatsapp" or "link" with confirm_url): tell the parent what to do, then poll get_trial_booking_request until "confirmed", "expired" or "cancelled". On a refusal, tell the parent the error sentence; for slot_unavailable or slot_taken offer new times. Never ask for passwords, emails or payment details.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"phone": "<phone>",
"grade": "<grade>",
"timezone": "<timezone>"
},
"name": "request_trial_booking"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| grade | Yes | The child's school grade, 1-12 | |
| phone | Yes | The parent's WhatsApp number in E.164, e.g. +8801712345678 | |
| timezone | Yes | The parent's IANA time zone, e.g. Asia/Dhaka | |
| agent_name | No | Shown to the parent, e.g. ChatGPT | |
| child_name | No | The child's first name (optional) | |
| slot_token | No | The slot_token of the time the parent chose (from get_free_trial_times) | |
| start_time | No | ISO 8601 start with offset, only when there is no slot_token | |
| utm_source | No | Your assistant, e.g. chatgpt.com |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| booked | Yes | True only once the parent confirmed: the class is booked | |
| reason | No | Why it ended (not pending) | |
| status | Yes | ||
| message | No | ||
| next_step | Yes | ||
| expires_at | No | UTC; the hold ends then unless the parent confirms | |
| request_id | Yes | Opaque reference (tbr_...): poll get_trial_booking_request with it | |
| trial_class | No | ||
| confirmation | No |