Class ByProjectKeyMeLoginPost

All Implemented Interfaces:
ErrorableTrait<ByProjectKeyMeLoginPost>, ClientRequestCommand<CustomerSignInResult>, CreateHttpRequestCommand, HttpRequestCommand<CustomerSignInResult>, RequestCommand<CustomerSignInResult>

Retrieves the authenticated customer (that matches the given email/password pair).

If used with an access token for an anonymous session, all Orders and Carts that belong to the anonymousId are assigned to the newly logged-in Customer.

  • If the Customer does not have a Cart yet, the most recently modified anonymous cart becomes the Customer's Cart.
  • If the Customer already has a Cart, the most recently modified anonymous cart is handled in accordance with AnonymousCartSignInMode.

A Cart returned as part of the CustomerSignInResult is recalculated with up-to-date prices, taxes, discounts, and invalid line items removed.

If an account with the given credentials is not found, an InvalidCredentials error is returned.



   CompletableFuture<ApiHttpResponse<com.commercetools.api.models.customer.CustomerSignInResult>> result = apiRoot
            .withProjectKey("{projectKey}")
            .me()
            .login()
            .post(null)
            .execute()