Create Shared Bill
create_billUse this when the user wants to create and share an itemized bill for a restaurant meal or shared purchase, with a link where participants select their own items and calculate their shares. Accept items from a receipt photo, typed list or plain-language description; no receipt or separately supplied grand total is required. For a EUR 20 pizza and two beers at EUR 5 each, submit pizza 1 x 20 and beer 2 x 5, bill total EUR 30. If no total was supplied, calculate it exactly from the stated items; clarify missing currency or ambiguous amounts, and do not invent taxes or fees. Do not call merely to read a receipt, answer simple arithmetic, collect payments or book a restaurant. Use update_bill for changes to an existing bill. Anyone with the returned share_url can view it. Supply positive quantities, nonnegative prices and one currency; each item total_price must equal unit_price times quantity, and bill total_price must equal the sum of item totals. Include separate receipt taxes in the prices of eligible items under local rules, including different food and alcohol tax groups; never create standalone tax items or add included taxes twice. When a receipt or user-supplied final total is present, keep that control total fixed. If totals differ, recheck the source items and correct extraction or arithmetic; never change the control total or invent adjustments to pass validation. After reconciling the receipt, an explicitly requested extra tip adds its exact amount to the bill total; record the receipt total and addition in info, and never add an already included tip twice. Represent requested tips as one selectable item with quantity equal to the explicitly supplied participant count and unit_price equal to total tips divided by that count; ask for a missing count and never round away a remainder. Shared items may be split into selectable portions by dividing their unchanged line total by the requested count. Reconcile discounts and tips before calling; do not guess unclear receipt values. Returns the saved bill, share_url and bill UI. Requires OAuth; no profile lookup is needed. Creation is not idempotent: do not blindly retry after a timeout or an ambiguous server error.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| info | Yes | Relevant bill notes, for example shared portions or an explicitly requested tip addition; omit receipt personal data | |
| items | Yes | Complete bill item list in one currency; updates delete omitted items and their selections | |
| title | Yes | Short bill title based on the user's description, for example Dinner with friends | |
| total_price | Yes | Final printed receipt total or explicit user-supplied total; keep that control total fixed. For items described in chat without a supplied total, calculate the exact item sum. Only explicit user-requested additions or removals change a reconciled total by their exact amount; record them in info. Splitting items preserves the total. Never hide inconsistent inputs or invent balancing adjustments |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Bill ID | |
| info | Yes | Additional bill information | |
| items | Yes | Bill items with selections | |
| title | Yes | Bill title | |
| owner_id | Yes | Bill owner user ID | |
| share_url | Yes | Bill share URL | |
| created_at | Yes | Creation time in RFC3339 UTC | |
| updated_at | Yes | Update time in RFC3339 UTC |