Get orders
List sales orders, most recent order date first, filtered by the query parameters below. Each entry is the same full order object returned by GET /public/v1/orders/{id}, including its line items, charges, invoices, and returns.
Results are paginated: the response is a data array plus a next_page URL. Follow next_page to walk subsequent pages; a null next_page means the last page was reached. All datetime filters accept an inclusive range and combine with AND (an order must satisfy every filter given).
Required permission: orders_permissions_view. Results are further limited to the orders the authenticated user can see under their team restrictions, so this may return fewer orders than exist on the company.
BearerAuthorizationBearer <token>API token generated in Distru (Settings → Distru API). Send it on every request as Authorization: Bearer YOUR_API_TOKEN.
ids[]?array<string>Restrict the result to specific orders by ID (the same ID returned as each order'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.
delivery_datetime?stringFilter by the delivery datetime (an order's delivery_datetime). Inclusive ISO8601 range written as after,before; either side may be omitted. 2022-07-10T00:00:00Z, keeps orders delivered on or after that instant, ,2022-07-10T00:00:00Z keeps those on or before it, and supplying both bounds keeps orders in between. Orders with no delivery datetime are excluded whenever this filter is present.
due_datetime?stringFilter by the due datetime — when the customer is expected to pay (an order's due_datetime). Inclusive ISO8601 range after,before; either side may be omitted (,2022-07-10T00:00:00Z keeps orders due on or before that instant).
inserted_datetime?stringFilter by when the order was created in Distru (its inserted_datetime). Inclusive ISO8601 range after,before; either side may be omitted.
order_datetime?stringFilter by the order datetime — when the order was placed (its order_datetime). Inclusive ISO8601 range after,before; either side may be omitted. Results are always sorted by this field, newest first.
page?stringPage 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.
statuses[]?array<>Filter by lifecycle status; repeat the key to pass several and orders in ANY of the given statuses are returned. SCREAMING_CASE, one of: PENDING, PROCESSING, READY_TO_SHIP, DELIVERING, DELIVERED, COMPLETED, CANCELED. See the status field on the order for what each value means. At most 200 statuses may be given.
updated_datetime?stringFilter by when the order was last modified in Distru (its updated_datetime). Inclusive ISO8601 range after,before; either side may be omitted. Useful for polling only the orders that changed since your last sync.
company_ids[]?array<string>Filter to orders whose buyer (customer) is any of these companies. Pass company relationship IDs — the same id returned as each order's company.id and by GET /public/v1/companies. Repeat the bracketed key once per ID. Unknown IDs (including ones that don't belong to your company) simply match nothing; an empty list is treated as no filter. At most 200 IDs.
owner_ids[]?array<string>Filter to orders owned by any of these Distru users (each order's owner.id). Repeat the bracketed key per ID; unknown IDs match nothing; empty list is no filter. At most 200 IDs.
location_ids[]?array<string>Filter to orders whose top-level location is any of these Distru locations (each order's location.id). This is the order's own location, not the per-line-item fulfillment location. Repeat the bracketed key per ID; unknown IDs match nothing; empty list is no filter. At most 200 IDs.
billing_location_ids[]?array<string>Filter to orders whose billing location is any of these Distru locations (each order's billing_location.id). Repeat the bracketed key per ID; unknown IDs match nothing; empty list is no filter. At most 200 IDs.
shipping_location_ids[]?array<string>Filter to orders whose shipping location is any of these Distru locations (each order's shipping_location.id). Repeat the bracketed key per ID; unknown IDs match nothing; empty list is no filter. At most 200 IDs.
order_number?stringFilter to orders whose order number contains this text, case-insensitively (substring match). For an exact match on one or more full order numbers, use order_numbers instead.
order_numbers[]?array<string>Filter to orders whose order number exactly matches any of these values, case-insensitively. Repeat the bracketed key once per value; an empty list is treated as no filter. At most 200 values. Use order_number for a substring search instead.
leaflink_ids[]?array<string>Filter to orders synced from any of these LeafLink orders, matching LeafLink's own order identifier (each order's leaflink_id). Exact match. Repeat the bracketed key per value; empty list is no filter. At most 200 values.
metrc_transfer_ids[]?array<integer>Filter to orders associated with any of these Metrc transfers, matching Metrc's own integer transfer id (each order's metrc_transfer_id). Repeat the bracketed key per value; empty list is no filter. At most 200 values.
biotrack_ids[]?array<string>Filter to orders associated with any of these BioTrack manifests (each order's biotrack_id). Exact match. Repeat the bracketed key per value; empty list is no filter. At most 200 values.
delivered_datetime?stringFilter by when the order was marked Delivered or Completed (an order's delivered_datetime). Inclusive ISO8601 range after,before; either side may be omitted. Orders that never reached Delivered or Completed have no delivered datetime and are excluded whenever this filter is present.
company_group_ids[]?array<string>Filter to orders whose customer belongs to any of these company relationship groups. Pass company relationship group IDs (the same id returned by GET /public/v1/company-relationship-groups). Repeat the bracketed key per ID; unknown IDs match nothing; empty list is no filter. At most 200 IDs.
payment_statuses[]?array<>Filter by payment status, derived from the order's invoices and their payments against the order total (net of returns). Repeat the key to pass several; orders in ANY of the given statuses are returned. SCREAMING_CASE, one of: • NOT_PAID — nothing has been paid. • PARTIALLY_PAID — some but not the full amount has been paid. • FULLY_PAID — paid in full. • OVER_PAID — paid more than the order total. At most 200 values.
total?stringFilter by the order total (the raw order total including line items, charges, discounts, and taxes — the same value returned as each order's total). Inclusive range written as min,max; either side may be omitted. 100, keeps orders totaling 100 or more, ,500 keeps those totaling 500 or less, and 100,500 keeps those in between.
batch_ids[]?array<string>Filter to orders that contain a line item drawn from any of these batches (matching an order item's batch). Repeat the bracketed key per ID; unknown IDs match nothing; empty list is no filter. At most 200 IDs. When combined with the other item and product filters, a single line item must satisfy all of them together (e.g. the same line is both in the given batch and of the given product).
package_ids[]?array<string>Filter to orders that contain a line item drawn from any of these packages (matching an order item's package). Repeat the bracketed key per ID; unknown IDs match nothing; empty list is no filter. At most 200 IDs. When combined with the other item and product filters, a single line item must satisfy all of them together (e.g. the same line is both in the given batch and of the given product).
package_compliance_labels[]?array<string>Filter to orders that contain a line item whose package carries any of these compliance labels (the package's Metrc/BioTrack label). Case-sensitive exact match. Repeat the bracketed key per value; empty list is no filter. At most 200 values. When combined with the other item and product filters, a single line item must satisfy all of them together (e.g. the same line is both in the given batch and of the given product).
package_batch_numbers[]?array<string>Filter to orders that contain a line item whose package has any of these batch numbers (the batch number stored on the package). Case-sensitive exact match. Repeat the bracketed key per value; empty list is no filter. At most 200 values. When combined with the other item and product filters, a single line item must satisfy all of them together (e.g. the same line is both in the given batch and of the given product).
batch_batch_numbers[]?array<string>Filter to orders that contain a line item whose batch has any of these batch numbers (matching the order item's batch). Case-sensitive exact match. Repeat the bracketed key per value; empty list is no filter. At most 200 values. When combined with the other item and product filters, a single line item must satisfy all of them together (e.g. the same line is both in the given batch and of the given product).
product_ids[]?array<string>Filter to orders that contain a line item of any of these products (matching an order item's product). Repeat the bracketed key per ID; unknown IDs match nothing; empty list is no filter. At most 200 IDs. When combined with the other item and product filters, a single line item must satisfy all of them together (e.g. the same line is both in the given batch and of the given product).
product_category_ids[]?array<string>Filter to orders that contain a line item whose product belongs to any of these product categories. Repeat the bracketed key per ID; unknown IDs match nothing; empty list is no filter. At most 200 IDs. When combined with the other item and product filters, a single line item must satisfy all of them together (e.g. the same line is both in the given batch and of the given product).
product_subcategory_ids[]?array<string>Filter to orders that contain a line item whose product belongs to any of these product subcategories. Repeat the bracketed key per ID; unknown IDs match nothing; empty list is no filter. At most 200 IDs. When combined with the other item and product filters, a single line item must satisfy all of them together (e.g. the same line is both in the given batch and of the given product).
product_group_ids[]?array<string>Filter to orders that contain a line item whose product belongs to any of these product groups. Repeat the bracketed key per ID; unknown IDs match nothing; empty list is no filter. At most 200 IDs. When combined with the other item and product filters, a single line item must satisfy all of them together (e.g. the same line is both in the given batch and of the given product).
product_brand_ids[]?array<string>Filter to orders that contain a line item whose product has any of these brands. Repeat the bracketed key per ID; unknown IDs match nothing; empty list is no filter. At most 200 IDs. When combined with the other item and product filters, a single line item must satisfy all of them together (e.g. the same line is both in the given batch and of the given product).
product_vendor_ids[]?array<string>Filter to orders that contain a line item whose product has any of these vendors (the product's supplier company relationship). Repeat the bracketed key per ID; unknown IDs match nothing; empty list is no filter. At most 200 IDs. When combined with the other item and product filters, a single line item must satisfy all of them together (e.g. the same line is both in the given batch and of the given product).
product_strain_ids[]?array<string>Filter to orders that contain a line item whose product has any of these strains. Repeat the bracketed key per ID; unknown IDs match nothing; empty list is no filter. At most 200 IDs. When combined with the other item and product filters, a single line item must satisfy all of them together (e.g. the same line is both in the given batch and of the given product).
product_tag_ids[]?array<string>Filter to orders that contain a line item whose product carries any of these tags. Repeat the bracketed key per ID; unknown IDs match nothing; empty list is no filter. At most 200 IDs. When combined with the other item and product filters, a single line item must satisfy all of them together (e.g. the same line is both in the given batch and of the given product).
product_skus[]?array<string>Filter to orders that contain a line item whose product has any of these SKUs. Case-insensitive exact match. Repeat the bracketed key per value; empty list is no filter. At most 200 values. When combined with the other item and product filters, a single line item must satisfy all of them together (e.g. the same line is both in the given batch and of the given product).
custom_data?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=order 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.
A list of orders
*/*- response
A collection of Orders
data?array<>Orders
next_page?stringURL for the next page of results; null when there is no next page
curl -X GET 'https://app.distru.com/public/v1/orders'{ "data": [ { "billing_location": { "address": "123 Fake Street, Beverly Hills, CA 90210, US", "company": { "id": "00000000-0000-0000-0000-00000001b6db", "name": "Company 5016", "updated_datetime": "2030-11-01T00:00:00.000000Z" }, "company_id": "00000000-0000-0000-0000-00000002d3bd", "id": "00000000-0000-0000-0000-0000000124b3", "license_id": null, "license_number": null, "name": "Place 1678" }, "biotrack_id": null, "blaze_payment_type": "CASH", "buyer_company": null, "buyer_note": null, "charges": [ { "charge_preset": null, "id": "2f788cf2-92eb-432c-bd3b-0530347144ec", "inserted_datetime": "2026-11-05T11:00:15.711754Z", "name": "C1", "percent": "10.0000", "price": "1.00", "tax": { "id": "00000000-0000-0000-0000-000000000633", "name": "T1" }, "type": "CHARGE", "unit_type": "PERCENT" } ], "combined_order": null, "company": { "id": "00000000-0000-0000-0000-00000001b6db", "name": "Company 5016", "updated_datetime": "2030-11-01T00:00:00.000000Z" }, "creator": { "banned": false, "deleted_at": null, "email": "[email protected]", "full_name": "John Foo", "id": "00000000-0000-0000-0000-00000003eaf1", "inserted_datetime": "2026-11-05T11:00:15.648862Z", "role": { "id": "00000000-0000-0000-0000-00000004091b", "name": "Admin 7598" }, "updated_datetime": "2026-11-05T11:00:15.648862Z" }, "custom_data": [ { "id": 2415, "name": "Custom Field 98", "value": "Custom Field Value 1" } ], "delivered_datetime": "2020-01-03T00:00:00.000000Z", "delivery_datetime": "2020-01-01T00:00:00.000000Z", "due_datetime": "2020-01-01T00:00:01.000000Z", "external_notes": null, "id": "f8856004-1821-4af8-80c3-be5bf410c0c2", "inserted_datetime": "2020-01-01T00:00:03.000000Z", "internal_notes": "Internal notes for this order", "inventory_source": { "address": "123 Fake Street, Beverly Hills, CA 90210, US", "company_id": "00000000-0000-0000-0000-00000002d3bb", "id": "00000000-0000-0000-0000-0000000124b1", "license_id": null, "license_number": null, "name": "Place 1676" }, "invoices": [], "items": [ { "batch": null, "compliance_quantity": "10.0000", "cost_per_unit": null, "cost_per_unit_default": null, "id": "d6de24e4-bda9-4503-b82d-9a98632f7447", "inserted_datetime": "2026-11-05T11:00:15.705646Z", "is_sample": true, "leaflink_id": null, "location": { "address": "123 Fake Street, Beverly Hills, CA 90210, US", "company_id": "00000000-0000-0000-0000-00000002d3bb", "id": "00000000-0000-0000-0000-0000000124b1", "license_id": null, "name": "Place 1676" }, "note": null, "package": { "batch_number": "B1", "compliance_label": "ABCDEF012345670000000593", "distru_status": "ACTIVE", "id": "00000000-0000-0000-0000-00000000347a", "license_id": "00000000-0000-0000-0000-000000006e98", "location_id": "00000000-0000-0000-0000-0000000124b2", "metrc_id": 592, "metrc_label": "ABCDEF012345670000000593", "quantity": "10.000000000", "quantity_active": "10.000000000", "status": "active" }, "price": "10.000000000", "price_base": "10", "price_tier_mode": "AUTO", "price_tier_version": null, "product": { "id": "821313b2-3a2b-425c-95d0-a9f878a66281", "name": "P1", "sku": "SKU1", "updated_datetime": "2023-11-02T00:00:00.000000Z" }, "quantity": "1.000000000", "returned_quantity": "0", "thc_percentage_total": null, "total_cost_actual": null, "total_cost_default": null } ], "leaflink_id": "1", "leaflink_order_number": "edce56a1-ee12-4d5a-83be-65e6f5c9ec68", "location": { "address": "123 Fake Street, Beverly Hills, CA 90210, US", "company_id": "00000000-0000-0000-0000-00000002d3bb", "id": "00000000-0000-0000-0000-0000000124b1", "license_id": null, "license_number": null, "name": "Place 1676" }, "menu": null, "metrc_transfer_id": 1, "metrc_transfer_template_error": null, "metrc_transfer_template_id": 2, "metrc_transfer_template_status": "COMPLETED", "order_datetime": "2020-01-01T00:00:02.000000Z", "order_number": "SO-123", "owner": { "banned": false, "deleted_at": null, "email": "[email protected]", "full_name": "John Bar", "id": "00000000-0000-0000-0000-00000003eaf2", "inserted_datetime": "2026-11-05T11:00:15.652385Z", "role": { "id": "00000000-0000-0000-0000-00000004091c", "name": "Admin 7599" }, "updated_datetime": "2026-11-05T11:00:15.652385Z" }, "payment_term_name": null, "returns": [], "shipping_location": { "address": "123 Fake Street, Beverly Hills, CA 90210, US", "company": { "id": "00000000-0000-0000-0000-00000001b6db", "name": "Company 5016", "updated_datetime": "2030-11-01T00:00:00.000000Z" }, "company_id": "00000000-0000-0000-0000-00000002d3bd", "id": "00000000-0000-0000-0000-0000000124b3", "license_id": null, "license_number": null, "name": "Place 1678" }, "status": "COMPLETED", "tasks": [], "total": "11.00", "updated_datetime": "2020-01-01T00:00:04.000000Z" } ], "next_page": null}