cURL
cancel
curl --request PUT \ --url https://api.getenso.ai/invoices/{id} \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data ' { "status": "cancelled", "comments": "Reason for cancellation" } '
{ "status": "<string>", "message": "<string>", "data": { "id": "<string>", "number": "<string>", "date": "2023-11-07T05:31:56Z", "fromDate": "2023-11-07T05:31:56Z", "toDate": "2023-11-07T05:31:56Z", "status": "<string>", "data": {}, "createdAt": "2023-11-07T05:31:56Z", "updatedAt": "2023-11-07T05:31:56Z", "deletedAt": "2023-11-07T05:31:56Z", "OrganisationId": "<string>", "ContractPlanId": "<string>" } }
Update the status of an invoice (e.g., cancel or mark as paid)
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Bearer <token>
<token>
ID of the invoice to update
Status update for the invoice
New status for the invoice
cancelled
paid
Reason for cancellation or additional comments
Date when the invoice was paid (required if status is 'paid')
Invoice status updated successfully
Status of the response
Success message
The updated invoice object
Show child attributes
Unique identifier for the invoice
Invoice number
Date of the invoice
Start date for the invoice period
End date for the invoice period
Status of the invoice (e.g., draft, sent, paid)
Additional data for the invoice
Timestamp when the invoice was created
Timestamp when the invoice was last updated
Timestamp when the invoice was deleted, if applicable
ID of the organisation associated with the invoice
ID of the contract plan associated with the invoice