Read a product page
curl --request GET \
--url https://api.print.app/v2/product-page \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.print.app/v2/product-page"
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/product-page', 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/product-page",
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/product-page"
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/product-page")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.print.app/v2/product-page")
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": "product_page",
"url": "<string>",
"title": "<string>",
"platform": "<string>",
"productId": "<string>",
"passwordProtected": true,
"printApp": true,
"designIds": [
"<string>"
],
"controls": [
{
"kind": "select",
"name": "<string>",
"label": "<string>",
"selector": "<string>",
"matches": 123,
"inProductForm": true,
"sends": "<string>",
"choices": [
{
"value": "<string>",
"label": "<string>",
"selected": true
}
],
"value": "<string>",
"notes": [
"<string>"
]
}
],
"printOptions": {
"found": true,
"fields": [
{
"id": "<string>",
"label": "<string>",
"type": "<string>",
"role": "<string>",
"source": {
"role": "<string>",
"field": "<string>"
},
"reference": "<string>",
"sends": "<string>",
"choices": [
{
"value": "<string>",
"label": "<string>",
"selected": true
}
]
}
],
"error": "<string>"
},
"store": {
"displayMode": "<string>",
"checks": [
{
"setting": "<string>",
"purpose": "<string>",
"value": "<string>",
"uses": "<string>",
"source": "setting",
"matches": 123,
"status": "ok",
"suggestion": "<string>",
"note": "<string>"
}
]
},
"notes": [
"<string>"
]
}{
"error": true,
"code": "invalid_request",
"message": "width is required.",
"param": "width",
"requestId": "FZn-uhymjoEEJow="
}{
"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="
}{
"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="
}Connectors
Read a product page
Reads a product page of your store as the Print.App client sees it when it loads: each option control with a selector that finds it and its choices, the Print Options fields with their roles and choices, the store’s product id and the designs it opens. Only pages of your own store (its address, Shopify shop or Print.App key) are read. Controls a theme builds in JavaScript after loading are not seen.
GET
/
v2
/
product-page
Read a product page
curl --request GET \
--url https://api.print.app/v2/product-page \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.print.app/v2/product-page"
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/product-page', 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/product-page",
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/product-page"
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/product-page")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.print.app/v2/product-page")
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": "product_page",
"url": "<string>",
"title": "<string>",
"platform": "<string>",
"productId": "<string>",
"passwordProtected": true,
"printApp": true,
"designIds": [
"<string>"
],
"controls": [
{
"kind": "select",
"name": "<string>",
"label": "<string>",
"selector": "<string>",
"matches": 123,
"inProductForm": true,
"sends": "<string>",
"choices": [
{
"value": "<string>",
"label": "<string>",
"selected": true
}
],
"value": "<string>",
"notes": [
"<string>"
]
}
],
"printOptions": {
"found": true,
"fields": [
{
"id": "<string>",
"label": "<string>",
"type": "<string>",
"role": "<string>",
"source": {
"role": "<string>",
"field": "<string>"
},
"reference": "<string>",
"sends": "<string>",
"choices": [
{
"value": "<string>",
"label": "<string>",
"selected": true
}
]
}
],
"error": "<string>"
},
"store": {
"displayMode": "<string>",
"checks": [
{
"setting": "<string>",
"purpose": "<string>",
"value": "<string>",
"uses": "<string>",
"source": "setting",
"matches": 123,
"status": "ok",
"suggestion": "<string>",
"note": "<string>"
}
]
},
"notes": [
"<string>"
]
}{
"error": true,
"code": "invalid_request",
"message": "width is required.",
"param": "width",
"requestId": "FZn-uhymjoEEJow="
}{
"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="
}{
"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
Response
OK.
What a store's product page offers a connector: its option controls, its Print Options fields, and whether Print.App runs on it.