PUT api/v2/Users/{id}/UserContactItem

Upserts a Contact Information to an existing User. Returns Success/Error along with the PK of the Contact Info The PK of the existing User that you want to upsert the Contact Item fromRequired: The Contact Info Item you want to upsert

Request Information

URI Parameters

NameDescriptionTypeAdditional information
id

globally unique identifier

Required

Body Parameters

UpsertContactItemViewModel
NameDescriptionTypeAdditional information
UserId

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

globally unique identifier

None.

ContactSubType

Required: The type of contact information being added or updated - 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": "36f0999a-b89d-4af9-86b5-f217cde86915",
  "ContactSubType": "c2e3389c-a8b8-4838-aa4c-8ff37214b059",
  "Value": "sample string 3",
  "IsDefault": true
}

application/xml, text/xml

Sample:
<UpsertContactItemViewModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/APIWebRole.Controllers">
  <ContactSubType>c2e3389c-a8b8-4838-aa4c-8ff37214b059</ContactSubType>
  <IsDefault>true</IsDefault>
  <UserId>36f0999a-b89d-4af9-86b5-f217cde86915</UserId>
  <Value>sample string 3</Value>
</UpsertContactItemViewModel>

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": "e4373046-cdb4-43f0-867e-49bad16a1b52",
  "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>e4373046-cdb4-43f0-867e-49bad16a1b52</Value>
</ResultWithGuid>