Skip to Content
Jun 07, 2022 at 01:26 PM

Special characters in OData filter query



I need to query MarketingPermissions ( /sap/opu/odata/sap/API_MKT_CONTACT_SRV;v=0003/MarketingPermissions ) and filter by ContactPermissionID, which is actually an email address. We have data with the plus character '+' (e.g. john.doe+1234@liamg.mock).

The query works if I encode the '+' charchter with %2B and run the query in Postman:

https://{{mktHostname}}:443/sap/opu/odata/sap/API_MKT_CONTACT_SRV;v=0003/MarketingPermissions?$top=10&$filter=ContactPermissionID eq 'john.doe%2B1234@liamg.mock'

The query does also work if I encode the entire email address ('+' and '@'):

https://{{mktHostname}}:443/sap/opu/odata/sap/API_MKT_CONTACT_SRV;v=0003/MarketingPermissions?$top=10&$filter=ContactPermissionID eq 'john.doe%2B1234%40liamg.mock'

But, the query does not work if I use it within an iFlow in CI - OData V2 adapter. What is CI doing differently? What can I do to make it work?