GET and PUT a contact should the identity (REST convention)

Occasional Organizer

GET and PUT a contact should the identity (REST convention)

Hello,

 

I would like to report a problem that I met today:

I wanted to add a contact to a list using the php sdk. I do a GET, update my object and then a PUT, but data given by the GET makes an error in my request.

 

  $contact = $ctct->getContact(TOKEN, $contact_id);

  $contact->addList($list_id); // Here the value is 1112858140

  $contact = $ctct->updateContact(TOKEN, $contact);

 

I have this error:

  [

    {

      error_key"json.field.lists.value.invalid",

      error_message"The contact list 1811380440 does not exist."

    }

  ]

 

So I event tried:

 

  $contact = $ctct->getContact(TOKEN, $contact_id);

  $contact = $ctct->updateContact(TOKEN, $contact);

 

and I have the same error.

 

What should I do ? Can you hot fix the API so that the GET & PUT identity works ? (REST convention)

 

Thank you very, I am available for more details.

 

 

 

 

Tags (4)
1 REPLY 1
Highlighted
Honored Contributor

Re: GET and PUT a contact should the identity (REST convention)

Hello,

 

It looks like you may potentially have an issue where your contact is assigned to a list that may no longer exist. In a situation where things are working normally, the GET & PUT identity does work with our API and that is something that should always work within our contacts API.

 

I will be taking some time to research this issue in the next few days and I should have some additional information for you soon.

 

Best Regards,

Elijah G.
API Support Engineer
Developer Portal

View API documentation, code samples, get your API key.