Class ByProjectKeyInStoreKeyByStoreKeyCartsPostString

All Implemented Interfaces:
Deprecatable201Trait<ByProjectKeyInStoreKeyByStoreKeyCartsPostString>, ErrorableTrait<ByProjectKeyInStoreKeyByStoreKeyCartsPostString>, ExpandableTrait<ByProjectKeyInStoreKeyByStoreKeyCartsPostString>, 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("")
            .execute()