Retrieve a template
curl --request GET \
--url https://api.pdfbase.dev/v1/templates/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.pdfbase.dev/v1/templates/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.pdfbase.dev/v1/templates/{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.pdfbase.dev/v1/templates/{id}",
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.pdfbase.dev/v1/templates/{id}"
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.pdfbase.dev/v1/templates/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.pdfbase.dev/v1/templates/{id}")
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{
"render_count": 123
}Templates
Retrieve a template
Get a template’s definition, schema, and defaults.
GET
/
v1
/
templates
/
{id}
Retrieve a template
curl --request GET \
--url https://api.pdfbase.dev/v1/templates/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.pdfbase.dev/v1/templates/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.pdfbase.dev/v1/templates/{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.pdfbase.dev/v1/templates/{id}",
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.pdfbase.dev/v1/templates/{id}"
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.pdfbase.dev/v1/templates/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.pdfbase.dev/v1/templates/{id}")
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{
"render_count": 123
}Phase
Phase 1 (Launch)Path parameters
string
required
Template ID, e.g.,
tpl_abc123.Response
{
"id": "tpl_abc123",
"object": "template",
"name": "invoice",
"description": "Standard customer invoice",
"html": "<!DOCTYPE html><html>...</html>",
"css": null,
"schema": {
"number": "string",
"customer": "string",
"items": "array",
"due_date": "date",
"total": "string"
},
"defaults": {
"format": "a4",
"margin": "20mm",
"compress": "medium"
},
"sample_data": {
"number": "INV-001",
"customer": "Acme Corp",
"items": [
{ "name": "Widget", "qty": 10, "price": "$50.00" }
],
"due_date": "2026-06-19",
"total": "$500.00"
},
"version": 3,
"render_count": 142,
"created_at": "2026-05-19T10:00:00Z",
"updated_at": "2026-05-22T14:30:00Z"
}
integer
Total number of times this template has been rendered. Useful for identifying unused templates.
Example
curl https://api.pdfbase.dev/v1/templates/tpl_abc123 \
-H "Authorization: Bearer pk_live_xxx"