PHP Wrapper Error - Creating Campaign with List then Schedule

Participant

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
Employee

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