Class ByProjectKeyMeCartsByIDPost

All Implemented Interfaces:
ConflictingTrait<ByProjectKeyMeCartsByIDPost>, Deprecatable200Trait<ByProjectKeyMeCartsByIDPost>, ErrorableTrait<ByProjectKeyMeCartsByIDPost>, ExpandableTrait<ByProjectKeyMeCartsByIDPost>, ClientRequestCommand<Cart>, CreateHttpRequestCommand, HttpRequestCommand<Cart>, RequestCommand<Cart>

Updates the Cart for a given id. Returns a 200 OK status if successful.

A ResourceNotFound error is returned in the following scenarios:

  • If no Cart exists for a given id.
  • If the Cart exists but does not have a customerId that matches the customer:{id} scope, or anonymousId that matches the anonymous_id:{id} scope.


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