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
Field | Values | API Version | Description | Required |
---|---|---|---|---|
Interval | String interval | 1.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:offset | String interval | 1.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 |
DateStart | yyyy-mm-dd | 1.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 |
DateEnd | yyyy-mm-dd | 1.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 |
CustomerIDs | Container | 1.0+ | No | |
CustomerIDs.CustomerID | Integer | 1.0+ | The Internal ID Aurora uses to identify Users or Customers of the site. | No Cannot be used in conjunction with EmailAddress |
EmailAddress | String | 1.0+ | The email address of the User or Customer being sought. | No Cannot be used in conjunction with CustomerIDs |
PhoneNumber | String | 1.5+ | Phone number of the User being sought. | No |
Limit | Integer > 0 | 1.0+ | The number of products to return before beginning to page | No |
Paging | Container | 1.0+ | No | |
Paging.Token | String | 1.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.Limit | Integer > 0 | 1.0+ | The number of results to return in the page being requested | No |
Paging.Page | Integer > 0 | 1.0+ | The page number to return the results for | Only if 'Token' is provided |
Response fields
Field | Values | API Version | Description |
---|---|---|---|
CustomerID | Integer > 0 | 1.0+ | The Internal ID Aurora uses to identify a Product. |
EmailAddress | String | 1.0+ | |
Title | String | 1.0+ | e.g. Mr, Mrs, Ms, Dr, etc |
FirstName | String | 1.0+ | |
LastName | String | 1.0+ | |
CompanyName | String | 1.0+ | |
DOB | yyyy-mm-dd | 1.0+ | |
Addresses | Container | 1.0+ | This contains all of the addresses pertaining to an order. This will normally include a billing and a shipping address. |
Addresses.Address | Container | 1.0+ | This contains all of the fields pertaining to an individual address. |
Addresses.Address.CustomerID | Integer | 1.0+ | The Internal ID Aurora uses to identify Users or Customers of the site. |
Addresses.Address.StorageType | I or U | 1.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.AddressType | BT or ST | 1.0+ | Describes whether an address is for Billing (BT) or Shipping (ST). |
Addresses.Address.EmailAddress | String | 1.0+ | |
Addresses.Address.OptOut | 1 or 0 | 1.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.Gender | male or female | 1.0+ | |
Addresses.Address.CompanyName | String | 1.0+ | |
Addresses.Address.Title | Restricted String | 1.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.FirstName | String | 1.0+ | |
Addresses.Address.LastName | String | 1.0+ | |
Addresses.Address.AddressLine1 | String | 1.0+ | |
Addresses.Address.AddressLine2 | String | 1.0+ | |
Addresses.Address.Town | String | 1.0+ | |
Addresses.Address.County | String | 1.0+ | |
Addresses.Address.PostCode | String | 1.0+ | |
Addresses.Address.Country | Restricted String | 1.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.PhoneNumber | String | 1.0+ | |
Addresses.Address.MobileNumber | String | 1.0+ | |
LoyaltyPoints | Integer | 1.0+ | The number of Loyalty Points the customer currently has. |
LoyaltyPointsUsed | Integer | 1.0+ | The number of Loyalty Points the customer has used to date. |
DateCreated | ISO 8601 date | 1.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 |
DateModified | ISO 8601 date | 1.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
Field | Values | API Version | Description | Required |
---|---|---|---|---|
EmailAddress | String | 1.0+ | The email address of the user to authenticate. | Yes |
Password | String | 1.0+ | The password of the user to authenticate. | Yes |
Services | Container | 1.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
Field | Values | API Version | Description |
---|---|---|---|
CustomerID | Integer > 0 | 1.0+ | The Internal ID Aurora uses to identify a customer. |
Auth | Container | 1.5+ | |
Auth.Session | Container | 1.5+ | Details of the authentication session. |
Auth.Session.CustomerAuthToken | String | 1.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.Expires | Date and Time in ISO-8601 format | 1.5+ | The time when the customer auth token expires. |
Updated over 2 years ago