Version 2021

Search for a User from a Service

Search for a user or get user counts.

GET /api/v1/users

Example call

curl -v -X GET 'https://usher-endpoint.com/api/v1/users?requester=Kintaro&locale=jp&infoType=countOnly' -H 'Authorization:Bearer [service token]'

curl -v -X GET 'https://usher-endpoint.com/api/v1/users?requester=Kintaro&locale=jp&infoType=userList&role=ADMIN' -H 'Authorization: Bearer [service token]'

Parameters

Type Name Description Schema
Query detail Whether or not full user details are returned in the response. Defaults to 'true'. string
Query email Filter attribute for the user's email. string
Query firstName Filter attribute for the user's first name. string
Query ignoreStatus Flag to decide whether search results contain users in "delete" status. Defaults to 'false'. enum (true, false)
Query infoType (required)

The info type of the retrieved data.

  • countOnly returns amount of users in each category.
  • userList returns list of matched users.
enum(countOnly, userList)
Query lastName Filter attribute for the user's last name. string
Query locale (required) Locale string
Query mobile Filter attribute for the user's mobile. string
Query pageIndex The pageIndex of search results. Default value is 0. The pageIndex must be an integer and must greater than or equal to 0. string
Query pageSize The pageSize of search results. Default value is 20. The pageSize must be an integer and must greater than or equal to 1. string
Query requester (required) Request type for token validator. string
Query role Filter attribute for the user's role. string
Query sortBy Controls which attributes are used to sort the results. By default, the sort order is (email, firstName, lastName, mobile, role, status) ascending. enum (email,firstName,lastName, mobile,role, status)
Query sortDir Selects if results are sorted in ascending or descending order. enum (asc, desc)
Query status Filter attribute for the user's status. If this value provided in the search query, the server will overwrite the value in the parameter ignoreStatus to 'true'. enum (active,locked, deactivated,delete, pending)
Query ts Unix time string
Query vin

Filter attribute for the vin of a vehicle belong to the user. This parameter is not required in search. When the infoType parameter is set to 'userList', the search query must contain at least one of the following parameters: email, mobile, firstName, lastName, or role.

string

Responses

HTTP Code Description Schema
200 Successful transaction Response 200
400 Invalid Request ErrorResponsiveInvalidInput
500 Server Error ErrorResponseInternalServerError

Response 200

Name Description Schema
data   data
localizedMessage Example : "success" string
reason Example : "success" string
status Example : "OK " string

data

Name Description Schema
currentPage Example : 2 integer
pageSize Example : 10 integer
total Example : 100 integer
totalInCurrentPage Example : 10 integer
totalPage Example : 10 integer
users   < users > array

users

Name Description Schema
additionalInfo   additionalInfo
city Example: "Alexandria" string
country Example: "USA" string
email Example: "example@ex.com" string
emailStatus Example: "pending" string
firstName Example: "Alex" string
lastName Example: "Smith" string
mobile Example: "17035556789" string
mobileStatus Example: "active" string
partner1Id Example: "2.5754029E7" string
privacyPolicyInfo   privacyPolicyInfo
privacyPolicyVersion Example: "v1" string
role Example: "default" string
state Example: "VA" string
status Example: "ACTIVE" string
street1 Example: "Main St SE" string
street2 Example: "1213 N" string
tosInfo   tosInfo
tosVersion Example: "v1" string
uid Example: "38ec62a-a923-4107-861f-30bd99430564" string
userSetting   userSetting
zip Example: "22188" string

additionalInfo

Name Description Schema
birthday   string
gender Example : "MALE" string
phone   string
region Example : "us" string

privacyPolicyInfo

Name Description Schema
appId Example: "myApp" string
deviceId Example : "QVP0DIztG2id5m+5CZC+Xg==" string

tosInfo

Name Description Schema
appId Example: "myApp" string
deviceId Example : "QVP0DIztG2id5m+5CZC+Xg==" string

userSetting

Name Schema
appCode appCode
deliveryPreference deliveryPreference

appCode

Name Description Schema
enabled Example: "true" boolean
value Example : "5555" string

deliveryPreference

Name Description Schema
email Example: true boolean
pushNotification Example : false boolean
sms Example: true boolean

Produces

application/json

Security

Type Name
apiKey ServiceAuth