Last updated: Nov 06 2017

Area: Episerver Perform Applies to versions: 1.0 and higher (Personalization API)

Response message

The response has a property called status with value OK for successful requests, fail when an error occurs, or warning when some errors are found but a useful result can be returned. If a fail status is returned, a fatal error occurred and the request could not be fulfilled; as a consequence, no recommendations are included in the response.

The API returns the following information to the client:

status The status of the request (e.g., OK, fail, warning).
"errors": […]
  code Error code
  message Explanation of the error.
"warnings": […]
{"warning": "A warning message."}
"smartRecs": […]
info AB test info

Failure response

If status is equal to fail or warning, then an errors element is returned after the status property. The value is a list of the errors or warnings encountered. Example:

      	"status"	: "fail",
   	"errors"	:	[
			"message":"Json Parsing exception: Malformed JSON. Unexpected
		character ('{' (code 123)): was expecting double-quote to start field 
		name at character offset 1."

Successful response

In case the status is different from fail, a successful response is returned.


      	"status" : "OK",

Do you have feedback on this documentation? Send an email to documentation@episerver.com. For development-related questions and discussions, refer to our Forums on https://world.episerver.com/forum/