Contents
On this page

Get Dashboard - Plugixa PDF Vouchers for WooCommerce

GET /plugixa-pdf-vouchers/v1/dashboard

The figures of the plugin’s Dashboard: what your vouchers are worth now, how many are in each status, the last 30 days, and the eight newest vouchers.

Needs a user with the plugixa_pdfv_view capability (signed in with an Application Password, or the login cookie with an X-WP-Nonce header). Administrators and shop managers get it when the plugin is activated; see Staff access.

Request

GET https://your-store.example/wp-json/plugixa-pdf-vouchers/v1/dashboard

Responses

200 OK.

{
  "success": true,
  "data": {
    "stats": {
      "total": 95,
      "active": 61,
      "sold": 6796,
      "liability": 3787,
      "redeemed": 2724,
      "expired": 110
    },
    "by_status": {
      "active": 61,
      "redeemed": 28,
      "expired": 3,
      "void": 1,
      "pending": 2
    },
    "activity": [
      {
        "date": "2026-10-22",
        "issued": 0,
        "redeemed": 26
      },
      {
        "date": "2026-10-23",
        "issued": 0,
        "redeemed": 12
      }
    ],
    "recent": [
      {
        "id": 95,
        "code": "PX-M9P2-FU55",
        "code_norm": "PXM9P2FU55",
        "kind": "mpv",
        "status": "active",
        "currency": "EUR",
        "initial_amount": 30,
        "balance": 30,
        "uses_allowed": 0,
        "uses_count": 0,
        "product_id": 0,
        "variation_id": 0,
        "order_id": 0,
        "order_item_id": 0,
        "allowed_product_ids": [],
        "allowed_category_ids": [],
        "buyer_user_id": 0,
        "buyer_email": "",
        "recipient_name": "Claire Morel",
        "recipient_email": "claire.morel@example.net",
        "from_name": "",
        "message": "Sorry for the wait during your last visit. Your next tea is on us.",
        "template_id": 1,
        "locale": "en_US",
        "vendor_id": 0,
        "source": "manual",
        "deliver_at": null,
        "delivered_at": "2026-11-07 16:51:19",
        "expires_at": "2027-02-05 16:50:39",
        "created_by": 1,
        "created_at": "2026-11-07 16:50:39",
        "updated_at": "2026-11-07 16:50:39",
        "version": 2,
        "batch": "",
        "recipient_phone": "",
        "meta": [],
        "is_expired": false,
        "order_url": "",
        "service": null
      }
    ],
    "currency": "EUR"
  }
}
Field Type Meaning
data.stats.total integer Every voucher ever made
data.stats.active integer Active vouchers
data.stats.sold number The starting value of every voucher (Value issued)
data.stats.liability number The balances of active vouchers: what you owe (Outstanding balance)
data.stats.redeemed number Spent from vouchers, minus refunds back onto them (Value redeemed)
data.stats.expired number Written off at expiry (Expired unused)
data.by_status object Vouchers per status
data.activity object[] 30 days, oldest first: date (UTC), issued (new vouchers and top-ups), redeemed (net of refunds). Shortened here
data.recent object[] The eight newest vouchers, fields as in List Vouchers
data.currency string The WooCommerce currency

The totals add amounts of every currency together. For figures over a chosen period, use Get Report PRO.

Errors

Status Code When
401 / 403 plugixa_pdfv_forbidden The caller lacks the capability.

Plus the errors every endpoint can return.

Examples

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

Quick Links

Share