Upsert a company's license
Upsert a single license held by one of the companies in your CRM — one POST handles both create and update. Include an existing license id in the body to update that license, or omit id to create a new one. The create path returns 201 and the update path returns 200; either way the response body is the license. The license also appears in the company's licenses array on the company endpoints, and the company can be found by its licenses via the license_number filter of GET /public/v1/companies; it is not returned by GET /public/v1/licenses, which lists only your own company's licenses.
This endpoint only manages the licenses of your partner companies: the {id} in the path must be a company in your CRM other than your own company. Your own company's licenses cannot be created or modified through the API — contact Distru support to change those. Licenses created here exist only in Distru (their compliance_type is NONE): writing one does not move inventory and does not sync to Metrc or BioTrack.
Updates are sparse: only the fields you send are changed, any field you omit keeps its current value, and sending null for a nullable field clears it.
Required permission: licenses_permissions_create to create a license, licenses_permissions_edit to update an existing one.
BearerAuthorizationBearer <token>API token generated in Distru (Settings → Distru API). Send it on every request as Authorization: Bearer YOUR_API_TOKEN.
id*stringID of the company (as returned by GET /public/v1/companies) that holds the license. Must be a company in your CRM other than your own company; an ID that doesn't exist for your company returns 404, and one your team restrictions hide returns 403.
application/json- body
id?stringID of the license. Provide it to update that license — it must belong to the company in the path, otherwise the request returns 404. Omit it to create a new license.
license_number?stringLicense number as issued by the state (e.g. C11-0000001-LIC). Required on create. Surrounding whitespace is trimmed, and the number must be unique among the company's licenses. Cannot be set to null.
license_type?stringType of the license. Required on create. Must be one of the values valid for your company's US state — call GET /public/v1/license-types for the exact strings, which are also listed on that endpoint's documentation. Any other value is rejected with a 400. Cannot be set to null.
active?booleanWhether the license is currently active. Defaults to true when omitted on create. Cannot be set to null.
expiry_datetime?stringISO 8601 datetime the license expires (e.g. 2030-01-01T00:00:00Z). Required on create. Cannot be set to null.
issue_datetime?stringISO 8601 datetime the license was issued, or null to clear it. Optional.
An updated license
*/*- response
A single license wrapped in a data envelope
data?A cannabis license held by a company or tied to a location, identifying it to the state and its compliance system.
curl -X POST 'https://app.distru.com/public/v1/companies/00000000-0000-0000-0000-000000000400/licenses' \ -H 'Content-Type: application/json' \ -d '{ "expiry_datetime": "2030-01-01T00:00:00Z", "issue_datetime": "2026-01-15T00:00:00Z", "license_number": "C11-001", "license_type": "Type 11 Distributor"}'{ "data": { "active": true, "expiry_datetime": "string", "id": "02c88a3f-d759-4973-88f9-60049d682524", "inserted_datetime": "string", "issue_datetime": "string", "license_number": "C11-1234567890", "license_type": "string" }}