Delete an option set
curl --request DELETE \
--url https://api.print.app/v2/option-sets/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.print.app/v2/option-sets/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.print.app/v2/option-sets/{id}', 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/option-sets/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
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/option-sets/{id}"
req, _ := http.NewRequest("DELETE", 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.delete("https://api.print.app/v2/option-sets/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.print.app/v2/option-sets/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"object": "option_set_change",
"dryRun": false,
"optionSetId": "2f7c9e1a-4b8d-4e2f-9a61-0c3d5b7e8f10",
"title": "Flyers",
"currency": "USD",
"created": true,
"deleted": false,
"changes": [
{
"productId": "8123456789",
"title": "Flyers",
"change": "added",
"fromOptionSetId": null,
"ok": true,
"error": null
}
],
"failed": 0,
"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
}
]
}
],
"warnings": []
}{
"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": "not_found",
"message": "Not found.",
"requestId": "FZn-uhymjoEEJow="
}{
"error": true,
"code": "folder_not_empty",
"message": "The folder still holds designs. Remove them from it (or delete them) first.",
"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="
}{
"error": true,
"code": "service_unavailable",
"message": "Searching the library is unavailable right now. Try again in a minute.",
"requestId": "FZn-uhymjoEEJow="
}Print Options
Delete an option set
Takes the option set off every product it is on: their pages go back to the theme’s own add-to-cart.
DELETE
/
v2
/
option-sets
/
{id}
Delete an option set
curl --request DELETE \
--url https://api.print.app/v2/option-sets/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.print.app/v2/option-sets/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.print.app/v2/option-sets/{id}', 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/option-sets/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
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/option-sets/{id}"
req, _ := http.NewRequest("DELETE", 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.delete("https://api.print.app/v2/option-sets/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.print.app/v2/option-sets/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"object": "option_set_change",
"dryRun": false,
"optionSetId": "2f7c9e1a-4b8d-4e2f-9a61-0c3d5b7e8f10",
"title": "Flyers",
"currency": "USD",
"created": true,
"deleted": false,
"changes": [
{
"productId": "8123456789",
"title": "Flyers",
"change": "added",
"fromOptionSetId": null,
"ok": true,
"error": null
}
],
"failed": 0,
"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
}
]
}
],
"warnings": []
}{
"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": "not_found",
"message": "Not found.",
"requestId": "FZn-uhymjoEEJow="
}{
"error": true,
"code": "folder_not_empty",
"message": "The folder still holds designs. Remove them from it (or delete them) first.",
"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="
}{
"error": true,
"code": "service_unavailable",
"message": "Searching the library is unavailable right now. Try again in a minute.",
"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 option set id.
Query Parameters
List the products it would come off, changing nothing.
Response
OK.
What a create, update or delete did to each product, or would do (dryRun).
Allowed value:
"option_set_change"true when nothing was written.
The option set. null for a dry-run create.
Show child attributes
Show child attributes
Products that did not change.
Required range:
x >= 0Its fields as connectors address them: give a field's source as a connector's source.
Show child attributes
Show child attributes
Things that will not stop it working but may not be meant.
Show child attributes
Show child attributes