Contents
On this page

Get Settings - Plugixa POS for WooCommerce

GET /plugixa-pos/v1/settings

All settings, and the lists the settings screen picks from. Pro modules add their own settings to the same object.

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/settings

Responses

200 OK.

{
  "success": true,
  "data": {
    "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
    },
    "choices": {
      "currency_positions": ["before", "after"],
      "date_formats": ["Y-m-d", "d/m/Y", "m/d/Y", "d.m.Y", "d-m-Y", "j M Y", "M j, Y"],
      "separators": [".", ",", " ", "'"],
      "site_timezone": "Europe/Paris"
    }
  }
}
Field Type Meaning
data.settings object Every setting, shortened in the example. With Pro also, for example, foreign_cash, loyalty_enabled, loyalty_earn_rate, layaway_min_percent, quote_valid_days, staff_auto_lock, scale_formats
data.choices object currencies, currency_positions, date_formats, separators, site_timezone

The currency group of settings belongs to the back-office display; the register sells in WooCommerce’s currency (see money in Get Register Bootstrap).

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/settings" \
  -u "$WP_USER:$WP_APP_PASSWORD"
<?php
$ch = curl_init('https://your-site.example/wp-json/plugixa-pos/v1/settings');
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/settings', {
  headers: {
    'Authorization': `Basic ${btoa(`${process.env.WP_USER}:${process.env.WP_APP_PASSWORD}`)}`,
  },
});
const { data } = await response.json();

Quick Links

Share