Organisation Update Put Request is clearing out contact information

Hi I am trying to update an organisation with new information that gets put into 3 custom fields.

My Put request is as follows.

{
"ORGANISATION_ID":121306018,
"ORGANISATION_NAME":"Jack's New Businsess",
"CUSTOMFIELDS":[
{
"CUSTOM_FIELD_ID":"ORGANISATION_FIELD_1",
"FIELD_VALUE":"Individual Membership"
},
{
"CUSTOM_FIELD_ID":"ORGANISATION_FIELD_2",
"FIELD_VALUE":"SNZM7908"
},
{
"CUSTOM_FIELD_ID":"ORGANISATION_FIELD_3",
"FIELD_VALUE":"sub_CR3bPqLVxZNKpq"
}
]
}

which I send to the endpoint

https://api.insight.ly/v2.2/Organisations

specified here

https://api.insight.ly/v2.2/Help#!/Organisations/UpdateOrganisation 

This works fine but it clears out any existing contact information like websites phone number etc. Is there a patch method that I can use instead of put?

I know there is this

https://api.insight.ly/v2.2/Help#!/Organisations/UpdateCustomField

But it only allows me to change 1 custom field right? I have tried adding more in an array but it errors. Why can't I change more than one? I don't want to do 3 seperate put requests.

Cheers

0

Comments

1 comment
  • Hi Jack,

    The Update API requires the data value of the full object graph.  If you don't include certain information, the API thinks you want to remove it.

     

    Regards,

    Kevin

    0
    Comment actions Permalink

Please sign in to leave a comment.