Get a stored template
Returns one stored template by id for this account: title, createdAt, byteSize, the cached inspect fields and skipped from the last store or replace, and downloadUrl for the blank PDF (GET /v1/templates/{id}/download on this host, same x-api-key). Matches POST /v1/inspect on those bytes. Does not re-inspect. Accept: application/pdf streams those stored bytes instead of JSON. Schema-only GET is not enough. A foreign or unknown id is not found. Not a filled output.
curl --request GET \
--url https://api.blinkpdf.io/v1/templates/{id} \
--header 'x-api-key: <api-key>'import requests
url = "https://api.blinkpdf.io/v1/templates/{id}"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.blinkpdf.io/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.blinkpdf.io/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 => [
"x-api-key: <api-key>"
],
]);
$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.blinkpdf.io/v1/templates/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
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.blinkpdf.io/v1/templates/{id}")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.blinkpdf.io/v1/templates/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"title": "<string>",
"createdAt": "<string>",
"byteSize": 1,
"fields": "<array>",
"skipped": "<array>",
"downloadUrl": "<string>"
}{
"error": "unauthorized"
}{
"error": "rate_limited",
"detail": "Tier rate limit exceeded. Retry after the Retry-After interval or upgrade for higher sustained throughput."
}Authorizations
API key issued from your Blink PDF account, prefixed bp_. Send it in the x-api-key header on every request. The documentation and health endpoints are exempt.
Headers
application/pdf streams the stored blank. Omit or application/json returns title, createdAt, byteSize, cached inspect, and downloadUrl.
Path Parameters
Stored template id returned by store
Response
Title, createdAt, byteSize, cached inspect, and downloadUrl for the blank PDF, or the stored blank when Accept: application/pdf
curl --request GET \
--url https://api.blinkpdf.io/v1/templates/{id} \
--header 'x-api-key: <api-key>'import requests
url = "https://api.blinkpdf.io/v1/templates/{id}"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.blinkpdf.io/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.blinkpdf.io/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 => [
"x-api-key: <api-key>"
],
]);
$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.blinkpdf.io/v1/templates/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
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.blinkpdf.io/v1/templates/{id}")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.blinkpdf.io/v1/templates/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"title": "<string>",
"createdAt": "<string>",
"byteSize": 1,
"fields": "<array>",
"skipped": "<array>",
"downloadUrl": "<string>"
}{
"error": "unauthorized"
}{
"error": "rate_limited",
"detail": "Tier rate limit exceeded. Retry after the Retry-After interval or upgrade for higher sustained throughput."
}