Delete a transaction (tenant:trade:sales|purchasing|inbound:write by document type)
DELETE /api/trade/v1/sales/transactions/{id}
Module: Trade · operationId: deleteTransaction · Tag: Transactions · Auth: access token (Authorization: Bearer <accessToken>)
The deletion is recorded in the protocol, which stays readable. A delivery note made from an order is cancelled (cancelSalesDeliveryNote), not deleted (409). An order (revision) whose lines delivery notes, invoices or credit notes refer to is not deleted (409). An interim invoice a final invoice deducts cannot be deleted (409 invoice_deducted); deleting the final draft frees it.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id |
path | string (uuid) | yes |
Responses
- 200 Deleted (
application/json) - 401 No valid session or bearer token (no body).
- 404 Not found in the tenant. (
application/json) - 409 A delivery note made from an order (cancel it instead), an order that delivery notes or invoices refer to, or an issued invoice or credit note (
codeissued_document; correct it with a credit note), or an interim invoice a final invoice deducts (codeinvoice_deducted). (application/json) - 423 An active workflow locks the transaction. (
application/json)
Fields of the 200 answer:
status(string, required): Outcome of the request.
Example 200 answer:
{
"status": "deleted"
}
Example request
curl -X DELETE 'https://api.mbcom.cloud/api/trade/v1/sales/transactions/3f2b8c1e-7d4a-4e9b-9c2a-5b1d6e8f0a12' \
-H "Authorization: Bearer $ACCESS_TOKEN"