REST API: Not recognizing program id starts with number 0 | Community
Skip to main content
Nov 9, 2017 7:56 AM UTC
Solved

REST API: Not recognizing program id starts with number 0

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.
Mark_PriceAccepted solution
Level 6
Nov 9, 2017 7:15 PM UTC

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.

10 replies

Nov 10, 2017 6:34 AM UTC

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

Translate
SanfordWhiteman
Level 10
Nov 10, 2017 6:39 AM UTC

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

Translate
SanfordWhiteman
Level 10
Nov 9, 2017 8:05 AM UTC

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

Translate
Nov 9, 2017 10:34 AM UTC

Its a QA env

Translate
SanfordWhiteman
Level 10
Nov 9, 2017 2:30 PM UTC

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"?

Translate