OCAPI JSONP

JSONP (JSON with padding) allows a browser page to request data from a server in a different domain. Normally, a Web API request returns a plain JSON document, which requires the client to parse the JSON document. There are some Browser JavaScript cases where it’s much more efficient to respond with JavaScript code instead of with a JSON document. The response is directly evaluated by the JavaScript interpreter and isn’t parsed by a JSONParser. The response, in these cases, is merely a JSON document with a JavaScript function call wrapped around it.

The Open Commerce API offers the URL request parameter callback. The value of this parameter is the name of the JavaScript function that is wrapped around the JSON document.