Contents
Get App Bootstrap - Plugixa POS for WooCommerce
GET /plugixa-pos/v1/bootstrap
What the admin app reads first: which capabilities the user holds (to hide what they cannot use), who they are, and the settings.
Needs a user with the plugixa_pos_view 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/bootstrap
Responses
200 OK.
{
"success": true,
"data": {
"entities": [],
"permissions": {
"manage": true,
"view": true,
"create": true,
"edit": true,
"delete": true,
"export": true,
"manage_settings": true,
"sell": true,
"refund": true,
"discount": true,
"manage_sessions": true,
"view_reports": true,
"fiscal_audit": true,
"settings": true
},
"user": {
"id": 87,
"name": "Emma Laurent",
"email": "emma.laurent@your-site.example",
"avatar": "https://secure.gravatar.com/avatar/0000?s=96&d=mm&r=g"
},
"settings": {
"currency": "USD",
"currency_position": "before",
"currency_decimals": 2,
"decimal_places": 2,
"decimal_separator": ".",
"thousands_separator": ",",
"date_format": "Y-m-d",
"records_per_page": 50,
"delete_data_on_uninstall": false,
"invoice_company": "Maison Plugixa SAS",
"invoice_prefix": "FA",
"credit_note_prefix": "AV",
"receipt_header": "Maison Plugixa\n12 rue des Archives, 75004 Paris",
"receipt_footer": "Exchanges within 30 days with this receipt.\nThank you and see you soon!",
"auto_print": false,
"require_customer": false,
"email_receipts": false,
"fiscal_year_end": 12
}
}
}
| Field | Type | Meaning |
|---|---|---|
data.permissions |
object |
One boolean per capability. settings means manage_options. It only hides controls: every route checks again |
data.user |
object |
id, name, email, avatar of the caller |
data.settings |
object |
As in Get Settings |
data.entities |
array |
Reserved: empty in 1.0.0 |
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/bootstrap" \
-u "$WP_USER:$WP_APP_PASSWORD"
<?php
$ch = curl_init('https://your-site.example/wp-json/plugixa-pos/v1/bootstrap');
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/bootstrap', {
headers: {
'Authorization': `Basic ${btoa(`${process.env.WP_USER}:${process.env.WP_APP_PASSWORD}`)}`,
},
});
const { data } = await response.json();
Quick Links
Share