Skip to main content
GET
/
v1
/
edits
from retab import Retab

client = Retab()

edits = client.edits.list(limit=20, order="desc")
for edit in edits.data:
    print(f"{edit.id}: {edit.file.filename}")

# Filter by template
edits = client.edits.list(template_id="edittplt_abc123", limit=50)
{
  "data": [
    {
      "id": "edit_01G34H8J2K",
      "file": {
        "id": "file_6dd6eb00688ad8d1",
        "filename": "form.pdf",
        "mime_type": "application/pdf"
      },
      "model": "retab-small",
      "template_id": null,
      "usage": {"page_count": 1, "credits": 1.0},
      "created_at": "2024-03-15T10:30:00Z",
      "updated_at": "2024-03-15T10:30:00Z"
    }
  ],
  "list_metadata": {
    "before": null,
    "after": "edit_01G34H8J2K",
    "total_count": 42
  }
}
List persisted edits for your organization, with cursor-based pagination and optional template filtering.
from retab import Retab

client = Retab()

edits = client.edits.list(limit=20, order="desc")
for edit in edits.data:
    print(f"{edit.id}: {edit.file.filename}")

# Filter by template
edits = client.edits.list(template_id="edittplt_abc123", limit=50)
{
  "data": [
    {
      "id": "edit_01G34H8J2K",
      "file": {
        "id": "file_6dd6eb00688ad8d1",
        "filename": "form.pdf",
        "mime_type": "application/pdf"
      },
      "model": "retab-small",
      "template_id": null,
      "usage": {"page_count": 1, "credits": 1.0},
      "created_at": "2024-03-15T10:30:00Z",
      "updated_at": "2024-03-15T10:30:00Z"
    }
  ],
  "list_metadata": {
    "before": null,
    "after": "edit_01G34H8J2K",
    "total_count": 42
  }
}

Query Parameters

before
string
Cursor for backward pagination.
after
string
Cursor for forward pagination.
limit
integer
default:"10"
Maximum number of edits to return. Max: 100.
order
string
default:"desc"
Sort order by created_at. Valid values: asc, desc.
filename
string
Case-insensitive substring filter applied to file.filename.
template_id
string
Only return edits created from this template.
from_date
string
Return edits created on or after this ISO date.
to_date
string
Return edits created on or before this ISO date.

Count

GET /v1/edits/count?template_id=edittplt_abc123
returns { "count": <int> }.

Authorizations

Api-Key
string
header
required

Query Parameters

before
string | null
after
string | null
limit
integer
default:10
Required range: 1 <= x <= 100
order
enum<string>
default:desc
Available options:
asc,
desc
filename
string | null
template_id
string | null
from_date
string | null
to_date
string | null
access_token
string | null

Response

Successful Response

data
any[]
required
list_metadata
ListMetadata · object
required