POST api/Account/DeleteUser

Deletes yourself as a user. You will be automatically logged out as well. This method will only be available for external users, if any other user tries to call method you will get an error response.

Exceptions

ExceptionCondition
HttpResponseException

Will throw HTTP status code 401 if we cannot logon or if you are not an external user.

Examples

Delete current user


var arg = {
    TicketId : "71137607-4587-44C9-BE92-A699180E42C9",
}
$.ajax({
    url: 'https://api.infocare.com/api/Account/DeleteUser',
    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

Ticket identifying the user to be deleted

BaseArgumentModel
NameDescriptionTypeAdditional information
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:
{
  "TicketId": "sample string 1",
  "Culture": "sample string 2"
}

application/xml, text/xml

Sample:
<BaseArgumentModel 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>
</BaseArgumentModel>

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 'BaseArgumentModel'.

Response Information

Resource Description

None.