Contents
List Bundles - Plugixa POS for WooCommerce
GET /plugixa-pos/v1/bundles
Every bundle: a simple product sold as a set of other products, whose stock comes from its components.
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/bundles
Responses
200 OK.
{
"success": true,
"data": [
{
"id": 4470,
"name": "Coffee lover set",
"sku": "SET-COFFEE",
"price": "39.00",
"status": "publish",
"edit_url": "https://your-site.example/wp-admin/post.php?post=4470&action=edit",
"own_stock": false,
"components": [
{
"id": 3720,
"qty": 1,
"name": "House espresso beans 250 g",
"sku": "COF-HOUSE",
"stock": 38,
"cost": "3.8000",
"price": "9.90"
},
{
"id": 3728,
"qty": 1,
"name": "French press 1 L",
"sku": "COF-PRESS",
"stock": 3,
"cost": "13.0000",
"price": "27.00"
}
],
"available": 3,
"parts_value": "36.90",
"cost": "16.8000",
"margin": "48.3"
}
]
}
| Field | Type | Meaning |
|---|---|---|
data[].available |
integer|null |
How many bundles the components’ stock allows |
data[].parts_value |
string |
Components at their own prices |
data[].cost |
string|null |
Cost price, null when unknown |
data[].margin |
string|null |
Margin on the price without tax, percent |
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/bundles" \
-u "$WP_USER:$WP_APP_PASSWORD"
<?php
$ch = curl_init('https://your-site.example/wp-json/plugixa-pos/v1/bundles');
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/bundles', {
headers: {
'Authorization': `Basic ${btoa(`${process.env.WP_USER}:${process.env.WP_APP_PASSWORD}`)}`,
},
});
const { data } = await response.json();
Quick Links
Share