Aurora API: Customer

This group of methods allows you to manage customer accounts, details and addresses. If you want to delete an address, you must see the Aurora API: Address section.

Add

Deferred: No

This method accepts new user credentials and a full set of details including customer addresses. If all data is found to be valid and the email address is not already taken, then the customer user record will be created and all new ID's returned.

Example Request:

 <AuroraRequestEnvelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
     <Header>
         <AuthToken>...</AuthToken>
     </Header>
     <Requests>
         <Request>
             <Customer>
                 <Add>
                     <RequestID>1</RequestID>
                     <EmailAddress>[email protected]</EmailAddress>
                     <Title>Mr</Title>
                     <FirstName>...</FirstName>
                     <LastName>...</LastName>
                     <Password>password</Password>
                     <CompanyName>...</CompanyName>
                     <DOB>1971-01-01</DOB>
                     <Addresses>
                         <Address>
                             <StorageType>I</StorageType>
                             <AddressType>BT</AddressType>
                             <EmailAddress>[email protected]</EmailAddress>
                             <OptOut>1</OptOut>
                             <Gender>male</Gender>
                             <CompanyName>...</CompanyName>
                             <Title>Mr</Title>
                             <FirstName>...</FirstName>
                             <LastName>...</LastName>
                             <AddressLine1>...</AddressLine1>
                             <AddressLine2>...</AddressLine2>
                             <Town>...</Town>
                             <County>...</County>
                             <PostCode>...</PostCode>
                             <Country>United Kingdom</Country>
                         </Address>
                         <Address>
                             <StorageType>I</StorageType>
                             <AddressType>ST</AddressType>
                             <EmailAddress>[email protected]</EmailAddress>
                             <OptOut>1</OptOut>
                             <Gender>male</Gender>
                             <CompanyName>...</CompanyName>
                             <Title>Mr</Title>
                             <FirstName>...</FirstName>
                             <LastName>...</LastName>
                             <AddressLine1>...</AddressLine1>
                             <AddressLine2>...</AddressLine2>
                             <Town>...</Town>
                             <County>...</County>
                             <PostCode>...</PostCode>
                             <Country>United Kingdom</Country>
                         </Address>
                     </Addresses>
                     <Active>1</Active>
                 </Add>
             </Customer>
         </Request>
     </Requests>
 </AuroraRequestEnvelope>

Example response:

 <AuroraResponseEnvolope>
     <Header>
         <Summary>
             <Ack>OK</Ack>
             <RequestsProcessed>1</RequestsProcessed>
             <RequestsSucceeded>1</RequestsSucceeded>
             <RequestErrors>0</RequestErrors>
         </Summary>
     </Header>
     <Responses>
         <Response>
             <RequestID>1</RequestID>
             <Ack>OK</Ack><Data>
                 <CustomerID>12345</CustomerID>
                 <Addresses>
                     <Address>
                         <AddressID>123456</AddressID>
                         <AddressType>BT</AddressType>
                     </Address>
                     <Address>
                         <AddressID>123457</AddressID>
                        <AddressType>ST</AddressType>
                     </Address>
                  </Addresses>
             </Data>
         </Response>
     </Responses>
</AuroraResponseEnvolope>

Update

Deferred: No

This method accepts user credentials or an ID and a full set of details including customer addresses. If all data is found to be valid and the email address is not already taken, then the customer user record will be updated and all affected ID's returned.

Example Request:

 <AuroraRequestEnvelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
     <Header>
         <AuthToken>...</AuthToken>
     </Header>
     <Requests>
         <Request>
             <Customer>
                 <Update>
                     <RequestID>1</RequestID>
                     <CustomerID>12345</CustomerID>
                     <EmailAddress>[email protected]</EmailAddress>
                     <Title>Mr</Title>
                     <FirstName>...</FirstName>
                     <LastName>...</LastName>
                     <Password>password</Password>
                     <CompanyName>...</CompanyName>
                     <DOB>1971-01-01</DOB>
                     <Addresses>
                         <Address>
                             <AddressID>123456</AddressID>
                             <EmailAddress>[email protected]</EmailAddress>
                             <OptOut>1</OptOut>
                             <Gender>male</Gender>
                             <CompanyName>...</CompanyName>
                             <Title>Mr</Title>
                             <FirstName>...</FirstName>
                             <LastName>...</LastName>
                             <AddressLine1>...</AddressLine1>
                             <AddressLine2>...</AddressLine2>
                             <Town>...</Town>
                             <County>...</County>
                             <PostCode>...</PostCode>
                             <Country>United Kingdom</Country>
                         </Address>
                     </Addresses>
                 </Update>
             </Customer>
         </Request>
     </Requests>
 </AuroraRequestEnvelope>

