POST v1/Customers/{customerId}/AlternateAccount

Merge social account to existing customer

URI template

v1/Customers/{customerId}/AlternateAccount

Request Information

URI Parameters

NameDescriptionTypeAdditional information
customerId

globally unique identifier

Required

Body Parameters

InTypeAccount object which should contain token, account type Facebook, Google, Twitter and Apple Value for token will be the screen_name if type is twitter Value for token is JWT if type is apple Email is only required if type is twitter FirstName and lastname are only required if type is apple

InTypeAccount
NameDescriptionTypeAdditional information
Token

If type is twitter, this will be the screen_name. If type is apple, expected value is JWT token. Otherwise value will be token for all other types.

string

Required

IdType

Type of the Alternate account (Facebook, Google, Twitter and Apple)

InAlternateIdType

Required

Email

This is only required if type is twitter

string

None.

FirstName

This is required upon creation of apple type account

string

None.

LastName

This is required upon creation of apple type account

string

None.

AddLoyalty

If this is set to false, loyalty will not be automatically added on account creation. Defaults to true

boolean

None.

Channel

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

string

None.

Request Formats

application/json, text/json

Sample:
{
  "Token": "sample string 1",
  "IdType": 1,
  "Email": "sample string 2",
  "FirstName": "sample string 3",
  "LastName": "sample string 4",
  "AddLoyalty": true,
  "Channel": "sample string 6"
}

application/xml, text/xml

Sample:
<InTypeAccount xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/OnlineOrderingAPI.Inbound">
  <AddLoyalty>true</AddLoyalty>
  <Channel>sample string 6</Channel>
  <Email>sample string 2</Email>
  <FirstName>sample string 3</FirstName>
  <IdType>Facebook</IdType>
  <LastName>sample string 4</LastName>
  <Token>sample string 1</Token>
</InTypeAccount>

Response Information

Resource Description

HttpStatus code is OK and known internal errors are BadRequest, InternalServerError

Customer
NameDescriptionTypeAdditional information
CustomerId

Nullable The unique identifier for a customer. PUT - CustomerId will be ignored

globally unique identifier

None.

EMail

The customer's email address

string

Required

Max length: 256

FirstName

The customer's first name

string

Required

Max length: 100

LastName

The customer's last name

string

Required

Max length: 100

BusinessName

The customer's business name

string

Max length: 100

VoicePhone

The customer's primary phone number. Is considered a valid number as defined by the Company's culture settings.

string

Max length: 30

VoicePhoneExtension

The customer's primary phone number extension

string

Max length: 4

DepartmentName

The customer's department name

string

Max length: 100

AltPhone

The customer's second phone number

string

Max length: 30

AltPhoneExtension

The customer's second phone number's extension

string

Max length: 4

FavoriteSiteId

DEPRECATED:The site id that the customer likes the most

integer

None.

FavoriteSiteIds

List of favorite sites that the customer likes the most

Collection of integer

None.

LoyaltyCardNumber

The customer's loyalty number. Failure to provide a LoyaltyCardNumber will remove a customer's account binding to a loyalty account.

string

Max length: 50

SecondaryEmailAddress

The customer's second email address

string

Max length: 256

Addresses

A collection of addresses for this customer

Collection of CustomerAddress

Required

Birthday

Get or set the Birthday property

date

None.

LoyaltyZipCode

Get or set the LoyaltyZipCode property

string

Max length: 10

AlternateAccounts

Get or set the AlternateAccounts property

Collection of AlternateAccount

None.

EmailVerificationStatus

Get or set the EmailVerficationStatus property which determines whether the customer's email address has been verfied

EmailVerificationStatus

None.

AuthenticationMethod

Represents the customer's chosen method of authentication. Default is TwoFactorAuthDisabled

AuthenticationMethod

None.

DataSharingOptOutDate

Get or set DataSharingOptOutDate property

string

None.

OrderStatusPushNotificationEnabled

Represent the customer's preference on receiving order status push notification. Default is true.

boolean

None.

HasRegisteredNOLOAccount

Indicates whether the customer has a registered NOLO account. Default is false.

boolean

None.

PromotionNotificationEnabled

Represent the customer's preference on receiving promotion email notification

boolean

None.

LoyaltyConsent

Represent the customer's preference on using loyalty or not

boolean

None.

StoredValueCardNumber

Represents customer's Stored Value Card Number.

string

Max length: 50

ClutchLoyaltyCardNumber

Represents customer's Clutch Loyalty Card Number.

string

Max length: 256

StoredValueResponse

Get or Set StoredValueCard Response

StoredValueApiResponse

None.

Response Formats

application/json, text/json

Sample:
{
  "CustomerId": null,
  "EMail": null,
  "FirstName": null,
  "LastName": null,
  "BusinessName": null,
  "VoicePhone": null,
  "VoicePhoneExtension": null,
  "DepartmentName": null,
  "AltPhone": null,
  "AltPhoneExtension": null,
  "FavoriteSiteId": null,
  "FavoriteSiteIds": null,
  "LoyaltyCardNumber": null,
  "SecondaryEmailAddress": null,
  "Addresses": [],
  "Birthday": null,
  "LoyaltyZipCode": null,
  "AlternateAccounts": [],
  "EmailVerificationStatus": null,
  "AuthenticationMethod": 0,
  "DataSharingOptOutDate": null,
  "OrderStatusPushNotificationEnabled": null,
  "HasRegisteredNOLOAccount": null,
  "PromotionNotificationEnabled": null,
  "LoyaltyConsent": false,
  "StoredValueCardNumber": null,
  "ClutchLoyaltyCardNumber": null,
  "StoredValueResponse": null
}

application/xml, text/xml

Sample:
<Customer xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/OnlineOrderingAPI.Models.v1">
  <Addresses />
  <AltPhone i:nil="true" />
  <AltPhoneExtension i:nil="true" />
  <AlternateAccounts />
  <AuthenticationMethod>TwoFactorAuthDisabled</AuthenticationMethod>
  <Birthday i:nil="true" />
  <BusinessName i:nil="true" />
  <ClutchLoyaltyCardNumber i:nil="true" />
  <CustomerId i:nil="true" />
  <DataSharingOptOutDate i:nil="true" />
  <DepartmentName i:nil="true" />
  <EMail i:nil="true" />
  <EmailVerificationStatus i:nil="true" />
  <FavoriteSiteId i:nil="true" />
  <FavoriteSiteIds xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays" i:nil="true" />
  <FirstName i:nil="true" />
  <HasRegisteredNOLOAccount i:nil="true" />
  <LastName i:nil="true" />
  <LoyaltyCardNumber i:nil="true" />
  <LoyaltyConsent>false</LoyaltyConsent>
  <LoyaltyZipCode i:nil="true" />
  <OrderStatusPushNotificationEnabled i:nil="true" />
  <PromotionNotificationEnabled i:nil="true" />
  <SecondaryEmailAddress i:nil="true" />
  <StoredValueCardNumber i:nil="true" />
  <StoredValueResponse i:nil="true" />
  <VoicePhone i:nil="true" />
  <VoicePhoneExtension i:nil="true" />
</Customer>