Class ByProjectKeyInStoreKeyByStoreKeyMeLoginPost

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

Retrieves the authenticated Customer (that matches the given email/password pair) if they are part of a specific Store.

If used with an optional 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, 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 according to AnonymousCartSignInMode.

A Cart returned in the CustomerSignInResult has any invalid Line Items removed and is updated with the latest prices, taxes, and discounts. During these updates, the following errors can be returned: MatchingPriceNotFound and MissingTaxRateForCountry.

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}")
            .inStoreKeyWithStoreKeyValue("{storeKey}")
            .me()
            .login()
            .post(null)
            .execute()