curl -X GET https://api.tableflow.com/v2/extractions/uT2bJNWN75YPU95r/tables/line_items/rows?offset=0&limit=100 \
-H "Authorization: Bearer YOUR_API_KEY"
const axios = require("axios");
async function getTableRows(extractionId, tableKey, offset, limit, filter = "all") {
try {
const response = await axios.get(
`https://api.tableflow.com/v2/extractions/${extractionId}/tables/${tableKey}/rows`,
{
params: {
offset,
limit,
filter,
},
headers: {
Authorization: "Bearer YOUR_API_KEY",
},
}
);
return response.data;
} catch (error) {
console.error(error);
throw error;
}
}
// Example usage
getTableRows("uT2bJNWN75YPU95r", "line_items", 0, 100)
.then(result => {
console.log(`Fetched ${result.rows.length} rows out of ${result.pagination.total}`);
// Process the rows
result.rows.forEach(row => {
console.log(`Row ${row.index}: ${row.values.description}`);
});
});
import requests
def get_table_rows(extraction_id, table_key, offset, limit, filter_type="all"):
url = f"https://api.tableflow.com/v2/extractions/{extraction_id}/tables/{table_key}/rows"
headers = {
"Authorization": "Bearer YOUR_API_KEY"
}
params = {
"offset": offset,
"limit": limit,
"filter": filter_type
}
response = requests.get(url, headers=headers, params=params)
response.raise_for_status() # Raise exception for 4XX/5XX responses
return response.json()
# Example usage
try:
result = get_table_rows("uT2bJNWN75YPU95r", "line_items", 0, 100)
print(f"Fetched {len(result['rows'])} rows out of {result['pagination']['total']}")
# Process the rows
for row in result['rows']:
print(f"Row {row['index']}: {row['values']['description']}")
except requests.exceptions.HTTPError as e:
print(f"Error fetching table rows: {e}")
{
"pagination": {
"offset": 0,
"limit": 100,
"total": 3,
"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": {}
},
{
"index": 2,
"values": {
"description": "27-inch Monitor",
"quantity": "2",
"unit_price": "329.99",
"amount": "659.98"
},
"validations": {}
}
]
}
Extractions
Get Extraction Table Rows
Get paginated rows from an extraction table
GET
/
v2
/
extractions
/
{id}
/
tables
/
{tableKey}
/
rows
curl -X GET https://api.tableflow.com/v2/extractions/uT2bJNWN75YPU95r/tables/line_items/rows?offset=0&limit=100 \
-H "Authorization: Bearer YOUR_API_KEY"
const axios = require("axios");
async function getTableRows(extractionId, tableKey, offset, limit, filter = "all") {
try {
const response = await axios.get(
`https://api.tableflow.com/v2/extractions/${extractionId}/tables/${tableKey}/rows`,
{
params: {
offset,
limit,
filter,
},
headers: {
Authorization: "Bearer YOUR_API_KEY",
},
}
);
return response.data;
} catch (error) {
console.error(error);
throw error;
}
}
// Example usage
getTableRows("uT2bJNWN75YPU95r", "line_items", 0, 100)
.then(result => {
console.log(`Fetched ${result.rows.length} rows out of ${result.pagination.total}`);
// Process the rows
result.rows.forEach(row => {
console.log(`Row ${row.index}: ${row.values.description}`);
});
});
import requests
def get_table_rows(extraction_id, table_key, offset, limit, filter_type="all"):
url = f"https://api.tableflow.com/v2/extractions/{extraction_id}/tables/{table_key}/rows"
headers = {
"Authorization": "Bearer YOUR_API_KEY"
}
params = {
"offset": offset,
"limit": limit,
"filter": filter_type
}
response = requests.get(url, headers=headers, params=params)
response.raise_for_status() # Raise exception for 4XX/5XX responses
return response.json()
# Example usage
try:
result = get_table_rows("uT2bJNWN75YPU95r", "line_items", 0, 100)
print(f"Fetched {len(result['rows'])} rows out of {result['pagination']['total']}")
# Process the rows
for row in result['rows']:
print(f"Row {row['index']}: {row['values']['description']}")
except requests.exceptions.HTTPError as e:
print(f"Error fetching table rows: {e}")
{
"pagination": {
"offset": 0,
"limit": 100,
"total": 3,
"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": {}
},
{
"index": 2,
"values": {
"description": "27-inch Monitor",
"quantity": "2",
"unit_price": "329.99",
"amount": "659.98"
},
"validations": {}
}
]
}
Retrieves paginated rows from a specific table in an extraction. This endpoint is useful for accessing large tables efficiently.
Usage Notes
- Use pagination to retrieve rows from large tables
- Row indexes are 0-based, meaning the first row has an index of 0
- When no
offsetorlimitis provided, defaults to offset 0 and limit 100 - Multiple filters can be combined using comma-separated values (e.g.,
filter=error,warn)
Request
string
required
The ID of the extraction.
string
required
The key of the table to retrieve rows from.
integer
default:"0"
The number of rows to skip. Minimum value is 0.
integer
default:"100"
The maximum number of rows to return. Minimum value is 1, maximum value is
1000.
string
default:"all"
Filter rows by status or validation state. Supports comma-separated values for multiple filters.
all- Return all rows (default)valid- Rows that pass all validationsinvalid- Rows that fail at least one validationerror- Rows with error-severity validationswarn- Rows with warning-severity validationsinfo- Rows with info-severity validations
string
Filter to only return rows that have validations in specific columns. Provide column keys as
comma-separated values (e.g.,
column_validations=unit_price,quantity). Only rows with
validation issues in any of the specified columns will be returned.curl -X GET https://api.tableflow.com/v2/extractions/uT2bJNWN75YPU95r/tables/line_items/rows?offset=0&limit=100 \
-H "Authorization: Bearer YOUR_API_KEY"
const axios = require("axios");
async function getTableRows(extractionId, tableKey, offset, limit, filter = "all") {
try {
const response = await axios.get(
`https://api.tableflow.com/v2/extractions/${extractionId}/tables/${tableKey}/rows`,
{
params: {
offset,
limit,
filter,
},
headers: {
Authorization: "Bearer YOUR_API_KEY",
},
}
);
return response.data;
} catch (error) {
console.error(error);
throw error;
}
}
// Example usage
getTableRows("uT2bJNWN75YPU95r", "line_items", 0, 100)
.then(result => {
console.log(`Fetched ${result.rows.length} rows out of ${result.pagination.total}`);
// Process the rows
result.rows.forEach(row => {
console.log(`Row ${row.index}: ${row.values.description}`);
});
});
import requests
def get_table_rows(extraction_id, table_key, offset, limit, filter_type="all"):
url = f"https://api.tableflow.com/v2/extractions/{extraction_id}/tables/{table_key}/rows"
headers = {
"Authorization": "Bearer YOUR_API_KEY"
}
params = {
"offset": offset,
"limit": limit,
"filter": filter_type
}
response = requests.get(url, headers=headers, params=params)
response.raise_for_status() # Raise exception for 4XX/5XX responses
return response.json()
# Example usage
try:
result = get_table_rows("uT2bJNWN75YPU95r", "line_items", 0, 100)
print(f"Fetched {len(result['rows'])} rows out of {result['pagination']['total']}")
# Process the rows
for row in result['rows']:
print(f"Row {row['index']}: {row['values']['description']}")
except requests.exceptions.HTTPError as e:
print(f"Error fetching table rows: {e}")
Response
object
array
Array of table rows.
Show rows
Show rows
integer
The row index (0-based).
{
"pagination": {
"offset": 0,
"limit": 100,
"total": 3,
"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": {}
},
{
"index": 2,
"values": {
"description": "27-inch Monitor",
"quantity": "2",
"unit_price": "329.99",
"amount": "659.98"
},
"validations": {}
}
]
}
Error Responses
string
Error message describing what went wrong.
{
"error": "The parameter 'filter' contains invalid value: unknown"
}