Contents
List Lots - Plugixa POS for WooCommerce
GET /plugixa-pos/v1/lots
Lots with units left, soonest expiry first.
Needs a user with the plugixa_pos_manage_settings capability (signed in with an Application Password, or the login cookie with an X-WP-Nonce header). Administrators hold it; other roles only when you grant it.
Request
GET https://your-site.example/wp-json/plugixa-pos/v1/lots?expiring=30
Query parameters
| Field | Type | Required | Description |
|---|---|---|---|
search |
string |
No | Lot number or product. |
outlet_id |
integer |
No | One store. |
product_id |
integer |
No | One product. |
expiring |
integer |
No | Only lots expiring within this many days (0 to 3650). -1 (default) for all. |
empty |
boolean |
No | Include lots with no units left. |
page |
integer |
No | Page to return, from 1. Defaults to 1. |
per_page |
integer |
No | Rows per page, 1 to 200. Defaults to 50. |
Responses
200 OK.
{
"success": true,
"data": [
{
"id": 3,
"lot": "L2611-A",
"expiry": "2027-05-31",
"days_left": 193,
"expired": false,
"quantity": 24,
"outlet_id": 1,
"product": {
"id": 3734,
"name": "Ceremonial matcha 30 g",
"sku": "TEA-MATCHA"
},
"updated_at": "2026-11-19 16:30:00"
}
],
"meta": {
"total": 1,
"pages": 1,
"outlets": {
"1": "Maison Plugixa Marais",
"2": "Maison Plugixa Lyon"
}
}
}
| Field | Type | Meaning |
|---|---|---|
data[].days_left |
integer|null |
Days until expiry, negative when past |
data[].quantity |
integer |
Units left in the lot |
meta.outlets |
object |
Store names by id |
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/lots?expiring=30" \
-u "$WP_USER:$WP_APP_PASSWORD"
<?php
$ch = curl_init('https://your-site.example/wp-json/plugixa-pos/v1/lots?expiring=30');
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/lots?expiring=30', {
headers: {
'Authorization': `Basic ${btoa(`${process.env.WP_USER}:${process.env.WP_APP_PASSWORD}`)}`,
},
});
const { data } = await response.json();
Quick Links
Share