This feature is marked as beta and may be affected by changes. Use with caution for production.

My Carts

This endpoint can only be used with an access token created with the password flow or with an anonymous session. It gives access to shopping carts that belong to the customer or the anonymous session linked to the access token.

Representations

All representations are JSON objects submitted or received as payload to API requests or responses. Responses are equal to the responses on the cart endpoint, but requests may differ. Custom line items and custom tax rates can not be set via this endpoint.

MyCartDraft

A CartDraft is the object submitted as payload to a Create Cart method. The customerId is automatically set with a password flow token. The anonymousId is automatically set with a token for an anonymous session.

MyLineItemDraft

Get Cart by ID

Endpoint: /{projectKey}/me/carts/{id}
Method: GET
OAuth2 Scopes: manage_my_orders:{projectKey}
Response Representation: Cart

Get Active Cart

Retrieves the active cart (the cart that has been modified most recently). If no active cart exists, a 404 Not Found error is returned.

Endpoint: /{projectKey}/me/active-cart
Method: GET
OAuth2 Scopes: manage_my_orders:{projectKey}
Response Representation: Cart

Query Carts

Endpoint: /{projectKey}/me/carts
Method: GET
OAuth2 Scopes: manage_my_orders:{projectKey}
Response Representation: PagedQueryResult with the results array of Cart
Query Parameters:

Create a Cart

Endpoint: /{projectKey}/me/carts
Method: POST
OAuth2 Scopes: manage_my_orders:{projectKey}
Request Representation: MyCartDraft
Response Representation: Cart

Update Cart

Endpoint: /{projectKey}/me/carts/{id}
Method: POST
OAuth2 Scopes: manage_my_orders:{projectKey}
Response Representation: Cart
Fields:

Update Actions
Please find below the individual update actions provided on this endpoint.


Add LineItem

Adds a product variant in the given quantity to the cart. If the cart already contains the product variant for the given supply and distribution channel, then only quantity of LineItem is increased.

The price is selected as described here.

Remove LineItem

As described here.

Change LineItem Quantity

As described here.

Set Customer Email

As described here.

Set Shipping Address

As described here.

Set Billing Address

As described here.

Set Country

As described here.

Set ShippingMethod

As described here.

Set Custom ShippingMethod

As described here.

Add DiscountCode

As described here.

Remove DiscountCode

As described here.

Recalculate

As described here.

Set Custom Type

As described here.

Set CustomField

As described here.

Set LineItem Custom Type

As described here.

Set LineItem CustomField

As described here.

Set Locale

As described here.

Add Payment beta

As described here.

Remove Payment beta

As described here.

Change TaxMode

As described here, except that the TaxMode Disabled can not be set on the My Carts endpoint.

Set DeleteDaysAfterLastModification beta

As described here.

Delete Cart

Removes a Cart.

Endpoint: /{projectKey}/me/carts/{id}
Method: DELETE
OAuth2 Scopes: manage_my_orders:{projectKey}
Response Representation: Cart
Query parameters: