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.
Request
- Base URLhttps://app.distru.com
- AuthHTTP bearer
Path parameters
ID 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.
Request body
Response
An updated license
Example response
{
"data": {
"id": "02c88a3f-d759-4973-88f9-60049d682524",
"license_number": "C11-1234567890"
}
}Changes
No recorded changes to this operation across all 17 revisions of this API.