Contents
On this page

Export CSV - Plugixa Inventory

GET /plugixa-inventory/v1/export/{entity_type}

Download every live record of one type as a CSV file.

The user needs both the plugixa_inventory_view and the plugixa_inventory_export capabilities. With Pro Roles and permissions enforcing, their role must allow reading and exporting that record type. Needs the Export app on in Plugixa Inventory -> App Manager; with it off, this route answers 404.

Note. In 1.1.1 two things do not work as the list screens suggest. Filter parameters (field__operator) are checked, so an unknown one still answers 400, but they do not narrow the file: it holds every live record that matches search. And stock_movement answers a file with the heading row only.

Request

GET https://your-site.example/wp-json/plugixa-inventory/v1/export/item

Path parameters

Name Type Description
entity_type string item, category, warehouse, recipient or transaction; with Pro also transfer, adjustment and unit

Query parameters

Name Type Default Description
search string Keeps the records whose text fields contain this.

At most 10,000 records, oldest first. Trashed records are left out.

Responses

200 OK. The body is the CSV file, not JSON.

The answer is text/csv; charset=utf-8 with Content-Disposition: attachment; filename="items-2026-11-12.csv": the record type’s plural and the UTC date.

ID,Name,SKU,Barcode,Serial number,Type,Category,Default warehouse,Unit,Image,...
42,Printer paper A4,PAP-A4,3045140105502,,consumable,Office supplies,Main warehouse,,,...

The first column is the id, then one column per field of the record type, headed with its label. Linked records (category, warehouse, …) are written as names, not ids.

Errors

Status Code When
404 plugixa_inventory_unknown_entity entity_type is not a record type that can be exported.
400 plugixa_inventory_unknown_filter A filter parameter names a field this record type does not have.

Plus the errors every endpoint can return.

Examples

curl -s "https://your-site.example/wp-json/plugixa-inventory/v1/export/item" \
  -u "admin:$WP_APP_PASSWORD" \
  -o items.csv
<?php
$ch = curl_init('https://your-site.example/wp-json/plugixa-inventory/v1/export/item');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_USERPWD        => 'admin:' . getenv('WP_APP_PASSWORD'),
]);
$csv = curl_exec($ch);
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/export/item', {
  headers: { 'Authorization': auth },
});
const csv = await response.text();

Quick Links

Share