Hi Community
I’ve tried to connect to an airtable database to write records. This works perfectly until I change the fieldtype to “number”. The sended datas are numeric (lik “5.1”). In the API I receive the error message “Error 422 - Unprocessable Entity”. Manually enter this value in airtable (web interface), there’s no problem. Also set fieldtype as “text” …
When using the Api Explorer to send a POST request with a JSON body, at the moment, all the body parameters are sent as string values only.
When using a numeric field in an Airtable base, their API doesn’t accept a string input or doesn’t try to convert it to a numeric input, and requires an explicit numeric parameter.
We do have an enhancement ticket regarding our API Explorer to enable specifying the parameter type in a JSON body, but it’s not on our short-term roadmap.
In the meantime, the solutions are
Use a text field in Airtable and keep using API Explorer
Use a numeric field in Airtable and build a custom Interface Asset (.NET, JS, TS depending on which Player / Platform you are using) to send the POST request with the exact body Airtable is expecting.
As an example, this is one of the reasons we created custom Interface Assets for OpenAI / Chat GPT since the “temperature” parameter has to be sent as a number.