User Management

Swagger: https://user.telematicssdk.com/swagger/index.html

Production URL: https://user.telematicssdk.com

Get user details

Request headers:

"Authorization": "Bearer {Token}" // required (get Token in /v1/Auth/Login)

Request

Query parameters (at least one of these is required):
DeviceToken = "3fa85f64-5717-4562-b3fc-2c963f66afa6";
Email = "string";
Phone = "string";
ClientId = "string";
Country = "string";
OsType = "android", // { "android" = 0, "iOS" = 1 }
FullName = "string";
FirstName = "string";
LastName = "string";
IncludeAccountInfo = true; // default = false
ShowInactiveUsers = false; // default = false

Response

{
"Result": [
{
"DeviceToken": "dfe6b62d-2395-456e-8421-a2b9bb5d1ba2",
"DateCreated": "2020-05-21T12:13:09.9107284",
"Status": "Active",
"ActivityStatus": "No Data",
"UserProfile": {
"FirstName": "Test",
"LastName": "Test",
"Gender": "None",
"Birthday": "2020-12-04T22:00:00",
"MaritalStatus": "string",
"ChildrenCount": "string",
"Address": "string",
"Country": "string",
"District": "string",
"City": "string",
"Nickname": "string",
"Email": "[email protected]",
"Phone": "+1213 621 0002",
"ImageUrl": "string"
},
"MobileDevice": {
"MobileUid": "string",
"DeviceModel": "string",
"OsType": "android", // { "android" = 0, "iOS" = 1 }
"OsVersion": "string",
"SdkVersion": "string",
"AppVersion": "string",
},
"AccountInfo": {
"CompanyId": 1285,
"CompanyName": "CompanyName",
"ApplicationId": 2339,
"ApplicationName": "AppName",
"InstanceId": "7600445e-ab2f-48ba-a52d-8b02fd8a8706",
"InstanceName": "Common"
},
"UserFields": [
{
"ClientId": "string",
"EnableLogging": false,
"EnableRealTimeLocation": false,
"EnableTracking": true,
"Enabled": true
}
]
}
],
"Status": 200,
"Title": "",
"Errors": []
}

Update user details

Request Headers:

"UserDeviceToken": "3fa85f64-5717-4562-b3fc-2c963f66af17" // use for update another user

Request

{
"OldPassword": "string", // required if set up NewPassword
"NewPassword": "string",
"SendVerificationCodeForEmailPhone": false, // default = false - send verification code on email or phone for approve change email or phone
"FirstName": "string",
"LastName": "string",
"Nickname": "string",
"Phone": "string",
"Email": "string",
"Gender": "None", // { "None", "Male", "Female", "Other" }
"Birthday": "2019-12-13T06:19:18.837Z",
"MaritalStatus": "string",
"ChildrenCount": 0,
"Country": "string",
"District": "string",
"City": "string",
"Address": "string",
"ImageUrl": "string" // photo url (you can upload your photo later),
"Status": "Active", // { "Active" = 1, "Deactivated" = 2, }
"MobileDevice": {
"MobileUid":"string",
"DeviceModel":"string",
"OsType":"string", // { "android" = 0, "iOS" = 1 }
"OsVersion":"string",
"SdkVersion":"string",
"AppVersion":"string",
},
"UserFields": { // default = null. Will be using dafult values below
"EnableTracking": true, // default = true
"EnableLogging": false; // default = false
"EnableRealTimeLocation": false, // default = false
"Enabled": true, // default = true
"ClientId": "string", // default = null. User id in your system
}
}

Response

{
"Result": null,
"Status": 200,
"Title": "",
"Errors": []
}

Delete user

Request headers:

"Authorization": "Bearer {Token}" // required (get Token in /v1/Auth/Login)

Request

{
"Result": null,
"Status": 200,
"Title": "",
"Errors": []
}

Transfer user to another InstanceID

Allows to change user instance inside application.

Request headers:

"Authorization": "Bearer {Token}" // required (get Token in /v1/Auth/Login)

Request

