Last Updated: May 05, 2016
Creating a new loyalty user
The API provides a way to create a new loyalty user.
Request
{ "UserName": "8576e0fd-e299-4bee-937f-14bfd0734e94", "AvailablePoints": 20.37076232692728, "StreetAddress1": "6b98811e-cc10-480b-b419-ecd61c1fe257", "StreetAddress2": "12eaf147-12b8-4a06-a63f-6ee2eb32efae", "City": "92c2920f-3d71-44df-a294-ac038661809b", "State": "b5ce9270-d460-466c-a455-57b335ab447f", "Zip": "118ab54b-b", "PhoneNumber": "bd89a826-d8ef-4b34-833d-33cb7ac1ce35", "EMailAddress": "5c0433ca-c757-451b-a16d-0b6b02ba77a8", "Gender": "Male", "DateOfBirth": "2013-08-16T12:23:02.4499918+03:00", "Password": "eb7a6d16-3839-4064-8927-4a3c935e9348", "Name": "acffa204-8ca7-4f38-8276-0ac91795e720", }
HTTP Method | Resource URI |
---|---|
POST | https://{tenantName}.api.xomni.com/private/pii/loyalty |
Request Body Description
Parameter Name | Description | Type | Conditions |
---|---|---|---|
UserName | User name of the loyalty user. | String |
Required
|
Id | The unique ID of the loyalty user. | Number | |
CreatedDate | Created date of the loyalty user. | Date | |
PIIUserTypeId | Assigned PII user type ID of the loyalty user. | Number | |
InitiatedSocialLikeCount | Total like count of the social posts shared by the loyalty user. | Number | |
AvailablePoints | Available points of the loyalty user. | Number | |
StreetAddress1 | Street address of the loyalty user. | String |
Max Length: 600
|
StreetAddress2 | Another street address of the loyalty user. | String |
Max Length: 600
|
City | City of the loyalty user. | String |
Max Length: 100
|
State | State of the loyalty user. | String |
Max Length: 100
|
Zip | Zip number of the loyalty user. | String |
Max Length: 20
|
PhoneNumber | Phone number of the loyalty user. | String |
Max Length: 50
|
EMailAddress | E-Mail address of the loyalty user. | String |
Max Length: 200
|
Gender | Gender of the loyalty user. | String |
Max Length: 20
|
DateOfBirth | Birthday date of the loyalty user. | Date | |
Password | Password of the loyalty user. | String | |
Name | Full name of the loyalty user. | String | |
PIIUserType | Assigned PII user type description of the loyalty user. | String |
Request Headers
Header Field Name | Description |
---|---|
Content-Type |
Content type of the response entity. The value of this header is always application/json.
|
Authorization |
Access or identity token taken from oauth APIs.
Sample: Bearer dc8f1dcdbe454da8a25621839a93569337522968019e4bd7becd6e01285444da
|
Accept |
Includes minor version header.
Sample: application/vnd.xomni.api-v4-1, */*
|
Response
{ "UserName": "8576e0fd-e299-4bee-937f-14bfd0734e94", "Id": 3, "CreatedDate": "2013-08-16T12:23:02.4499918+03:00", "PIIUserTypeId": 2, "AvailablePoints": 20.37076232692728, "StreetAddress1": "6b98811e-cc10-480b-b419-ecd61c1fe257", "StreetAddress2": "12eaf147-12b8-4a06-a63f-6ee2eb32efae", "City": "92c2920f-3d71-44df-a294-ac038661809b", "State": "b5ce9270-d460-466c-a455-57b335ab447f", "Zip": "118ab54b-b", "PhoneNumber": "bd89a826-d8ef-4b34-833d-33cb7ac1ce35", "EMailAddress": "5c0433ca-c757-451b-a16d-0b6b02ba77a8", "Gender": "Male", "DateOfBirth": "2013-08-16T12:23:02.4499918+03:00", "Password": "eb7a6d16-3839-4064-8927-4a3c935e9348", "Name": "acffa204-8ca7-4f38-8276-0ac91795e720", "PIIUserType": "Loyalty", "InitiatedSocialLikeCount":0 }
Response Body Description
Parameter Name | Description | Type |
---|---|---|
UserName | User name of the loyalty user. | String |
Id | The unique ID of the loyalty user. | Number |
CreatedDate | Created date of the loyalty user. | Date |
PIIUserTypeId | Assigned PII user type ID of the loyalty user. | Number |
InitiatedSocialLikeCount | Total like count of the social posts shared by the loyalty user. | Number |
AvailablePoints | Available points of the loyalty user. | Number |
StreetAddress1 | Street address of the loyalty user. | String |
StreetAddress2 | Another street address of the loyalty user. | String |
City | City of the loyalty user. | String |
State | State of the loyalty user. | String |
Zip | Zip number of the loyalty user. | String |
PhoneNumber | Phone number of the loyalty user. | String |
EMailAddress | E-Mail address of the loyalty user. | String |
Gender | Gender of the loyalty user. | String |
DateOfBirth | Birthday date of the loyalty user. | Date |
Password | Password of the loyalty user. | String |
Name | Full name of the loyalty user. | String |
PIIUserType | Assigned PII user type description of the loyalty user. | String |
Response Headers
Header Field Name | Description |
---|---|
Content-Type |
Content type of the response entity. The value of this header is always application/json.
|
Status Codes
A successful operation returns status code 200 (OK) for POST operations. Possible response status codes are as listed below:
Status Code | Description |
---|---|
409 (Conflict) | Given loyalty user already exists. |