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.
- Request
- Response
Path Params
urlKey - The unique identifier of the business.
inventory - The SKU of the inventory item.
Headers
| Name | Type | Value Description |
|---|---|---|
| Content-Type * | string | application-json |
| Authorization * | string | Bearer <jwt> |
Query Params
| Name | Type | Value Description |
|---|---|---|
| transactionDate[fromDate] * | string | Start date of the range, e.g. 2026-05-10 |
| transactionDate[toDate] * | string | End date of the range, e.g. 2026-06-10. The range cannot exceed 31 days |
| id | string | Filter by a specific transaction ID |
| docId | string | Filter by related document ID, e.g. an invoice ID |
| billType | string (enum) | INVOICE, MANUAL, TRANSFERSTOCK, etc. |
| type | string (enum) | BUY or SELL |
| transactionType | string (enum) | UPDATE, IGNORE, BLOCK, or BLOCK_IGNORE |
| warehouse | string | Filter by warehouse code, e.g. W1 |
| client | string | Filter by client/vendor uniqueKey |
| $limit | number | Number of results to return (default 10, max 50) |
| $skip | number | Number of results to skip (default 0, max 10000) |
| $sort | object | Sort order — only sortable by transactionDate and _id, e.g. $sort[transactionDate]=-1 |
transactionDate[fromDate] and transactionDate[toDate] are required, e.g.: ?transactionDate[fromDate]=2026-05-10&transactionDate[toDate]=2026-06-10
200: OKdata is an array containing one object with the matching items and pagination info — same envelope shape as List Inventory Items.
{
"success": true,
"data": [
{
"items": [
{
"_id": "6a282a4c93ef3b001940303f",
"inventory": "API-TEST-SKU-002",
"quantity": 60,
"unit": "PCS",
"currency": "INR",
"type": "BUY",
"costPrice": 1000,
"sellingPrice": 1500,
"adjustedCostPrice": 1000,
"adjustedSellingPrice": 1500,
"gstRate": 18,
"transactionDate": "2026-06-09T14:59:24.000Z",
"billType": "MANUAL",
"transactionType": "UPDATE",
"itemType": "product",
"isReversed": false,
"createdAt": "2026-06-09T14:59:24.850Z",
"updatedAt": "2026-06-09T14:59:24.850Z",
"warehouse": "W1"
}
// ...2 more transactions with the same shape
],
"total": 3,
"limit": 10,
"skip": 0
}
]
}
401: UnauthorizedInvalid authentication.
{ "name": "NotAuthenticated", "message": "Invalid login", "code": 401, "className": "not-authenticated", "data": { "message": "Invalid login" }, "errors": {} }
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.
- Request
- Response
Path Params
urlKey - The unique identifier of the business.
inventory - The SKU of the inventory item.
Headers
| Name | Type | Value Description |
|---|---|---|
| Content-Type * | string | application-json |
| Authorization * | string | Bearer <jwt> |
Body — Manual Stock Adjustment (operationType: "manual-adjustment")
| Name | Type | Value Description |
|---|---|---|
| operationType * | string | manual-adjustment |
| type * | string (enum) | BUY -> Adds stockSELL -> Deducts stock |
| quantity * | number | Quantity to adjust — must be greater than 0 |
| reason * | string (enum) | For type: BUY -> Purchased, Returned, or Adjust StockFor type: SELL -> Sold, Damaged, or Adjust Stock |
| warehouse * | string | Warehouse code, e.g. W1 — required when Warehouse Management is enabled |
| client | string | uniqueKey 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 * | string | Batch code |
| batches[].quantity * | number | Quantity to adjust for this batch |
| batches[].warehouse * | string | Warehouse 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[].label | string | Custom field label |
| customFields[].value | string | Custom 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".
This operation requires Warehouse Management to be enabled for the business.
| Name | Type | Value Description |
|---|---|---|
| operationType * | string | transfer-stock |
| transferFrom * | string | Source warehouse code, or UNASSIGNED for unallocated stock (no source warehouse is decremented) |
| transferTo * | string | Destination warehouse code |
| transferQty * | number | Quantity to transfer — must be greater than 0 |
| reason * | string | Free-text reason for the transfer |
| batch | string | Batch code — required for batch-tracked items (trackingMethod: "BATCH") |
| generateDeliveryChallan | boolean | Optional — generate a delivery challan for this transfer |
200: OK — Manual Stock Adjustment (non-batch){ "success": true, "data": { "created": true, "id": "6aad360fe6ee0300193c0132" } }
200: OK — Manual Stock Adjustment (batch-tracked){ "success": true, "data": { "created": true, "message": "Transaction created for 2 batches" } }
200: OK — Transfer StockSame response shape for both non-batch and batch-tracked transfers.
{ "success": true, "data": { "transferFrom": "W1", "transferTo": "W2", "transferQty": 5 } }
401: UnauthorizedInvalid authentication.
{ "name": "NotAuthenticated", "message": "Invalid login", "code": 401, "className": "not-authenticated", "data": { "message": "Invalid login" }, "errors": {} }