Get one published output's render contract
Requires a studio-owned API account with templates:read. During the compatibility period, print_orders:read is also accepted. Omit revision_id to resolve the latest published revision. Only published or superseded immutable revisions are eligible; draft editor revisions are never returned. The selected output’s used slots and physical surfaces are returned, while arbitrary editor nodes, placement geometry, and transforms remain outside this contract. Returned slot key is the only runtime input identity; ordinal, label, and semantic suggestion are revision-local discovery metadata. Use the published browser-preview package when a client needs visual node identity or browser-side placement data.
curl --request GET \
--url https://api.batchrelay.com/v1/templates/{template_id}/outputs/{output_id}/contract \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.batchrelay.com/v1/templates/{template_id}/outputs/{output_id}/contract"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.batchrelay.com/v1/templates/{template_id}/outputs/{output_id}/contract', 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.batchrelay.com/v1/templates/{template_id}/outputs/{output_id}/contract",
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.batchrelay.com/v1/templates/{template_id}/outputs/{output_id}/contract"
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.batchrelay.com/v1/templates/{template_id}/outputs/{output_id}/contract")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.batchrelay.com/v1/templates/{template_id}/outputs/{output_id}/contract")
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{
"output": {
"id": "<string>",
"ordinal": 1,
"surfaces": [
{
"canonical_product_id": "<string>",
"canonical_product_revision": 2,
"dpi": 123,
"fulfillment_role": "artwork",
"height_in": 123,
"id": "<string>",
"ordinal": 1,
"variant_id": "<string>",
"width_in": 123,
"label": "<string>"
}
],
"label": "<string>"
},
"slots": [
{
"key": "<string>",
"kind": "text",
"ordinal": 1,
"required": true,
"expected_aspect_ratio": {
"height": 2,
"width": 2
},
"max_length": 2,
"minimum_effective_ppi": 123,
"suggested_label": "<string>",
"suggested_semantic_key": "<string>"
}
],
"template": {
"document_hash": "<string>",
"id": "<string>",
"revision_id": "<string>",
"revision_number": 2,
"template_engine_version": "0.10.0"
}
}{
"code": "<string>",
"docs_url": "<string>",
"error": "<string>",
"message": "<string>",
"request_id": "<string>"
}{
"code": "<string>",
"docs_url": "<string>",
"error": "<string>",
"message": "<string>",
"request_id": "<string>"
}{
"code": "<string>",
"docs_url": "<string>",
"error": "<string>",
"message": "<string>",
"request_id": "<string>"
}{
"code": "<string>",
"docs_url": "<string>",
"error": "<string>",
"message": "<string>",
"request_id": "<string>"
}{
"code": "<string>",
"docs_url": "<string>",
"error": "<string>",
"message": "<string>",
"request_id": "<string>"
}Authorizations
Headers
Path Parameters
Query Parameters
Response
Output-scoped immutable render contract
Published output-scoped render contract for one immutable revision. Slots are limited to the selected output's used runtime bindings; editor node placement and transforms are represented only by the separate browser-preview package.
curl --request GET \
--url https://api.batchrelay.com/v1/templates/{template_id}/outputs/{output_id}/contract \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.batchrelay.com/v1/templates/{template_id}/outputs/{output_id}/contract"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.batchrelay.com/v1/templates/{template_id}/outputs/{output_id}/contract', 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.batchrelay.com/v1/templates/{template_id}/outputs/{output_id}/contract",
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.batchrelay.com/v1/templates/{template_id}/outputs/{output_id}/contract"
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.batchrelay.com/v1/templates/{template_id}/outputs/{output_id}/contract")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.batchrelay.com/v1/templates/{template_id}/outputs/{output_id}/contract")
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{
"output": {
"id": "<string>",
"ordinal": 1,
"surfaces": [
{
"canonical_product_id": "<string>",
"canonical_product_revision": 2,
"dpi": 123,
"fulfillment_role": "artwork",
"height_in": 123,
"id": "<string>",
"ordinal": 1,
"variant_id": "<string>",
"width_in": 123,
"label": "<string>"
}
],
"label": "<string>"
},
"slots": [
{
"key": "<string>",
"kind": "text",
"ordinal": 1,
"required": true,
"expected_aspect_ratio": {
"height": 2,
"width": 2
},
"max_length": 2,
"minimum_effective_ppi": 123,
"suggested_label": "<string>",
"suggested_semantic_key": "<string>"
}
],
"template": {
"document_hash": "<string>",
"id": "<string>",
"revision_id": "<string>",
"revision_number": 2,
"template_engine_version": "0.10.0"
}
}{
"code": "<string>",
"docs_url": "<string>",
"error": "<string>",
"message": "<string>",
"request_id": "<string>"
}{
"code": "<string>",
"docs_url": "<string>",
"error": "<string>",
"message": "<string>",
"request_id": "<string>"
}{
"code": "<string>",
"docs_url": "<string>",
"error": "<string>",
"message": "<string>",
"request_id": "<string>"
}{
"code": "<string>",
"docs_url": "<string>",
"error": "<string>",
"message": "<string>",
"request_id": "<string>"
}{
"code": "<string>",
"docs_url": "<string>",
"error": "<string>",
"message": "<string>",
"request_id": "<string>"
}