APIHarvest assembly

Delete a harvest assembly

DELETE
/public/v1/harvest-assemblies/{id}

Deletes a PENDING harvest assembly. Its outputs' metrc_label tags are freed and their weight goes back to the harvest's remaining_weight. Responds 204 with no body; afterwards GET /public/v1/harvest-assemblies/{id} returns 404 for it and it is no longer listed.

A COMPLETED harvest assembly can't be deleted and returns 400: its packages already exist.

An ID that does not exist, that belongs to another company, or that belongs to a removed harvest assembly returns 404.

Required permission: harvests_permissions_delete_packages.

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

The harvest assembly's ID, as returned in the id field of a harvest assembly response. An ID that doesn't exist for your company returns 404.

Response Body

The harvest assembly was deleted

Example Request
curl -X DELETE 'https://app.distru.com/public/v1/harvest-assemblies/7dbf4ad0-054d-4bab-a340-74c856f3168f'
Example Response
Empty