---
title: "Get the Inventory Transaction History report"
method: GET
path: "/public/v1/reports/inventory-transaction-history"
tags: ["InventoryTransactionHistory"]
---

# Get the Inventory Transaction History report

`GET /public/v1/reports/inventory-transaction-history`

## Request

- Base URL: `https://app.distru.com`
- URL: `https://app.distru.com/public/v1/reports/inventory-transaction-history`
- Auth: HTTP bearer

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`.

## Query parameters

- `datetime` string
- `product_ids` string[]
- `batch_ids` string[]
- `package_id` string

## Response `200`

The Inventory Transaction History report

- InventoryTransactionHistoryReport: The Inventory Transaction History report
  - `data` InventoryTransactionHistoryReportRow[], required: The report rows
    - `amount` string, required: The signed transaction quantity, measured in `unit_type`: negative when stock left inventory, positive when it entered.
    - `assembly_id` string: The related assembly's ID — the `id` [GET /public/v1/assemblies](#get-assemblies) returns. Null unless the related entity is an assembly.
    - `batch_id` string: The Distru batch ID of the transaction's batch. Null unless the product is batch-tracked. Accepts the same value the `batch_ids` filter takes.
    - `batch_number` string: The Distru batch number of the transaction's batch. Null unless the product is batch-tracked.
    - `cbd` string: The package's CBD potency, as a percentage. Same population rule as `thc`.
    - `cbd_mg_g` string: The package's CBD in mg per gram. Populated only when the primary test result reports potency in mg/g; null otherwise — mutually exclusive with `cbd_mg_ml`.
    - `cbd_mg_ml` string: The package's CBD in mg per millilitre. Populated only when the primary test result reports potency in mg/mL; null otherwise. Mutually exclusive with `cbd_mg_g`.
    - `company_relationship_id` string: The Distru ID of the related customer or vendor (the company relationship). Null when the transaction has no related entity, or that entity has no associated company (e.g. assemblies, stock transfers, teardowns, breakdowns).
    - `date` string, required: The transaction's date and time, formatted `YYYY-MM-DD HH:MM` in the company's timezone (e.g. `2026-01-15 14:30`).
    - `description` string, required: The transaction's description.
    - `metrc_production_batch_number` string: The package's Metrc production batch number. Null when there is no package or the package has none. This key is absent entirely for companies on the BioTrack integration.
    - `metrc_unit_name` string: The Metrc unit-of-measure name for the package. Null for non-package transactions. This key is absent entirely for companies on the BioTrack integration.
    - `package_batch_number_or_batch_name` string: For package transactions, the package's batch number; for batch-tracked products, the batch's name. Null when the product is tracked at the product level (no package and no batch).
    - `package_id` string: The transaction's package ID — the `id` [GET /public/v1/packages](#get-packages) returns and the value the `package_id` filter takes. Null when the transaction is not tied to a package.
    - `package_label` string: The package's compliance label. Null when the transaction is not tied to a package.
    - `product` string, required: The product's name. When the product has been deactivated the name is prefixed to mark it inactive.
    - `product_id` string: The Distru product ID of the transaction's product. Accepts the same value the `product_ids` filter takes.
    - `purchase_order_id` string: The related purchase's ID — the `id` [GET /public/v1/purchases](#get-purchases) returns. Null unless the related entity is a purchase.
    - `related_entity` string: A human-readable label for the entity that caused the movement: an order or purchase number, return number, assembly number, stock transfer number, a teardown name, or a breakdown number. For system movements with no such entity it is a synthesized label (e.g. `Stock Adjustment`, `Package Repair`, `Package Changed Product`, `Update from Metrc`), or an empty string when neither applies.
    - `related_entity_customer_vendor` string: The customer or vendor company name on the related entity. Null when the transaction has no related entity, or that entity has no associated company (e.g. assemblies, stock transfers, teardowns).
    - `related_entity_status` string: The related entity's status as shown in Distru — populated for order, purchase, return, assembly, and stock transfer movements. Null when the transaction has no related entity, and for teardown and breakdown movements, which carry no status. Returned as Distru's human-readable status text (e.g. `Completed`, `Partially Received`), not the SCREAMING_CASE enum used elsewhere in the API.
    - `return_id` string: The related return's ID — the `id` [GET /public/v1/returns](#get-returns) returns. Null unless the related entity is a return.
    - `sales_order_id` string: The related order's ID — the `id` [GET /public/v1/orders](#get-orders) returns. Null unless the related entity is a sales order.
    - `thc` string: The package's THC potency, as a percentage. Populated only for package transactions whose package has a primary test result recorded; null otherwise (including all non-package transactions).
    - `thc_mg_g` string: The package's THC in mg per gram. Populated only when the package's primary test result reports potency in mg/g; null otherwise — including when it reports in mg/mL, in which case see `thc_mg_ml`.
    - `thc_mg_ml` string: The package's THC in mg per millilitre. Populated only when the package's primary test result reports potency in mg/mL; null otherwise. Mutually exclusive with `thc_mg_g`.
    - `total_cbd` string: The package's total CBD (post-decarboxylation), as a percentage. Same population rule as `thc`.
    - `total_cbd_mg_g` string: The package's total CBD in mg per gram. Populated only when the primary test result reports potency in mg/g; null otherwise.
    - `total_cbd_mg_ml` string: The package's total CBD in mg per millilitre. Populated only when the primary test result reports potency in mg/mL; null otherwise.
    - `total_cost` string: The transaction's total inventory cost over its quantity, in the company's currency. Null when no unit cost is recorded for the stock consumed. Omitted entirely (key absent) for users without permission to view costs.
    - `total_thc` string: The package's total THC (post-decarboxylation), as a percentage. Same population rule as `thc`.
    - `total_thc_mg_g` string: The package's total THC in mg per gram. Populated only when the primary test result reports potency in mg/g; null otherwise.
    - `total_thc_mg_ml` string: The package's total THC in mg per millilitre. Populated only when the primary test result reports potency in mg/mL; null otherwise.
    - `type` string: The kind of movement that produced this row, as a lowercase/mixed-case token (e.g. `adjustment`, `package_repair`). Null when the transaction has no recorded type. Unlike enums elsewhere in the API, this value is not normalized to SCREAMING_CASE, so match it case-sensitively as returned.
    - `unit_type` string, required: The name of the unit `amount` is measured in — the package's unit for package transactions, otherwise the product's unit.
  - `meta` InventoryTransactionHistoryReportMeta, required: Report-level metadata
    - `columns` InventoryTransactionHistoryReportColumn[], required: The report's column definitions, in order, each mapping a row key to its human-readable label. For BioTrack companies this list omits the `metrc_unit_name` and `metrc_production_batch_number` columns, matching the row shape.
      - `key` string, required: The key used for this column in each data row
      - `label` string, required: The human-readable label of the column
    - `date_range` string, required: The human-readable date range the report covers, reflecting the resolved `datetime` filter (or the default last-30-days window when it was omitted).
    - `report` string, required: The report identifier, always `inventory_transaction_history`.

## Other responses

- `400`: Invalid parameters
- `401`: Missing or invalid API token
- `403`: The API token lacks the required permission, or team restrictions hide the record

## Changes

- **2026-10-07** `e8639f7dafed`: 5 info
  - added the optional property `data/items/assembly_id` to the response with the `200` status
  - added the optional property `data/items/package_id` to the response with the `200` status
  - added the optional property `data/items/purchase_order_id` to the response with the `200` status
  - added the optional property `data/items/return_id` to the response with the `200` status
  - …1 more

[Operation history](https://skmtc.dev/distru/apis/distru-api/changes/public/v1/reports/inventory-transaction-history/get.md)

---

[API](https://skmtc.dev/distru/apis/distru-api.md) - [All operations](https://skmtc.dev/distru/apis/distru-api/llms.txt) - [OpenAPI document](https://skmtc.dev/distru/apis/distru-api/revisions/9d851a88e82f?raw)
