POST api/Account/UpdateUser

Update user profile information. You will only be allowed update your own profile

Exceptions

ExceptionCondition
ArgumentNullHttpResponseException

If you are missing required arguments, for example if you have forgotten to specify the AttributeName

ArgumentOutOfRangeHttpResponseException

If you for example specify a non-existing AttributeName

Remarks

Please note that the Updates parameter only support fields updates, any other options will result in an exception

Examples

The example below how to update the mobile phone


var arg = {
    TicketId : "71137607-4587-44C9-BE92-A699180E42C9",
    Updates : [{
        AttributeName : "MobilePhone",
        AttributeAction : 1
        AttributeType : 0,
        AttributeData : {
            FieldValue : "+4712345678"
        }
    }]


$.ajax({
    url: 'https://api.infocare.com/api/Account/UpdateUser',
    data: JSON.stringify(arg),
    type: "POST",
    contentType: "application/json;charset=utf-8"
})
.done (function (){
    //handle success here
})
.fail ( function (jqXHR, textStatus, err){
    //handle failure here
    console.log(jqXHR.status);
    console.log(jqXHR.responseText);
});

Request Information

URI Parameters

None.

Body Parameters

Update information about the user.

UpdateUserArgumentModel
NameDescriptionTypeAdditional information
Updates

Gets or sets a list of user updates

Collection of AttributeUpdateModel

None.

TicketId

Gets or sets the ticket id

string

None.

Culture

Gets or sets culture, if not specified we will use culture set on user.

string

None.

Request Formats

application/json, text/json

Sample:
{
  "Updates": [
    {
      "AttributeName": "sample string 1",
      "AttributeAction": 0,
      "AttributeType": 0,
      "AttributeTransaction": "sample string 2",
      "AttributeData": {}
    },
    {
      "AttributeName": "sample string 1",
      "AttributeAction": 0,
      "AttributeType": 0,
      "AttributeTransaction": "sample string 2",
      "AttributeData": {}
    }
  ],
  "TicketId": "sample string 1",
  "Culture": "sample string 2"
}

application/xml, text/xml

Sample:
<UpdateUserArgumentModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Rostov.Models">
  <Culture>sample string 2</Culture>
  <TicketId>sample string 1</TicketId>
  <Updates>
    <AttributeUpdateModel>
      <AttributeAction>Add</AttributeAction>
      <AttributeData />
      <AttributeName>sample string 1</AttributeName>
      <AttributeTransaction>sample string 2</AttributeTransaction>
      <AttributeType>Field</AttributeType>
    </AttributeUpdateModel>
    <AttributeUpdateModel>
      <AttributeAction>Add</AttributeAction>
      <AttributeData />
      <AttributeName>sample string 1</AttributeName>
      <AttributeTransaction>sample string 2</AttributeTransaction>
      <AttributeType>Field</AttributeType>
    </AttributeUpdateModel>
  </Updates>
</UpdateUserArgumentModel>

application/x-www-form-urlencoded

Sample:

Failed to generate the sample for media type 'application/x-www-form-urlencoded'. Cannot use formatter 'JQueryMvcFormUrlEncodedFormatter' to write type 'UpdateUserArgumentModel'.

Response Information

Resource Description

BaseReturnModel
NameDescriptionTypeAdditional information
CombinedPerformanceId

Gets or sets the performance id. If performance monitoring is not turned on this property will not be present or set to null

string

Json null value handling: Ignore

Response Formats

application/json, text/json

Sample:
{
  "CombinedPerformanceId": "sample string 1"
}

application/xml, text/xml

Sample:
<BaseReturnModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Rostov.Models">
  <CombinedPerformanceId>sample string 1</CombinedPerformanceId>
</BaseReturnModel>