Company

Get companies

List the companies in your CRM (each entry is your relationship with another company), ordered oldest-first by creation date. Filter by name or legal business name, business category, relationship type, group, owner, license number, US state or city, QuickBooks Online / LeafLink links, outstanding balance, custom fields, creation and last-modified datetimes, and whether soft-deleted entries are included.

This is a read-only listing served from a replica, so it returns eventually consistent data — a create or update made through the API can take up to 1 second to appear here.

Required permission: companies_permissions_view. Results are scoped to your own account and further limited to the companies the authenticated user can see under their team restrictions, so this may return fewer entries than exist on the account.

get/public/v1/companies

Query parameters

idsstring[]

Restrict the result to specific companies by ID (the same ID returned as each company'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.

category'Cultivator' | 'Delivery' | 'Dispensary' | 'Distributor' | 'Lab' | 'Manufacturer' | 'Microbusiness' | 'Other' | 'Retail'

Filter by the company's business category, matching exactly one value verbatim. Note these values are Title Case, not the SCREAMING_CASE used by other enums in this API — the same casing the category response field returns.

inserted_datetimestring

Filter by the datetime each company was created. A comma-separated, inclusive ISO8601 range written as after,before; omit either side to leave that bound open. ?inserted_datetime=2022-07-10T00:00:00Z, returns entries created on or after that instant, ?inserted_datetime=,2022-07-10T00:00:00Z returns entries created on or before it, and supplying both bounds restricts to the range between them.

deleted'no' | 'include' | 'only'

Controls whether soft-deleted companies are returned. no (the default when omitted) returns only non-deleted entries, only returns only soft-deleted entries, and include returns both. A soft-deleted entry keeps a non-null deleted_at in the response.

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.

updated_datetimestring

Filter by the datetime each company was last modified. Same comma-separated, inclusive after,before ISO8601 range format as inserted_datetime. ?updated_datetime=,2022-07-10T00:00:00Z returns entries last modified on or before that instant.

namestring

Filter by company name, matching a case-insensitive substring of each company's display name. ?name=acme matches “Acme Dispensary”. For exact, multi-value matching use names instead.

namesstring[]

Restrict to companies whose display name exactly matches one of the given values (case-insensitive). Repeat the bracketed key once per name. An empty list is treated as no filter. At most 200 names may be given.

legal_business_namestring

Filter by the company's registered legal business name (distinct from its display name), matching a case-insensitive substring of each company's legal_business_name.

license_numberstring

Filter to companies that hold a license with this exact number, matched against the license numbers under each company's licenses. Case-insensitive and surrounding whitespace is ignored.

relationship_type_idsstring[]

Restrict to companies assigned any of these relationship types, matched against each company's relationship_type.id. Repeat the bracketed key once per ID. Unknown IDs match nothing; an empty list is treated as no filter. At most 200 IDs.

company_group_idsstring[]

Restrict to companies in any of these groups, matched against each company's group.id. Repeat the bracketed key once per ID. Unknown IDs match nothing; an empty list is treated as no filter. At most 200 IDs.

owner_idsstring[]

Restrict to companies owned by any of these Distru users, matched against each company's owner_id. Repeat the bracketed key once per ID. Unknown IDs match nothing; an empty list is treated as no filter. At most 200 IDs.

statesstring[]

Restrict to companies that have a location in any of these US states, given as two-letter state codes and matched against the state of each company's locations. Repeat the bracketed key once per code. At most 200 codes may be given.

citystring

Restrict to companies that have a location whose city matches this case-insensitive substring, matched against the city of each company's locations.

leaflink_customer_idsinteger[]

Restrict to companies linked to any of these LeafLink customer IDs, matched exactly against each company's leaflink_customer_id. Repeat the bracketed key once per ID. An empty list is treated as no filter. At most 200 IDs.

qb_customer_idsstring[]

Restrict to companies linked to any of these QuickBooks Online customer IDs, matched exactly against each company's qb_customer_id. Repeat the bracketed key once per ID. An empty list is treated as no filter. At most 200 IDs.

qb_vendor_idsstring[]

Restrict to companies linked to any of these QuickBooks Online vendor IDs, matched exactly against each company's qb_vendor_id. Repeat the bracketed key once per ID. An empty list is treated as no filter. At most 200 IDs.

has_outstanding_balanceboolean

When true, returns only companies whose computed outstanding_balance is greater than 0 (they owe you money). When false, returns only companies with an outstanding balance of 0 or less, including those with a credit balance. Omit to include all.

outstanding_balancestring

Filter by each company's computed outstanding_balance. A comma-separated, inclusive min,max decimal range; omit either side to leave that bound open. ?outstanding_balance=100, returns companies owing at least 100, ?outstanding_balance=,500 at most 500, and both bounds restricts to the range between them.

custom_dataobject

Filter by custom field values, as custom_data[{id}]=value where {id} is a custom field's numeric id. Repeat with different ids to filter on several fields at once; a record must match every one (AND). Matching is case-sensitive exact against the value stored on the record. The id must be a filterable custom field defined on this entity — use GET /public/v1/custom-fields?parent_object=company to list the ids, their types, and which are filterable. A non-numeric id, an id not defined on this entity, or an id that isn't filterable returns a 400.

Response

A list of companies

Changes

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