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: https://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.
Solved! Go to Solution.
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: https://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.
Where are you retrieving the Program Id that is a zero-padded string?
Its a QA env
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"?
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: https://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.
An easy way to get a program id for a simple test is from the from the address bar when logged into Marketo
Not always though. There are exceptional cases where the URL hash doesn't represent the real REST ID, but rather a UI-only ID.
Good to know! Haven't run into it yet but maybe will switch to using query byName or something else to find id for testing.
Discovered it the hard way.
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
Integer.toString() can't start with "0".