Finish or unfinish packages

distru-finish-packagesWriteMetrc

Finishes empty Metrc packages in Metrc and Distru, or unfinishes them, all-or-nothing.

Inputs

Every tool also takes the common inputs.

FieldTypeRequiredDescription
actionenum
FINISHUNFINISH
YesUNFINISH reopens finished packages in Metrc and Distru, to undo a finish done by mistake.
idsstring[]YesFINISH: packages with quantity 0. Resolve via distru-search-packages.

Output

Presence on a nested field assumes its parent exists.

FieldTypePresence
packagesobject[]Always
packages[].idstringAlways
packages[].metrcLabelstringAlways
packages[].distruStatusenum
ACTIVEASSEMBLINGDESTROYEDDISCONTINUEDFINISHEDON_HOLDRETURNINGSELLINGSOLDTRANSFERRED
Always
packages[].metrcStatusenum
ACTIVEDISCONTINUEDFINISHEDONHOLDTRANSFERRED
Can be null
packages[].syncingbooleanAlways
What the AI reads

Finishes empty Metrc packages in Metrc and Distru, or unfinishes them, all-or-nothing. Finishing is how a used-up package is closed out in Metrc. FINISH is refused when a package's quantity isn't 0, it is already finished, on hold, discontinued, inactive, syncing or transferred, its Distru and Metrc quantities don't match, or you lack Metrc finish permission on its license; the error names each refused package with its reason. UNFINISH is refused for a package that isn't finished, or is on hold, discontinued, inactive, syncing or transferred. Not for BioTrack. The change is sent to Metrc in the background, so syncing is true until it lands. To hide a package in Distru without touching Metrc, use distru-bulk-update-packages with isActive false.