Create, update or delete a company license
distru-mutate-company-licenseWriteCreates, updates or deletes one license of a customer or vendor company.
Inputs
Every tool also takes the common inputs.
| Field | Type | Required | Description |
|---|---|---|---|
| action | enumCREATEUPDATEDELETE | Yes | |
| id | string | No | Required for UPDATE and DELETE. Resolve via distru-get-company (includeLicenses). |
| companyId | string | No | Required for CREATE; cannot change afterwards. The customer or vendor, not your own company. Resolve via distru-search-companies. |
| licenseNumber | string | No | Required for CREATE. Unique within the company; not checked against Metrc. |
| licenseType | string | No | Required for CREATE. Resolve via distru-search-lookups (type LICENSE_TYPE). |
| expiryDatetime | string | No | Required for CREATE. ISO 8601 with a UTC offset, e.g. "2026-09-01T00:00:00-07:00"; the company timezone is on distru-get-me. |
| issueDatetime | string or null | No | When it was issued. ISO 8601 with a UTC offset, e.g. "2026-09-01T00:00:00-07:00"; the company timezone is on distru-get-me. Send null to clear it. |
| isActive | boolean | No | CREATE defaults to true. |
Output
This tool returns one of 2 shapes, depending on its inputs.
Presence on a nested field assumes its parent exists.
Result with license
| Field | Type | Presence |
|---|---|---|
| license | object | Always |
| license. | string | Always |
| license. | string | Always |
| license. | string | Always |
| license. | enumBIOTRACKMETRCNONE | Always |
| license. | boolean | Always |
| license. | string | Null or absent |
| license. | string | Always |
Result with id
| Field | Type | Presence |
|---|---|---|
| id | string | Always |
What the AI reads
Creates, updates or deletes one license of a customer or vendor company. The license is never synced with Metrc. Read current values with distru-get-company first (includeLicenses). Your own company's licenses can't be changed here; they are managed in Settings → Licenses. DELETE removes the license for good; refused while a location is linked to it (unlink or delete the location with distru-mutate-company-location first). CREATE and UPDATE return the license as distru-get-company does; DELETE returns its id. Sparse update: UPDATE changes only the fields sent; a field sent as null is cleared.