{
"DeviceToken": "3fa85f64-5717-4562-b3fc-2c963f66afa6", // Device token transfering user
"ToInstanceId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"ToInstanceKey": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
// method is now in development, we will add FromInstanceId and FromInstanceKey soon

Response

{
"Result": null,
"Status": 200,
"Title": "",
"Errors": []
}

Transfer user to another instance with a Company Invitation Code

Transfer user to another InstanceID with a Company Invitation Code

Allows to change user instance inside application.

  • Address: /v1/Management/users/instances/change/{InstanceInviteCode}

  • Method: POST

  • Authorization: Required as User

  • url parameter: InstanceInviteCode = "someCode" - instance invite code in DataHub

{
"Result": null,
"Status": 200,
"Title": "",
"Errors": []
}

Get list of users

Request headers:

"Authorization": "Bearer {Token}" // required (get Token in /v1/Auth/Login)

Request Parameters work as filter. No parameters are required to get the full list of users.

{
"CompanyIds": [
0 // search for companies for which there are rights - where to find information about company ids - https://docs.userdatahub.com/
],
"ApplicationIds": [
0 // search for applications for which there are rights - where to find information about application ids - https://docs.userdatahub.com/
],
"InstanceIds": [
"3fa85f64-5717-4562-b3fc-2c963f66afa6" // search for instances for which there are rights - where to find information about instance ids - https://docs.userdatahub.com/
],
"IncludeAccountInfo": true, // default = false - show company name, application name, instance name in result
"SearchTerm": "string", // string for searching
"Sort": "DeviceToken", /* { DeviceToken,
FirstName,
LastName,
Nickname,
Phone,
Email,
Gender,
Birthday,
MaritalStatus,
ChildrenCount,
Country,
District,
City,
DeviceTokenDesc,
FirstNameDesc,
LastNameDesc,
NicknameDesc,
PhoneDesc,
EmailDesc,
GenderDesc,
BirthdayDesc,
MaritalStatusDesc,
ChildrenCountDesc,
CountryDesc,
DistrictDesc,
CityDesc,
DateCreated,
DateCreatedDesc,
ActivityStatus,
ActivityStatusDesc } */
"ActivityStatuses": [
"Active"
], // { Active, Inactive, Lost, NoData }
"DateCreatedFrom": "2020-06-30T10:46:39.782Z",
"DateCreatedTo": "2020-06-30T10:46:39.782Z",
"Country": "string",
"City": "string",
"PageNumber": 1, // should be >= 1
"PageSize": 3, // should be >= 1
}

Response

{
"Result": {
"Users": [
{
"DeviceToken": "721109ee-d59f-47fa-ad1b-e9920cf6c5ac",
"DateCreated": "2020-02-02T14:39:28.1736903",
"Status": "Active",
"ActivityStatus": "No Data",
"UserProfile": null,
"MobileDevice": {
"MobileUid": "string",
"DeviceModel": "string",
"OsType": "android", // { "android" = 0, "iOS" = 1 }
"OsVersion": "string",
"SdkVersion": "string",
"AppVersion": "string",
},
"AccountInfo": {
"CompanyId": 3,
"CompanyName": "CompanyName",
"ApplicationId": 1002,
"ApplicationName": "AppName",
"InstanceId": "3c1c8447-4133-404a-82e9-93a015d85362",
"InstanceName": "Common"
},
"UserFields": [
{
"ClientId": "string",
"EnableLogging": false,
"EnableRealTimeLocation": false,
"EnableTracking": true,
"Enabled": true
}
]
},
{
"DeviceToken": "4ac97d8a-bf5f-4ffd-a550-115eaf42bbdf",
"DateCreated": "2020-02-02T14:39:27.3484452",
"Status": "Active",
"ActivityStatus": "No Data",
"UserProfile": null,
"MobileDevice": {
"MobileUid": "string",
"DeviceModel": "string",
"OsType": "android", // { "android" = 0, "iOS" = 1 }
"OsVersion": "string",
"SdkVersion": "string",
"AppVersion": "string",
},
"AccountInfo": {
"CompanyId": 111,
"CompanyName": "CompanyName",
"ApplicationId": 1231231,
"ApplicationName": "AppName",
"InstanceId": "3c1c44d7-4133-5454-82e9-93a015d85362",
"InstanceName": "Common"
},
"UserFields": [
{
"ClientId": "string",
"EnableLogging": false,
"EnableRealTimeLocation": false,
"EnableTracking": true,
"Enabled": true
}
]
},
{
"DeviceToken": "2b947c54-ad81-4ef3-ad0e-0e3b490b50f2",
"DateCreated": "2020-02-02T14:39:26.5883671",
"Status": "Active",
"ActivityStatus": "No Data",
"UserProfile": null,
"MobileDevice": {
"MobileUid": "string",
"DeviceModel": "string",
"OsType": "android", // { "android" = 0, "iOS" = 1 }
"OsVersion": "string",
"SdkVersion": "string",
"AppVersion": "string",
},
"AccountInfo": {
"CompanyId": 3,
"CompanyName": "CompanyName",
"ApplicationId": 1002,
"ApplicationName": "AppName",
"InstanceId": "3c1c44d7-4133-xdfs-82e9-93a015d85362",
"InstanceName": "Common"
},
"UserFields": [
{
"ClientId": "string",
"EnableLogging": false,
"EnableRealTimeLocation": false,
"EnableTracking": true,
"Enabled": true
}
]
}
],
"HasPreviousPage": false,
"HasNextPage": true,
"TotalUsers": 1548,
"TotalPages": 516,
"CurrentPage": 1
},
"Status": 200,
"Title": "",
"Errors": []
}

Quick search for users

Find users by email, phone, name, deviceToken, clientID as a searchterm.

Request headers:

"Authorization": "Bearer {Token}" // required (get Token in /v1/Auth/Login)

Request

From query:
SearchTerm = "string"

Response

{
"Result": {
"DeviceTokens": [],
"Emails": [
{
"Item1": "4302a498-0b58-45d0-acc0-15817d800c5e",
"Item2": "[email protected]"
},
{
"Item1": "07012e2b-6542-4978-be80-24c840f98b57",
"Item2": "[email protected]"
}
],
"ClientIds": [
{
"Item1": "58156858-3629-4931-89d9-0043e5873b91",
"Item2": "234341136598Test"
}
]
},
"Status": 200,
"Title": "",
"Errors": []
}