Once you have created a response filter via the REST API, you can pass its key in the data a widget sends along with a REST request. The server uses the key to locate the correct response filter and then returns data accordingly. The simplest way to include a response filter key is to hard code it in the REST call, for example:

data["filterKey"] = "my-filter-key";

ccRestClient.request(url, data,
      this.successFunc.bind(this),
      this.errorFunc.bind(this));

Commerce Cloud also provides a mechanism for programmatically determining the response filter key to pass in a REST call, allowing you to avoid hard coding it into the widget itself. This mechanism is described in Programmatically determine the correct response filter key.


Copyright © 1997, 2017 Oracle and/or its affiliates. All rights reserved. Legal Notices