Class ByProjectKeyCustomersPost

All Implemented Interfaces:
Deprecatable201Trait<ByProjectKeyCustomersPost>, ErrorableTrait<ByProjectKeyCustomersPost>, ExpandableTrait<ByProjectKeyCustomersPost>, ClientRequestCommand<CustomerSignInResult>, CreateHttpRequestCommand, HttpRequestCommand<CustomerSignInResult>, RequestCommand<CustomerSignInResult>

If the anonymousCart field is set on the CustomerDraft, then the newly created Customer will be assigned to that Cart. Similarly, if the anonymousId field is set, the Customer will be set on all Carts, Orders, ShoppingLists and Payments with the same anonymousId.

Creating a Customer produces the CustomerCreated Message. Simultaneously creating two Customers with the same email address can return a LockedField error.



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