The Community is hosting an End of Summer sweepstakes! Participants must complete tasks to earn tickets that will enter them with a chance to win a free year of Constant Contact and other great prizes!*
*No Purchase Necessary. For Official Rules, visit here. Constant Contact’s End of Summer 2020 Sweepstakes ends on October, 20, 2020 at 11:50 PM EST.

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

Highlighted
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.

Visit Page

Constant Contact 2020 End of Summer Community Sweepstakes!

The Constant Contact User Community is hosting a sweepstakes. The more you participate, the more chances you have to win! Read on to learn more...

Read More
Featured