how should the request for Schedule Campaigns REST API should be ?

Anonymous
Not applicable

how should the request for Schedule Campaigns REST API should be ?

I am trying Schedule campaigns Rest api and i provide the request as below,

http://developers.marketo.com/documentation/rest/schedule-campaign/

    {

       "input":

          {

         

             "tokens" : [

                {

                   "name": "{{my.Aparna1}}",

                   "value": 11

                }

            ]

          }

    }

I am getting the following exception as response,

{"requestId":"66de#156ebf0da0a","success":false,"errors":[{"code":"1003","message":"Invalid token value: [\"Aparna1\"] "}]}

Wanted to know if there should be some other way to provide tokens input. {{my.Aparna1}} is a token of type number. I have tried providing value as "11",11 and even a float "11.09". Should i provide something different? I have also ensured {{my.Aparna1}} is present in the same schedule campaign id. Please hlep out.

3 REPLIES 3
Highlighted
Anonymous
Not applicable

Re: how should the request for Schedule Campaigns REST API should be ?

Either or works fine for me. 

Although, the error message really has nothing to do with the value.  It's actually erroring out on the token name.  Are you sure this token exists in the program?

Anonymous
Not applicable

Re: how should the request for Schedule Campaigns REST API should be ?

Now it works. But i want to understand where this value gets updated. As i have tried to update the value of Aparna1 to 11 from 10. But still Marketo UI tokens Aparna1 shows 10. Where will the change will be seen ?

Re: how should the request for Schedule Campaigns REST API should be ?

You aren't making a persistent change to the token value. You're making a temporary runtime change for a single campaign execution. This is explained quite well in the docs.