Contents
On this page

List Stock Movements - Plugixa Inventory

GET /plugixa-inventory/v1/stock-movements

List stock movements, drafts and finalized, one page at a time.

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?status__in=draft&movement_type__in=add_stock

Query parameters

Plus the list parameters every paged list accepts. search matches reference, recipient, details. orderby accepts id, reference, movement_type, movement_date, status, created_at, modified_at. view=trash lists the trash instead.

The filters this list accepts: status, movement_type, warehouse_id, recipient_id, movement_date, created_at, modified_at.

Responses

200 OK. data is one page of stock movements.

{
  "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,
      "warehouse_name": "Main warehouse",
      "recipient_name": null
    }
  ],
  "meta": {
    "total": 1,
    "pages": 1
  }
}
Field Type Meaning
data[].movement_type string check_in, check_out, add_stock or remove_stock
data.status string draft or finalized
data[].warehouse_name string|null The warehouse’s name
data[].recipient_name string|null The recipient’s name
data[].line_count integer Lines on the document, counted live on a draft
meta.total integer Stock Movements matching, before paging
meta.pages integer Number of pages at this per_page

List rows do not carry the lines. Get Stock Movement does.

Errors

Plus the errors every endpoint can return.

Examples

curl -s "https://your-site.example/wp-json/plugixa-inventory/v1/stock-movements?status__in=draft&movement_type__in=add_stock" \
  -u "admin:$WP_APP_PASSWORD"
<?php
$query = http_build_query(['status__in' => 'draft', 'movement_type__in' => 'add_stock']);
$ch = curl_init('https://your-site.example/wp-json/plugixa-inventory/v1/stock-movements?' . $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({ status__in: 'draft', movement_type__in: 'add_stock' });
const response = await fetch(`https://your-site.example/wp-json/plugixa-inventory/v1/stock-movements?${query}`, {
  headers: { 'Authorization': auth },
});
const { data, meta } = await response.json();

Quick Links

Share