Get an option set template
curl --request GET \
--url https://api.print.app/v2/print-options/templates/{key} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.print.app/v2/print-options/templates/{key}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.print.app/v2/print-options/templates/{key}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.print.app/v2/print-options/templates/{key}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.print.app/v2/print-options/templates/{key}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.print.app/v2/print-options/templates/{key}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.print.app/v2/print-options/templates/{key}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"object": "option_set_template",
"key": "flyers",
"name": "Flyers",
"description": "Size, sides, tiered per-unit pricing.",
"currency": "USD",
"fields": [
{
"id": "size",
"label": "Size",
"type": "select-one",
"role": "size",
"source": {
"role": "size"
},
"reference": "po:role/size",
"sends": "choice id as value, label as text",
"choices": [
{
"value": "a5",
"label": "A5",
"selected": true
},
{
"value": "a4",
"label": "A4",
"selected": false
}
]
}
],
"config": {
"version": "2.0",
"productId": "flyers",
"title": "Flyers",
"layout": "stacked",
"pricing": {
"currency": "USD",
"basePrice": {
"amount": 10,
"per": "order"
}
},
"sections": [
{
"id": "main",
"title": "Your flyer",
"fields": [
{
"id": "size",
"type": "select-one",
"display": "pills",
"label": "Size",
"role": "size",
"required": true,
"options": [
{
"id": "a5",
"label": "A5",
"default": true,
"priceModifiers": []
},
{
"id": "a4",
"label": "A4",
"priceModifiers": [
{
"type": "fixed",
"amount": 5
}
]
}
],
"priceModifiers": []
}
]
}
]
}
}{
"error": true,
"code": "unauthorized",
"message": "Missing or invalid secret key. Send it as \"Authorization: Bearer sk_…\".",
"requestId": "FZn-uhymjoEEJow="
}{
"error": true,
"code": "account_suspended",
"message": "This account is suspended. Settle the outstanding invoice in the Print.App dashboard.",
"requestId": "FZn-uhymjoEEJow="
}{
"error": true,
"code": "not_found",
"message": "Not found.",
"requestId": "FZn-uhymjoEEJow="
}{
"message": "Too Many Requests"
}{
"error": true,
"code": "internal_error",
"message": "Something went wrong on our side. Retry the request; if it keeps failing, contact support with the requestId.",
"requestId": "FZn-uhymjoEEJow="
}Print Options
Get an option set template
A template as a complete option set, to adapt and save with POST /v2/option-sets: its currency set to the store’s, and its choices and prices to the merchant’s.
GET
/
v2
/
print-options
/
templates
/
{key}
Get an option set template
curl --request GET \
--url https://api.print.app/v2/print-options/templates/{key} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.print.app/v2/print-options/templates/{key}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.print.app/v2/print-options/templates/{key}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.print.app/v2/print-options/templates/{key}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.print.app/v2/print-options/templates/{key}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.print.app/v2/print-options/templates/{key}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.print.app/v2/print-options/templates/{key}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"object": "option_set_template",
"key": "flyers",
"name": "Flyers",
"description": "Size, sides, tiered per-unit pricing.",
"currency": "USD",
"fields": [
{
"id": "size",
"label": "Size",
"type": "select-one",
"role": "size",
"source": {
"role": "size"
},
"reference": "po:role/size",
"sends": "choice id as value, label as text",
"choices": [
{
"value": "a5",
"label": "A5",
"selected": true
},
{
"value": "a4",
"label": "A4",
"selected": false
}
]
}
],
"config": {
"version": "2.0",
"productId": "flyers",
"title": "Flyers",
"layout": "stacked",
"pricing": {
"currency": "USD",
"basePrice": {
"amount": 10,
"per": "order"
}
},
"sections": [
{
"id": "main",
"title": "Your flyer",
"fields": [
{
"id": "size",
"type": "select-one",
"display": "pills",
"label": "Size",
"role": "size",
"required": true,
"options": [
{
"id": "a5",
"label": "A5",
"default": true,
"priceModifiers": []
},
{
"id": "a4",
"label": "A4",
"priceModifiers": [
{
"type": "fixed",
"amount": 5
}
]
}
],
"priceModifiers": []
}
]
}
]
}
}{
"error": true,
"code": "unauthorized",
"message": "Missing or invalid secret key. Send it as \"Authorization: Bearer sk_…\".",
"requestId": "FZn-uhymjoEEJow="
}{
"error": true,
"code": "account_suspended",
"message": "This account is suspended. Settle the outstanding invoice in the Print.App dashboard.",
"requestId": "FZn-uhymjoEEJow="
}{
"error": true,
"code": "not_found",
"message": "Not found.",
"requestId": "FZn-uhymjoEEJow="
}{
"message": "Too Many Requests"
}{
"error": true,
"code": "internal_error",
"message": "Something went wrong on our side. Retry the request; if it keeps failing, contact support with the requestId.",
"requestId": "FZn-uhymjoEEJow="
}Authorizations
A secret key from Print.App admin → Domains → Secret keys, sent as Authorization: Bearer sk_…. Server-side only.
Path Parameters
The template key, such as flyers.
Response
OK.
A template as a complete option set.
Allowed value:
"option_set_template"For GET /v2/print-options/templates/{key}.
The template's currency: change it to the store's.
Its fields as connectors address them: give a field's source as a connector's source.
Show child attributes
Show child attributes
The option set itself: Print Options' JSON (version "2.0"), as in the option set JSON reference.