Contents
On this page

List PDF Designs - Plugixa PDF Vouchers for WooCommerce

GET /plugixa-pdf-vouchers/v1/templates

Every active design, plus the choices the design editor offers. See PDF designs.

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

Responses

200 OK. data lists the designs; meta holds the editor’s choices.

{
  "success": true,
  "data": [
    {
      "id": 1,
      "name": "Classic cream",
      "kind": "preset",
      "preset": "classic",
      "paper": "A4",
      "orientation": "L",
      "settings": {
        "title": "Gift Voucher",
        "subtitle": "Maison Willow · Spa & Tea Room",
        "accent": "#7a1f2b",
        "background": "#f7f1e8",
        "text": "#2b2b2b",
        "logo_id": 0,
        "background_id": 0,
        "font": "dejavusans",
        "show_qr": true,
        "show_expiry": true,
        "show_message": true,
        "footer": "Present this voucher or enter the code at checkout on {site_url}.",
        "terms": "",
        "rtl": false,
        "logo_id_url": "",
        "background_id_url": ""
      },
      "layout": null,
      "vendor_id": 0,
      "is_default": 1,
      "status": "active",
      "created_at": "2026-11-15 15:51:22",
      "updated_at": "2026-11-15 15:51:22",
      "version": 1
    }
  ],
  "meta": {
    "presets": ["classic", "modern", "minimal", "elegant", "festive", "ticket"],
    "preset_info": [
      {
        "preset": "classic",
        "name": "Classic",
        "settings": {
          "title": "Gift Voucher",
          "accent": "#7a1f2b"
        }
      }
    ],
    "papers": ["A4", "A5", "LETTER"],
    "fonts": ["dejavusans", "dejavuserif", "dejavusansmono", "xbriyaz"],
    "font_labels": {
      "dejavusans": "DejaVu Sans",
      "dejavuserif": "DejaVu Serif",
      "dejavusansmono": "DejaVu Sans Mono",
      "xbriyaz": "XB Riyaz (العربية)"
    },
    "font_files": {
      "dejavusans": "https://your-store.example/wp-content/plugins/plugixa-pdf-vouchers/assets/fonts/DejaVuSans.ttf"
    },
    "placeholders": {
      "code": "Voucher code",
      "amount": "Voucher value",
      "balance": "Remaining balance",
      "expiry": "Expiry date"
    }
  }
}
Field Type Meaning
id integer The design’s id
name string Its name in the design list
kind string preset for a ready-made layout, builder for a Pro drag-and-drop design
preset string The layout: classic, modern, minimal, and with Pro elegant, festive, ticket
paper string A4, A5 or LETTER
orientation string L landscape or P portrait
settings object Texts, colours, pictures and switches, below. logo_id_url and background_id_url are added for display
layout object|null The elements of a Pro drag-and-drop design, null for a ready-made one
is_default integer 1 for the store default design
status string active or archived
version integer Goes up on every change

meta is shortened here. presets lists the Pro layouts only when Pro is active, fonts adds your custom fonts PRO, and placeholders lists every placeholder with its meaning. preset_info gives each layout’s name and starting settings.

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

Quick Links

Share