Contents
On this page

Get Stock Movement - Plugixa Inventory

GET /plugixa-inventory/v1/stock-movements/{id}

Read one stock movement, with its lines.

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 stock movements.

Request

GET https://your-site.example/wp-json/plugixa-inventory/v1/stock-movements/57

Path parameters

Name Type Description
id integer The stock movement’s id

Responses

200 OK. data is the stock movement.

{
  "success": true,
  "data": {
    "id": 57,
    "reference": "",
    "movement_type": "add_stock",
    "warehouse_id": 1,
    "recipient_id": null,
    "recipient": "",
    "movement_date": "2026-11-12 10:30:00",
    "status": "draft",
    "finalized_at": null,
    "finalized_by": null,
    "batch_id": "",
    "line_count": 1,
    "total_quantity": 0.0,
    "total_cost": 0.0,
    "details": "",
    "attachments": null,
    "assigned_user_id": null,
    "created_by": 1,
    "modified_by": 1,
    "created_at": "2026-11-12 09:30:00",
    "modified_at": "2026-11-12 09:30:00",
    "deleted_at": null,
    "lines": [
      {
        "id": 210,
        "movement_id": 57,
        "item_id": 42,
        "unit_id": null,
        "quantity": 120.0,
        "weight": 0.0,
        "weight_unit": "",
        "weight_base": 0.0,
        "cost_per_unit": 4.2,
        "total_cost": 0.0,
        "transaction_id": 0,
        "notes": "Delivery note 4471",
        "position": 1,
        "created_by": "1",
        "modified_by": "1",
        "created_at": "2026-11-12 09:30:00",
        "modified_at": "2026-11-12 09:30:00",
        "deleted_at": null,
        "item_name": "Printer paper A4",
        "item_sku": "PAP-A4",
        "item_type": "consumable",
        "unit_code": null
      }
    ],
    "warehouse_name": "Main warehouse",
    "recipient_name": null
  }
}
Field Type Meaning
data.id integer The document’s id
data.reference string Your reference, empty until finalized when you gave none
data.status string draft or finalized
data.movement_date string Document date, in the site’s timezone
data.line_count integer Number of lines
data.lines[].quantity number Quantity, always positive
data.lines[].item_name string|null The item’s name
data.lines[].transaction_id integer The ledger row this line wrote. 0 until finalized
data.warehouse_name string|null The warehouse’s name
data.created_at string UTC datetime

Errors

Status Code When
404 plugixa_inventory_not_found No document with that id, or it is in the trash.

Plus the errors every endpoint can return.

Examples

curl -s "https://your-site.example/wp-json/plugixa-inventory/v1/stock-movements/57" \
  -u "admin:$WP_APP_PASSWORD"
<?php
$ch = curl_init('https://your-site.example/wp-json/plugixa-inventory/v1/stock-movements/57');
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/stock-movements/57', {
  headers: { 'Authorization': auth },
});
const { data } = await response.json();

Quick Links

Share