Contents
On this page

Get PDF Design - Plugixa PDF Vouchers for WooCommerce

GET /plugixa-pdf-vouchers/v1/templates/{id}

One design, active or archived.

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

Path parameters

Name Type Description
id integer The design’s id

Responses

200 OK.

{
  "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
  }
}
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

The settings object:

Field Type Meaning
title string The heading
subtitle string The line under it
accent string Hex colour
background string Hex colour
text string Hex colour
logo_id integer A media library image, 0 for none
background_id integer A media library image, 0 for none
font string A font key from meta.fonts of List PDF Designs
show_qr boolean Print the QR code
show_expiry boolean Print the expiry date
show_message boolean Print the personal message
footer string Footer text. Placeholders such as {site_url} work
terms string Terms and conditions
rtl boolean Right-to-left

Errors

Status Code When
401 / 403 plugixa_pdfv_forbidden The caller lacks the capability.
404 plugixa_pdfv_not_found No design with that id: Design not found.

Plus the errors every endpoint can return.

Examples

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

Quick Links

Share