Skip to main content

Inventory Transactions

Overview

Inventory transactions are the stock ledger entries for an inventory item. They are created automatically when invoices/estimates are generated, or manually via this API — either as a manual stock adjustment or a warehouse-to-warehouse stock transfer. See the Inventory and Inventory Batches pages for setting up items and batches.


List Inventory Transactions

get /api/v1/businesses/:urlKey/inventories/:inventory/inventory-transactions

This endpoint allows you to retrieve the transaction ledger for an inventory item.

Path Params

urlKey - The unique identifier of the business.
inventory - The SKU of the inventory item.

Headers

NameTypeValue Description
Content-Type *stringapplication-json
Authorization *stringBearer <jwt>

Query Params

NameTypeValue Description
transactionDate[fromDate] *stringStart date of the range, e.g. 2026-05-10
transactionDate[toDate] *stringEnd date of the range, e.g. 2026-06-10. The range cannot exceed 31 days
idstringFilter by a specific transaction ID
docIdstringFilter by related document ID, e.g. an invoice ID
billTypestring (enum)INVOICE, MANUAL, TRANSFERSTOCK, etc.
typestring (enum)BUY or SELL
transactionTypestring (enum)UPDATE, IGNORE, BLOCK, or BLOCK_IGNORE
warehousestringFilter by warehouse code, e.g. W1
clientstringFilter by client/vendor uniqueKey
$limitnumberNumber of results to return (default 10, max 50)
$skipnumberNumber of results to skip (default 0, max 10000)
$sortobjectSort order — only sortable by transactionDate and _id, e.g. $sort[transactionDate]=-1
info

transactionDate[fromDate] and transactionDate[toDate] are required, e.g.: ?transactionDate[fromDate]=2026-05-10&transactionDate[toDate]=2026-06-10


Create Inventory Transaction

post /api/v1/businesses/:urlKey/inventories/:inventory/inventory-transactions

This endpoint allows you to create a stock transaction. The request body shape depends on the operationType: manual-adjustment or transfer-stock.

Path Params

urlKey - The unique identifier of the business.
inventory - The SKU of the inventory item.

Headers

NameTypeValue Description
Content-Type *stringapplication-json
Authorization *stringBearer <jwt>

Body — Manual Stock Adjustment (operationType: "manual-adjustment")

NameTypeValue Description
operationType *stringmanual-adjustment
type *string (enum)BUY -> Adds stock
SELL -> Deducts stock
quantity *numberQuantity to adjust — must be greater than 0
reason *string (enum)For type: BUY -> Purchased, Returned, or Adjust Stock
For type: SELL -> Sold, Damaged, or Adjust Stock
warehouse *stringWarehouse code, e.g. W1 — required when Warehouse Management is enabled
clientstringuniqueKey of the related vendor/client
batches[]array[object]Required for batch-tracked items (trackingMethod: "BATCH") — splits the transaction across one or more batches
batches[].batch *stringBatch code
batches[].quantity *numberQuantity to adjust for this batch
batches[].warehouse *stringWarehouse code for this batch entry — required on every entry when Warehouse Management is enabled
customFields[]array[object]Custom fields — label must be pre-configured for the Inventory Transactions category in Business Settings
customFields[].labelstringCustom field label
customFields[].valuestringCustom field value

Body — Transfer Stock (operationType: "transfer-stock")

Transfers stock from one warehouse to another. Internally creates two transaction records — a SELL on transferFrom and a BUY on transferTo, both with billType: "TRANSFERSTOCK".

info

This operation requires Warehouse Management to be enabled for the business.

NameTypeValue Description
operationType *stringtransfer-stock
transferFrom *stringSource warehouse code, or UNASSIGNED for unallocated stock (no source warehouse is decremented)
transferTo *stringDestination warehouse code
transferQty *numberQuantity to transfer — must be greater than 0
reason *stringFree-text reason for the transfer
batchstringBatch code — required for batch-tracked items (trackingMethod: "BATCH")
generateDeliveryChallanbooleanOptional — generate a delivery challan for this transfer