AddUserContactItem
Overview
Adds a Contact Information to an existing User. Returns Success/Error code plus primary key of ContactInfo entry made.
Request Information
Method
POST - api/Person/AddUserContactItem
URI Parameters
None.
Body Parameters
AddUserContactItemViewModel
| Name | Description | Type | Additional information |
|---|---|---|---|
| UserId |
Required: The PK of the existing User that you want to add the Contact Item to. |
globally unique identifier |
None. |
| ContactType |
Required: The type of contact information being added - Retrieve possible values from /ContactItem/GetAllTypes |
globally unique identifier |
None. |
| Value |
Required: Represents the Contact Item value - an email address, a phone number |
string |
None. |
| IsDefault |
Required: Specifies if the Contact Item is the default method of contact for that Contact Type (default email, default phone, etc.) |
boolean |
None. |
JSON
{
"UserId": "bf5c30e5-cf83-4272-a0b0-d6b606f5eaf6",
"ContactType": "f7dea725-1b55-4e4a-942a-7645b07e5e95",
"Value": "sample string 3",
"IsDefault": true
}
XML
<AddUserContactItemViewModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/BluSKYWebAPI.Controllers"> <ContactType>f7dea725-1b55-4e4a-942a-7645b07e5e95</ContactType> <IsDefault>true</IsDefault> <UserId>bf5c30e5-cf83-4272-a0b0-d6b606f5eaf6</UserId> <Value>sample string 3</Value> </AddUserContactItemViewModel>
Response Information
Resource Description
ResultWithGuid
| Name | Description | Type | Additional information |
|---|---|---|---|
| ResultCode |
Represents the result code |
integer |
None. |
| Description |
Represents a description of the result code |
string |
None. |
| Value |
Represents the PK value that was created as a result of an add |
globally unique identifier |
None. |
Response Formats
JSON
{
"ResultCode": 1,
"Description": "sample string 2",
"Value": "021c4356-fbf7-42f0-80f7-4436216dc111"
}
XML
<ResultWithGuid xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/BluSKYWebAPI.Controllers"> <Description>sample string 2</Description> <ResultCode>1</ResultCode> <Value>021c4356-fbf7-42f0-80f7-4436216dc111</Value> </ResultWithGuid>