Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Method
POST
Comments
Description

creates a new customer profile

This method will begin an email validated registration process. The merchant id, email, and password are the only required fields. You may also provide the first and last name to pre-populate the account.

Upon successful email verification, any prior orders associated with the email address will be updated and assigned to the newly created account.

Cookies

UltraCartMerchantID = Merchant ID

UltraCartShoppingCartId - Cart ID

A new account cannot be created if the customer is logged in. They must log out first to create an account.
Path Parametersnone 
Query Parameters

none

 

redirectUrl

themeCode

The redirectUrl is the url where you wish the customer to be redirected to after they click on their email confirmation. This should be the full url, including protocol. For security reasons, this exact url must be supplied in the Customer Profiles Settings page.

themeCode is the screen branding theme code. it ensures that if a redirect happens to a legacy page, the proper themeCode is displayed. You probably won't need this parameter if you have a StoreFront.

Headers

none

 
Receives JsonMyAccount object 
Returns JsonMyAccount object

the return object will contain the customer profile id (unique identifier) 

If the merchant account does not allow customer profiles, a 400 Bad Request is returned.

If the email is already registered for this merchant, a 400 Bad Request is returned.

password is not returned. a string of asterisks is returned instead.

Example

 

Code Block
themeDJango
languagejavascript
linenumberstrue
    this.createAccount = function (customerInformation, options) {
    options = options || {};
    var account = null;
    jQuery.ajax({
      url: '/rest/myaccount/settings',
      data: JSON.stringify(customerInformation),
      type: 'post',
      async: (options.success || options.failure) ? true : false,
      headers: { "cache-control": "no-cache" },
      cache: false,
      contentType: 'application/json; charset=UTF-8',
      dataType: 'json'
    }).done(function (result) {
              account = result;
              if (options.success) {
                options.success(account);
              }
            })
            .fail(function (jqXHR, textStatus, errorThrown) {
              if (options.failure) {
                options.failure(jqXHR, textStatus, errorThrown);
              }
            });
    return account;
  };

...