Class ByProjectKeyInStoreKeyByStoreKeyCartsPost

All Implemented Interfaces:
Deprecatable201Trait<ByProjectKeyInStoreKeyByStoreKeyCartsPost>, ErrorableTrait<ByProjectKeyInStoreKeyByStoreKeyCartsPost>, ExpandableTrait<ByProjectKeyInStoreKeyByStoreKeyCartsPost>, ClientRequestCommand<Cart>, CreateHttpRequestCommand, HttpRequestCommand<Cart>, RequestCommand<Cart>

Creates a Cart in a Store.

An InvalidOperation error is returned in one of the following cases:

  1. If the referenced Shipping Method has a predicate that does not match the Cart.
  2. If the referenced Shipping Method is not active.
  3. If the referenced Shipping Method is associated with a Store that is different from the Cart's Store.

Specific Error Codes:



   CompletableFuture<ApiHttpResponse<com.commercetools.api.models.cart.Cart>> result = apiRoot
            .withProjectKey("{projectKey}")
            .inStoreKeyWithStoreKeyValue("{storeKey}")
            .carts()
            .post(null)
            .execute()