SAP Knowledge Base Article - Public

3551131 - API Error - "One Or More Query Parameters Passed Are Invalid"

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.

  1. Login to SAP Business Accelerator Hub for SAP Sales and Service Cloud Version 2 Product.
  2. Search for Registered Product Service API.
  3. Navigate to the 'Try Out' Tab to create a GET query.
  4. 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).
  5. 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

  1. Login to Sales and Service Cloud Version 2 system.
  2. Go to Settings.
  3. Navigate to Extensibility Administration.
  4. Open the Affected entity (for e.g. Registered Product Service).
  5. Go to Field Attributes Tab and expand the section.
  6. 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

Product

SAP Sales Cloud and SAP Service Cloud Version 2 1.0