curl --request PATCH \
--url https://api.print.app/v2/settings \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"cartButtonSelector": "button[name=\"add\"]",
"displayMode": "dialog"
}
'import requests
url = "https://api.print.app/v2/settings"
payload = {
"cartButtonSelector": "button[name=\"add\"]",
"displayMode": "dialog"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({cartButtonSelector: 'button[name="add"]', displayMode: 'dialog'})
};
fetch('https://api.print.app/v2/settings', 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/settings",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'cartButtonSelector' => 'button[name="add"]',
'displayMode' => 'dialog'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.print.app/v2/settings"
payload := strings.NewReader("{\n \"cartButtonSelector\": \"button[name=\\\"add\\\"]\",\n \"displayMode\": \"dialog\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.print.app/v2/settings")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"cartButtonSelector\": \"button[name=\\\"add\\\"]\",\n \"displayMode\": \"dialog\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.print.app/v2/settings")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"cartButtonSelector\": \"button[name=\\\"add\\\"]\",\n \"displayMode\": \"dialog\"\n}"
response = http.request(request)
puts response.read_body{
"object": "settings",
"editor": "new",
"autoSaveProjects": false,
"autoSaveDuration": 8,
"autoExpireProjects": false,
"projectLifetime": 1,
"autoExpireUploads": false,
"uploadLifetime": 120,
"skipPreview": false,
"expandThumbNav": true,
"showTabTitle": true,
"enableSaveLater": false,
"defaultLayout": "",
"layout": "",
"displayMode": "modal",
"showGraphicsTitle": false,
"graphicsSearchCustomers": false,
"graphicsSearchScope": "store",
"enableColorProofing": false,
"bleedLineColor": "#F3343C",
"marginLineColor": "#84cc16",
"trimLineColor": "#8b5cf6",
"foldLineColor": "#fde047",
"borderColor": "#2563eb",
"decimalPointTextSize": true,
"autoPlaceNewText": true,
"autoTextSize": true,
"newTextSize": 40,
"defaultTextType": "Textbox",
"defaultNewTextString": "Type into your new\ntext",
"defaultNewHeadingString": "Add a heading",
"hoverShow": true,
"enableSnapping": true,
"snapRange": 5,
"gridLinesInterval": 20,
"bleedLineMessage": "Bleed line",
"marginLineMessage": "Margin line",
"trimLineMessage": "Trim line",
"retainProductImages": false,
"forceCustomization": false,
"disableCustomization": false,
"customPreviewSelector": "",
"cartButtonSelector": "",
"customVariantSelector": "",
"inlineSelector": "",
"miniSelector": "",
"moveButtonsBefore": "",
"buttonsClass": "",
"observeFormRerenders": false,
"collectionButtons": false,
"sideBarColor": "#FFFFFF",
"editorTheme": "system"
}{
"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="
}{
"error": true,
"code": "unsupported_media_type",
"message": "Send the request body as JSON, with \"Content-Type: application/json\".",
"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="
}Update the settings
Changes the settings you send. Selectors are checked as CSS first; GET /v2/product-page shows whether they find their element on a product page. Product pages pick the change up within a few minutes. The editor in use and the settings that delete projects are read-only here; custom JS and CSS, webhook addresses and the guide book can only be set in the dashboard.
curl --request PATCH \
--url https://api.print.app/v2/settings \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"cartButtonSelector": "button[name=\"add\"]",
"displayMode": "dialog"
}
'import requests
url = "https://api.print.app/v2/settings"
payload = {
"cartButtonSelector": "button[name=\"add\"]",
"displayMode": "dialog"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({cartButtonSelector: 'button[name="add"]', displayMode: 'dialog'})
};
fetch('https://api.print.app/v2/settings', 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/settings",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'cartButtonSelector' => 'button[name="add"]',
'displayMode' => 'dialog'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.print.app/v2/settings"
payload := strings.NewReader("{\n \"cartButtonSelector\": \"button[name=\\\"add\\\"]\",\n \"displayMode\": \"dialog\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.print.app/v2/settings")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"cartButtonSelector\": \"button[name=\\\"add\\\"]\",\n \"displayMode\": \"dialog\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.print.app/v2/settings")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"cartButtonSelector\": \"button[name=\\\"add\\\"]\",\n \"displayMode\": \"dialog\"\n}"
response = http.request(request)
puts response.read_body{
"object": "settings",
"editor": "new",
"autoSaveProjects": false,
"autoSaveDuration": 8,
"autoExpireProjects": false,
"projectLifetime": 1,
"autoExpireUploads": false,
"uploadLifetime": 120,
"skipPreview": false,
"expandThumbNav": true,
"showTabTitle": true,
"enableSaveLater": false,
"defaultLayout": "",
"layout": "",
"displayMode": "modal",
"showGraphicsTitle": false,
"graphicsSearchCustomers": false,
"graphicsSearchScope": "store",
"enableColorProofing": false,
"bleedLineColor": "#F3343C",
"marginLineColor": "#84cc16",
"trimLineColor": "#8b5cf6",
"foldLineColor": "#fde047",
"borderColor": "#2563eb",
"decimalPointTextSize": true,
"autoPlaceNewText": true,
"autoTextSize": true,
"newTextSize": 40,
"defaultTextType": "Textbox",
"defaultNewTextString": "Type into your new\ntext",
"defaultNewHeadingString": "Add a heading",
"hoverShow": true,
"enableSnapping": true,
"snapRange": 5,
"gridLinesInterval": 20,
"bleedLineMessage": "Bleed line",
"marginLineMessage": "Margin line",
"trimLineMessage": "Trim line",
"retainProductImages": false,
"forceCustomization": false,
"disableCustomization": false,
"customPreviewSelector": "",
"cartButtonSelector": "",
"customVariantSelector": "",
"inlineSelector": "",
"miniSelector": "",
"moveButtonsBefore": "",
"buttonsClass": "",
"observeFormRerenders": false,
"collectionButtons": false,
"sideBarColor": "#FFFFFF",
"editorTheme": "system"
}{
"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="
}{
"error": true,
"code": "unsupported_media_type",
"message": "Send the request body as JSON, with \"Content-Type: application/json\".",
"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
Body
The settings to change. Only the ones you send change. Product page changes reach the store within a few minutes.
Response
OK.
The account's editor and product page settings that the API manages. Settings that run code in the store (custom JS and CSS), send data elsewhere (webhooks) or are files are left out; manage them in the dashboard.
New editor only: the layout customers get. "" default, default-right sidebar on the right, product product designer, steps one step at a time, approve view and approve. Designs can override it in the editor.
, default-right, product, steps, approve, null