Expenses

Take expenses out of an expense report

Takes lines back out of a nota spese and restates its three totals. The report has to be open — draft or rejected; one that has left is refused, and an approver who wants a line out rejects the whole report instead. The lines themselves are untouched: they go back to their owner’s pool as they were and can go into another report. reason is for a refusal («non rimborsabile») and lands on each line for its owner to read; leave it out for a line that was put in by mistake. ⚠ ALL OR NOTHING: if one line is not in this report, none is taken out and the answer names it. A line already back in its owner’s pool is not an error — it comes back under already_out — so repeating a call changes nothing. spese_get_report with detailed lists the lines a report holds.

Examples

  • Togli il taxi dalla nota di settembre, l’ho messo per sbaglio DELETE /api/v1/rest/spese/reports/22222222-3333-4444-8555-666666666666/expenses?expense_ids=44444444-5555-4666-8777-888888888888
  • Il pranzo del 3 non è rimborsabile, levalo dalla nota DELETE /api/v1/rest/spese/reports/22222222-3333-4444-8555-666666666666/expenses?expense_ids=11111111-2222-4333-8444-555555555555&reason=Non+rimborsabile%3A+pranzo+personale
delete/api/v1/rest/spese/reports/{id}/expenses

Request

  • Base URL: https://api.custodo.ai
  • URL: https://api.custodo.ai/api/v1/rest/spese/reports/{id}/expenses
  • Auth: HTTP bearer

Path parameters

idstring uuid required

The nota spese id, from spese_list_reports.

Query parameters

expense_idsstring[] required

The lines to take out, 1–50. From spese_get_report with detailed. Past that ceiling the answer is several calls.

reasonstring

Why they come back, when this is a refusal: one sentence the owner reads on each line. Omit it for a correction.

Headers

X-Tenant-Idstring uuid

The organisation to act in. An API key is bound to exactly one, so this is optional for a key and must match the one it was minted for.

Response

Done. data is the tool’s own answer.

oktrue required
dataunknown required

Changes

No recorded changes to this operation across all 1 revision of this API.