Miscellaneous
Batch
Batch processing allows you to submit arbitrary sequence of requests within a single HTTPS request.
Any type of request from the above documentation may be used in the Batch, and the Batch may combine different types of requests arbitrarily as well.
Using Batch requests is beneficial for example, when synchronizing the catalog of items or uploading historical interaction data, as sending the data in Batch is considerably faster than sending the individual requests (thanks to optimizations and reducing network and HTTPS overhead).
Parameters
ID of your database.
JSON array containing the requests.
Makes all the recommended items for a certain user distinct among multiple recommendation requests in the batch.
Responses
Successful operation. There is an array with responses. The order of the responses in the array follows the order of the sent requests.
Many possibilities, see the error description in the result JSON. Examples: invalid or missing Content-type (not application/json), request body is not a valid JSON, request JSON does not have the prescribed structure.
There is at least one request in the batch with an invalid (non-existing) URL. In such a case, the batch as a whole is not executed and you'll get HTTP 404, because the batch is apriori erroneous.
Too large batch (containing more than 10,000 requests in case of a server side request).
Examples
Example Sending multiple requests in a single Batch request
Batch can encapsulate requests of various types.
Example Checking the result of the individual requests
You should check that the requests in the Batch succeeded. A request can fail for example due to invalid parameters - the returned error mesage gives you a hint what went wrong.
Example Using distinctRecomms parameter to deduplicate results in multiple boxes
If you show multiple boxes with recommendations on a single page, you may want to ensure that the same item is not recommended in multiple boxes. You can achieve that by specifying distinctRecomms=true.
Notes
Executing the requests in a Batch is equivalent as if they were executed one-by-one individually; there are, however, many optimizations to make batch execution as fast as possible.
The status code of the Batch request itself is 200 even if the individual requests result in error – you have to inspect the code values in the resulting array.
If the status code of the whole batch is not 200, then there is an error in the Batch request itself; in such a case, the error message returned should help you to resolve the problem.
The batch size is limited to 10,000 requests when sent from the server side; if you wish to execute even larger number of requests, please split the Batch into multiple parts. Client libraries do the splitting automatically.
In case of the client side integration, the limit is 30 requests and only the requests that can be called from the client side are allowed.
List Scenarios
Get all Scenarios of the given database.
Parameters
ID of your database.
Responses
Successful operation.
Reset Database
Completely erases all your data, including items, item properties, series, user database, purchases, ratings, detail views, and bookmarks. Make sure the request is never executed in the production environment! Resetting your database is irreversible.
Parameters
ID of your database.
Responses
Successful operation.