HomeGuidesAPI Reference
Submit Documentation FeedbackJoin Developer CommunityOptimizely GitHubOptimizely NuGetLog In

Request message reference

You can access the RESTful service on the Optimizely LIVE server by a POST or GET https request using the following request URL:

https://<clientname>.peerius.com/tracker/api/v1_4/rest.pagex

📘

Note

The <clientname> part of the URL might be different depending of the integration settings with Optimizely. You will need to change that accordingly.

You should test your API calls using the user acceptance testing (UAT) server prior to adding code to your production server or live website. You can access the RESTful service on the Optimizely UAT server by a POST or GET https request using the following request URL:

https://uat.peerius.com/tracker/api/v1_4/rest.pagex

POST request

The POST request has a content type of application/x-www-form-urlencoded, with a single value named jd (JSON data). The value of jd is the JSON content of the request as specified in the Tracking request format section. This value must be URL encoded in UTF-8.

GET request

The GET request has a single parameter of name jd (JSON data). This parameter must be URL encoded in UTF-8, and its value is the JSON content of the request as specified in the Tracking request format section.

The following example shows a GET request, including the URL-encoded parameter value:

https://retailer.peerius.com/tracker/api/v1_4/rest.pagex?jd= 
%7B%22type%22%3A%22home%22%2C%22ip%22%3A%2210.42.37.139%22%2C%22session%22%3A%22new%22
%2C%22cuid%22%3A%22new%22%2C%22site%22%3A%22retailer%22%2C%22clientToken%22%3A%22
1234abcd5678%22%2C%22channel%22%3A%22web%22%2C%22lang%22%3A%22en-gb%22%2C%22
currentURI%22%3A%22http%3A%2F%2Fwww.retailer.com%2Fhome%22%2C%22
previousURI%22%3A%22http%3A%2F%2Fwww.retailer.com%2Fproduct%2FRC123.html%22%2C%22
userAgent%22%3A%22Mozilla%2F5.0+%28Windows+NT+10.0%3B+WOW64%29+AppleWebKit%2F537.36
+%28KHTML%2C+like+Gecko%29+Chrome%2F56.0.2924.87+Safari%2F537.36%22%2C%22
user%22%3A%7B%22id%22%3A%22abcd1234efgh%22%7D%2C%22recContent%22%3A%22refCodeOnly%22%7D

In both cases, the returned data has a Content-Type header of application/json.


Did this page help you?