Contents
On this page
List Transactions - Plugixa Inventory
GET /plugixa-inventory/v1/transactions
Read the stock ledger: one row per change to one item in one warehouse, newest first.
The user needs the plugixa_inventory_view capability (administrators have every inventory capability). With Pro Roles and permissions enforcing, their role must also allow reading the stock ledger.
The ledger is read-only. No route writes, edits or deletes a row: rows come only from finalizing a document.
Request
GET https://your-site.example/wp-json/plugixa-inventory/v1/transactions?item=42&per_page=100
Query parameters
| Name | Type | Default | Description |
|---|---|---|---|
item |
integer |
Rows for this item only. | |
warehouse |
integer |
Rows in this warehouse only. | |
batch |
string |
Rows written by one finalize, by its batch_id. |
Plus the list parameters every paged list accepts. search matches reason and recipient. orderby accepts id, occurred_at, created_at, transaction_type, quantity_change, new_quantity and total_cost. Without orderby, rows come newest first and order is ignored.
The filters this list accepts: transaction_type, item_id, warehouse_id, recipient_id, occurred_at, created_at.
Responses
200 OK. data is one page of ledger rows.
{
"success": true,
"data": [
{
"id": 981,
"item_id": 42,
"warehouse_id": 1,
"transaction_type": "add_stock",
"quantity_change": 120.0,
"new_quantity": 120.0,
"original_quantity": 0.0,
"transaction_unit_id": null,
"weight": 0.0,
"weight_unit": "",
"weight_base": 0.0,
"cost_per_unit": 4.2,
"total_cost": 504.0,
"batch_id": "3f6c1a52-8d0e-4b7a-9c61-2f4e8a9b7d10",
"source_type": "stock_movement",
"source_id": 57,
"source_line_id": 210,
"recipient": "",
"recipient_id": null,
"reason": "Stock movement (add_stock) #57",
"occurred_at": "2026-11-12 09:30:00",
"created_by": 1,
"modified_by": 1,
"created_at": "2026-11-12 10:15:00",
"modified_at": "2026-11-12 10:15:00",
"deleted_at": null,
"item_name": "Printer paper A4",
"warehouse_name": "Main warehouse",
"recipient_name": null
}
],
"meta": {
"total": 1,
"pages": 1
}
}
| Field | Type | Meaning |
|---|---|---|
data[].transaction_type |
string |
check_in, check_out, add_stock, remove_stock, transfer_in, transfer_out, adjustment_addition, adjustment_damage or adjustment_subtraction |
data[].quantity_change |
number |
Signed: positive adds, negative takes away |
data[].new_quantity |
number |
On hand in that warehouse just after this row |
data[].original_quantity |
number |
The quantity as entered before a unit conversion, when one was recorded. 0.0 otherwise |
data[].cost_per_unit |
number |
Cost per unit as recorded |
data[].total_cost |
number |
Cost of this row |
data[].batch_id |
string |
Shared by every row one finalize wrote |
data[].source_type |
string |
stock_movement, transfer or adjustment |
data[].source_id |
integer |
The document |
data[].source_line_id |
integer |
The document line |
data[].recipient |
string |
Recipient name as recorded at the time |
data[].reason |
string |
The document’s details or reason, or a generated description |
data[].occurred_at |
string |
UTC datetime the stock moved: the document date |
data[].created_at |
string |
UTC datetime the row was written |
data[].item_name |
string|null |
The item’s name |
data[].warehouse_name |
string|null |
The warehouse’s name |
data[].recipient_name |
string|null |
The recipient’s current name |
meta.total |
integer |
Rows matching, before paging |
meta.pages |
integer |
Number of pages at this per_page |
Errors
Plus the errors every endpoint can return.
Examples
curl -s "https://your-site.example/wp-json/plugixa-inventory/v1/transactions?item=42&per_page=100" \
-u "admin:$WP_APP_PASSWORD"
<?php
$query = http_build_query(['item' => 42, 'per_page' => 100]);
$ch = curl_init('https://your-site.example/wp-json/plugixa-inventory/v1/transactions?' . $query);
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_USERPWD => 'admin:' . getenv('WP_APP_PASSWORD'),
]);
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
const auth = 'Basic ' + btoa(`admin:${process.env.WP_APP_PASSWORD}`);
const query = new URLSearchParams({ item: '42', per_page: '100' });
const response = await fetch(`https://your-site.example/wp-json/plugixa-inventory/v1/transactions?${query}`, {
headers: { 'Authorization': auth },
});
const { data, meta } = await response.json();
Quick Links
Share