Example Response:

 <AuroraResponseEnvolope>
     <Header>
         <Summary>
             <Ack>OK</Ack>
             <RequestsProcessed>1</RequestsProcessed>
             <RequestsSucceeded>1</RequestsSucceeded>
             <RequestErrors>0</RequestErrors>
         </Summary>
     </Header>
     <Responses>
         <Response>
             <RequestID>1</RequestID>
             <Ack>OK</Ack><Data>
                 <CustomerID>12345</CustomerID>
                 <Addresses>
                     <Address>
                         <AddressID>123456</AddressID>
                         <AddressType>BT</AddressType>
                     </Address>
                  </Addresses>
             </Data>
         </Response>
     </Responses>
</AuroraResponseEnvolope>

Get

Deferred: No

Customers returned by this call are currently returned in no particular order. This may change, but no such plans are currently in place.

Example Request:

<?xml version="1.0" encoding="utf-8"?>
<AuroraRequestEnvelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <Header>
        <AuthToken>...</AuthToken>
    </Header>
    <Requests>
        <Request>
            <Customer>
                <Get>
                    <RequestID>1</RequestID>
                    <CustomerIDs>
                        <CustomerID>12345</CustomerID>
                    </CustomerIDs>
                    <Limit>1</Limit>
                    <Paging>
                        <Limit>20</Limit>
                    </Paging>
                </Get>
            </Customer>
        </Request>
    </Requests>
</AuroraRequestEnvelope>

Example Response:

<AuroraResponseEnvolope>
    <Header>
        <Summary>
            <Ack>OK</Ack>
            <RequestsProcessed>1</RequestsProcessed>
            <RequestsSucceeded>1</RequestsSucceeded>
            <RequestErrors>0</RequestErrors>
        </Summary>
    </Header>
    <Responses>
         <Response>
             <RequestID>1</RequestID>
             <Ack>OK</Ack>
             <Data>
                 <Customer>
                     <RequestID>1</RequestID>
                     <CustomerID>12345</CustomerID>
                     <EmailAddress>[email protected]</EmailAddress>
                     <Title>Mr</Title>
                     <FirstName>...</FirstName>
                     <LastName>...</LastName>
                     <CompanyName>...</CompanyName>
                     <DOB>1971-01-01</DOB>
                     <Addresses>
                         <Address>
                             <AddressID>123456</AddressID>
                             <StorageType>I</StorageType>
                             <AddressType>BT</AddressType>
                             <EmailAddress>[email protected]</EmailAddress>
                             <OptOut>1</OptOut>
                             <Gender>male</Gender>
                             <CompanyName>...</CompanyName>
                             <Title>Mr</Title>    
                             <FirstName>...</FirstName>
                             <LastName>...</LastName>
                             <AddressLine1>...</AddressLine1>
                             <AddressLine2>...</AddressLine2>
                             <Town>...</Town>
                             <County>...</County>
                             <PostCode>...</PostCode>
                             <Country>United Kingdom</Country>
                         </Address>
                         <Address>
                             <AddressID>123457</AddressID>
                             <StorageType>I</StorageType>
                             <AddressType>ST</AddressType>
                             <EmailAddress>[email protected]</EmailAddress>
                             <OptOut>1</OptOut>
                             <Gender>male</Gender>
                             <CompanyName>...</CompanyName>
                             <Title>Mr</Title>
                             <FirstName>...</FirstName>
                             <LastName>...</LastName>
                             <AddressLine1>...</AddressLine1>
                             <AddressLine2>...</AddressLine2>
                             <Town>...</Town>
                             <County>...</County>
                             <PostCode>...</PostCode>
                             <Country>United Kingdom</Country>
                         </Address>
                     </Addresses>
                     <LoyaltyPoints>100</LoyaltyPoints>
                     <LoyaltyPointsUsed>100</LoyaltyPointsUsed>
                     <DateCreated>2004-02-12T15:19:21+00:00</DateCreated>
                     <DateModified>2005-02-12T15:19:21+00:00</DateModified>
                 </Customer>
            </Data>
        </Response>
    </Responses>
