TrakIT API‎ > ‎User‎ > ‎

Get User

The below API is used to get user detail from User Management.


Request: GET

Signature:
 /api/mobile/GetUser?Token={Login_Token}&UserID={User_ID}



Sample /api/mobile/GetUser?Token=VomYEMiECFFyAQ3==&UserID=TOM


Response: 

{
    "Code": 1,
    "Info": "",
    "RowsAffected": 0,
    "Scalar": null,
    "Identity": 0,
    "RetInfo": {
        "Data": [
            {
                "Type": "Field",
                "Name": "User ID",
                "Value": "TOM",
                "Active": "True",
                "IsEditable": "False",
                "Code": "UserID",
                "DataType": "Text",
                "Remarks": null,
                "MultiSelect": null,
                "ListValues": null
            },
            {
                "Type": "Field",
                "Name": "First Name",
                "Value": "Tom",
                "Active": "True",
                "IsEditable": "True",
                "Code": "FIRSTNAME",
                "DataType": "Text",
                "Remarks": null,
                "MultiSelect": null,
                "ListValues": null
            },
            {
                "Type": "Field",
                "Name": "Last Name",
                "Value": "Masivoh",
                "Active": "True",
                "IsEditable": "True",
                "Code": "LASTNAME",
                "DataType": "Text",
                "Remarks": null,
                "MultiSelect": null,
                "ListValues": null
            },
            {
                "Type": "Field",
                "Name": "Email(s)",
                "Value": "tom@gmail.com",
                "Active": "True",
                "IsEditable": "True",
                "Code": "EMAIL",
                "DataType": "Text",
                "Remarks": null,
                "MultiSelect": null,
                "ListValues": null
            },
            {
                "Type": "Field",
                "Name": "Mobile",
                "Value": "+254713555603",
                "Active": "True",
                "IsEditable": "True",
                "Code": "MOBILE",
                "DataType": "Text",
                "Remarks": null,
                "MultiSelect": null,
                "ListValues": null
            },
            {
                "Type": "Field",
                "Name": "Two Factor Auth",
                "Value": "None",
                "Active": "True",
                "IsEditable": "True",
                "Code": "TWOFACTORAUTH",
                "DataType": "Text",
                "Remarks": null,
                "MultiSelect": null,
                "ListValues": "None;Email;SMS And Email"
            },
            {
                "Type": "Field",
                "Name": "Roles",
                "Value": " Operations",
                "Active": "True",
                "IsEditable": "False",
                "Code": "ROLES",
                "DataType": "Text",
                "Remarks": null,
                "MultiSelect": null,
                "ListValues": null
            },
            {
                "Type": "Field",
                "Name": "SMS Updates",
                "Value": "No",
                "Active": "True",
                "IsEditable": "True",
                "Code": "ENABLESMS",
                "DataType": "Boolean",
                "Remarks": null,
                "MultiSelect": null,
                "ListValues": null
            },
            {
                "Type": "Field",
                "Name": "Mobile Tracking",
                "Value": "Do Not Track",
                "Active": "True",
                "IsEditable": "True",
                "Code": "MOBILETRACKING",
                "DataType": "Text",
                "Remarks": null,
                "MultiSelect": null,
                "ListValues": "Do Not Track;Every Minute;Every 2 Minutes;Every 5 Minutes;Every 10 Minutes;Every 15 Minutes;Every 30 Minutes;Every Hour;Every 2 Hours;Every 3 Hours;Every 6 Hours;Every 12 Hours"
            },
            {
                "Type": "Field",
                "Name": "Office",
                "Value": "Mombasa",
                "Active": "True",
                "IsEditable": "True",
                "Code": "OFFICE",
                "DataType": "Text",
                "Remarks": null,
                "MultiSelect": null,
                "ListValues": "Mombasa;Nairobi;Port Louis"
            },
            {
                "Type": "Field",
                "Name": "News Updates",
                "Value": "Yes",
                "Active": "True",
                "IsEditable": "True",
                "Code": "NEWSUPDATE",
                "DataType": "Boolean",
                "Remarks": null,
                "MultiSelect": null,
                "ListValues": null
            },
            {
                "Type": "Data",
                "Name": "Per. Address",
                "Value": "",
                "Active": "True",
                "IsEditable": "True",
                "Code": "ADDR",
                "DataType": "Text",
                "Remarks": null,
                "MultiSelect": null,
                "ListValues": null
            },
            {
                "Type": "Data",
                "Name": "DOB",
                "Value": "25-02-2019 06:30",
                "Active": "True",
                "IsEditable": "True",
                "Code": "DOB",
                "DataType": "Date",
                "Remarks": "",
                "MultiSelect": null,
                "ListValues": null
            },
            {
                "Type": "Data",
                "Name": "Permanent Location",
                "Value": "Mombasa",
                "Active": "True",
                "IsEditable": "True",
                "Code": "MS",
                "DataType": "Text",
                "Remarks": "",
                "MultiSelect": "1",
                "ListValues": "Mombasa;Kenya;Nairobi"
            }
        ]
    }
}

  Things to know about this API: 
  • Login_Token - You can use Login API to get token under Info

  • User_IDYou can use Get User List API to get UserID

  • Possible Values for Type:
    1. Field (User details mentioned on the header section.)
    2. Data (These are the additional data fields that are added to User Management.)

  • Definition of each attribute for Field:

  • Attribute  Description
    Name Name of the field
    Value Current value stored in it
    Active It is a Boolean field. All the fields will be default True
    IsEditable It is a Boolean field. It will be True if the user has access to Update action. It will be by default False for UserID
    Code Unique code assigned to the Field
    DataType It will be by default Text or Boolean
    Remarks It will be by default null
    MultiSelect It will be by default null.
    ListValues If MultiSelect is null and ListValues has some values, then ListValues is single select list

  • Definition of each attribute for Data:

  • Attribute  Description
    Name Name of the field
    Value Current value stored in it
    Active It is a Boolean field.True: if the data field is active and False: if the data field is inactive
    IsEditable It is a Boolean field. It will be True if the user has access to Update User Data action.
    Code Unique code assigned to the Data
    DataType Possible values will be Text, Date, Number, Currency and HyperLink
    Remarks Current remarks stored in it.
    MultiSelect Possible values are null or greater than 0.

    • When MultiSelect is Null and ListValues has some list in it, then it is Single Select
    • When MultiSelect is greater than 0 and ListValues has some list in it, then it is Multi Select
    • When MultiSelect is Null and ListValues is also Null, then it can be a Text or Numeric Field

    ListValues It will have a list in case of Single Select Or Multi Select

Comments