SAP Knowledge Base Article - Public

3520728 - Hash (#) in GET method of an URL returns Invalid Error message

Symptom

Hash (#) in GET method of an URL returns Invalid Error message

{
    "error": {
        "message": "Invalid operator found in $filter expression:[937.10]"
    }
}

Environment

SAP Sales Cloud and SAP Service Cloud Version 2

Reproducing the Issue

Example:

GET:
https://myxxxxxxx.us1.test.crm.cloud.sap/sap/c4c/api/v1/product-service/products?$filter=displayId eq 'A123#BC4' 

returns

{
    "error": {
        "message": "Invalid operator found in $filter expression:[937.10]"
    }
}

Cause

Hash (#) is a valid URI character, but it starts the hash fragment, so you need to encode it in the query string.

Resolution

Use %23 instead of Hash (#).

Keywords

Hash, #, error, invalid, operator, %23 , KBA , CEC-CRM-PRD , Product for SAP Sales/Service Cloud , Problem

Product

SAP Sales Cloud and SAP Service Cloud Version 2 1.0