</AuroraResponseEnvolope>

Request Fields

Only if 'FraudResult' is provided

FieldValuesAPI VersionDescriptionRequired
IntervalString interval1.0+Used to select date/time range from now into the past.

P indicates the period (required)

nY indicates the number of years

nM indicates the number of months

nD indicates the number of days

T indicates the start of a time section (required if you are going to specify hours, minutes, or seconds)

nH indicates the number of hours

nM indicates the number of minutes

nS indicates the number of seconds
Only one of 'Interval' or 'DateStart' is permitted
Interval:offsetString interval1.5+Format as per "Interval" field. Used to provide a time offset for the "Interval" to end at, rather than now (the current time). The default offset is 10 seconds ( "PT10S" ) to reduce the chance of exporting orders while post purchase updates are being made.No
Interval:date[created|modified|both]1.5+This attribute to the Interval tag allows you to specify which date should be used when performing this check. By default, both the Date the Customer was Created and last Modified are checked, but either one can be specified here is desired. When "both" is specified only one of the date fields needs to match the specified interval.No
DateStartyyyy-mm-dd1.0+Only one of 'Interval' or 'DateStart' is permitted
DateStart:date[created|modified|both]1.5+This attribute to the DateStart tag allows you to specify which date should be used when performing this check. By default, both the Date the Customer was Created and last Modified are checked, but either one can be specified here is desired. When "both" is specified only one of the dates needs to match the specified interval.No
DateEndyyyy-mm-dd1.0+No
DateEnd:date[created|modified|both]1.5+This attribute to the DateStart tag allows you to specify which date should be used when performing this check. By default, both the Date the Customer was Created and last Modified are checked, but either one can be specified here is desired. When "both" is specified only one of the dates needs to match the specified interval.No
CustomerIDsContainer1.0+No
CustomerIDs.CustomerIDInteger1.0+The Internal ID Aurora uses to identify Users or Customers of the site.No

Cannot be used in conjunction with EmailAddress
EmailAddressString1.0+The email address of the User or Customer being sought.No

Cannot be used in conjunction with CustomerIDs
PhoneNumberString1.5+Phone number of the User being sought.No
LimitInteger > 01.0+The number of products to return before beginning to pageNo
PagingContainer1.0+No
Paging.TokenString1.2+This is the Token string issued from any previous OrderGet call featuring paging. Providing this will have the API collect the data from the previously generated set of data, ensuring accurate and consistent dataset results for every page. You cannot change the request properties previously provided when using a Token, so these are ignored by the API.No
Paging.LimitInteger > 01.0+The number of results to return in the page being requestedNo
Paging.PageInteger > 01.0+The page number to return the results forOnly if 'Token' is provided

Response fields

FieldValuesAPI VersionDescription
CustomerIDInteger > 01.0+The Internal ID Aurora uses to identify a Product.
EmailAddressString1.0+
TitleString1.0+e.g. Mr, Mrs, Ms, Dr, etc
FirstNameString1.0+
LastNameString1.0+
CompanyNameString1.0+
DOByyyy-mm-dd1.0+
AddressesContainer1.0+This contains all of the addresses pertaining to an order. This will normally include a billing and a shipping address.
Addresses.AddressContainer1.0+This contains all of the fields pertaining to an individual address.
Addresses.Address.CustomerIDInteger1.0+The Internal ID Aurora uses to identify Users or Customers of the site.
Addresses.Address.StorageTypeI or U1.0+This describes whether an address is an Order Address or a User/Customer Address. User/Customer addresses are addresses that have been saved to a Customers account for convenience and can be removed by the customer while Order Addresses are assigned specifically to Orders made and cannot be removed.
Addresses.Address.AddressTypeBT or ST1.0+Describes whether an address is for Billing (BT) or Shipping (ST).
Addresses.Address.EmailAddressString1.0+
Addresses.Address.OptOut1 or 01.0+Is used by some mailing and reporting systems to control whether or not the address is used in mail-shots and marketing campaigns.
Addresses.Address.Gendermale or female1.0+
Addresses.Address.CompanyNameString1.0+
Addresses.Address.TitleRestricted String1.0+The is the User/Customer title, e.g. Mr, Mrs, etc.

