Skip to main content
GET
/
v1
/
extractions
/
{extraction_id}
from retab import Retab

client = Retab()

extraction = client.extractions.get("extr_01G34H8J2K")
print(extraction)
{
  "id": "extr_01G34H8J2K",
  "created_at": "2024-03-15T10:30:00Z",
  "updated_at": "2024-03-15T10:30:00Z",
  "organization_id": "org_01ABC123",
  "origin": {
    "type": "project",
    "id": "proj_F0FE8DFqyouQdZXDTWRg0"
  },
  "file": {
    "id": "file_6dd6eb00688ad8d1",
    "filename": "invoice.pdf"
  },
  "predictions": {
    "invoice_number": "INV-2024-0042",
    "total_amount": 1234.56,
    "vendor_name": "Acme Corp",
    "line_items": [
      {
        "description": "Widget A",
        "quantity": 10,
        "unit_price": 99.99
      }
    ]
  },
  "human_review_status": "success",
  "json_schema": {
    "type": "object",
    "properties": {
      "invoice_number": { "type": "string" },
      "total_amount": { "type": "number" },
      "vendor_name": { "type": "string" },
      "line_items": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "description": { "type": "string" },
            "quantity": { "type": "integer" },
            "unit_price": { "type": "number" }
          }
        }
      }
    }
  },
  "metadata": {
    "organization_id": "org_acme_corp",
    "batch_id": "batch_2024_03"
  }
}
from retab import Retab

client = Retab()

extraction = client.extractions.get("extr_01G34H8J2K")
print(extraction)
{
  "id": "extr_01G34H8J2K",
  "created_at": "2024-03-15T10:30:00Z",
  "updated_at": "2024-03-15T10:30:00Z",
  "organization_id": "org_01ABC123",
  "origin": {
    "type": "project",
    "id": "proj_F0FE8DFqyouQdZXDTWRg0"
  },
  "file": {
    "id": "file_6dd6eb00688ad8d1",
    "filename": "invoice.pdf"
  },
  "predictions": {
    "invoice_number": "INV-2024-0042",
    "total_amount": 1234.56,
    "vendor_name": "Acme Corp",
    "line_items": [
      {
        "description": "Widget A",
        "quantity": 10,
        "unit_price": 99.99
      }
    ]
  },
  "human_review_status": "success",
  "json_schema": {
    "type": "object",
    "properties": {
      "invoice_number": { "type": "string" },
      "total_amount": { "type": "number" },
      "vendor_name": { "type": "string" },
      "line_items": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "description": { "type": "string" },
            "quantity": { "type": "integer" },
            "unit_price": { "type": "number" }
          }
        }
      }
    }
  },
  "metadata": {
    "organization_id": "org_acme_corp",
    "batch_id": "batch_2024_03"
  }
}

Authorizations

Api-Key
string
header
required

Path Parameters

extraction_id
string
required

Query Parameters

access_token
string | null

Response

Successful Response

file
object
required

Information about the file

predictions
object | null
required

Predictions generated by the analysis

human_review_status
enum<string>
required

Human review status

Available options:
success,
review_required,
reviewed
origin
object
required

Source of the extraction

inference_settings
object
required

Inference settings used for the extraction

json_schema
object
required

JSON schema used for the extraction

organization_id
string
required

Organization ID of the user or application

id
string

Unique identifier of the analysis

predictions_draft
object | null

Draft predictions generated by the analysis

metadata
object

User-defined metadata for the extraction

created_at
string<date-time>

Timestamp of the creation of the extraction object

updated_at
string<date-time>

Timestamp of the last update of the extraction object