Sync Metrc tags

distru-sync-metrc-tagsWrite

Pulls a license's unused Metrc tags of one kind from Metrc.

Inputs

Every tool also takes the common inputs.

FieldTypeRequiredDescription
kindenum
PACKAGEPLANT
NoTag pool to sync; PACKAGE and PLANT pools never overlap. Default: "PACKAGE"
licenseIdstringYesResolve via distru-search-licenses.

Output

Presence on a nested field assumes its parent exists.

FieldTypePresence
licenseobjectAlways
license.idstringAlways
license.licenseNumberstringAlways
license.metrcPackageTagsSyncedAtstringCan be null
license.metrcPlantTagsSyncedAtstringCan be null
What the AI reads

Pulls one license's unused Metrc tags of one kind from Metrc into Distru while you wait, so a tag just bought in Metrc becomes usable. Use it when distru-search-available-metrc-tags is missing a tag the user has; search again afterwards, and if the tag is still missing, search once more a second later: search can lag a sync by about a second. Tags Metrc no longer lists as unused are marked used. Returns the license with when the last sync of each kind started. Refused within 5 minutes of the license's last sync of that kind, failed ones and ones started from Distru's tag picker included: the error says how many minutes are left, so don't call again sooner. Refused for a license that isn't an active Metrc license, and for PLANT on a license that can't grow plants.