Create Customer

Warning

This documentation is for translated APIs and intended only for some implementations who have upgraded from a previous version of Order Management. Verify whether your implementation uses translated APIs before making this call, as you will experience errors if your tenant is not configured to use these. If your implementation is not configured to do so, then refer to the standard API documentation instead.

The Create Customer API allows a new customer to be created and their information saved when they place an order. Their basic account and contact information is assigned on this initial creation, and custom data can be added when applicable.

Note that the request body and parameter schemas outlined in this guide are the exact same as in the previous version of OMS, as the Unified Commerce platform supports backwards compatibility for this API. The only change to this request is the format of the base endpoint, as shown in the below table. Remember to provide the x-vol-tenant key for authentication in the headers.

Production URLhttps://{tenantId}-translation.mozu.com/api/v2/customer
Sandbox URLhttps://{tenantId}-translation.sandbox.mozu.com/api/v2/customer
Supported FormatsJSON
HTTP MethodPOST

Example

In this example, the customer details includes these particular properties:

  • Customer named TEST CUSTOMER
  • Being set up with the email “test@shopatron.com” and the password “password”

Required Parameters

These parameters are necessary for the Create Customer API to return a successful response:

ParameterTypeDescription
firstNamestringThe first name of the customer. The minimum length is 1 and the maximum length is 300.
lastNamestringThe last name of the customer. The minimum length is 1 and the maximum length is 300.
emailstringThe email address of the customer. The minimum length is 1 and the maximum length is 250.
phone1stringThe phone number of the customer. The minimum length is 1 and the maximum length is 20.
passwordstringA unique password for the customer. The minimum length is 5 and the maximum length is 48.

Optional Parameters

This additional information can also be provided during customer creation:

ParameterTypeDescription
phone2stringA secondary phone number for the customer. The maximum length is 20.
customDataarrayA set of custom data for the customer.

The Full Request

This is the complete request that will create a new customer.

{
 "firstName":"TEST",
 "lastName":"CUSTOMER",
 "email":"test@shopatron.com", 
 "phone1":"0000000000",
 "password":"password"
}

The Full Response

This is the full response returned by the API, detailing the information about the newly created customer.

{
 "customerID": "000000",
 "firstName": "TEST",
 "lastName": "CUSTOMER",
 "email": "test@shopatron.com",
 "password": "*****",
 "phone1": "0000000000",
 "active": "ACTIVE",
 "accountCreated": "2007-11-20T02:50:15+00:00"
}