GET
/
v2
/
extractions
/
{id}
curl -X GET https://api.tableflow.com/v2/extractions/uT2bJNWN75YPU95r \
  -H "Authorization: Bearer YOUR_API_KEY"
{
  "id": "uT2bJNWN75YPU95r",
  "workspace_id": "dk4g1tUg1uHLs8YU",
  "template_id": "f150a878-bd38-4e18-9428-a22878a21ff4",
  "template_name": "Invoice Template",
  "file_name": "acme-invoice-apr2023.pdf",
  "file_size": 245872,
  "file_type": {
    "key": "document",
    "extension": "pdf",
    "mime_type": "application/pdf"
  },
  "status": "completed",
  "status_history": [
    {
      "status": "processing",
      "time": 1682366228,
      "message": "File uploaded"
    },
    {
      "status": "completed",
      "time": 1682366240,
      "message": "Extraction completed"
    }
  ],
  "created_at": 1682366228,
  "updated_at": 1682366240,
  "data": {
    "fields": {
      "values": {
        "invoice_number": "INV-20230415",
        "invoice_date": "2023-04-15",
        "customer_name": "Acme Corporation",
        "payment_terms": "Net 30",
        "total_amount": "1245.75"
      },
      "validations": {}
    },
    "tables": {
      "line_items": {
        "pagination": {
          "offset": 0,
          "limit": 100,
          "total": 2,
          "next_offset": null,
          "filter": "all"
        },
        "rows": [
          {
            "index": 0,
            "values": {
              "description": "Ergonomic Office Chair",
              "quantity": "1",
              "unit_price": "249.99",
              "amount": "249.99"
            },
            "validations": {}
          },
          {
            "index": 1,
            "values": {
              "description": "Wireless Keyboard",
              "quantity": "2",
              "unit_price": "59.95",
              "amount": "119.90"
            },
            "validations": {}
          }
        ]
      }
    }
  }
}

Retrieves extraction data by ID, including fields, tables, and document information.

Usage Notes

  • This endpoint returns extraction data including all fields
  • For tables, it includes up to 100 rows per table (the default pagination limit)
  • For tables with more than 100 rows, use the pagination information from each table and the Get Extraction Table Rows endpoint to retrieve additional rows

Request

id
string
required

The ID of the extraction to retrieve.

curl -X GET https://api.tableflow.com/v2/extractions/uT2bJNWN75YPU95r \
  -H "Authorization: Bearer YOUR_API_KEY"

Response

id
string

The unique identifier for the extraction.

workspace_id
string

The ID of the workspace this extraction belongs to.

template_id
string

The ID of the template used for extraction.

template_name
string

The name of the template used for extraction.

file_name
string

The name of the uploaded file.

file_size
integer

The size of the uploaded file in bytes.

file_type
object

Information about the file type.

status
string

The current status of the extraction (e.g., “processing”, “completed”, “failed”).

status_history
array

History of status changes for this extraction.

error
string

Error message if the extraction failed.

metadata
object

Additional metadata associated with the extraction.

created_at
integer

Unix timestamp when the extraction was created.

updated_at
integer

Unix timestamp when the extraction was last updated.

data
object

The extracted data.

stats
object

Statistics about the extraction data.

template
object

The template used at the time of extraction.

{
  "id": "uT2bJNWN75YPU95r",
  "workspace_id": "dk4g1tUg1uHLs8YU",
  "template_id": "f150a878-bd38-4e18-9428-a22878a21ff4",
  "template_name": "Invoice Template",
  "file_name": "acme-invoice-apr2023.pdf",
  "file_size": 245872,
  "file_type": {
    "key": "document",
    "extension": "pdf",
    "mime_type": "application/pdf"
  },
  "status": "completed",
  "status_history": [
    {
      "status": "processing",
      "time": 1682366228,
      "message": "File uploaded"
    },
    {
      "status": "completed",
      "time": 1682366240,
      "message": "Extraction completed"
    }
  ],
  "created_at": 1682366228,
  "updated_at": 1682366240,
  "data": {
    "fields": {
      "values": {
        "invoice_number": "INV-20230415",
        "invoice_date": "2023-04-15",
        "customer_name": "Acme Corporation",
        "payment_terms": "Net 30",
        "total_amount": "1245.75"
      },
      "validations": {}
    },
    "tables": {
      "line_items": {
        "pagination": {
          "offset": 0,
          "limit": 100,
          "total": 2,
          "next_offset": null,
          "filter": "all"
        },
        "rows": [
          {
            "index": 0,
            "values": {
              "description": "Ergonomic Office Chair",
              "quantity": "1",
              "unit_price": "249.99",
              "amount": "249.99"
            },
            "validations": {}
          },
          {
            "index": 1,
            "values": {
              "description": "Wireless Keyboard",
              "quantity": "2",
              "unit_price": "59.95",
              "amount": "119.90"
            },
            "validations": {}
          }
        ]
      }
    }
  }
}

Error Responses

error
string

Error message describing what went wrong.