Add trip expense
trip_expense_createAdd expenses to a trip's shared expense ledger, with who paid and how each is split. Uses the same rules as the Expenses screen in Tineo. For one expense, send description and amount; for several (a list of receipts, a spreadsheet, a whole trip's costs), send them all in expenses in one call, up to 50 per call, instead of one call per expense. Each item in expenses is added or rejected on its own; failed items come back by index with the reason, so resend only those. Get traveler IDs from trip_expenses_list. Defaults: payer is the user, date is today in the user's profile time zone, an equal split with everyone on the trip (all on the payer on a solo trip). Confirm the amounts, payers and splits with the user before calling; for a batch, confirm the list once.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| date | No | Expense date, YYYY-MM-DD. Defaults to today in the user's profile time zone; send the user's local date when you know it. | |
| notes | No | ||
| split | No | Who the cost belongs to. type payer = all of it is the payer's cost (no split). equal = divided evenly among participants (omit participants for everyone on the trip). percentage = each participant's percentage, summing to 100. exact = each participant's amount, summing to the expense amount. To make an expense 100% one person's: if they paid, use type payer with paid_by set to them; if someone else paid, use percentage with only that person at 100. | |
| amount | No | Total amount, greater than 0. | |
| vendor | No | Merchant or vendor. | |
| paid_by | No | Traveler ID from trip_expenses_list travelers, or "me". Defaults to me. | |
| trip_id | Yes | Tineo trip ID (from trips_list). | |
| category | No | ||
| currency | No | 3-letter currency code. Defaults to the trip currency, else USD. | |
| expenses | No | Several expenses in one call, each with the same fields as a single expense. Use instead of description and amount at the top level. | |
| description | No | What the expense was for, e.g. Travel insurance. |