I am trying to make an Update to the value of a Person Custom field with a fetch request
let url = `https://${domain}.pipedrive.com/api/v2/persons/${crmId}`;
let finalUrl = `${url}?api_token=${privateKey}`;
let data = {
"fieldKey" : "deleted"
}
let resp = await fetch(finalUrl, {
method: "PATCH",
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify(data)
});
const response = await resp.json()
return response;
but I get the following error, note the fieldKeyValue was direcly copied from Pipedrive in the data section and get API key button for the field, I write is as a variable here but its the key string
success:
false
error:
“Validation failed: fieldKeyValue: Parameter ‘fieldKeyValue’ is not allowed for this request”
code:
“ERR_SCHEMA_VALIDATION_FAILED”
Edit: Issue only is with v2 endpoint, with v1 endpoint the update is succesfull using the same fieldKey. Additionally, when using v2 endpoint it changes normal fields like “name”, it just gives error with custom fields