DeleteInvoice

Delete invoice by ID. The invoice is marked as deleted and, as in Mango: its payments are released, credit note is reverted on the original invoice, the linked cost is deleted, the invoice is unlinked from orders and stock movements are cancelled. Invoice already sent as e-invoice can not be deleted. Methods DELETE, POST or PUT.

DELETE https://rest.crmango.com/api/DeleteInvoice

Authorization

1 Sent in the request headers
Bearer varchar

Auth token

Body data

1 Sent in the request body
invoice_id integer

Invoice id (required)

Response

3 HTTP 200

Delete invoice by ID

code integer

Return code

message varchar

Info message

invoice_id integer

Id of the deleted invoice

Example request

curl --request DELETE \
  --url 'https://rest.crmango.com/api/DeleteInvoice' \
  --header 'Authorization: Bearer auth_token' \
  --header 'Content-Type: application/json' \
  --data '{
    "data": {
      "invoice_id": 21
    }
  }'
{
    "code": 200,
    "message": "Invoice has been deleted",
    "invoice_id": 21
}