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

Parameters: add_expense_to_report
NameTypeDescription
report_id string required string Report ID from list_reports.
expense_id string required string Expense ID from list_expenses.

Request

cURL
curl -X POST https://cotlet.dev/api/v1/expensify/reports/report_8c41d2/expenses/expense_8c41d2/to-report \
  -H "Authorization: Bearer $COTLET_API_KEY"
Python
result = client.call("expensify", "add_expense_to_report", {"report_id":"report_8c41d2","expense_id":"expense_8c41d2"})
Node.js
const result = await cotlet.call('expensify', 'add_expense_to_report', {"report_id":"report_8c41d2","expense_id":"expense_8c41d2"});
CLI
cotlet call expensify add_expense_to_report --data '{"report_id":"report_8c41d2","expense_id":"expense_8c41d2"}'

Example response

JSON

{
  "report_id": "R10042",
  "expense_id": "T7f3a9c",
  "expenses": 1,
  "total": 42.5,
  "currency": "USD"
}

Sign in once. Your agent does the rest.

Sign up and add the apps you need. Free 7-day trial with 2,000 credits, no card needed.