Class ByProjectKeyCartsPostString

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

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


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