Hi, I’m trying to update a collection from a script make in a google sheet (I don’t want to use Zapier) but I receive the “fields is required” error.
This is my code
var teamData = {
"fields": {
"name": "test",
"slug": "test",
"category": "WOMEN",
"nationality-iso-code": "Italy",
"payment-status": "Confirmed",
"_archived": "false",
"_draft": "false"
}
}
var options = {
'method': 'POST',
'muteHttpExceptions': true,
'headers': {
'accept': 'application/json',
'content-type': 'application/json',
'authorization':'Bearer ' + API_TOKEN
},
'body' : JSON.stringify(teamData)
};
var response = UrlFetchApp.fetch(URL, options);
The same json via postman works, and I have the same problem if I try to update an item, via postman works, via google script not.
How can I solve this problem?