Contents
On this page
List Vouchers - Plugixa PDF Vouchers for WooCommerce
GET /plugixa-pdf-vouchers/v1/vouchers
One page of vouchers, newest first by default, as the Vouchers screen shows them. See 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/vouchers?search=claire&status=active&per_page=1
Query parameters
| Field | Type | Required | Description |
|---|---|---|---|
search |
string |
No | A code (dashes and spaces do not matter, part of a code is enough), a recipient name or email, a buyer email, or an order number when you send only digits. |
status |
string |
No | active, redeemed, expired, void or pending. |
kind |
string |
No | mpv (gift card) or spv (product voucher). |
batch |
string |
No | Pro bulk codes: only vouchers of this batch. |
orderby |
string |
No | id (default), code, status, initial_amount, balance, expires_at or created_at. Anything else sorts by id. |
order |
string |
No | desc (default) or asc. |
page |
integer |
No | Page to return, from 1. Defaults to 1. |
per_page |
integer |
No | Vouchers per page, 1 to 200. Defaults to 25. |
Responses
200 OK. data is the page of vouchers, meta.total the number of matches.
{
"success": true,
"data": [
{
"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
}
],
"meta": {
"total": 1
}
}
| Field | Type | Meaning |
|---|---|---|
id |
integer |
The voucher’s id |
code |
string |
The code as printed, for example PX-GHMR-PKT5 |
code_norm |
string |
The code without dashes or spaces, as codes are compared |
kind |
string |
mpv for a gift card, spv for a product voucher |
status |
string |
active, redeemed (used up), expired, void or pending |
currency |
string |
The currency the voucher was sold in. Every amount of the voucher is in it |
initial_amount |
number |
The starting value |
balance |
number |
What is left to spend |
uses_allowed |
integer |
How many uses a product voucher allows, 0 for no limit |
uses_count |
integer |
How many times it was used |
product_id |
integer |
The voucher product it was sold from, 0 when made by hand |
variation_id |
integer |
The variation, 0 when none |
order_id |
integer |
The order that bought it, 0 when made by hand |
order_item_id |
integer |
The order line that bought it |
allowed_product_ids |
integer[] |
For a product voucher, the products it pays for |
allowed_category_ids |
integer[] |
For a product voucher, the categories it pays for |
buyer_user_id |
integer |
The customer account of the buyer, 0 for a guest |
buyer_email |
string |
The buyer’s email |
recipient_name |
string |
Who the voucher is for |
recipient_email |
string |
Where the voucher is emailed |
from_name |
string |
The sender’s name printed on the voucher |
message |
string |
The personal message |
template_id |
integer |
The PDF design, 0 for the store default |
locale |
string |
The language the PDF and emails are written in |
vendor_id |
integer |
With Pro marketplaces, the vendor who sold it, 0 for the store |
source |
string |
Where it came from: order, manual, bulk, import, physical and so on |
deliver_at |
string|null |
With Pro scheduled delivery, when the email is due, UTC |
delivered_at |
string|null |
When it was first emailed, UTC |
expires_at |
string|null |
End of validity, UTC, null for never |
created_by |
integer |
The user who made it by hand, 0 for an order |
created_at |
string |
UTC |
updated_at |
string |
UTC |
version |
integer |
Goes up on every change. Send it back with Update Voucher to refuse a stale save |
batch |
string |
With Pro bulk codes, the batch it belongs to |
recipient_phone |
string |
With Pro text messages, the recipient’s mobile |
meta |
object|array |
Extra data kept by Pro features, such as a service booking. An empty list when there is none |
is_expired |
boolean |
Whether the expiry date has passed |
order_url |
string |
The order’s edit screen in wp-admin, empty when there is no order |
service |
object|null |
With Pro service vouchers, the sessions: name, sessions, used, left, session_value, booking. null for other vouchers |
The list has no history lines: read them with Get Voucher.
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/vouchers?search=claire&status=active&per_page=1" \
-u "$WP_USER:$WP_APP_PASSWORD"
<?php
$ch = curl_init('https://your-store.example/wp-json/plugixa-pdf-vouchers/v1/vouchers?search=claire&status=active&per_page=1');
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/vouchers?search=claire&status=active&per_page=1', {
headers: {
'Authorization': `Basic ${btoa(`${process.env.WP_USER}:${process.env.WP_APP_PASSWORD}`)}`,
},
});
const { data } = await response.json();
Quick Links
Share