Sending forward slash in query filters

Our client uses document numbers (“docNo”) that in some cases contain the forward slash (/) character. So far we have not been able to come up with a formulation that does not get a Bad Request - Error in Query Syntax response. Our URL looks like this:‘DEMO%20-%xxxxxx%20xxxxxxx’)/portalDocuments(docNo=‘74486/16’,docType=‘ACKLEGACY’)

We have tried substituting %2F for the /, no luck. We have tried moving the filter values to query parameters or the request body, no luck (the receiving program needs them to be query filters, because it needs to pick those filter values up and use them in internal functions).

Is there in fact some way to send values containing forward slashes as query filter values?

It looks like you are using ODataV4, so I would have thought that %2F would be the correct way to go.

It will be down to the API whether it supports escape characters or not.

So I guess this is a question for the supplier\developer of the API.

Actually that introduces an interesting angle–the developer of the API. Which in this case would be Microsoft. It just might be that their API does not support this encoding. Extremely limited resources for support/explanation/documentation from MS on this topic (and on this version of their software), but user community might come up with something. The last time we had this problem, ChatGPT came up with the answer: “That version did not support that feature; it only became available in 2018.” Thanks much for the suggestion!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.