12. TrakIT API‎ > ‎User‎ > ‎

Update User Location

The below API is used to update user profile


Request: POST

Signature: /api/mobile/UpdateLocation?Token={Login_Token}

Body:

{
"UserID":"USER_ID",
"Field":
[
{
"Code":"FIELD_CODE",
"Value":"FIELD_VALUE"
}
],
"Data":
[
{
"Code":"DATA_FIELD_CODE",
"Value":"DATA_FIELD_VALUE"
}
]
}


Sample: /api/mobile/UpdateUserData?Token=VomYEMiECFFyAQ3==


Body: 

{
"UserID":"TOM",
"Field":
[
{
"Code":"EMAIL",
"Value":"tom@gmail.com"
},
        {
"Code":"ENABLESMS",
"Value":"false
},
        {
"Code":"MOBILETRACKING",
"Value":120
}
],
"Data":
[
{
"Code":"ADDR",
"Value":"12 XYZ, Kenya"
}
]
}


Response:

{
    "Code": 1,
    "Info": "User data updated successfully",
    "RowsAffected": 1,
    "Scalar": null,
    "Identity": 0,
    "RetInfo": null
}

Things to know about this API:

  1. Token - You can use Login API to get token displayed under Info

  2. These fields are mandatory while sending request body:

    • User ID
    • Code
    • Value

  3. Below are the User Header Fields and their Code:

    Header Field  Code DataType
    First Name FIRSTNAME Text
    Last Name LASTNAME Text
    Email Address EMAIL Text
    Mobile Number MOBILE Text
    Two Factor Authentication TWOFACTORAUTH Text (You can use Get User API to get the list displayed under ListValues where Code is TWOFACTORAUTH)
    SMS Updates ENABLESMS Boolean (true / false)
    Mobile Tracking MOBILETRACKING Numeric (0 to 720)
    Office OFFICE Text (You can use Get User API to get Office list displayed under ListValues where Code is OFFICE )
    News Update NEWSUPDATE Boolean (true / false)

  4. Data value for Item list must be separated with semi colon (;)
Comments