Contents
On this page

List Batches - Plugixa PDF Vouchers for WooCommerce

GET /plugixa-pdf-vouchers/v1/bulk/batches

The 100 newest batches, like Bulk > Batches.

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.

Note. Pro only: on the free plugin this route answers 404 rest_no_route.

Request

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

Responses

200 OK. A plain list, without the usual wrapper.

[
  {
    "batch": "bulk-261024-acme",
    "source": "bulk",
    "vouchers": 24,
    "issued": 960,
    "outstanding": 640,
    "created_at": "2026-10-24 11:11:16"
  }
]
Field Type Meaning
batch string The batch name
source string bulk (generated) or import
vouchers integer Vouchers in it
issued number Their starting value
outstanding number What is left on them
created_at string When the batch was made, UTC

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

Quick Links

Share