PUT v1/Customers

Create a new customer

URI template

v1/Customers?verbose={verbose}&accountCreationEmailOption={accountCreationEmailOption}&enableLoyaltyAccountLinking={enableLoyaltyAccountLinking}&autoAssignStoredValue={autoAssignStoredValue}

Request Information

URI Parameters

NameDescriptionTypeAdditional information
verbose

Optional query param. If true, then returns a filled out CustomerResults object. If any other value, returns the CustomerResults object with only the CustomerId having a value

boolean

Default value is False

accountCreationEmailOption

Optional query param. This flag determines if an account creation email should be sent to the customer. The default behavior will follow the 'Send an email on account creation' field on the Web Admin Company Setup page. When set to 'SendEmail' an email WILL be sent regardless of the Web Admin setting. When set to 'DoNotSendEmail' an email will NOT be sent regardless of the Web Admin setting.

AccountCreationEmailOptions

Default value is UseCompanySetting

enableLoyaltyAccountLinking

Optional query param. This flag determines what happens when assigning a loyalty account to the newly created customer. The default behavior first looks for an existing loyalty account with the same email address as the new customer. If a loyalty account is found that account is linked to the customer. If no account is found a new virtual card will be created and linked to the customer. When set to 'false' a new virtual card will ALWAYS be created and linked to the customer.

boolean

Default value is True

autoAssignStoredValue

Optional query param. This flag determines whether we should create Stored Value Card to the newly created customer or not. When Set to True 1) if Company Loyalty Processor is Cluth we will making call to AlohaStoredValue API and assign a StoredValueCard for the customer 2) if Company Loyalty Processor is Aloha we will directly copy Aloha LoyatyCardNumber to the Customer StoredValueCardNumber When Set to False we will not assign StoredValueCard Regardless of Company LoyaltyProcesser

boolean

Default value is False

Body Parameters

InRegistration object which should contain a Customer object, a password, a secret question and a secret answer

InRegistration
NameDescriptionTypeAdditional information
Customer

Customer

Required

Password

string

Required

Min length: 7

SecurityQuestion

string

Required

SecurityAnswer

string

Required

Channel

DEPRECATED. Please use the X-Api-Channel header instead.

string

None.

Request Formats

application/json, text/json

Sample:
{
  "Customer": null,
  "Password": null,
  "SecurityQuestion": null,
  "SecurityAnswer": null,
  "Channel": "Unknown"
}

application/xml, text/xml

Sample:
<InRegistration xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/OnlineOrderingAPI.Inbound">
  <Channel>Unknown</Channel>
  <Customer xmlns:d2p1="http://schemas.datacontract.org/2004/07/OnlineOrderingAPI.Models.v1" i:nil="true" />
  <Password i:nil="true" />
  <SecurityAnswer i:nil="true" />
  <SecurityQuestion i:nil="true" />
</InRegistration>

Response Information

Resource Description

CustomerResults object, which can either contain just the new guid inside the customer object or the entire full new customer

CustomerResults
NameDescriptionTypeAdditional information
Customer

Customer

None.

CustomerId

globally unique identifier

None.

PrivacySuccess

boolean

None.

Response Formats

application/json, text/json

Sample:
{
  "Customer": null,
  "CustomerId": "00000000-0000-0000-0000-000000000000",
  "PrivacySuccess": false
}

application/xml, text/xml

Sample:
<CustomerResults xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/OnlineOrderingAPI.Models.v1.Response">
  <Customer xmlns:d2p1="http://schemas.datacontract.org/2004/07/OnlineOrderingAPI.Models.v1" i:nil="true" />
  <CustomerId>00000000-0000-0000-0000-000000000000</CustomerId>
  <PrivacySuccess>false</PrivacySuccess>
</CustomerResults>