Delete an assembly
Deletes an assembly. This is a hard delete: the assembly is permanently removed together with all of its outputs, inputs, costs, and bin links — it disappears from GET /public/v1/assemblies, GET /public/v1/assemblies/{id} returns 404 for it, and it cannot be recovered through the API. This is the same operation as POST /public/v1/assemblies with action DELETE. Responds 204 with no body on success, or 404 if no assembly with that id exists in your company (including one that belongs to another company). Metrc and non-compliance (NONE) licenses only; BioTrack is not supported.
Some assemblies cannot be deleted; each of these is refused with a 400 and nothing is changed:
• An assembly with any COMPLETED output — which includes every COMPLETED assembly (completing an assembly requires all of its outputs to be completed). The inventory a completed output produced stays; there is no way to un-complete or delete such an assembly through the API. • A Metrc processing job assembly whose job has been adjusted in Metrc, or that has completed outputs. Finish the processing job in Metrc instead — Distru deletes the assembly automatically about 30 minutes later. • A system-generated assembly (creation_source SALES_ORDER, SPLIT_PACKAGE, or LAB_TESTING) — only MANUALLY_CREATED assemblies can be deleted through the API. • A BioTrack assembly. • An assembly another request is mutating at that same moment (transient — retry).
Inventory: the quantities the assembly's PENDING or COMPLETED inputs had claimed, and the product-level quantities its DRAFT inputs had reserved, are released back to available inventory. An input package this assembly had fully consumed (finished) is reactivated, and unfinished in Metrc as well.
Other effects, all in one atomic call: tasks tied to the assembly are deleted; batches linked to it and files attached to it are detached but kept. If the assembly created a Metrc processing job (and that job was never adjusted in Metrc), the job is deleted in Metrc as a side effect after the request commits (that sync is eventual — observe it in Metrc, not in the 204).
Required permission: assemblies_permissions_delete.
Path parameters
ID of the assembly to delete, as returned by the list, fetch, and upsert endpoints. An ID that doesn't exist for your company returns 404.
Response
No Content
Changes
No recorded changes to this endpoint across all 1 revision of this API.