API referenceExpenses
Void a booked expense
Needs a token with the write:expenses scope. Authentication
Try in Playground sends a real request to app.helvetly.com with a token you paste. It stays in this browser tab only (session storage) and goes to no one else.
POST
Voids a booked expense with a reason (the correction path: void it, then duplicate_expense and book the corrected copy). Owner or admin only (403 forbidden for a member). 409 invalid_state unless the expense is booked, 409 period_closed if its document date is in a closed month. Writes an expense.voided audit event. Cannot be undone; a retry answers 409 invalid_state.
bearerAuthheader
AuthorizationBearer <token>A personal API token, hvt_…, with scopes such as read:* or write:invoices
id*stringThe expense's id.
application/json- body
reason*stringWhy the expense is voided; kept in the audit trail.
Length
1 <= length <= 500OK
application/json- response
data*curl -X POST 'https://app.helvetly.com/api/v1/expenses/string/void' \ -H 'Content-Type: application/json' \ -d '{ "reason": "Booked twice: duplicate of expense #41."}'Example Response
{ "data": { "id": "string", "number": 0, "status": "draft", "source": "string", "supplier_name": "string", "supplier_vat_number": "string", "supplier_country": "string", "reference": "string", "duplicate_of": { "id": "string", "number": 0, "date": "2019-08-24" }, "description": "string", "category": { "id": "string", "name": "string", "account_code": "string" }, "document_date": "2019-08-24", "due_date": "2019-08-24", "currency": "string", "amount_mode": "string", "lines": [ { "id": "string", "position": 0, "description": "string", "amount": "1234.50", "vat_rate": "string" } ], "net_total": "1234.50", "vat_total": "1234.50", "total": "1234.50", "vat_breakdown": [ { "rate": "string", "taxable_amount": "1234.50", "vat_amount": "1234.50", "deductible_amount": "1234.50" } ], "input_tax": "string", "reverse_charge": true, "input_tax_box": "string", "deductible_percent": "string", "deductible_vat": "1234.50", "exchange_rate": "string", "exchange_rate_date": "2019-08-24", "exchange_rate_source": "string", "base": { "currency": "string", "net_total": "1234.50", "vat_total": "1234.50", "total": "1234.50", "deductible_vat": "1234.50" }, "payment_status": "string", "paid_on": "2019-08-24", "payment_method": "string", "paid_by_member": { "id": "string", "name": "string" }, "reimbursed_on": "2019-08-24", "is_overdue": true, "note": "string", "receipt_missing_reason": "string", "receipts_count": 0, "is_complete": true, "missing_fields": [ "string" ], "created_by": { "id": "string", "name": "string" }, "booked_at": "2019-08-24T14:15:22Z", "booked_by": { "id": "string", "name": "string" }, "voided_at": "2019-08-24T14:15:22Z", "voided_by": { "id": "string", "name": "string" }, "void_reason": "string", "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z" }}