APITest result

Delete a test result

DELETE
/public/v1/test-results/{id}

Deletes a test result. This is a hard delete: the record is permanently removed — it disappears from GET /public/v1/test-results, GET /public/v1/test-results/{id} returns 404 for it, and it cannot be recovered through the API. Responds 204 with no body on success, or 404 if no test result with that id exists in your company (including one that belongs to another company or was already deleted).

Only Distru-only results can be deleted: a result synced from Metrc or BioTrack (compliance-tracked) is refused with a 400. Nothing else blocks the delete — a result can be deleted even while it is the primary result of its package or batch.

Effects beyond the test result itself: the result is detached from the package or batch it was attached to (and from any child packages it propagated to), and its attached Certificate of Analysis (COA) file is permanently deleted with it. Where the result was the primary one, the affected packages/batches and their inventory are left with no test result — potency stops showing for that inventory until another result is created or marked primary via the upsert endpoint; no result is auto-promoted. No inventory quantity is created, consumed, or released, and nothing is synced to Metrc or BioTrack.

Required permission: products_permissions_edit.

Authorization

Bearer
headerAuthorizationBearer <token>

API token generated in Distru (Settings → Distru API). Send it on every request as Authorization: Bearer YOUR_API_TOKEN.

Path Parameters

id*string

ID of the test result to delete, as returned by the list, fetch, and upsert endpoints. An ID that doesn't exist for your company returns 404.

Response Body

No Content

Example Request
curl -X DELETE 'https://app.distru.com/public/v1/test-results/dbf34ffb-5e7e-4b7d-9b41-cf381f27b4bc'
Example Response
Empty