Hi!
I can’t undestand this error. Here is my code using JQuery and Ajax:
$(document).ready(function(){
x = 1;
$("button").click(function(){
$.ajax({
url: "https://api.airtable.com/v0/appHQ1ATs3SjuAC20/XXXXXX?api_key=XXXXXX",
type: 'PATCH',
dataType: "json",
data: {
"fields" : {
"FIELD": VALUE
}
},
});
});
});
When I replace FIELD with the proper field name, and the data type of that field is a string, and replace VALUE with a string (e.g., “hola”), I can update the field through the API. But when replace FIELD with the proper name of an integer field, and replace VALUE whit a number (e.g., 1234), I get this error:
PATCH https://api.airtable.com/v0/appHQ1ATs3SjuAC20/xxxxxx/?api_key=xxxxxxx 422 (Unprocessable Entity)
I tried a lot of things but nothing works.
Anyone can help me?
Thanks