Skip to main content

Delete purchase orders

DELETE 

/v1/purchaseorder

Soft-delete purchase orders based on filter criteria. Sets is_deleted = true, deleted_at = NOW(), and status = 'DELETED'.

Cascade: matched headers also soft-delete their child purchase_order_line rows (via source_document_id) and any purchase_order_receipt rows hanging off those lines (via source_line_id). You don't need to delete lines or receipts separately.

No action field: previous versions accepted action: 'delete' | 'deactivate'. That parameter is no longer supported — the only supported behavior is soft-delete. Sending action in the request body returns 400.

Filter parameters array — each entry runs as one independent UPDATE; fields within an entry combine with AND. Maximum 50 filter entries per request.

Request

Responses

Purchase orders soft-deleted successfully (lines and receipts cascaded)