I have an proxy flow having condition as <Condition>(proxy.pathsuffix MatchesPath "/eligibleProduct/{folderId}/{contractId}") and (request.verb = "GET"). However user is having the value of contract id like contractId=XYZ/B due to which request is failing in apigee with 404 no resource found error. How to fix this issue and how can we extract the contract id value including '/' in a new variable.
Hi Saurabh,
This issue isn’t really with Apigee - the root cause is that / is a reserved character in URLs, used to separate path segments. So when a value like contractId=XYZ/B is passed directly in the path, Apigee treats it as two separate path segments, not one - hence the 404.
To fix this:
The client must URL-encode values like XYZ/B. In this case, contractId=XYZ%2FB, so the full path would be something like /eligibleProduct/folder123/XYZ%2FB. Apigee will then correctly treat that as a single segment.
Alternatively, if the contract ID can contain special characters frequently, consider moving such values to headers, where / is not a control character.