Skip to main content
GET
/
v1
/
templates
/
{id}
cURL
curl --request GET \
  --url https://api.doczilla.app/v1/templates/{id} \
  --header 'Authorization: Bearer <token>'
import requests

url = "https://api.doczilla.app/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.doczilla.app/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.doczilla.app/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.doczilla.app/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.doczilla.app/v1/templates/{id}")
.header("Authorization", "Bearer <token>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.doczilla.app/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
{
  "id": "<string>",
  "name": "<string>",
  "createdAt": "2023-11-07T05:31:56Z",
  "updatedAt": "2023-11-07T05:31:56Z",
  "variables": {
    "page": {
      "url": "<string>",
      "html": "<string>",
      "htmlTemplate": "<string>",
      "templateData": {},
      "waitUntil": "auto",
      "waitForMilliseconds": 2500,
      "waitForSelector": {
        "selector": "<string>",
        "options": {
          "visible": false,
          "hidden": false,
          "timeout": 10000
        }
      },
      "waitForFunction": {
        "pageFunction": "window.innerWidth < 100",
        "options": {
          "polling": "raf",
          "timeout": 10000
        }
      },
      "headers": {
        "x-foo": "bar"
      },
      "adblock": true,
      "javascript": true,
      "cookies": [
        {
          "name": "<string>",
          "value": "<string>",
          "domain": "<string>",
          "url": "<string>",
          "path": "<string>",
          "secure": true,
          "httpOnly": true,
          "expires": 123
        }
      ],
      "authentication": {
        "username": "<string>",
        "password": "<string>"
      },
      "colorScheme": "<string>",
      "timezone": "<string>"
    },
    "screenshot": {
      "type": "png",
      "device": "Macbook Pro 16",
      "viewport": {
        "width": 2240,
        "height": 1260,
        "deviceScaleFactor": 1,
        "isMobile": false,
        "hasTouch": false,
        "isLandscape": false
      },
      "fullPage": false,
      "fromSurface": true,
      "omitBackground": false,
      "optimizeForSpeed": true,
      "quality": 50,
      "captureBeyondViewport": false,
      "clip": {
        "width": 2240,
        "height": 1260,
        "x": 123,
        "y": 123,
        "scale": 1
      },
      "element": "<string>",
      "overlay": {
        "background": "<string>",
        "filter": "none",
        "margin": 0.2,
        "screenshotBorderRadius": 0
      }
    },
    "pdf": {
      "scale": 1,
      "displayHeaderFooter": false,
      "headerHtml": "<string>",
      "footerHtml": "<string>",
      "printBackground": false,
      "landscape": false,
      "pageRanges": "1-5",
      "format": "letter",
      "width": "<string>",
      "height": "<string>",
      "preferCSSPageSize": false,
      "margin": {
        "top": "<string>",
        "bottom": "<string>",
        "left": "<string>",
        "right": "<string>"
      },
      "omitBackground": false,
      "outline": false,
      "tagged": false
    }
  }
}
{
"message": "Validations failed!",
"code": "api.validation",
"fields": {
"page.url": "must be a URL address"
}
}
{
"message": "Unauthorized"
}
{
"message": "Reached subscription limit!"
}
{
"message": "Token has no active subscription!"
}
{
"message": "Too Many Requests!"
}
{
"message": "Internal server error"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

id
string
required

Response

id
string
required

The unique identifier of the template.

name
string
required

The name of the template.

Maximum string length: 200
output
enum<string>
required

The output format of the template.

Available options:
PDF,
IMAGE
createdAt
string<date-time>
required

The date and time the template was created.

updatedAt
string<date-time>
required

The date and time the template was last updated.

variables
object
required

The variables of the template.