from retab import Retab
client = Retab()
edit = client.edits.get("edit_01G34H8J2K")
print(edit.output.form_data)
import { Retab } from "@retab/node";
const client = new Retab({ apiKey: process.env.RETAB_API_KEY });
const edit = await client.edits.get("edit_01G34H8J2K");
console.log(edit.output.formData);
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)
}
edit, err := client.Edits.Get(ctx, "edit_01G34H8J2K", nil)
if err != nil {
log.Fatal(err)
}
fmt.Println(edit.Output.FormData)
}
require 'retab'
client = Retab::Client.new(api_key: ENV['RETAB_API_KEY'])
edit = client.edits.get(edit_id: 'edit_01G34H8J2K')
puts edit.output.form_data
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 edit = client.edits().get("edit_01G34H8J2K", retab::resources::edits::GetParams::default()).await?;
println!("{:?}", edit.output.as_ref().unwrap().form_data);
Ok(())
}
<?php
require 'vendor/autoload.php';
use Retab\Client;
$client = new Client(apiKey: getenv('RETAB_API_KEY'));
$result = $client->edits()->get(
editId: 'edit_id_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.GetAsync("edit_id_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().get("edit_abc123", null);
System.out.println(result);
}
}
curl -X GET \
'https://api.retab.com/v1/edits/edit_01G34H8J2K' \
-H "Authorization: Bearer $RETAB_API_KEY"
{
"id": "edit_01G34H8J2K",
"file": {
"id": "file_6dd6eb00688ad8d1",
"filename": "form.pdf",
"mime_type": "application/pdf"
},
"model": "retab-small",
"instructions": "Name: John Doe",
"template_id": null,
"config": { "color": "#000080" },
"output": {
"form_data": [
{
"key": "full_name",
"type": "text",
"value": "John Doe",
"description": "Full name",
"bbox": {
"left": 0.15,
"top": 0.2,
"width": 0.35,
"height": 0.03,
"page": 1
}
}
],
"filled_document": {
"filename": "form_filled.pdf",
"url": "data:application/pdf;base64,..."
}
},
"usage": { "page_count": 1, "credits": 1.0 },
"created_at": "2024-03-15T10:30:00Z"
}
{
"detail": "Edit edit_01G34H8J2K not found"
}
Edits
Get Edit
Retrieve an edit.
Fetches a single edit by its edit_id. Returns the edit with its filled
form data and rendered document; responds with 404 if no edit with that
id exists.
GET
/
v1
/
edits
/
{edit_id}
from retab import Retab
client = Retab()
edit = client.edits.get("edit_01G34H8J2K")
print(edit.output.form_data)
import { Retab } from "@retab/node";
const client = new Retab({ apiKey: process.env.RETAB_API_KEY });
const edit = await client.edits.get("edit_01G34H8J2K");
console.log(edit.output.formData);
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)
}
edit, err := client.Edits.Get(ctx, "edit_01G34H8J2K", nil)
if err != nil {
log.Fatal(err)
}
fmt.Println(edit.Output.FormData)
}
require 'retab'
client = Retab::Client.new(api_key: ENV['RETAB_API_KEY'])
edit = client.edits.get(edit_id: 'edit_01G34H8J2K')
puts edit.output.form_data
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 edit = client.edits().get("edit_01G34H8J2K", retab::resources::edits::GetParams::default()).await?;
println!("{:?}", edit.output.as_ref().unwrap().form_data);
Ok(())
}
<?php
require 'vendor/autoload.php';
use Retab\Client;
$client = new Client(apiKey: getenv('RETAB_API_KEY'));
$result = $client->edits()->get(
editId: 'edit_id_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.GetAsync("edit_id_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().get("edit_abc123", null);
System.out.println(result);
}
}
curl -X GET \
'https://api.retab.com/v1/edits/edit_01G34H8J2K' \
-H "Authorization: Bearer $RETAB_API_KEY"
{
"id": "edit_01G34H8J2K",
"file": {
"id": "file_6dd6eb00688ad8d1",
"filename": "form.pdf",
"mime_type": "application/pdf"
},
"model": "retab-small",
"instructions": "Name: John Doe",
"template_id": null,
"config": { "color": "#000080" },
"output": {
"form_data": [
{
"key": "full_name",
"type": "text",
"value": "John Doe",
"description": "Full name",
"bbox": {
"left": 0.15,
"top": 0.2,
"width": 0.35,
"height": 0.03,
"page": 1
}
}
],
"filled_document": {
"filename": "form_filled.pdf",
"url": "data:application/pdf;base64,..."
}
},
"usage": { "page_count": 1, "credits": 1.0 },
"created_at": "2024-03-15T10:30:00Z"
}
{
"detail": "Edit edit_01G34H8J2K not found"
}
from retab import Retab
client = Retab()
edit = client.edits.get("edit_01G34H8J2K")
print(edit.output.form_data)
import { Retab } from "@retab/node";
const client = new Retab({ apiKey: process.env.RETAB_API_KEY });
const edit = await client.edits.get("edit_01G34H8J2K");
console.log(edit.output.formData);
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)
}
edit, err := client.Edits.Get(ctx, "edit_01G34H8J2K", nil)
if err != nil {
log.Fatal(err)
}
fmt.Println(edit.Output.FormData)
}
require 'retab'
client = Retab::Client.new(api_key: ENV['RETAB_API_KEY'])
edit = client.edits.get(edit_id: 'edit_01G34H8J2K')
puts edit.output.form_data
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 edit = client.edits().get("edit_01G34H8J2K", retab::resources::edits::GetParams::default()).await?;
println!("{:?}", edit.output.as_ref().unwrap().form_data);
Ok(())
}
<?php
require 'vendor/autoload.php';
use Retab\Client;
$client = new Client(apiKey: getenv('RETAB_API_KEY'));
$result = $client->edits()->get(
editId: 'edit_id_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.GetAsync("edit_id_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().get("edit_abc123", null);
System.out.println(result);
}
}
curl -X GET \
'https://api.retab.com/v1/edits/edit_01G34H8J2K' \
-H "Authorization: Bearer $RETAB_API_KEY"
{
"id": "edit_01G34H8J2K",
"file": {
"id": "file_6dd6eb00688ad8d1",
"filename": "form.pdf",
"mime_type": "application/pdf"
},
"model": "retab-small",
"instructions": "Name: John Doe",
"template_id": null,
"config": { "color": "#000080" },
"output": {
"form_data": [
{
"key": "full_name",
"type": "text",
"value": "John Doe",
"description": "Full name",
"bbox": {
"left": 0.15,
"top": 0.2,
"width": 0.35,
"height": 0.03,
"page": 1
}
}
],
"filled_document": {
"filename": "form_filled.pdf",
"url": "data:application/pdf;base64,..."
}
},
"usage": { "page_count": 1, "credits": 1.0 },
"created_at": "2024-03-15T10:30:00Z"
}
{
"detail": "Edit edit_01G34H8J2K not found"
}
Authorizations
Query Parameters
Response
Successful Response
An edit result: form-field values written onto a document or template PDF.