InventoryTransactionHistory

Get the Inventory Transaction History report

Changed on

Returns the Inventory Transaction History report as JSON: one row per inventory transaction (a single recorded movement of stock) falling within the reported date range, ordered newest-first by transaction date. Each row carries the transaction's date, product, package/batch identifiers, Metrc production batch number, transaction type, the related entity that caused the movement (order, purchase, return, assembly, teardown, breakdown, stock transfer, or stock adjustment) with that entity's status and customer/vendor, the signed amount and unit type, the package's potency figures (THC/CBD), and the transaction's total cost. The total_cost column is omitted entirely — the key is absent, not null — for users without permission to view costs, which is a separate permission from the report permission below.

This is a read-only report and changes nothing. It reflects inventory movements already recorded by orders, purchases, assemblies, teardowns, breakdowns, returns, stock transfers, stock adjustments, and Metrc/BioTrack compliance syncs — so a row appears here only after the operation that moved the stock. Use it to reconcile or audit stock movement over a period; it is not the way to look up a single package's current balance. The entire matching result set is returned in one response — there is no pagination — so scope every request with the date range and the entity filters below to keep the payload manageable (a broad range can span hundreds of thousands of rows).

When no datetime filter is provided, the report defaults to the last 30 days: from the start of the day 30 days ago through the end of today, in the company's timezone. At most one entity filter takes effect per request — when several are sent, the report applies package_id first, then batch_ids, then product_ids, and ignores the rest.

Every value mirrors the report's CSV export: numeric cells are returned as strings (currency and comma formatting stripped, matching the rest of the API), everything else stays a string, and identifier-like values whose number carries a significant leading zero keep their display string. Companies on the BioTrack compliance integration do not receive the metrc_unit_name or metrc_production_batch_number columns at all. The resolved date range and the column definitions are returned under meta.

Each row also carries the IDs of the records it names — package_id after package_label, and after related_entity one ID per kind of related entity (sales_order_id, purchase_order_id, assembly_id, return_id), each null unless the related entity is of that kind — so a row can be followed to the package, order, purchase, assembly or return endpoints without a lookup. Stock transfers, teardowns and breakdowns get no ID. The CSV export leaves these ID columns out.

Required permission: reports_permissions_inventory_transaction_history.

get/public/v1/reports/inventory-transaction-history

Request

  • Base URL
    https://app.distru.com
  • Auth
    HTTP bearer

Query parameters

datetimestring

Include only transactions whose date falls in this range, as two comma-separated ISO8601 timestamps after,before (both bounds inclusive). Either side may be left empty to make the range open-ended (2026-01-01T00:00:00Z, for everything from that instant on). When omitted entirely the report defaults to the last 30 days — from the start of the day 30 days ago through the end of today, in the company's timezone.

product_idsstring[]

Include only transactions for these products, given as Distru product IDs. Takes effect only when neither package_id nor batch_ids is supplied (package_id wins, then batch_ids, then product_ids). Omit to include every product in range.

batch_idsstring[]

Include only transactions for these batches, given as Distru batch IDs. Applies only when package_id is absent, and takes precedence over product_ids when both are sent. Omit to include every batch in range.

package_idstring

Include only transactions for this single package, given as a Distru package ID. This is the highest-priority entity filter: when present, batch_ids and product_ids are ignored. Omit to leave package filtering off.

Response

The Inventory Transaction History report

Changes

    • info

      added the optional property // to the response with the status

    • info

      added the optional property // to the response with the status

    • info

      added the optional property // to the response with the status

    • info

      added the optional property // to the response with the status

    • info

      added the optional property // to the response with the status