Contents
On this page
Plugixa Inventory REST API - Plugixa Inventory
The integration surface for Plugixa Inventory: items, categories, warehouses and recipients you can create and edit, stock documents you can draft and finalize, the stock ledger you can read, a barcode lookup and a CSV export. Enough to sync a catalogue from another system, post deliveries and issues from a script, feed a BI tool from the ledger, or drive a scanner.
Everything the admin screens do, they do through this API, under the namespace plugixa-inventory/v1. There is no private back channel: if the app can do it, so can you, and every permission the interface enforces is enforced at the endpoint rather than in the page.
An absent module has no routes. A free site answers 404 with rest_no_route for /transfers, because the module is not installed, not because a licence check refused it. The same is true of an app switched off in the App Manager.
Base URL
https://your-site.example/wp-json/plugixa-inventory/v1
On a site with plain permalinks, pass the route as a parameter instead:
https://your-site.example/?rest_route=/plugixa-inventory/v1/items
Authentication
Plugixa Inventory has no API keys of its own. It uses the two ways WordPress itself signs in a REST request.
| Caller | How it signs in |
|---|---|
| A script or another system | A WordPress Application Password, sent as HTTP Basic auth |
| The admin app and the shortcode front end | The logged-in cookie plus an X-WP-Nonce header, the normal WordPress way |
Create an Application Password under Users -> Profile -> Application Passwords for the user the script should act as. WordPress only offers them over HTTPS, or on a local development site.
curl -s "https://your-site.example/wp-json/plugixa-inventory/v1/items" \
-u "admin:$WP_APP_PASSWORD"
Permissions
Every route answers through one permission check, handed the action and, for a single record, the record itself. The action maps to a WordPress capability:
| Action | Capability | Routes |
|---|---|---|
| Read | plugixa_inventory_view |
Lists, single reads, lookups, the ledger |
| Create | plugixa_inventory_create |
POST to a collection |
| Edit | plugixa_inventory_edit |
PUT / PATCH, and finalize |
| Delete | plugixa_inventory_delete |
Trash, restore and purge |
| Export | plugixa_inventory_export |
The CSV export, on top of read |
Administrators have every capability. With Pro Roles and Permissions enforcing, a role decides per record type and per record as well, and lists hold only the records the role may see: one user’s list can be empty while another’s is full.
The script acts as the user it signs in as. Use a dedicated user whose capabilities match what the script needs.
Responses
Every successful response is wrapped the same way:
{
"success": true,
"data": { "id": 42, "name": "Printer paper A4" },
"meta": { "total": 37, "pages": 1 }
}
meta is only present on paged lists. Ids and counts are integers, quantities, prices and weights are numbers, and flags are real booleans. created_at, modified_at, deleted_at, finalized_at and the ledger’s occurred_at are UTC strings in the form 2026-11-12 09:30:00. A document’s own date (movement_date, transfer_date, adjustment_date) is in the site’s timezone.
The CSV export is the one exception: its body is the file itself.
Lists and pagination
Paged list endpoints accept the same parameters, and put the totals in meta, not in headers (X-WP-Total is not sent).
| Parameter | Type | Default | Description |
|---|---|---|---|
page |
integer |
1 |
Page to return, from 1 |
per_page |
integer |
50 |
Rows per page, 1 to 200 |
search |
string |
Substring search over the columns each endpoint lists | |
orderby |
string |
id |
One of the sortable columns each endpoint lists. Anything else falls back to id |
order |
string |
desc |
asc or desc |
view |
string |
trash for trashed rows only |
Items, categories, warehouses, recipients, units and draft documents are soft-deleted: DELETE moves a row to the trash, where it stops appearing in single reads and in lists unless you ask for view=trash. Each has a restore route to bring it back and a purge route to delete it for good.
Filtering lists
A list also takes structured filters, written field__operator=value. A parameter without a known operator suffix is not a filter.
GET /plugixa-inventory/v1/items?status__in=published&unit_price__between=5,20&created_at__gte=2026-11-01
| Field type | Operators (the first is the usual one) |
|---|---|
| Text | contains, eq, ne, empty, not_empty |
| Choice | in, ne, empty, not_empty |
| Linked record | in, ne, empty, not_empty |
| Number | between, gte, gt, lte, lt, eq, ne, empty, not_empty |
| Date | between, gte, gt, lte, lt, eq, empty, not_empty |
in and between take comma-separated values; empty and not_empty take none. A date matches whole days: created_at__lte=2026-03-31 includes all of the 31st. Each list page names the fields it can be filtered on. With Pro custom fields, those fields can be filtered on too.
A filter on a field the list does not have, an operator that does not fit the field, a missing value or a date that is not a date is a 400, never a silently wider list.
Updates
Updates merge: only the fields you send change, and PUT and PATCH behave the same. To avoid overwriting someone else’s change, send back the modified_at you read. If the record changed in between, the update is refused with 409 and plugixa_inventory_conflict. Leave modified_at out to skip the check.
Endpoints
| Resource | Endpoints |
|---|---|
| Items | List, Create, Get, Update, Delete, Restore, Purge, Low stock, Stock levels |
| Categories | List, Create, Get, Update, Delete, Restore, Purge |
| Warehouses | List, Create, Get, Update, Delete, Restore, Purge |
| Recipients | List, Create, Get, Update, Delete, Restore, Purge |
| Stock movements | List, Create, Get, Update, Delete, Restore, Purge, Finalize, Movement types |
| Transactions (ledger) | List, Get |
| Lookup | Look up a code, Quick search |
| Transfers PRO | List, Create, Get, Update, Delete, Restore, Purge, Finalize |
| Adjustments PRO | List, Create, Get, Update, Delete, Restore, Purge, Finalize |
| Units PRO | List, Create, Get, Update, Delete, Restore, Purge |
| Export | Export CSV |
The App Manager, settings, imports, notifications, dashboards, reports, roles, custom field definitions and the WooCommerce screen have routes too. They serve the admin app and are not documented as an API.
What is never writable
- The ledger. There is no route to create, update or delete a transaction row, and the data layer refuses it even if code tried. Rows come only from finalizing a document.
- On hand. An item’s
stock_quantityis the result of finalized documents. It is not among the fields an item update may touch, and a value sent for it is ignored. - A finalized document. Apart from its reference, details, reason and assignee, it is frozen and cannot be deleted. Post the opposite document instead.
These are not permissions you can grant. See The Stock Ledger.
Errors
Errors use the standard WordPress shape, with a code you can branch on. Many carry extra detail in data: the field at fault, the allowed values, or the list of blocking reasons.
{
"code": "plugixa_inventory_duplicate_identifier",
"message": "The SKU \"PAP-A4\" is already used by \"Printer paper A4\".",
"data": { "status": 409, "field": "sku", "conflict_id": 42 }
}
These can come back from any endpoint. Each endpoint page lists its own errors on top of them.
| Status | Code | When |
|---|---|---|
401 |
plugixa_inventory_forbidden |
The request is not signed in: no Application Password, or a cookie sent without its nonce. |
401 |
incorrect_password / invalid_username |
WordPress refused the Application Password. |
403 |
plugixa_inventory_forbidden |
Signed in, but the user’s capabilities or Pro role do not allow this action on this record. |
403 |
rest_cookie_invalid_nonce |
A browser request sent a stale or wrong nonce. |
404 |
rest_no_route |
No such route or method, or the module that registers it is not installed or its app is switched off. |
400 |
rest_invalid_param |
A parameter failed validation, for example per_page above 200 or order other than asc/desc. |
400 |
rest_missing_callback_param |
A required parameter is missing. |
400 |
plugixa_inventory_unknown_filter / plugixa_inventory_unknown_operator / plugixa_inventory_missing_value / plugixa_inventory_invalid_date |
A list filter is not valid. |
409 |
plugixa_inventory_conflict |
An update sent a modified_at that is no longer current. |
Validation problems answer 422 and usually name the field in data.field. Conflicts such as a duplicate SKU, or a record something else depends on, answer 409. There is no rate limit.
Filtering what comes back
Several hooks change what the API answers, in PHP, without touching the routes:
| Hook | Changes |
|---|---|
plugixa_inventory_filter_output |
Every successful payload, with the record type. The one place field-level rules can be applied |
plugixa_inventory_user_can |
The answer to every permission check, with the action, record type, record and user |
plugixa_inventory_query_clauses |
The conditions every list and count runs with, which is how a list is narrowed per user |
plugixa_inventory_register_rest_routes fires with the namespace and the plugin’s container, so your own routes can sit in the same namespace and reuse the same permission model. See Hooks for the full set.
Troubleshooting
| Symptom | Usual cause |
|---|---|
401 from a script |
No Application Password sent, or WordPress refused it. Check the user name and the password, and that the site is on HTTPS. |
401 or 403 from the browser |
The nonce is missing or stale. Reload the admin. |
404 with rest_no_route |
The module is not installed (a Pro route on the free build), or its app is switched off. |
403 on a record you can see in a list |
A Pro role allows reading more widely than editing or deleting. |
| A list is empty for one user and full for another | Pro role scoping. That is the feature. |
409 on create |
A duplicate SKU, barcode or code. The message names the other record. |
409 on delete |
Something depends on the record. data.blockers lists the reasons. |
| On hand will not change | Correct: post a stock movement and finalize it. |
A lookup miss returns 200 |
By design, so a miss cannot be confused with a failure. |
See also
- Hook into events and change behaviour in PHP: Hooks.
- Long-running jobs such as rebuilding stock: WP-CLI.
- Who may call what: Roles and Permissions PRO.
- How stock and its history fit together: The Stock Ledger.
Quick Links
Share