How to add values on custom fields ?

ahnafabir11
ahnafabir11 Member Posts: 2 NEW MEMBER
edited November 19 in Apps and Integrations #1

I have created a personFields through a post request POST /v1/personFields

It was successfully created. (I checked on person column in website ✅)

When i was trying to add value on this custom field for a specific person through a patch request PATCH /api/v2/persons/{id} i am getting a validation error like this

data: {
success: false,
error: "Validation failed: {custom_field_name}: Parameter '{custom_field_name}' is not allowed for this request",
code: 'ERR_SCHEMA_VALIDATION_FAILED'
}

My json body was like this -

{custom_field_name: 'my value'}

I have tried the v1 api but it was saying method not allowed (error). Am i doing something wrong ?

Tagged:

Best Answer

  • mac@datomni.com
    mac@datomni.com Member Posts: 10 VERIFIED MEMBER
    First Answer First Comment Photogenic
    #2 Answer ✓

    Use the custom field ID, not the custom field name, as the key in your JSON body. Here's where to find your custom field ID:


    Cheers,
    Mac

    Datomni Pipedrive Implementation Team

Answers

  • Irina Iglesias
    Irina Iglesias Pipedrive Team Posts: 53 PIPEDRIVE TEAM
    Fourth Anniversary 10 Comments Name Dropper Photogenic

    Hi @ahnafabir11 , in this particular case, it may be worth referring to our developer community here if you haven'’ already. You're more likely to find the advice needed as the team will be more specialized about these matters.

    Thank you!