Records

Finds and replaces field values matching search criteria

PUT
Searches for all values that match the 'find' value (globally or for a specific field via 'fieldKey') and replaces them with the 'replace' value. Wrap 'find' value in double quotes for exact match (""). Returns a commitId for the updated records

Path parameters

sheetIdstringRequired
ID of sheet

Query parameters

filterenumOptional
Options to filter records
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
qstringOptional
An FFQL query used to filter the result set

Request

This endpoint expects an object.
fieldKey
stringRequired
A unique key used to identify a field in a sheet
find
unionOptional
A value to find for a given field in a sheet. For exact matches, wrap the value in double quotes ("Bob")
replace
unionOptional
The value to replace found values with

Response

This endpoint returns an object
data
object
PUT
$curl -X PUT https://api.x.flatfile.com/v1/sheets/us_sh_YOUR_ID/find-replace \
> -H "Authorization: Bearer <token>" \
> -H "Content-Type: application/json" \
> -d '{
> "fieldKey": "email"
>}'
Response
1{
2 "data": {
3 "versionId": "us_vr_YOUR_ID"
4 }
5}