REST API: Not recognizing program id starts with number 0 | Community
Skip to main content
November 9, 2017
Solved

REST API: Not recognizing program id starts with number 0

  • November 9, 2017
  • 2 replies
  • 4199 views

Hi,

I'm trying to get the leads by program id. Most of our programs IDs are starting with number 0 (zero)..

example 0816

REST url: 123-wzl-123.mktorest.com:443/rest/v1/leads/programs/0816.json?access_token=123

Response:

{

    "requestId": "16286#15f9fc20164",

    "success": false,

    "errors": [

        {

            "code": "1013",

            "message": "Program '816' not found"

        }

    ]

}

Looks like the api removing the 0 from the Program id.

Can anyone please help me on this.

Thanks.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Mark_Price

Hi Rajesh,

Where did the program Id come from?  Was it provided by someone else? 


An easy way to get a program id for a simple test is from the from the address bar when logged into Marketo. 

Navigate to the program and notice the address bar. A link like this will appear:   app-***marketo.com/#PG1396A1  <-   It's a link for program id: 1396

To test, maybe try a known good value for program id with the above method.

2 replies

November 10, 2017

Sorry my bad, I was looking for the ID somewhere else. Thank for the replies.

But this is a bug, if there is any ID that starts with 0.

Thanks,

Bala

SanfordWhiteman
New Participant
November 10, 2017

Integer.toString() can't start with "0".

SanfordWhiteman
New Participant
November 9, 2017

Where are you retrieving the Program Id that is a zero-padded string?

November 9, 2017

Its a QA env

SanfordWhiteman
New Participant
November 9, 2017

That doesn't answer the question... I'm asking what endpoint you're querying that is returning string IDs rather than integers in the first place. Why do you think this Program's underlying ID is "0816"?