Sheets

Get record cells by field

GET
Returns record cell values grouped by all fields in the sheet

Path parameters

sheetIdstringRequired
ID of sheet

Query parameters

fieldKeystringOptional
Returns results from the given field only. Otherwise all field cells are returned
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
pageSizeintegerOptional
Number of records to return in a page (default 1000 if pageNumber included)
pageNumberintegerOptional
Based on pageSize, which page of records to return
distinctbooleanRequired
Must be set to true
includeCountsbooleanOptional
When both distinct and includeCounts are true, the count of distinct field values will be returned
searchValuestringOptional
A value to find for a given field in a sheet. Wrap the value in "" for exact match

Response

This endpoint returns an object
data
map from strings to lists of objects
Cell values grouped by field key
GET
$curl -G https://api.x.flatfile.com/v1/sheets/us_sh_YOUR_ID/cells \
> -H "Authorization: Bearer <token>" \
> -d distinct=true \
> -d fieldKey=firstName \
> -d sortField=firstName \
> -d sortDirection=asc \
> -d filter=valid
Response
1{
2 "data": {
3 "firstName": [
4 {
5 "counts": {
6 "total": 1,
7 "valid": 1,
8 "error": 0
9 },
10 "valid": true,
11 "value": "Mike"
12 },
13 {
14 "counts": {
15 "total": 1,
16 "valid": 1,
17 "error": 0
18 },
19 "valid": true,
20 "value": "Jordan"
21 }
22 ]
23 }
24}