PUT v1/users({UserId})

Updates a User in a company

Information:

Base URL:

https://api.covasoft.net/usermanager

Use this request to update a user’s record.

Important: It is important to understand the behavior of PUT requests used to update user records.

A great many fields in the user record are optional when initially creating the record.These fields are naturally also optional in PUT requests, but the behavior in a PUT request is quite different.

In PUT requests, any fields CURRENTLY POPULATED in the user’s record MUST ALSO BE INCLUDED in the update request; otherwise, those fields are deleted from the user record.

In other words, omitting a currently populated field in a PUT request amounts to deleting that information from the user’s record.

At the same time, if you want to remove information for a specific field in a user record, you can do this using a PUT request that includes ALL the necessary information EXCEPT the field you want to delete.

Just be careful to include all information you want to retain in the record.

Note that you cannot disable a user by using a PUT request to set the IsActive property to false. If the IsActive property is included in a PUT request, it is ignored.

Example of a call would be:

https://api.covasoft.net/usermanager/v1/users({UserId})

Example of the Body of the Call:

{ "FirstName": "John", "LastName": "Bates", "UserName": "johnb@cova.com", "Address": { "AddressLine1": "1432 Merry View Road", "AddressLine2": "", "City": "Big Windy", "StateCode": "ON", "CountryCode": "CA", "Zip": "A1A2B2" }, "Picture": { "Id": "1fa5ae34-1578-44a0-9b21-b9be14559b9f", "Href": "https://ams.blob.core.windows.net/assets/1fa5ae34-1578-44a0-9b21-b9be14559b9f.jpg", "Height": 480, "Width": 640, "Md5Checksum": "d3fc6e526f00a56c9dacd503eff5fc93", "Name": "sample.jpg", "MimeType": "image/jpeg" }, "ClientUserId": "132", "CorrelationId": "Test", "Email": "johnb@cova.com", "JobTitle": "Sales Clerk", "ParentEntityId": {CompanyId}, "PhoneNumbers": [ { "Number": "6135550127", "Extension": "5532", "Type": "Work" } ], "Version": 1 }

Request Information

URI Parameters

NameDescriptionTypeAdditional information
UserId

The User Id you want to Update

integer

Required

Body Parameters

See example above

CreateNewUserPost
NameDescriptionTypeAdditional information
CorrelationId

string

None.

ClientUserId

string

None.

FirstName

string

None.

LastName

string

None.

UserName

string

None.

Email

string

None.

IsActive

boolean

None.

ParentEntityId

integer

None.

ParentEntityName

string

None.

Profiles

Collection of Object

None.

Picture

UserPicture

None.

Address

UserAddress

None.

PhoneNumbers

Collection of UserPhoneNumber

None.

JobTitle

string

None.

Attributes

UserAttributes

None.

Version

integer

None.

Request Formats

application/json, text/json

Sample:
{
  "CorrelationId": "sample string 1",
  "ClientUserId": "sample string 2",
  "FirstName": "sample string 3",
  "LastName": "sample string 4",
  "UserName": "sample string 5",
  "Email": "sample string 6",
  "IsActive": true,
  "ParentEntityId": 1,
  "ParentEntityName": "sample string 8",
  "Profiles": [
    {},
    {}
  ],
  "Picture": {
    "Id": "a8b123a6-a206-47a5-890a-2a1a290f5fdf",
    "Href": "http://webapihelppage2.com",
    "Height": 1.1,
    "Width": 1.1,
    "Md5Checksum": "sample string 3",
    "Name": "sample string 4",
    "MimeType": "sample string 5"
  },
  "Address": {
    "AddressLine1": "sample string 1",
    "AddressLine2": "sample string 2",
    "City": "sample string 3",
    "StateCode": "sample string 4",
    "CountryCode": "sample string 5",
    "Zip": "sample string 6"
  },
  "PhoneNumbers": [
    {
      "Number": "sample string 1",
      "Extension": "sample string 2",
      "Type": "sample string 3"
    },
    {
      "Number": "sample string 1",
      "Extension": "sample string 2",
      "Type": "sample string 3"
    }
  ],
  "JobTitle": "sample string 9",
  "Attributes": {
    "Department": "sample string 1",
    "BadgeId": 2
  },
  "Version": 1
}

Response Information

Resource Description

Returns the New User that was just Created

CreateNewUserReturn
NameDescriptionTypeAdditional information
Id

integer

None.

CorrelationId

string

None.

ClientUserId

string

None.

FirstName

string

None.

LastName

string

None.

UserName

string

None.

Email

string

None.

IsActive

boolean

None.

ParentEntityId

integer

None.

ParentEntityName

string

None.

Profiles

Collection of Object

None.

Picture

UserPicture

None.

Address

UserAddress

None.

PhoneNumbers

Collection of UserPhoneNumber

None.

JobTitle

string

None.

Attributes

UserAttributes

None.

Version

integer

None.

Response Formats

application/json, text/json

Sample:
{
  "Id": 1,
  "CorrelationId": "sample string 1",
  "ClientUserId": "sample string 2",
  "FirstName": "sample string 3",
  "LastName": "sample string 4",
  "UserName": "sample string 5",
  "Email": "sample string 6",
  "IsActive": true,
  "ParentEntityId": 1,
  "ParentEntityName": "sample string 8",
  "Profiles": [
    {},
    {}
  ],
  "Picture": {
    "Id": "4d585d64-cb07-4d6d-9853-86ffa777c0b0",
    "Href": "http://webapihelppage2.com",
    "Height": 1.1,
    "Width": 1.1,
    "Md5Checksum": "sample string 3",
    "Name": "sample string 4",
    "MimeType": "sample string 5"
  },
  "Address": {
    "AddressLine1": "sample string 1",
    "AddressLine2": "sample string 2",
    "City": "sample string 3",
    "StateCode": "sample string 4",
    "CountryCode": "sample string 5",
    "Zip": "sample string 6"
  },
  "PhoneNumbers": [
    {
      "Number": "sample string 1",
      "Extension": "sample string 2",
      "Type": "sample string 3"
    },
    {
      "Number": "sample string 1",
      "Extension": "sample string 2",
      "Type": "sample string 3"
    }
  ],
  "JobTitle": "sample string 9",
  "Attributes": {
    "Department": "sample string 1",
    "BadgeId": 2
  },
  "Version": 1
}