Records

Get records

GET
Returns records from a sheet in a workbook

Path parameters

sheetIdstringRequired
ID of sheet

Query parameters

versionIdstringOptionalDeprecated

Deprecated, use commitId instead.

commitIdstringOptional
Commit ID
sinceVersionIdstringOptionalDeprecated

Deprecated, use sinceCommitId instead.

sinceCommitIdstringOptional
Commit ID
sortFieldstringOptional
Name of field by which to sort records
sortDirectionenumOptional
Sort direction - asc (ascending) or desc (descending)
Allowed values: ascdesc
filterenumOptional
Options to filter records
Allowed values: validerrorallnone
filterFieldstringOptional
Name of field by which to filter records
searchValuestringOptional
Search for the given value, returning matching rows. For exact matches, wrap the value in double quotes ("Bob"). To search for null values, send empty double quotes ("")
searchFieldstringOptional
Use this to narrow the searchValue results to a specific field
idsstringOptional
The Record Ids param (ids) is a list of record ids that can be passed to several record endpoints allowing the user to identify specific records to INCLUDE in the query, or specific records to EXCLUDE, depending on whether or not filters are being applied. When passing a query param that filters the record dataset, such as 'searchValue', or a 'filter' of 'valid' | 'error' | 'all', the 'ids' param will EXCLUDE those records from the filtered results. For basic queries that do not filter the dataset, passing record ids in the 'ids' param will limit the dataset to INCLUDE just those specific records. Maximum of 100 allowed.
pageSizeintegerOptional
Number of records to return in a page (default 10,000)
pageNumberintegerOptional
Based on pageSize, which page of records to return (Note - numbers start at 1)
includeCountsbooleanOptionalDeprecated

DEPRECATED Use GET /sheets/:sheetId/counts

includeLengthbooleanOptional
The length of the record result set, returned as counts.total
includeLinksbooleanOptional
If true, linked records will be included in the results. Defaults to false.
includeMessagesbooleanOptional
Include error messages, defaults to false.
forstringOptional
if "for" is provided, the query parameters will be pulled from the event payload
qstringOptional
An FFQL query used to filter the result set

Response

This endpoint returns an object
data
object
A list of records with optional record counts

Errors

GET
$curl https://api.x.flatfile.com/v1/sheets/us_sh_YOUR_ID/records \
> -H "Authorization: Bearer <token>"
Response
1{
2 "data": {
3 "records": [
4 {
5 "id": "us_rc_YOUR_ID",
6 "values": {
7 "firstName": {
8 "messages": [],
9 "updatedAt": "2023-11-20T16:59:40.286Z",
10 "valid": true,
11 "value": "John"
12 },
13 "lastName": {
14 "messages": [],
15 "updatedAt": "2023-11-20T16:59:40.286Z",
16 "valid": true,
17 "value": "Smith"
18 },
19 "email": {
20 "messages": [],
21 "updatedAt": "2023-11-20T16:59:40.286Z",
22 "valid": true,
23 "value": "john.smith@example.com"
24 }
25 },
26 "valid": true,
27 "metadata": {},
28 "config": {}
29 }
30 ],
31 "success": true,
32 "commitId": "us_vr_YOUR_ID",
33 "counts": {
34 "total": 1000,
35 "valid": 1000,
36 "error": 0
37 },
38 "versionId": "us_vr_YOUR_ID"
39 }
40}