Integrating "Similar Products" via JSON

The interface can be accessed using the following URL:

$stringEscapeUtils.escapeHtml($body)

Apart from the differing value of the format parameter, the query parameters of this interface are identical to the XML interface.

The JSON-Schema is available at:

$stringEscapeUtils.escapeHtml($body)

A sample response to a JSON query is as follows:

{
  "attributes": [
    {
      "name": "category0",
      "value": "..Bikes.."
    },
    ...
  ],
 
  "records": [
    {
      "id": "223294",
      "record": {
        "products_id": "223294",
        ...
      }
    },
    ...
  ]
}

The output basically consists of two lists. The attributes list provides information on the attributes that have been used to determine the similarity. The records list contains the product information. It is constructed similar to the search results response.