from retab import Retab
client = Retab()
template = client.edits.templates.get("edittplt_abc123")
print(template.name, template.field_count)
import { Retab } from "@retab/node";
const client = new Retab({ apiKey: process.env.RETAB_API_KEY });
const template = await client.edits.templates.get("edittplt_abc123");
console.log(template.name, template.fieldCount);
package main
import (
"context"
"fmt"
"log"
retab "github.com/retab-dev/retab/clients/go"
)
func ptr[T any](v T) *T { return &v }
func main() {
ctx := context.Background()
client, err := retab.NewClient("")
if err != nil {
log.Fatal(err)
}
template, err := client.Edits.Templates.Get(ctx, "edittplt_abc123")
if err != nil {
log.Fatal(err)
}
fmt.Println(template.Name, template.FieldCount)
}
require 'retab'
client = Retab::Client.new(api_key: ENV['RETAB_API_KEY'])
template = client.edits.templates.get(template_id: 'edittplt_abc123')
puts "#{template.name} #{template.field_count}"
use retab::Retab;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let client = Retab::new(std::env::var("RETAB_API_KEY")?);
let template = client.edits().templates().get("edittplt_abc123").await?;
println!("{} {}", template.name, template.field_count.unwrap_or_default());
Ok(())
}
<?php
require 'vendor/autoload.php';
use Retab\Client;
$client = new Client(apiKey: getenv('RETAB_API_KEY'));
$result = $client->edits()->templates()->get(
templateId: 'tmpl_abc123',
);
print_r($result);
using Retab;
using RetabClient = Retab.Retab;
var apiKey = Environment.GetEnvironmentVariable("RETAB_API_KEY")!;
var client = new RetabClient(apiKey);
var result = await client.Edits.Templates.GetAsync("tmpl_abc123");
Console.WriteLine(result);
import com.retab.RetabClient;
public final class Example {
public static void main(String[] args) throws Exception {
RetabClient client = new RetabClient(System.getenv("RETAB_API_KEY"));
var result = client.edits().templates().get("tmpl_abc123");
System.out.println(result);
}
}
curl -X GET \
'https://api.retab.com/v1/edits/templates/edittplt_abc123' \
-H "Authorization: Bearer $RETAB_API_KEY"
{
"id": "edittplt_abc123",
"name": "W-9 Form",
"file": {
"id": "file_6dd6eb00688ad8d1",
"filename": "w9_empty.pdf",
"mime_type": "application/pdf"
},
"form_fields": [
{
"key": "full_name",
"description": "Full legal name",
"type": "text",
"bbox": {
"left": 0.15,
"top": 0.2,
"width": 0.35,
"height": 0.03,
"page": 1
}
}
],
"field_count": 1,
"created_at": "2024-03-15T10:30:00Z",
"updated_at": "2024-03-15T10:30:00Z"
}
{
"detail": "Template edittplt_abc123 not found"
}
Templates
Get Template
Retrieve an edit template.
Fetches a single edit template by its template_id, including its form
fields. Responds with 404 if no template with that id exists.
GET
/
v1
/
edits
/
templates
/
{template_id}
from retab import Retab
client = Retab()
template = client.edits.templates.get("edittplt_abc123")
print(template.name, template.field_count)
import { Retab } from "@retab/node";
const client = new Retab({ apiKey: process.env.RETAB_API_KEY });
const template = await client.edits.templates.get("edittplt_abc123");
console.log(template.name, template.fieldCount);
package main
import (
"context"
"fmt"
"log"
retab "github.com/retab-dev/retab/clients/go"
)
func ptr[T any](v T) *T { return &v }
func main() {
ctx := context.Background()
client, err := retab.NewClient("")
if err != nil {
log.Fatal(err)
}
template, err := client.Edits.Templates.Get(ctx, "edittplt_abc123")
if err != nil {
log.Fatal(err)
}
fmt.Println(template.Name, template.FieldCount)
}
require 'retab'
client = Retab::Client.new(api_key: ENV['RETAB_API_KEY'])
template = client.edits.templates.get(template_id: 'edittplt_abc123')
puts "#{template.name} #{template.field_count}"
use retab::Retab;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let client = Retab::new(std::env::var("RETAB_API_KEY")?);
let template = client.edits().templates().get("edittplt_abc123").await?;
println!("{} {}", template.name, template.field_count.unwrap_or_default());
Ok(())
}
<?php
require 'vendor/autoload.php';
use Retab\Client;
$client = new Client(apiKey: getenv('RETAB_API_KEY'));
$result = $client->edits()->templates()->get(
templateId: 'tmpl_abc123',
);
print_r($result);
using Retab;
using RetabClient = Retab.Retab;
var apiKey = Environment.GetEnvironmentVariable("RETAB_API_KEY")!;
var client = new RetabClient(apiKey);
var result = await client.Edits.Templates.GetAsync("tmpl_abc123");
Console.WriteLine(result);
import com.retab.RetabClient;
public final class Example {
public static void main(String[] args) throws Exception {
RetabClient client = new RetabClient(System.getenv("RETAB_API_KEY"));
var result = client.edits().templates().get("tmpl_abc123");
System.out.println(result);
}
}
curl -X GET \
'https://api.retab.com/v1/edits/templates/edittplt_abc123' \
-H "Authorization: Bearer $RETAB_API_KEY"
{
"id": "edittplt_abc123",
"name": "W-9 Form",
"file": {
"id": "file_6dd6eb00688ad8d1",
"filename": "w9_empty.pdf",
"mime_type": "application/pdf"
},
"form_fields": [
{
"key": "full_name",
"description": "Full legal name",
"type": "text",
"bbox": {
"left": 0.15,
"top": 0.2,
"width": 0.35,
"height": 0.03,
"page": 1
}
}
],
"field_count": 1,
"created_at": "2024-03-15T10:30:00Z",
"updated_at": "2024-03-15T10:30:00Z"
}
{
"detail": "Template edittplt_abc123 not found"
}
from retab import Retab
client = Retab()
template = client.edits.templates.get("edittplt_abc123")
print(template.name, template.field_count)
import { Retab } from "@retab/node";
const client = new Retab({ apiKey: process.env.RETAB_API_KEY });
const template = await client.edits.templates.get("edittplt_abc123");
console.log(template.name, template.fieldCount);
package main
import (
"context"
"fmt"
"log"
retab "github.com/retab-dev/retab/clients/go"
)
func ptr[T any](v T) *T { return &v }
func main() {
ctx := context.Background()
client, err := retab.NewClient("")
if err != nil {
log.Fatal(err)
}
template, err := client.Edits.Templates.Get(ctx, "edittplt_abc123")
if err != nil {
log.Fatal(err)
}
fmt.Println(template.Name, template.FieldCount)
}
require 'retab'
client = Retab::Client.new(api_key: ENV['RETAB_API_KEY'])
template = client.edits.templates.get(template_id: 'edittplt_abc123')
puts "#{template.name} #{template.field_count}"
use retab::Retab;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let client = Retab::new(std::env::var("RETAB_API_KEY")?);
let template = client.edits().templates().get("edittplt_abc123").await?;
println!("{} {}", template.name, template.field_count.unwrap_or_default());
Ok(())
}
<?php
require 'vendor/autoload.php';
use Retab\Client;
$client = new Client(apiKey: getenv('RETAB_API_KEY'));
$result = $client->edits()->templates()->get(
templateId: 'tmpl_abc123',
);
print_r($result);
using Retab;
using RetabClient = Retab.Retab;
var apiKey = Environment.GetEnvironmentVariable("RETAB_API_KEY")!;
var client = new RetabClient(apiKey);
var result = await client.Edits.Templates.GetAsync("tmpl_abc123");
Console.WriteLine(result);
import com.retab.RetabClient;
public final class Example {
public static void main(String[] args) throws Exception {
RetabClient client = new RetabClient(System.getenv("RETAB_API_KEY"));
var result = client.edits().templates().get("tmpl_abc123");
System.out.println(result);
}
}
curl -X GET \
'https://api.retab.com/v1/edits/templates/edittplt_abc123' \
-H "Authorization: Bearer $RETAB_API_KEY"
{
"id": "edittplt_abc123",
"name": "W-9 Form",
"file": {
"id": "file_6dd6eb00688ad8d1",
"filename": "w9_empty.pdf",
"mime_type": "application/pdf"
},
"form_fields": [
{
"key": "full_name",
"description": "Full legal name",
"type": "text",
"bbox": {
"left": 0.15,
"top": 0.2,
"width": 0.35,
"height": 0.03,
"page": 1
}
}
],
"field_count": 1,
"created_at": "2024-03-15T10:30:00Z",
"updated_at": "2024-03-15T10:30:00Z"
}
{
"detail": "Template edittplt_abc123 not found"
}
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Response
Successful Response
A reusable edit template: an empty PDF and the form_fields defined on it.
Unique identifier of the template.
Name of the template.
File information for the empty PDF template.
Show child attributes
Show child attributes
Form fields attached to the template.
Show child attributes
Show child attributes
Number of form fields in the template.
Timestamp of creation.
Timestamp of last update.
⌘I