xenial-black
xenial-black2y ago

Defining multiple parameters for fetching exact record from Airtable

I have been trying to fetch order records from Airtable through GET API call. When im trying use 3 parameters in GET API call, where Sales_order_num is number and other 2 are string. Im not fetch exact record using API call. Help me with any solution?
No description
No description
4 Replies
Tico | Voiceflow Assistant
To fetch an exact record from Airtable using multiple parameters in a GET API call, ensure you're correctly formatting your request and handling the response. Here are some key points to consider: - Make sure you're using the correct method (GET for retrieving data) and have added your bearer key under headers for authorization. - When setting up your API call, specify the parameters you're filtering by in the request URL or through query parameters, depending on how Airtable's API expects them. - Capture the response by mapping out to a variable. This involves specifying the path to the data you're interested in within the response object. For example, if you're looking for a task, you might use [response.record[0].fields.Task]. - Test your integration by sending a request and checking if the expected record is fetched. Adjust your parameters or the way you're accessing the response data as needed. Remember, the success of fetching the correct record depends on correctly specifying the parameters and handling the response. If you encounter a VF_STATUS_CODE: 422 error, it indicates a formatting issue with your request, so double-check that your parameters match the expected format and data types in Airtable. For more detailed guidance, you can refer to the API documentation provided by Airtable or the specific instructions on setting up API calls within Voiceflow.
xenial-black
xenial-blackOP2y ago
So my sample data for those parameters looks like '12233-1233-RF' and '122344-RF' . something like that. What should the parameter datatype be? we have datatypes like custom, number, age, email, ordinal,& so on. Which is best datatype for strings with numbers,special characters,text
Steve B. | IntelleSync.ai
Your parameter has to match your Airtable header exactly and you don't need to ad the the curly brackets '{}'. You also you want to use double quotes instead of single quotes around your variable. Those are why your getting a parameter validation error.
For example here is a GET call to retrieve an order number in one of my projects. The header for the order number column in my Airtable is OrderNo. As a rule of thumb it's better not to have spaces in your Airtable headers, you can but you have add %20 where the spaces are which is pain.
No description
rival-black
rival-black2y ago
Sometimes underscore also doesn’t work

Did you find this page helpful?