online-help.platform.features.premier_subscription.connectors.inbound-rest-api.endpoints.user.title
Edit User
Overview
Updating a User info in MobiWork
URL Format
https://{domain}.mobiwork/api/rest/{clientId}/{versionNumber}/user/{reqUserId}/edit.html?token=XXXXXXXX&userId={userId}
Arguments
clientId
required
MobiWork assigned unique ID of the company
versionNumber
required
Version number of MobiWork API SDK release. Current version is: 10.0.78
token
required
Part of URL as a request parameter and is required in every call to verify access to API calls
reqUserId
required
The identifier of the user to be updated
userId
optional
If provided, this User ID will be taken as a logged in user. If not provided we use an active global administrator ID
Return
Returns a User Object if user update is successful or errors will be returned
Request Body XSD
Response Body XSD
Curl Example
HTTP Method: POST
Request: curl -k -X POST -H "https://www.mobiwork.com/api/rest/12014/10.0.78/user/2975/edit.html?token=COJL8X2FKSLMMRTYCH2B" -data '<request>
<user>
<mobiworkUserId>2975</mobiworkUserId>
<externalId>TEST2975</externalId>
<email>jsmith@mobiwork.com</email>
<loginId>jsmith</loginId>
<firstName>John</firstName>
<lastName>Smith</lastName>
<phoneNumber>5619015198</phoneNumber>
<altPhoneNumber>5619218621</altPhoneNumber>
<faxNumber></faxNumber>
<status>ACTIVE</status>
<jobTitle></jobTitle>
<reportsToName></reportsToName>
<userRole>ROLE_CLIENT_ADMIN</userRole>
<address>
<addressId>96198</addressId>
<address1>160 Congress Park Drive</address1>
<address2></address2>
<city>Delray Beach</city>
<state>Florida</state>
<zipCode>33445</zipCode>
<countryId>1</countryId>
<latitude>26.458049</latitude>
<longitude>-80.094237</longitude>
<name></name>
</address>
<customFields>
<customField>
<fieldType>6</fieldType>
<apiName>EmployeeLevel</apiName>
<value>4</value>
<name>Employee Level</name>
</customField>
</customFields>
</user>
</request>'
Response: <?xml version="1.0" encoding="UTF-8" ?>
<response version="10.0.78" statusCode="1">
<user>
<mobiworkUserId>2975</mobiworkUserId>
<externalId>TEST2975</externalId>
<email>jsmith@mobiwork.com</email>
<loginId>jsmith</loginId>
<firstName>John</firstName>
<lastName>Smith</lastName>
<phoneNumber>5619015198</phoneNumber>
<altPhoneNumber>5619218621</altPhoneNumber>
<faxNumber>null</faxNumber>
<status>ACTIVE</status>
<jobTitle></jobTitle>
<reportsToName></reportsToName>
<userRole>ROLE_CLIENT_ADMIN</userRole>
<address>
<addressId>818643</addressId>
<address1>160 Congress Park Drive</address1>
<address2></address2>
<city>Delray Beach</city>
<state>Florida</state>
<zipCode></zipCode>
<countryId>0</countryId>
<latitude>26.4582132</latitude>
<longitude>-80.0940502</longitude>
<name></name>
<baseDistance>9022407</baseDistance>
</address>
<customFields>
<customField>
<fieldType>6</fieldType>
<apiName>EmployeeLevel</apiName>
<index>0</index>
<value>4</value>
<name>Employee Level</name>
</customField>
</customFields>
</user>
</response>