Symptom
Error occurs when 'Filter' parameter is used in API GET method to fetch an entity data.
Environment
SAP Sales Cloud and SAP Service Cloud Version 2
Reproducing the Issue
This issue is applicable for any entity that supports API Calls. Below is an example for GET call with Registered Product entity.
- Login to SAP Business Accelerator Hub for SAP Sales and Service Cloud Version 2 Product.
- Search for Registered Product Service API.
- Navigate to the 'Try Out' Tab to create a GET query.
- For Filter parameter, pass value as extensions/Z_ABC eq 'Test' (where Z_ABC is an extension field maintained in system for Registered Product entity).
- Click on Run.
Notice that error occurs as below:
{ "error": { "code": "service-object.2011", "message": "One or more query parameters passed are invalid", "target": "/sap/c4c/api/v1/registered-product-service/registeredProducts?$filter=extensions%2FZ_ABC%20eq%20'Test'" } }
Cause
The issue happens because the custom field (here Z_ABC) has not been configured as "filterable" within Extensibility Administration in the system.
Resolution
- Login to Sales and Service Cloud Version 2 system.
- Go to Settings.
- Navigate to Extensibility Administration.
- Open the Affected entity (for e.g. Registered Product Service).
- Go to Field Attributes Tab and expand the section.
- Search for the required Customer field and toggle the button to Active for Filterable option.
See Also
3515964 - Error When Filtering by an Extension Field Value
3521580 - How to Use the Sales and Service Cloud V2 - Case API on SAP API Business Hub
Keywords
API, Business Accelerator Hub, Entity, Error, GET, filter, extensibility, filterable, custom, API calls, Invalid , KBA , CEC-CRM-CZM-EXT , Extensibility for SAP Sales/Service Cloud , CEC-CRM-RPD , Registered Products for SAP Sales/Service Cloud , CEC-CRM-CZM , Customization for SAP Sales/Service Cloud , Problem