Contents
Get Transaction - Plugixa Inventory
GET /plugixa-inventory/v1/transactions/{id}
Read one row of the stock ledger.
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.
Request
GET https://your-site.example/wp-json/plugixa-inventory/v1/transactions/981
Path parameters
| Name | Type | Description |
|---|---|---|
id |
integer |
The ledger row’s id |
Responses
200 OK. data is the ledger row.
{
"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
}
}
| 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 |
Unlike List Transactions, the single row carries no item, warehouse or recipient names.
Errors
| Status | Code | When |
|---|---|---|
404 |
plugixa_inventory_not_found |
No ledger row with that id. |
Plus the errors every endpoint can return.
Examples
curl -s "https://your-site.example/wp-json/plugixa-inventory/v1/transactions/981" \
-u "admin:$WP_APP_PASSWORD"
<?php
$ch = curl_init('https://your-site.example/wp-json/plugixa-inventory/v1/transactions/981');
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 response = await fetch('https://your-site.example/wp-json/plugixa-inventory/v1/transactions/981', {
headers: { 'Authorization': auth },
});
const { data } = await response.json();
Quick Links
Share