Create Lunch Order Draft
create_lunch_order_draftCreates an unpaid draft lunch order with one or more items - nothing is charged until pay_lunch_order_draft commits it. Use for multi-item orders or when the user should review the total first; each items entry pairs a menu_item_id with a quantity. The draft total is the sum of item prices times quantities plus nothing else until pay_lunch_order_draft. To change or abandon the draft, use update_lunch_order_draft or discard_lunch_order_draft. FINANCIAL - confirm student, items, and date before calling.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| items | Yes | Line items to order; get IDs and prices from get_lunch_menu | |
| menu_date | Yes | Date the lunch is served, YYYY-MM-DD | |
| student_id | No | Student ID (must be your own student; from get_my_context); required when the user has more than one student, defaults to their only student | |
| school_slug | No | School slug (from get_my_context); defaults to the active school |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | No | Draft order ID - pass to pay_lunch_order_draft | |
| items | No | Draft line items | |
| status | No | Order status (draft) | |
| menuDate | No | Date the lunch is served, YYYY-MM-DD | |
| studentId | No | Student the order is for | |
| schoolSlug | No | School the order was placed at | |
| itemTotalCents | No | Item total in cents - charged on finalize |