Class ByProjectKeyMeCartsByIDGet

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

Returns a 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}")
            .get()
            .execute()