cart
This topic explains how to communicate with the cart API.
The cart
API lets you manipulate carts in Optimizely Customized Commerce. There are two sets of endpoints which require different levels of permissions. When using the /carts
endpoints you, must have the CustomerServiceRepresentatives role. When using the /me/cart
endpoints, you have access to create and modify only your own carts. For both sets of endpoints you can use either the cartId
integer or the customerId
, cartName
, and marketId
to manipulate the carts.
Endpoints
GET | api/episerver/v3.0/carts/{cartId} | Gets a cart by integer primary key. |
GET | api/episerver/v3.0/carts/{customerId}/{cartName}/{marketId}/{createIfNotExist:bool?} | Gets a cart by customer id, cart name and market id. Last parameter is optional boolean to create cart if does not exist. |
GET | api/episerver/v3.0/me/cart/{cartId} | Gets a cart by integer primary key for current user. |
GET | api/episerver/v3.0/me/cart/{customerId}/{cartName}/{marketId}/{createIfNotExist:bool?} | Gets a cart by customer id, cart name and market id for current user. Last parameter is optional boolean to create cart if does not exist. |
POST | api/episerver/v3.0/carts | Create new cart as per provided model. |
POST | api/episerver/v3.0/me/cart | Create new cart as per provided model for current user |
PUT | api/episerver/v3.0/carts | Updates an existing cart or creates new cart as per provided model. |
PUT | api/episerver/v3.0/me/cart | Updates an existing cart or creates new cart as per provided model for current user. |
DELETE | api/episerver/v3.0/carts/{cartId} | Deletes a cart as per given cartId. |
DELETE | api/episerver/v3.0/carts/{customerId}/{cartName}/{marketId} | Deletes a cart by customer id, cart name and market id. |
DELETE | api/episerver/v3.0/me/cart/{cartId} | Deletes a cart as per given cartId for current user. |
DELETE | api/episerver/v3.0/me/cart/{customerId}/{cartName}/{marketId} | Deletes a cart by customer id, cart name and market id for current user. |
POST | api/episerver/v3.0/carts/search | Search carts using search filter object as body. |
POST | api/episerver/v3.0/me/cart/search | Search carts using search filter object as body for current user. |
POST | api/episerver/v3.0/carts/{cartId}/converttoorder | Creates an order for specified cart, returns an order model and location for the resource created in the header. |
POST | api/episerver/v3.0/carts/{customerId}/{cartName}/{marketId}/converttoorder | Creates an order for specified cart, returns an order model and location for the resource created in the header. |
POST | api/episerver/v3.0/me/cart/{cartId}/converttoorder | Creates an order for specified cart for current user and returns an order model and location for the resource created in the header. |
POST | api/episerver/v3.0/me/cart/{customerId}/{cartName}/{marketId}/converttoorder | Creates an order for specified cart for current user and returns an order model and location for the resource created in the header. |
POST | api/episerver/v3.0/carts/{cartId}/preparecheckout | Validates specified cart and returns information related to cart totals and validation messages. |
POST | api/episerver/v3.0/carts/{customerId}/{cartName}/{marketId}/preparecheckout | Validates specified cart and returns information related to cart totals and validation messages. |
POST | api/episerver/v3.0/me/cart/{cartId}/preparecheckout | Validates specified cart for current user and returns information related to cart totals and validation messages. |
POST | api/episerver/v3.0/me/cart/{customerId}/{cartName}/{marketId}/preparecheckout | Validates specified cart for current user and returns information related to cart totals and validation messages. |
Updated about 1 month ago