Contents
List Templates - Plugixa Extra Product Options
GET /plugixa-epo/v1/templates
The templates the Templates button offers.
Needs a user with the plugixa_epo_manage capability (signed in with an Application Password, or the login cookie with an X-WP-Nonce header). Administrators and shop managers hold it; see Permissions. Pro only: on the free plugin this route answers 404 rest_no_route.
Request
GET https://your-store.example/wp-json/plugixa-epo/v1/templates
Responses
200 OK.
{
"success": true,
"data": [
{
"id": "custom-print",
"title": "Custom print",
"description": "A photo upload, print size, paper and frame for custom prints.",
"field_count": 4
},
{
"id": "engraving",
"title": "Engraving",
"description": "Optional engraved text with a choice of font.",
"field_count": 3
},
{
"id": "food-extras",
"title": "Size and extras",
"description": "Size, extra toppings and cooking notes for a meal or pizza.",
"field_count": 3
},
{
"id": "gift-options",
"title": "Gift options",
"description": "Gift wrap, a card with a message, and a delivery date.",
"field_count": 4
}
]
}
| Field | Type | Meaning |
|---|---|---|
id |
string |
Template id |
title |
string |
Name |
description |
string |
What it holds |
field_count |
integer |
Fields in it |
Errors
| Status | Code | When |
|---|---|---|
401 / 403 |
plugixa_epo_forbidden |
The caller lacks the capability: You are not allowed to do that. |
Plus the errors every endpoint can return.
Examples
curl -s "https://your-store.example/wp-json/plugixa-epo/v1/templates" \
-u "$WP_USER:$WP_APP_PASSWORD"
<?php
$ch = curl_init('https://your-store.example/wp-json/plugixa-epo/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-epo/v1/templates', {
headers: {
'Authorization': `Basic ${btoa(`${process.env.WP_USER}:${process.env.WP_APP_PASSWORD}`)}`,
},
});
const { data } = await response.json();
Quick Links
Share