curl -X GET https://api.tableflow.com/v2/extractions/uT2bJNWN75YPU95r \
-H "Authorization: Bearer YOUR_API_KEY"
{
"id": "uT2bJNWN75YPU95r",
"workspace_id": "dk4g1tUg1uHLs8YU",
"template_id": "JlLZVabDjYWzu7C9",
"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": {}
}
]
}
}
},
"stats": {
"fields": {
"valid": 5,
"invalid": 0,
"total": 5
},
"tables": {
"line_items": {
"rows": {
"valid": 2,
"invalid": 0,
"total": 2
},
"columns": {
"total": 4
}
}
}
},
"template": {
"id": "JlLZVabDjYWzu7C9",
"name": "Invoice Template",
"fields": [
{
"key": "invoice_number",
"name": "Invoice Number",
"data_type": "string"
}
],
"tables": [
{
"key": "line_items",
"name": "Line Items",
"columns": [
{
"key": "description",
"name": "Description",
"data_type": "string"
}
]
}
]
}
}
Extractions
Extraction
Get extraction by ID
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": "JlLZVabDjYWzu7C9",
"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": {}
}
]
}
}
},
"stats": {
"fields": {
"valid": 5,
"invalid": 0,
"total": 5
},
"tables": {
"line_items": {
"rows": {
"valid": 2,
"invalid": 0,
"total": 2
},
"columns": {
"total": 4
}
}
}
},
"template": {
"id": "JlLZVabDjYWzu7C9",
"name": "Invoice Template",
"fields": [
{
"key": "invoice_number",
"name": "Invoice Number",
"data_type": "string"
}
],
"tables": [
{
"key": "line_items",
"name": "Line Items",
"columns": [
{
"key": "description",
"name": "Description",
"data_type": "string"
}
]
}
]
}
}
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
The ID of the extraction to retrieve.
curl -X GET https://api.tableflow.com/v2/extractions/uT2bJNWN75YPU95r \
-H "Authorization: Bearer YOUR_API_KEY"
Response
The unique identifier for the extraction.
The ID of the workspace this extraction belongs to.
The ID of the template used for extraction.
The name of the template used for extraction.
The name of the uploaded file.
The size of the uploaded file in bytes.
The current status of the extraction (e.g., “processing”, “completed”, “failed”).
History of status changes for this extraction.
Error message if the extraction failed.
Additional metadata associated with the extraction.
Unix timestamp when the extraction was created.
Unix timestamp when the extraction was last updated.
The extracted data.
Show data
Show data
Field data extracted from the document.
Show fields
Show fields
Map of field keys to their extracted values.
Map of table keys to their data and pagination information.
Note: This endpoint includes up to 100 rows per table. For tables with more rows, use the pagination information and the Get Extraction Table Rows endpoint to retrieve additional rows.
Show tables
Show tables
Pagination information for this table.
Show pagination
Show pagination
Current offset.
Current limit (typically 100 for the main extraction endpoint).
Total number of rows in the table.
Offset for the next page of results. Will be null if all rows are included.
The applied filter (“all”, “valid”, “error”).
Array of table rows, limited to first 100 rows. For complete access to all rows, use the Get Extraction Table Rows endpoint.
Statistics about the extraction data.
Show stats
Show stats
Map of table keys to their statistics.
Show tables
Show tables
Column statistics for this table.
Show columns
Show columns
The template used at the time of extraction.
{
"id": "uT2bJNWN75YPU95r",
"workspace_id": "dk4g1tUg1uHLs8YU",
"template_id": "JlLZVabDjYWzu7C9",
"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": {}
}
]
}
}
},
"stats": {
"fields": {
"valid": 5,
"invalid": 0,
"total": 5
},
"tables": {
"line_items": {
"rows": {
"valid": 2,
"invalid": 0,
"total": 2
},
"columns": {
"total": 4
}
}
}
},
"template": {
"id": "JlLZVabDjYWzu7C9",
"name": "Invoice Template",
"fields": [
{
"key": "invoice_number",
"name": "Invoice Number",
"data_type": "string"
}
],
"tables": [
{
"key": "line_items",
"name": "Line Items",
"columns": [
{
"key": "description",
"name": "Description",
"data_type": "string"
}
]
}
]
}
}
Error Responses
Error message describing what went wrong.
{
"error": "No extraction ID provided"
}
⌘I