API - Simple Find & Update - Please Help

I’m trying to setup a simple API but I’m not exactly sure what APIs to use.

  1. I want to check for a unique value in a field (userID) and return the RecordID.

  2. If recordID exists, overwrite record with new data

  3. If recordID doesn’t exist, create new record with data

At the moment I’m stuck on 1. I’ve tried List Records, using filterbyFormula & the API Encoder tool, Retrieve a record, I just can’t get the single results returns like I’m after.

Can someone please provide me with an example API request to for number 1? If you could help with the others that would also be really great but at the moment 1 is where I’m stuck.

I know it’s a really simple API setup but I’m new to this and have been trying for hours. I have also posted to the Airtable forum but my posts aren’t getting approved for some reason.

Thanks so much.

What’s wrong with the results you’re getting?

Here’s one I just tried that works for me:
https://api.airtable.com/v0/[APP ID]/[TABLE ID]?filterByFormula=AND(Name%3D%22Bob%22%2C+Notes%3D%222%22)

The formula is: AND(Name="Bob", Notes="2")

Have you verified that the exact formula you are using also works in a formula field?

Trying for hours when working with your first API sounds normal. APIs can be finicky and you have to get everything exactly right.

This topic was solved and automatically closed 15 days after the last reply. New replies are no longer allowed.