APILocation

Get locations

GET
/public/v1/locations

Returns the paginated list of locations belonging to your company, oldest first (ascending creation date). A location is a physical or logical place that holds inventory and appears throughout the rest of the API: it is where a purchase receives inventory, where an order ships from, and where stock and packages are held. Each location optionally links to a compliance license; that link (license / license_id) is null for locations with no compliance license. When the linked license is a Metrc license, metrc_id is the identifier of the corresponding Metrc room; it is null for locations not synced to Metrc, and it is a raw Metrc integer id, not a Distru id.

By default only non-deleted locations are returned; use deleted to include or isolate soft-deleted locations. Filter the result set by name (case-insensitive substring), license_number (exact match on the linked license), creation window (inserted_datetime), and last-modified window (updated_datetime); when several are supplied a location must satisfy all of them to be returned (AND). Results are scoped to your own company; you never see another tenant's locations.

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: companies_permissions_view.

Authorization

Bearer
headerAuthorizationBearer <token>

API token generated in Distru (Settings → Distru API). Send it on every request as Authorization: Bearer YOUR_API_TOKEN.

Query Parameters

ids[]?array<string>

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

inserted_datetime?string

Filter by creation datetime. Accepts a comma-separated from,to range in ISO-8601 UTC; both bounds are inclusive and either side may be omitted. 2022-07-10T00:00:00Z, returns locations created on or after that time; ,2022-07-10T00:00:00Z returns those created on or before it; 2022-07-01T00:00:00Z,2022-07-31T00:00:00Z returns those in the window. Omit the param to apply no creation-date filter. Combines with updated_datetime via AND — a location must fall in both windows to be returned.

deleted?string

Controls whether soft-deleted locations are returned. no (the default when omitted) returns only non-deleted locations, only returns only soft-deleted ones, include returns both. A soft-deleted location has a non-null deleted_at in the response.

Default"no"
Value in"no""include""only"
license_number?string

Filter by the exact license_number of the location's linked compliance license (as returned under license.license_number). Case-sensitive exact match; locations with no linked license never match. Send a single value, not a list.

name?string

Case-insensitive substring match on the location name (partial matches count; e.g. main matches Main Warehouse). Send a single value, not a list.

page?string

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_datetime?string

Filter by last-modified datetime. Accepts a comma-separated from,to range in ISO-8601 UTC; both bounds are inclusive and either side may be omitted. ,2022-07-10T00:00:00Z returns locations last modified on or before that time; 2022-07-10T00:00:00Z, returns those modified on or after it. Omit the param to apply no last-modified filter.

Response Body

A list of locations

*/*
  1. response

A collection of Locations

data?array<>

Locations

next_page?string

URL for the next page of results; null when there is no next page

Example Request
curl -X GET 'https://app.distru.com/public/v1/locations'
Example Response
{  "data": [    {      "address": "123 Fake Street, Suite 100, Beverly Hills, CA 90210, US",      "apt": "Suite 100",      "city": "Beverly Hills",      "company": {        "id": "00000000-0000-0000-0000-00000001ac55",        "name": "Company 954",        "updated_datetime": "2026-11-05T10:59:36.641203Z"      },      "company_id": "00000000-0000-0000-0000-00000002c3dc",      "country": "US",      "deleted_at": null,      "id": "00000000-0000-0000-0000-000000011f0d",      "inserted_datetime": "2026-11-05T10:59:36.662057Z",      "latitude": 12.34,      "license": null,      "license_id": null,      "longitude": -56.78,      "metrc_id": null,      "name": "Place 238",      "state": "CA",      "street_address": "123 Fake Street",      "updated_datetime": "2026-11-05T10:59:36.662057Z",      "zip": "90210"    },    {      "address": "123 Fake Street, Beverly Hills, CA 90210, US",      "apt": null,      "city": "Beverly Hills",      "company": {        "id": "00000000-0000-0000-0000-00000001ac55",        "name": "Company 954",        "updated_datetime": "2026-11-05T10:59:36.641203Z"      },      "company_id": "00000000-0000-0000-0000-00000002c3dc",      "country": "US",      "deleted_at": null,      "id": "00000000-0000-0000-0000-000000011f0e",      "inserted_datetime": "2026-11-05T10:59:36.672185Z",      "latitude": 1,      "license": {        "active": true,        "expiry_datetime": "2026-12-05T10:59:36.653518Z",        "id": "00000000-0000-0000-0000-000000006cc3",        "inserted_datetime": "2026-11-05T10:59:36.653565Z",        "issue_datetime": "2026-11-05T10:59:36.653518Z",        "license_number": "CDPH-00000074",        "license_type": "Type 12 Microbusiness"      },      "license_id": "00000000-0000-0000-0000-000000006cc3",      "longitude": 2,      "metrc_id": 999,      "name": "Place 239",      "state": "CA",      "street_address": "123 Fake Street",      "updated_datetime": "2026-11-05T10:59:36.672185Z",      "zip": "90210"    }  ],  "next_page": null}