Add expense to report
Puts an existing expense of yours on a draft report.
POST https://cotlet.dev/api/v1/expensify/reports/{report_id}/expenses/{expense_id}/to-report
write
Adds one of your own expenses to a Draft report and returns the new total. Only expenses in your own account can be added, and an expense that is on hold is accepted but will move to a new Draft report if you submit with unheld ones. It reaches no one and can be undone in Expensify, so it does not wait for your OK.
Parameters
| Name | Type | Description |
|---|---|---|
| report_id string required | string | Report ID from list_reports. |
| expense_id string required | string | Expense ID from list_expenses. |
Request
curl -X POST https://cotlet.dev/api/v1/expensify/reports/report_8c41d2/expenses/expense_8c41d2/to-report \
-H "Authorization: Bearer $COTLET_API_KEY" result = client.call("expensify", "add_expense_to_report", {"report_id":"report_8c41d2","expense_id":"expense_8c41d2"}) const result = await cotlet.call('expensify', 'add_expense_to_report', {"report_id":"report_8c41d2","expense_id":"expense_8c41d2"}); cotlet call expensify add_expense_to_report --data '{"report_id":"report_8c41d2","expense_id":"expense_8c41d2"}' Example response
{
"report_id": "R10042",
"expense_id": "T7f3a9c",
"expenses": 1,
"total": 42.5,
"currency": "USD"
}