While I’m sure it’s just me doing something wrong, I can’t seem to figure out how to update a contact. I’m using REST with the PHP SDK, and it doesn’t throw an error, it just doesn’t work like this.
$data = array('given_name' => 'Smith'); $this->infusionsoft->contacts('update',16, $data );
This is the only way I’ve found to not get an error but it doesn’t work. To be honest, I don’t even remember where I found this method (the update as a parameter) as I’ve been looking all over this forum and google.
If I try anything with
it just tells me
Fatal error: Uncaught Error: Call to undefined method Infusionsoft\Api\Rest\ContactService::update()
Which I can see is true, but that’s what I see on the page https://developer.infusionsoft.com/docs/xml-rpc/#contact-update-a-contact
(I know the link says xml-rpc, but I’m clicking on the PHP tab at the top and it changes to at least look like it could work). I’m assuming this is some older version or something?
If I try the save method from https://github.com/infusionsoft/infusionsoft-php
$contact->given_name = 'Smith'; $contact->save();
I get Fatal error: Uncaught GuzzleHttp\Exception\ClientException: Client error:
PATCH https://api.infusionsoft.com/crm/rest/v1/contacts/18?access_token=[token] resulted in a
400 Bad Request
I’m sure it’s something dumb, but I’ve wasted too many hours on this already.
Also, how will updating a custom field vary?