User Management
GET /v3/api/users
Retrieve a list of users that the authorized user is allowed to manipulate.
Response attributes:
| Property | Nullable | Type | Description |
|---|---|---|---|
| Id | No | Long | Unique identifier of the returned user. |
| Username | No | String | Username of the returned user. |
| FirstName | No | String | First name of the returned user. |
| LastName | No | String | Last name of the returned user. |
| NumberOfAssignedDealers | No | Integer | Indicates the number of dealers assigned to the retuned user. |
| HasPermissions | No | Boolean | Indicates whether or not the user has permissions for the dealer. |
| IsActive | No | Boolean | Indicates whether or not the user is allowed to interact with AFI systems. |
| DealerNumber | No | String | Returns a list of dealer numbers the user is associated with. |
| RoleAssigned | No | String | Returns a list of roles the user has for each dealer. |
| EmailAddress | No | String | Email address of the returned user. |
| PhoneNumber | No | String | Phone number of the returned user. |
| IsAfiUser | No | Boolean | Indicates whether or not the returned user is an AFI user. |
Example response:
[
{
"Id": 7,
"Username": "testuser1",
"FirstName": "test",
"LastName": "user",
"IsActive": true,
"NumberOfAssignedDealers": 3,
"HasPermissions": false,
"IsAfiUser": true,
"DealerNumber": "000123.000, 000123.001, 543210.000",
"RoleAssigned": "Super User, Super User, Super User",
"EmailAddress": "support@aquafinance.com",
"PhoneNumber": "7155555555"
},
{
"Id": 8,
"Username": "testuser1",
"FirstName": "test",
"LastName": "user",
"IsActive": true,
"NumberOfAssignedDealers": 2,
"HasPermissions": false,
"IsAfiUser": true,
"DealerNumber": "543210.000, 000123.000",
"RoleAssigned": "Super User, Super User",
"EmailAddress": "acopeland@aquafinance.com",
"PhoneNumber": "7155555555"
},
]
GET /v3/api/users/{Id}
Retrieve full details about a given user.
Request URL query parameters:
| Property | Required/Optional | Type | Description |
|---|---|---|---|
| userId | Required | Long | Valid userId number that requesting user has access to. |
Response attributes:
| Property | Nullable | Type | Description |
|---|---|---|---|
| UserId | No | Long | Unique identifier of the returned user. |
| IsActive | No | Boolean | Indicates whether or not the user is allowed to interact with AFI systems. |
| FirstName | No | String | First name of the returned user. |
| MiddleInitial | Yes | String | Middle initial of the returned user. |
| LastName | No | String | Last name of the returned user. |
| DisplayName | Yes | String | Display name of the returned user. |
| Username | No | String | Username of the returned user. |
| EmailAddress | No | String | Email address of the returned user. |
| PhoneNumber | No | String | Phone number of the returned user. |
| DealerRoles | No | Array | Returns the associated DealerId/RoleId mapping for every dealer the user is associated with. |
DealerRoles attributes:
| Property | Nullable | Type | Description |
|---|---|---|---|
| DealerId | No | Long | A valid DealerId that the user will be associated to |
| RoleId | No | Long | Role of the User for the specified DealerId. Must be a valid UserRole Id value. |
Example response:
{
"UserId": 10000,
"IsActive": true,
"FirstName": "Test",
"MiddleInitial": "I",
"LastName": "Tester",
"DisplayName": "Test Teseter",
"UserName": "xyztester",
"Title": "Tester",
"EmailAddress": "test@test.com",
"PhoneNumber": "7151234567",
"DealerRoles": [
{
"DealerId": 7,
"RoleId": 1
},
{
"DealerId": 8,
"RoleId": 6
}
]
}
POST /v3/api/users
Creates a new Portal User.
Request attributes:
| Property | Required/Optional | Type | Description |
|---|---|---|---|
| IsActive | Required | Boolean | If false or not specified, the created user cannot interact with the AFI ecosystem. |
| Username | Required | String | Indicates the username for the user. Username may consist of alphanumeric and period. |
| FirstName | Required | String | Indicates the first name for the user. |
| LastName | Required | String | Indicates the last name for the user. |
| MiddleInitial | Optional | String | Indicates the middle initial for the user. |
| DisplayName | Optional | String | Usually in the format of FirstName LastName |
| Title | Required | String | User's job title |
| EmailAddress | Required | String | Indicates the email address for the user. |
| PhoneNumber | Required | String | Indicates the phone number for the user. |
| DealerRoles | Required | Array | Mapping of the associated DealerId/RoleId for every dealer the user is associated with. |
DealerRoles attributes:
| Property | Required/Optional | Type | Description |
|---|---|---|---|
| DealerId | Required | Long | A valid DealerId that the user will be associated to |
| RoleId | Required | Long | Role of the User for the specified DealerId. Must be a valid UserRole Id value. |
Example request:
{
"IsActive": true,
"FirstName": "Test",
"MiddleInitial": "I",
"LastName": "Tester",
"DisplayName": "Test Teseter",
"UserName": "xyztester",
"Title": "Tester",
"EmailAddress": "test@test.com",
"PhoneNumber": "7151234567",
"DealerRoles": [
{
"DealerId": 7,
"RoleId": 1
},
{
"DealerId": 8,
"RoleId": 6
}
]
}
The response contains the same elements as the request, but now includes the UserId field(Number).
Example response:
{
"UserId": 10000,
"IsActive": true,
"FirstName": "Test",
"MiddleInitial": "I",
"LastName": "Tester",
"DisplayName": "Test Teseter",
"UserName": "xyztester",
"Title": "Tester",
"EmailAddress": "test@test.com",
"PhoneNumber": "7151234567",
"DealerRoles": [
{
"DealerId": 7,
"RoleId": 1
},
{
"DealerId": 8,
"RoleId": 6
}
]
}
PUT /v3/api/users/{Id}
Updates an existing Portal User.
Request URL query parameters:
| Property | Required/Optional | Type | Description |
|---|---|---|---|
| userId | Required | Long | Valid userId number that requesting user has access to |
Request attributes:
| Property | Required/Optional | Type | Description |
|---|---|---|---|
| IsActive | Required | Boolean | If false or not specified, the created user cannot interact with the AFI ecosystem. |
| Username | Required | String | Indicates the username for the user. |
| FirstName | Required | String | Indicates the first name for the user. |
| LastName | Required | String | Indicates the last name for the user. |
| MiddleInitial | Optional | String | Indicates the middle initial for the user. |
| DisplayName | Optional | String | Usually in the format of FirstName LastName |
| Title | Required | String | User's job title |
| EmailAddress | Required | String | Indicates the email address for the user. |
| PhoneNumber | Required | String | Indicates the phone number for the user. |
| DealerRoles | Required | Array | Mapping of the associated DealerId/RoleId for every dealer the user is associated with. |
DealerRoles attributes:
| Property | Required/Optional | Type | Description |
|---|---|---|---|
| DealerId | Required | Long | A valid DealerId that the user will be associated to |
| RoleId | Required | Long | Role of the User for the specified DealerId. Must be a valid UserRole Id value. |
Example request:
{
"IsActive": true,
"FirstName": "Test",
"MiddleInitial": "I",
"LastName": "Tester",
"DisplayName": "Test Teseter",
"UserName": "xyztester",
"Title": "Tester",
"EmailAddress": "test@test.com",
"PhoneNumber": "7151234567",
"DealerRoles": [
{
"DealerId": 7,
"RoleId": 1
},
{
"DealerId": 8,
"RoleId": 6
}
]
}
Example response:
{
"UserId": 10000,
"IsActive": true,
"FirstName": "Test",
"MiddleInitial": "I",
"LastName": "Tester",
"DisplayName": "Test Teseter",
"UserName": "xyztester",
"Title": "Tester",
"EmailAddress": "test@test.com",
"PhoneNumber": "7151234567",
"DealerRoles": [
{
"DealerId": 7,
"RoleId": 1
},
{
"DealerId": 8,
"RoleId": 6
}
]
}
DELETE /v3/api/users/{Id}
Disables an existing Portal User.
Request URL query parameters:
| Property | Required/Optional | Type | Description |
|---|---|---|---|
| userId | Required | Long | Valid userId number that requesting user has access to. |
Example response:
"User has been disabled."