Delete Invoices

DELETE https://app.alaaqat.com/api/invoices/delete-selected

Deletes one or more invoices in a single request. Each invoice's notes are deleted with it. Your API key needs the invoice-delete ability, and the team member who created the key needs Delete Invoices.

{warning} Deleting is permanent. A deleted invoice and its notes cannot be restored.

Header

{
    "Accept": "application/json",
    "Content-Type": "application/json"
}

Body

{
    selected_ids: string[]
}
Field Required Validation Description
selected_ids Required An array of invoice IDs The _id of every invoice to delete.
{
    "selected_ids": [
        "6657c1d2e3f4a5b6c7d8e901",
        "6657c1d2e3f4a5b6c7d8e902"
    ]
}

An ID that does not match an invoice in your account is skipped, and the rest are still deleted.

Response

200 OK

{
    "message": "Entity was deleted successfully.",
    "data": []
}

The response is the same whether every ID matched an invoice or some were skipped. To check the result, list your invoices again.