from retab import Retab
client = Retab()
edit = client.edits.create_edit_cancel("edt_01G34H8J2K")
print(edit.status)
import { Retab } from "@retab/node";
const client = new Retab({ apiKey: process.env.RETAB_API_KEY });
const edit = await client.edits.create_edit_cancel("edt_01G34H8J2K");
console.log(edit.status);
package main
import (
"context"
"fmt"
"log"
retab "github.com/retab-dev/retab/clients/go"
)
func main() {
client, err := retab.NewClient("")
if err != nil {
log.Fatal(err)
}
edit, err := client.Edits.CreateCancel(context.Background(), "edt_01G34H8J2K")
if err != nil {
log.Fatal(err)
}
fmt.Println(edit.Status)
}
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 edit = client.edits().createCancel("edt_01G34H8J2K");
System.out.println(edit.getStatus());
}
}
require 'retab'
client = Retab::Client.new(api_key: ENV['RETAB_API_KEY'])
edit = client.edits.create_edit_cancel(edit_id: 'edt_01G34H8J2K')
puts edit.status
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().create_edit_cancel("edt_01G34H8J2K").await?;
println!("{:?}", edit.status);
Ok(())
}
<?php
require 'vendor/autoload.php';
use Retab\Client;
$client = new Client(apiKey: getenv('RETAB_API_KEY'));
$edit = $client->edits()->createEditCancel('edt_01G34H8J2K');
echo $edit->status?->value . PHP_EOL;
using Retab;
using RetabClient = Retab.Retab;
var apiKey = Environment.GetEnvironmentVariable("RETAB_API_KEY")!;
var client = new RetabClient(apiKey);
var edit = await client.Edits.CreateCancelAsync("edt_01G34H8J2K");
Console.WriteLine(edit.Status);
curl -X POST \
'https://api.retab.com/v1/edits/edt_01G34H8J2K/cancel' \
-H "Authorization: Bearer $RETAB_API_KEY"
{
"id": "edt_01G34H8J2K",
"status": "cancelled",
"error": null
}
{
"detail": "edit 'edt_01G34H8J2K' not found"
}
Cancel Edit
from retab import Retab
client = Retab()
edit = client.edits.create_edit_cancel("edt_01G34H8J2K")
print(edit.status)
import { Retab } from "@retab/node";
const client = new Retab({ apiKey: process.env.RETAB_API_KEY });
const edit = await client.edits.create_edit_cancel("edt_01G34H8J2K");
console.log(edit.status);
package main
import (
"context"
"fmt"
"log"
retab "github.com/retab-dev/retab/clients/go"
)
func main() {
client, err := retab.NewClient("")
if err != nil {
log.Fatal(err)
}
edit, err := client.Edits.CreateCancel(context.Background(), "edt_01G34H8J2K")
if err != nil {
log.Fatal(err)
}
fmt.Println(edit.Status)
}
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 edit = client.edits().createCancel("edt_01G34H8J2K");
System.out.println(edit.getStatus());
}
}
require 'retab'
client = Retab::Client.new(api_key: ENV['RETAB_API_KEY'])
edit = client.edits.create_edit_cancel(edit_id: 'edt_01G34H8J2K')
puts edit.status
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().create_edit_cancel("edt_01G34H8J2K").await?;
println!("{:?}", edit.status);
Ok(())
}
<?php
require 'vendor/autoload.php';
use Retab\Client;
$client = new Client(apiKey: getenv('RETAB_API_KEY'));
$edit = $client->edits()->createEditCancel('edt_01G34H8J2K');
echo $edit->status?->value . PHP_EOL;
using Retab;
using RetabClient = Retab.Retab;
var apiKey = Environment.GetEnvironmentVariable("RETAB_API_KEY")!;
var client = new RetabClient(apiKey);
var edit = await client.Edits.CreateCancelAsync("edt_01G34H8J2K");
Console.WriteLine(edit.Status);
curl -X POST \
'https://api.retab.com/v1/edits/edt_01G34H8J2K/cancel' \
-H "Authorization: Bearer $RETAB_API_KEY"
{
"id": "edt_01G34H8J2K",
"status": "cancelled",
"error": null
}
{
"detail": "edit 'edt_01G34H8J2K' not found"
}
Edit run (one created with background: true). Cancellation is idempotent: a run that has already reached a terminal state (completed, failed, or cancelled) is returned unchanged rather than erroring.
from retab import Retab
client = Retab()
edit = client.edits.create_edit_cancel("edt_01G34H8J2K")
print(edit.status)
import { Retab } from "@retab/node";
const client = new Retab({ apiKey: process.env.RETAB_API_KEY });
const edit = await client.edits.create_edit_cancel("edt_01G34H8J2K");
console.log(edit.status);
package main
import (
"context"
"fmt"
"log"
retab "github.com/retab-dev/retab/clients/go"
)
func main() {
client, err := retab.NewClient("")
if err != nil {
log.Fatal(err)
}
edit, err := client.Edits.CreateCancel(context.Background(), "edt_01G34H8J2K")
if err != nil {
log.Fatal(err)
}
fmt.Println(edit.Status)
}
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 edit = client.edits().createCancel("edt_01G34H8J2K");
System.out.println(edit.getStatus());
}
}
require 'retab'
client = Retab::Client.new(api_key: ENV['RETAB_API_KEY'])
edit = client.edits.create_edit_cancel(edit_id: 'edt_01G34H8J2K')
puts edit.status
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().create_edit_cancel("edt_01G34H8J2K").await?;
println!("{:?}", edit.status);
Ok(())
}
<?php
require 'vendor/autoload.php';
use Retab\Client;
$client = new Client(apiKey: getenv('RETAB_API_KEY'));
$edit = $client->edits()->createEditCancel('edt_01G34H8J2K');
echo $edit->status?->value . PHP_EOL;
using Retab;
using RetabClient = Retab.Retab;
var apiKey = Environment.GetEnvironmentVariable("RETAB_API_KEY")!;
var client = new RetabClient(apiKey);
var edit = await client.Edits.CreateCancelAsync("edt_01G34H8J2K");
Console.WriteLine(edit.Status);
curl -X POST \
'https://api.retab.com/v1/edits/edt_01G34H8J2K/cancel' \
-H "Authorization: Bearer $RETAB_API_KEY"
{
"id": "edt_01G34H8J2K",
"status": "cancelled",
"error": null
}
{
"detail": "edit 'edt_01G34H8J2K' not found"
}
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Response
Successful Response
An edit result: form-field values written onto a document or template PDF.
Unique identifier of the edit.
Information about the source file (input document or template PDF).
Show child attributes
Show child attributes
Model used for the edit operation.
Configuration used for the edit operation.
Show child attributes
Show child attributes
Free-form instructions supplied with the edit request.
Template id used when the edit was created from a template; null for direct-document edits.
The edit result: filled form fields and the rendered PDF. An empty sentinel until status == 'completed'; gate reads on status.
Show child attributes
Show child attributes
Lifecycle status. The synchronous path returns 'completed'. Background runs progress pending -> queued -> in_progress -> completed | failed | cancelled.
pending, queued, in_progress, completed, failed, cancelled Error details when a background run fails; null otherwise. Always present so consumers can read it without an existence check.
Show child attributes
Show child attributes
Durable file reference for the filled document, when materialized.
Show child attributes
Show child attributes
Usage information for the edit operation.
Show child attributes
Show child attributes