Class ByProjectKeyInStoreKeyByStoreKeyCartsPost

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

Creates a Cart in the Store specified by storeKey.

If the referenced ShippingMethod in the CartDraft has a predicate that does not match, or if the Shipping Method is not active, an InvalidOperation error is returned.

Specific Error Codes:

  • DiscountCodeNonApplicable
  • InvalidItemShippingDetails
  • MatchingPriceNotFound
  • MissingTaxRateForCountry
  • CountryNotConfiguredInStore


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