Solved

Update company on Person via API? does not seem to take affect

  • 8 October 2021
  • 3 replies
  • 16 views

so i’m calling update on a Person.

 

When i do so, I get a 200 OK back, but the return record still has None for company_name/company_id. I know these are correct, if i enter in the web front end it populates.

Other fields I update work, just not this one.

 

I cam trying both with and without the emails (and also w/, w/o name, id). Same affect:

 

{'id': 77886699, 'name': 'XXX', 'company_name': 'XXX', 'company_id': XXX, 'emails': [{'email': 'XXX@XXX', 'category': 'work'}]}
 

{'id': 77886699, 'name': 'XXX', 'company_name': 'XXX', 'company_id': XXX }

 

I have also tried just company_name and just company_id, all do the same thing. No error, no update.

 

the fields are as here https://developer.copper.com/people/overview.html

 

any suggestions? Only ‘name’ is marked as a required field, but its not clear that is true for a PUT.

 

icon

Best answer by Kevin from Copper 13 October 2021, 00:17

View original

3 replies

the web front end calls

 

'https://app.copper.com/api/v1/companies/MYID/contacts_api/USERID/'

with {"primary_organization" … }

 

but i cannot call that.

Userlevel 5
Badge +4

Hi @donbowman, I’m getting one of our internal API experts to take a look at your question. Hang tight!

Userlevel 2
Badge +1

@donbowman this is a known limitation. I has to do with the data structure between People and Company records. Within the UI, the Company Name appears as a field on the on the Person record. However, it’s actually related record, which is more complex than updating a text  field on a record.

You will need to use the related items endpoint to remove the relation (People and Company) and then add the new relation.

Reply