POST api/v1/Users/{id}/UserContactItems

Adds a Contact Information to an existing User. Returns Success/Error code plus primary key of ContactInfo entry made.

Request Information

URI Parameters

NameDescriptionTypeAdditional information
id

string

None.

Body Parameters

AddUserContactItemViewModel
NameDescriptionTypeAdditional information
UserId

Required: The PK of the existing User that you want to add the Contact Item to.

globally unique identifier

None.

ContactSubType

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.

Request Formats

application/json, text/json

Sample:
{
  "UserId": "bf6f105c-5be2-4ee9-8a8a-65c6bfafd30d",
  "ContactSubType": "91a6fc9e-de7b-4ac7-b435-972753a5de93",
  "Value": "sample string 3",
  "IsDefault": true
}

application/xml, text/xml

Sample:
<AddUserContactItemViewModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/APIWebRole.Controllers">
  <ContactSubType>91a6fc9e-de7b-4ac7-b435-972753a5de93</ContactSubType>
  <IsDefault>true</IsDefault>
  <UserId>bf6f105c-5be2-4ee9-8a8a-65c6bfafd30d</UserId>
  <Value>sample string 3</Value>
</AddUserContactItemViewModel>

application/x-www-form-urlencoded

Sample:

Sample not available.

Response Information

Resource Description

ResultWithGuid
NameDescriptionTypeAdditional information
Value

Represents the PK value that was created as a result of an add

globally unique identifier

None.

ResultCode

Represents the result code

integer

None.

Description

Represents a description of the result code

string

None.

Response Formats

application/json, text/json

Sample:
{
  "Value": "5d629c94-c707-4d77-b763-4d2ea67b4534",
  "ResultCode": 2,
  "Description": "sample string 3"
}

application/xml, text/xml

Sample:
<ResultWithGuid xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/APIWebRole.Controllers">
  <Description>sample string 3</Description>
  <HttpStatusCode>Continue</HttpStatusCode>
  <ResultCode>2</ResultCode>
  <Value>5d629c94-c707-4d77-b763-4d2ea67b4534</Value>
</ResultWithGuid>