Airtable has a feature called “smart links”, if you create via API a new row in a table that has a “link to other records” column type, you can send the key value of that link (not the id!) and that record gets linked automatically.
For example, if I have to tables:
Table 1
customer_id / name / membership
cust-0001 / John / premium
We will improve the API in the future. Regarding the number of calls, as link_id will never change after link column creation, you can write the id in your code directly, the same is for other_table_name.
In your another table, the row ids for membership plans will not change too. So you can read them in the beginning of your script and put them in a map.
So actually only two API calls are needed for each new row:
You are right with the link_id and the table_names.
However, my application is adding dynamically records to both tables. It’s not best to solution to hard code the row_ids. I have to get the row_ids via API if I don’t want to map the ids every time I add a record.
Please keep this in mind in the future, while you improve your API. At this point the first colunm of each table it’s not a true key value, it’s just an ornamental column type.
Something similar to “smart links” already in development?
This is an important feature! I am trying to establish kind of a similar thing but with several linked fields/columns in one table. All of which are supposed to be created dynamically via a Script/API.
You can now use “automation rule → Add links” to link records between tables. You can also use “Data processing → Auto add link” to add links to existing records in bulk.