Contents
On this page

Quick Search - Plugixa Inventory

GET /plugixa-inventory/v1/lookup/search

Find up to 20 published items from part of a name, SKU, barcode or serial number.

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 items. Needs the Scanner and quick search app on in Plugixa Inventory -> App Manager; with it off, this route answers 404.

Request

GET https://your-site.example/wp-json/plugixa-inventory/v1/lookup/search?q=pap

Query parameters

Name Type Default Description
q string Required. At least 2 characters: anything shorter answers an empty list.

Sorted by name. This endpoint is not paged.

Responses

200 OK. data is the list of matching items.

{
  "success": true,
  "data": [
    {
      "id": 42,
      "name": "Printer paper A4",
      "sku": "PAP-A4",
      "barcode": "3045140105502",
      "serial_number": "",
      "item_type": "consumable",
      "category_id": 3,
      "default_warehouse_id": 1,
      "unit_id": null,
      "image_id": null,
      "stock_quantity": 120.0,
      "reorder_level": 20.0,
      "unit_price": 6.9,
      "cost_price": 4.2,
      "weight": 2.5,
      "weight_unit": "kg",
      "weight_base": 2.5,
      "track_weight": false,
      "status": "published",
      "description": "",
      "custom_fields": null,
      "assigned_user_id": null,
      "created_by": 1,
      "modified_by": 1,
      "created_at": "2026-11-12 09:30:00",
      "modified_at": "2026-11-12 10:15:00",
      "deleted_at": null,
      "stock_levels": {
        "1": 80.0,
        "2": 40.0
      },
      "on_hand": 120.0
    }
  ]
}
Field Type Meaning
data[] object An item, in the same shape as data.item in Look Up a Code
data[].stock_levels object On hand by warehouse id
data[].on_hand number Total on hand

Errors

Status Code When
400 rest_missing_callback_param q is missing.

Plus the errors every endpoint can return.

Examples

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

Quick Links

Share