Hello Nirdesh,
First, I recommend opening a ticket with product support as they would be able to dig into logging and investigate in far more depth than we can do here in a public forum.
Generally a 404 means, as you can see, a not found. This could be because of the prompt timing. Meaning that your not giving the system enough time with the first request to generate a valid id. So the second request is trying to pull something that doesn't exist yet thus you get a 404.
After the first request it might be a good idea to run a request to make sure you get a valid id returned before moving on with the second request where the id is needed.
Cheers,
------------------------------
Cameron
Online Community Manager/Moderator
------------------------------