Class ByProjectKeyInStoreKeyByStoreKeyCustomersPostString

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

When using this endpoint, if omitted, the Customer stores field is set to the Store specified in the path parameter.

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. If a Cart with a store field specified, the store field must reference the same Store specified in the {storeKey} path parameter.

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