When importing records from CSV it works on the basis of Adding New records, and updating existing records, providing you import to the key field.
I'm wondering if the same be done with the Add or Edit Record API calls?
I'm not sure of your relationships, but if you can arrange for the record being added or edited to be the Parent of the record that you are on, which I typically do is to create a checkbox formula field on the Parent called [Parent exists?] with a value of true. Then I look that up to the child record and use either the Add or Edit API based on an IF statement.
Hi - thanks for the feedback. My use case is the other way around, so this won't work. External users can add records via a public web form - I'm thinking of using the API with webhooks, to create a parent record if one doesn't already exist. I'll use the email address as the key field, linking the parent to each child. Obviously if the parent already existing for that email address it shouldn't create another. Thinking out loud, I'm wondering if this will work just by setting the email address field in the parent record to unique so that attempts to create parents with duplicate email addresses will fail. I'll give that a go tomorrow. D