APIBin

Get bins

GET
/public/v1/bins

List the bins belonging to the authenticated company, sorted oldest-first (by creation time).

A bin is a named sub-location used by bin inventory tracking — packages, batches, plants, plant groups and assembly outputs are associated to a bin to record where within a location they physically sit. Bins only exist for companies that have bin inventory tracking enabled, so this list is empty for companies that do not.

Results are paginated; follow next_page in the response envelope to page forward, or stop when it is null.

Required permission: settings_permissions_bins.

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 bins by ID (the same ID returned as each bin'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.

search?string

Case-insensitive substring filter on the bin name — returns every bin whose name contains this text anywhere. Omit to return all bins. Example: ?search=cooler matches "Walk-in Cooler" and "Cooler 2".

inserted_datetime?string

Filter to bins by their creation datetime, given as a comma-separated start,end pair of ISO8601 datetimes (inclusive). Either bound may be omitted for an open-ended range: 2022-07-10T00:00:00Z, matches on or after that instant, ,2022-07-10T00:00:00Z matches on or before it.

updated_datetime?string

Filter to bins by their last-updated datetime, given as a comma-separated start,end pair of ISO8601 datetimes (inclusive). Either bound may be omitted for an open-ended range.

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.

Response Body

A list of bins

*/*
  1. response

A collection of bins

data?array<>

Bins

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/bins'
Example Response
{  "data": [    {      "id": "4cdc7ddb-b667-4c08-9d98-f1c228ae7c93",      "inserted_datetime": "2026-10-08T09:10:04.219083Z",      "name": "AAA",      "updated_datetime": "2026-10-08T09:10:04.219083Z"    },    {      "id": "ca20272b-fee8-4473-a27b-0f8365296090",      "inserted_datetime": "2026-10-08T09:10:04.220336Z",      "name": "BBB",      "updated_datetime": "2026-10-08T09:10:04.220336Z"    },    {      "id": "95200f6b-1312-4bdb-8f65-ff09bafde037",      "inserted_datetime": "2026-10-08T09:10:04.220649Z",      "name": "CCC",      "updated_datetime": "2026-10-08T09:10:04.220649Z"    }  ],  "next_page": "https://www.example.com/public/v1/bins?page[after]=ZHwyMDI2LTEwLTA4VDA5OjEwOjA0LjIyMDY0OVp8dXw5NTIwMGY2Yi0xMzEyLTRiZGItOGY2NS1mZjA5YmFmZGUwMzc"}