License

Get licenses

Returns the paginated list of your own company's licenses, oldest first (ascending creation date). A license identifies your company to the state and its compliance system, and appears throughout the rest of the API: locations link to a license, and packages, transfers, and cultivation records are all scoped to one. Unlike the compact license object nested in other resources, this endpoint returns the full license detail, including the health of the license's Metrc sync in both directions:

metrc_pull_status reports the pull side — how fresh each cache of data Distru reads from Metrc is (packages, transfers, items, and so on), and whether a backfill is currently re-reading historical data. • metrc_push_status reports the push side — the queue of changes Distru writes to Metrc for this license: how many changes are waiting, how many have permanently failed, when a change last succeeded, and the details of the oldest change that has not completed yet.

Both objects are populated only for licenses whose compliance_type is METRC, and are null otherwise.

Use these two objects to alert on sync problems before they surface as stale or rejected data: a failed activity blocks the queue behind it, an old oldest_incomplete_activity means the queue is stalled, and an old cache timestamp means data read from Metrc may be out of date. Note that Distru only pulls from Metrc while the company's users are active in Distru, so an old cache timestamp can also simply mean nobody has been using Distru recently.

Filter the result set by ids, active, compliance_type, and license_number (exact match); when several are supplied a license must satisfy all of them to be returned (AND). Results are scoped to your own company; you never see another tenant's licenses, and licenses that belong to your partner companies are not included.

Results are paginated: read the top-level next_page URL to fetch the following page, and stop when it is null. Page size is fixed by the server and is not client-controllable.

This endpoint returns eventually consistent data, with changes taking up to 1 second to propagate in responses.

Required permission: licenses_permissions_view.

get/public/v1/licenses

Query parameters

activeboolean

When true, returns only active licenses; when false, only inactive ones. Omit the param to return both.

compliance_type'METRC' | 'BIOTRACK' | 'NONE'

Filter by the compliance system the license syncs with. METRC and BIOTRACK licenses sync with their state system; NONE licenses exist only in Distru and carry no sync health. Omit the param to return all licenses.

idsstring[]

Restrict the result to specific licenses by ID (the same ID returned as each license's id). Repeat the bracketed key once per ID. Unknown IDs simply match nothing; an empty list is treated as no filter. At most 200 IDs may be given.

license_numberstring

Filter by the exact license_number as issued by the state (case-sensitive exact match, e.g. C11-0000001-LIC). Send a single value, not a list.

pagestring

Page selector. Page size is fixed by the server; paginate by following the next_page URL in each response rather than building page selectors yourself — it is null on the last page. next_page uses page[after]=<cursor>, an opaque token marking where the next page resumes; pass it back exactly as given, and only to the endpoint that issued it. This is seek-based, so every page stays fast no matter how deep you page.

Response

A list of licenses

Changes

No recorded changes to this endpoint across all 1 revision of this API.