PHP Wrapper Error - Creating Campaign with List then Schedule

Highlighted
Frequent Visitor

PHP Wrapper Error - Creating Campaign with List then Schedule

Hi

 

I was using the new SDK but it had an error on the example so I m using the PHP wrapper instead. I need to add a kist ID to my campaign then a date to schedule.

 

When I add the following line, it gives me this error.

 

$campaign->lists = $lists;    ($lists is set for a vraiable and is a single int.)

 

Array

(

    [0] => Array

        (

            [error_key] => json.field.invalid

            [error_message] => #/lists: Property was found but is not permitted at this location.

        )

 

)

 

I also need to know how to add a schedule to the campaign from a variable that is setn to the page.

 

Cheers

Gary

1 REPLY 1
Highlighted
CTCT Employee

Re: PHP Wrapper Error - Creating Campaign with List then Schedule

Hi Gary,

 

If you check the campaign example here again, the issue you were seeing should now be resolved.  You should use the addList method like below to assign a list to the campaign.

 

$campaign->addList($list);

 

See the example at the link above for how to schedule the campaign.

 

Best Regards,

Shannon W.

API Support Specialist

Developer Portal

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

Visit Page

Constant Contact Would Like To Hear From You!

We want to hear from customers like you about your favorite features and how they have helped your business or organization. Tell us by answering a few questions in...

Read More
Featured