Contents
On this page

Get Dashboard - Plugixa POS for WooCommerce

GET /plugixa-pos/v1/dashboard

The figures of the back-office dashboard. The top part (sales to open_sessions) is always today; the rest follows range.

Needs a user with the plugixa_pos_view_reports 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/dashboard?range=7d

Query parameters

Field Type Required Description
range string No today (default), 7d or 30d.

Responses

200 OK.

{
  "success": true,
  "data": {
    "currency": "EUR",
    "sales": "21.60",
    "refunds": "0.00",
    "net": "21.60",
    "tickets": 1,
    "average": "21.60",
    "by_method": {
      "Cash USD (30.00 USD at 0.92)": "27.60"
    },
    "open_sessions": [
      {
        "id": 85,
        "register_id": 1,
        "register_name": "Front counter",
        "code": "R1",
        "opened_at": "2026-11-16 08:47:00",
        "opened_local": "2026-11-16T09:47:00+01:00",
        "net": "494.01",
        "tickets": 19
      }
    ],
    "range": "7d",
    "from": "2026-11-13",
    "to": "2026-11-19",
    "current": {
      "net": "2381.71",
      "sales": "2465.71",
      "refunds": "84.00",
      "tickets": 61,
      "items": 108,
      "average": "40.42"
    },
    "previous": {
      "net": "3394.00",
      "sales": "3569.90",
      "refunds": "175.90",
      "tickets": 79,
      "items": 127,
      "average": "45.19"
    },
    "series": [
      {
        "label": "2026-11-13",
        "net": "850.40",
        "previous": "871.40"
      }
    ],
    "by_hour": ["0.00", "0.00", "0.00", "0.00", "0.00", "0.00", "0.00", "0.00", "0.00", "0.00", "119.41", "143.50", "310.80", "307.40", "144.21", "514.89", "164.00", "454.70", "169.80", "26.00", "0.00", "27.00", "0.00", "0.00"],
    "by_method_list": [
      {
        "label": "Card (terminal)",
        "amount": "1227.90"
      },
      {
        "label": "Cash",
        "amount": "1075.21"
      }
    ],
    "top_products": [
      {
        "id": 3819,
        "name": "Minimal watch",
        "qty": 2,
        "revenue": "298.00",
        "image": "https://your-site.example/wp-content/uploads/2026/11/acc-watch-7-150x150.jpg"
      }
    ],
    "top_categories": [
      {
        "id": 126,
        "name": "Accessories",
        "revenue": "652.00"
      }
    ],
    "recent": [
      {
        "order_id": 4463,
        "order_number": "4463",
        "at": "2026-11-19T14:01:52+01:00",
        "register": "R1",
        "total": "21.60",
        "items": 1,
        "method": "Cash USD (30.00 USD at 0.92)",
        "customer": ""
      }
    ],
    "low_stock": {
      "count": 9,
      "items": [
        {
          "id": 3734,
          "name": "Ceremonial matcha 30 g",
          "sku": "TEA-MATCHA",
          "qty": 0,
          "image": "https://your-site.example/wp-content/uploads/2026/11/tea-matcha-7-150x150.jpg"
        }
      ]
    }
  }
}
Field Type Meaning
data.sales string Today’s sales, from the fiscal journal
data.refunds string Today’s refunds
data.net string Sales minus refunds
data.tickets integer Today’s sales count
data.average string Average sale
data.by_method object Today’s payments by method label. Payment amounts as tendered, so cash includes the change given back
data.open_sessions object[] Open registers with their net and ticket count
data.current object Totals of the range
data.previous object Totals of the period before, for comparison
data.series object[] Per hour (today) or per day: net and the previous period’s
data.by_hour string[] 24 hourly totals of the range
data.top_products object[] Best sellers of the range
data.top_categories object[] Best categories of the range
data.recent object[] Latest sales
data.low_stock object Published products and variations with tracked stock of 5 or less

Errors

Status Code When
400 rest_invalid_param range is not today, 7d or 30d.

Plus the errors every endpoint can return.

Examples

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

Quick Links

Share