Contents
On this page
Get Reorder Suggestions - Plugixa POS for WooCommerce
GET /plugixa-pos/v1/purchasing/reorder
Products that reached their supplier reorder point, grouped by supplier, with a suggested quantity. Goods already on order count.
Needs a user with the plugixa_pos_purchase capability (signed in with an Application Password, or the login cookie with an X-WP-Nonce header). Unlike the other capabilities, Pro gives this one to administrators and to the WooCommerce Shop manager role.
Request
GET https://your-site.example/wp-json/plugixa-pos/v1/purchasing/reorder?outlet_id=1
Query parameters
| Field | Type | Required | Description |
|---|---|---|---|
outlet_id |
integer |
No | One store. 0 (default) for the shop’s stock. |
Responses
200 OK. An empty list when nothing needs ordering.
{
"success": true,
"data": [
{
"supplier_id": 2,
"supplier_name": "Atelier Grès & Terre",
"lines": [
{
"product_id": 3745,
"name": "Ceramic bowl",
"sku": "KIT-BOWL",
"stock": 3,
"on_order": 0,
"reorder_point": 4,
"pack_size": 1,
"suggested": 12,
"unit_cost": "4.9000"
}
]
}
]
}
Errors
This endpoint has no errors of its own.
Plus the errors every endpoint can return.
Examples
curl -s "https://your-site.example/wp-json/plugixa-pos/v1/purchasing/reorder?outlet_id=1" \
-u "$WP_USER:$WP_APP_PASSWORD"
<?php
$ch = curl_init('https://your-site.example/wp-json/plugixa-pos/v1/purchasing/reorder?outlet_id=1');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_USERPWD => getenv('WP_USER') . ':' . getenv('WP_APP_PASSWORD'),
]);
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
const response = await fetch('https://your-site.example/wp-json/plugixa-pos/v1/purchasing/reorder?outlet_id=1', {
headers: {
'Authorization': `Basic ${btoa(`${process.env.WP_USER}:${process.env.WP_APP_PASSWORD}`)}`,
},
});
const { data } = await response.json();
Quick Links
Share