Area: Optimizely Service API
Applies to versions: Not applicable

Optimizely Service API Developer Guide

Recommended reading 

The Optimizely Service API is a service layer that allows system integrators to update and retrieve information from Optimizely Commerce, ensuring a seamless integration with external systems, such as PIM, DAM and ERPs.

Use cases

The Optimizely Service API provides a programming interface for performing operations like:

Getting started

The Optimizely Service API is installed as a NuGet package EPiServer.ServiceApi. The Service API is available for Optimizely Commerce version 8.5 and higher. See Installation and configuration how to install and set up the integration.

How it works

The Service API integration service uses OWIN-based authentication and ASP.NET Identity, see Installation and configuration and Overview of Service API.

Requests and responses

Below is an example illustrating the usage of the REST API for managing CRUD operations.

GET carts by name and customer ID


  • Base path (base URL/host): episerverapi
  • Endpoint: commerce/carts/
  • Query string parameter(s): /{customerId}/{name}

Example: Request GET method using C#/.NET

var client = new HttpClient()


    BaseAddress = new Uri(ConfigurationManager.AppSettings["integrationUrl"])


client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.AccessToken);                                       

var result = client.GetAsync("/episerverapi/commerce/carts/{customerId}/{name}").Result.Content.ReadAsStringAsync().Result

JSON response

Overview of request and response interactions between the application and the REST API.


Related topics

Do you find this information helpful? Please log in to provide feedback.

Last updated: Apr 14, 2021

Recommended reading