Delete

[POST] .../v1/docinvoice/delete

Deletes an invoice document. Use this destructive method only after DocInvoice/DeleteMark has set deleted_mark to true for the target invoice. The request body must contain id and the response returns UpdateResult with row_affected for the invoice that was physically marked as deleted. The invoice must be locked by the current request user, already marked for deletion and not posted; this is the final deletion step in the DocInvoice/DeleteMark -> DocInvoice/Delete workflow. The current request user must have invoice delete permission; missing body, invalid id, denied access, unlocked document, missing deleted_mark, posted document, tariff restriction, database or transaction failures are returned as HTTP 200 ErrorResult business errors.

Request Parameters

Name Type Required Description
id Int64 Required Invoice ID.

Request Example

{
  "id": 9101
}

Response Parameters

Name Type Description
ok Boolean Indicates whether the request completed successfully.
result Update Update operation result.

Response Example

{
  "ok": true,
  "result": {
    "row_affected": 1
  }
}