To find out what values are permitted here, please refer to the API's XSD file, which can be found on your API URL as http://api_url/api_version/aurora.xsd
Addresses.Address.FirstNameString1.0+
Addresses.Address.LastNameString1.0+
Addresses.Address.AddressLine1String1.0+
Addresses.Address.AddressLine2String1.0+
Addresses.Address.TownString1.0+
Addresses.Address.CountyString1.0+
Addresses.Address.PostCodeString1.0+
Addresses.Address.CountryRestricted String1.0+To find out what values are permitted here, please refer to the API's XSD file, which can be found on your API URL as http://api_url/api_version/aurora.xsd
Addresses.Address.PhoneNumberString1.0+
Addresses.Address.MobileNumberString1.0+
LoyaltyPointsInteger1.0+The number of Loyalty Points the customer currently has.
LoyaltyPointsUsedInteger1.0+The number of Loyalty Points the customer has used to date.
DateCreatedISO 8601 date1.0+The date and time that the customer account was created in ISO 8601 date format, e.g. 2004-02-12T15:19:21+00:00
DateModifiedISO 8601 date1.5+The date and time that the customer account was last changed/edited in ISO 8601 date format, e.g. 2005-02-12T15:19:21+00:00

Auth

Deferred: No

This method accepts a user email address and password and authenticates this against Aurora's customer database. If they are valid, then the matching Customer ID is returned, otherwise an error message is returned.

Example Request:

 <AuroraRequestEnvelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
     <Header>
         <AuthToken>,,,</AuthToken>
     </Header>
     <Requests>
         <Request>
             <Customer>
                 <Auth>
                     <RequestID>1</RequestID>
                     <EmailAddress>...</EmailAddress>
                     <Password>...</Password>
                     <Services>
                         <Service>AutoLogin</Service>
                         <Service>GetCustomer</Service>
                         <Service>UpdateCustomer</Service>
                     </Services>
                 </Auth>
             </Customer>
         </Request>
     </Requests>
 </AuroraRequestEnvelope>

Example Response:

 <AuroraResponseEnvolope>
     <Header>
         <Summary>
             <Ack>OK</Ack>
             <RequestsProcessed>1</RequestsProcessed>
             <RequestsSucceeded>1</RequestsSucceeded>
             <RequestErrors>0</RequestErrors>
         </Summary>
     </Header>
     <Responses>
         <Response>
             <RequestID>1</RequestID>
             <Ack>OK</Ack>
             <Data>
                 <Customer>
                     <CustomerID>...</CustomerID>
                     <Auth>
                         <Session>
                             <CustomerAuthToken>eyJ0eXAiKV1QiL=.eyJ1aWQiOiIyMdpblwiXSJ9.ZTODYxM2EyZWI4jMzE0MQ==</CustomerAuthToken>
                             <Expires>2020-02-02T12:34:56</Expires>
                         </Session>
                     </Auth>
                 </Customer>
             </Data>
         </Response>
     </Responses>
</AuroraResponseEnvolope>

Request Fields

FieldValuesAPI VersionDescriptionRequired
EmailAddressString1.0+The email address of the user to authenticate.Yes
PasswordString1.0+The password of the user to authenticate.Yes
ServicesContainer1.5+A list of services to tag the customer auth token to.No
Services.Service AutoLogin
GetCustomer
* UpdateCustomer
1.5+The service name.No

Response fields

FieldValuesAPI VersionDescription
CustomerIDInteger > 01.0+The Internal ID Aurora uses to identify a customer.
AuthContainer1.5+
Auth.SessionContainer1.5+Details of the authentication session.
Auth.Session.CustomerAuthTokenString1.5+The customer auth token generated by the authentication session.

This can be used with Auto-Login Endpoint and will be applied to other API services going forward such as the CustomerGet and CustomerUpdate services.
Auth.Session.ExpiresDate and Time

in ISO-8601 format
1.5+The time when the customer auth token expires.