curl --request POST \
--url https://api.print.app/v2/imposition-rules \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"title": "Calendar: month pairs on A3",
"unit": "mm",
"sections": [
{
"pages": "",
"group": 2,
"direction": "vertical",
"sheet": {
"width": 297,
"height": 420
}
}
]
}
'import requests
url = "https://api.print.app/v2/imposition-rules"
payload = {
"title": "Calendar: month pairs on A3",
"unit": "mm",
"sections": [
{
"pages": "",
"group": 2,
"direction": "vertical",
"sheet": {
"width": 297,
"height": 420
}
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
title: 'Calendar: month pairs on A3',
unit: 'mm',
sections: [{pages: '', group: 2, direction: 'vertical', sheet: {width: 297, height: 420}}]
})
};
fetch('https://api.print.app/v2/imposition-rules', 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/imposition-rules",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'title' => 'Calendar: month pairs on A3',
'unit' => 'mm',
'sections' => [
[
'pages' => '',
'group' => 2,
'direction' => 'vertical',
'sheet' => [
'width' => 297,
'height' => 420
]
]
]
]),
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/imposition-rules"
payload := strings.NewReader("{\n \"title\": \"Calendar: month pairs on A3\",\n \"unit\": \"mm\",\n \"sections\": [\n {\n \"pages\": \"\",\n \"group\": 2,\n \"direction\": \"vertical\",\n \"sheet\": {\n \"width\": 297,\n \"height\": 420\n }\n }\n ]\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.print.app/v2/imposition-rules")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"title\": \"Calendar: month pairs on A3\",\n \"unit\": \"mm\",\n \"sections\": [\n {\n \"pages\": \"\",\n \"group\": 2,\n \"direction\": \"vertical\",\n \"sheet\": {\n \"width\": 297,\n \"height\": 420\n }\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.print.app/v2/imposition-rules")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"title\": \"Calendar: month pairs on A3\",\n \"unit\": \"mm\",\n \"sections\": [\n {\n \"pages\": \"\",\n \"group\": 2,\n \"direction\": \"vertical\",\n \"sheet\": {\n \"width\": 297,\n \"height\": 420\n }\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"object": "imposition_rule",
"id": "_imposition_1",
"title": "Book cover: back, spine and front as one spread",
"description": "Pages 1, 2 and 3 are the front cover, the spine and the back cover. The PDF joins them into one spread with the back cover on the left. Later pages print as they are.",
"builtIn": true,
"unit": "mm",
"sections": [
{
"pages": "1-3",
"group": 3,
"order": [
3,
2,
1
],
"direction": "horizontal",
"sheet": null,
"anchor": "center",
"offset": {
"x": 0,
"y": 0
},
"marks": {
"crop": null,
"fold": null
}
}
],
"created": null,
"modified": null
}{
"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="
}Create an imposition rule
Creates a rule from its sections, or from basedOn (a built-in rule or one of yours). Each section takes design pages, cuts them into groups of group and puts each group on one sheet: joined at the trim along direction in order, on a sheet that fits them or on a fixed sheet. Sections the PDF would ignore are refused. Give it to designs with impositionRuleId on PATCH /v2/designs/{id}.
curl --request POST \
--url https://api.print.app/v2/imposition-rules \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"title": "Calendar: month pairs on A3",
"unit": "mm",
"sections": [
{
"pages": "",
"group": 2,
"direction": "vertical",
"sheet": {
"width": 297,
"height": 420
}
}
]
}
'import requests
url = "https://api.print.app/v2/imposition-rules"
payload = {
"title": "Calendar: month pairs on A3",
"unit": "mm",
"sections": [
{
"pages": "",
"group": 2,
"direction": "vertical",
"sheet": {
"width": 297,
"height": 420
}
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
title: 'Calendar: month pairs on A3',
unit: 'mm',
sections: [{pages: '', group: 2, direction: 'vertical', sheet: {width: 297, height: 420}}]
})
};
fetch('https://api.print.app/v2/imposition-rules', 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/imposition-rules",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'title' => 'Calendar: month pairs on A3',
'unit' => 'mm',
'sections' => [
[
'pages' => '',
'group' => 2,
'direction' => 'vertical',
'sheet' => [
'width' => 297,
'height' => 420
]
]
]
]),
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/imposition-rules"
payload := strings.NewReader("{\n \"title\": \"Calendar: month pairs on A3\",\n \"unit\": \"mm\",\n \"sections\": [\n {\n \"pages\": \"\",\n \"group\": 2,\n \"direction\": \"vertical\",\n \"sheet\": {\n \"width\": 297,\n \"height\": 420\n }\n }\n ]\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.print.app/v2/imposition-rules")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"title\": \"Calendar: month pairs on A3\",\n \"unit\": \"mm\",\n \"sections\": [\n {\n \"pages\": \"\",\n \"group\": 2,\n \"direction\": \"vertical\",\n \"sheet\": {\n \"width\": 297,\n \"height\": 420\n }\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.print.app/v2/imposition-rules")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"title\": \"Calendar: month pairs on A3\",\n \"unit\": \"mm\",\n \"sections\": [\n {\n \"pages\": \"\",\n \"group\": 2,\n \"direction\": \"vertical\",\n \"sheet\": {\n \"width\": 297,\n \"height\": 420\n }\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"object": "imposition_rule",
"id": "_imposition_1",
"title": "Book cover: back, spine and front as one spread",
"description": "Pages 1, 2 and 3 are the front cover, the spine and the back cover. The PDF joins them into one spread with the back cover on the left. Later pages print as they are.",
"builtIn": true,
"unit": "mm",
"sections": [
{
"pages": "1-3",
"group": 3,
"order": [
3,
2,
1
],
"direction": "horizontal",
"sheet": null,
"anchor": "center",
"offset": {
"x": 0,
"y": 0
},
"marks": {
"crop": null,
"fold": null
}
}
],
"created": null,
"modified": null
}{
"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
A secret key from Print.App admin → Domains → Secret keys, sent as Authorization: Bearer sk_…. Server-side only.
Headers
Makes a retry safe: a second request with the same key and the same body gets the first response back (for 24 hours) instead of creating the resource again. Use a new key, such as a UUID, for every new request.
1 - 255Body
A new imposition rule: its sections, or basedOn to copy another rule's unit and sections (what you send replaces what is copied). Give it to designs with impositionRuleId on PATCH /v2/designs/{id}.
The rule's name.
1 - 200What it is for.
500A rule to start from, such as a built-in one.
1 - 120The unit of every sheet size and offset. Default mm.
mm, cm, in, pt Applied in order. Pages no section takes print as they are.
1 - 20 elementsShow child attributes
Show child attributes
Response
Created.
How the print PDF of a design puts its pages on sheets: joined into spreads (a book cover, calendar pairs) or placed on a fixed sheet. Designs use one with impositionRuleId; a customer's project follows its design's.
"imposition_rule"The rule id: imposition_…, or a built-in _imposition_….
What it is for.
One of Print.App's rules: it can be used and copied (basedOn), not changed.
The unit of every sheet size and offset.
mm, cm, in, pt Applied in order. Pages no section takes print as they are.
Show child attributes
Show child attributes