POST api/users/import?customerId={customerId}&countryId={countryId}&defaultPortalId={defaultPortalId}
Imports a list of users into the system.
Request Information
URI Parameters
| Name | Description | Type | Additional information |
|---|---|---|---|
| customerId |
The ID of the customer associated with these users. |
integer |
Required |
| countryId |
Optional. The ID of the country associated with these users. If not provided, the country ID of the current user will be used. |
integer |
None. |
| defaultPortalId |
Optional. The ID of the default portal associated with these users. |
integer |
None. |
Body Parameters
A list of users to be imported. List cannot be longer than 200 users.
| Name | Description | Type | Additional information |
|---|---|---|---|
| FirstName |
First Name |
string |
Required Max length: 255 |
| Surname |
Surname |
string |
Required Max length: 255 |
|
Email address (will be used as login) |
string |
Required Max length: 512 |
|
| SalaryNumber |
Salary Number (if known) |
string |
Max length: 512 |
| Gender |
Gender |
UserProfileGenderEnum |
None. |
Request Formats
application/json, text/json
[
{
"firstName": "sample string 1",
"surname": "sample string 2",
"email": "sample string 3",
"salaryNumber": "sample string 4",
"gender": 0
},
{
"firstName": "sample string 1",
"surname": "sample string 2",
"email": "sample string 3",
"salaryNumber": "sample string 4",
"gender": 0
}
]
Response Information
A UserImportResultModel indicating the result of the import operation.
| Name | Description | Type | Additional information |
|---|---|---|---|
| TotalCount | integer |
None. |
|
| Errors | integer |
None. |
|
| Success | integer |
None. |
|
| ErrorDetails | Collection of ErrorDetails |
None. |
Response Formats
application/json, text/json
{
"totalCount": 1,
"errors": 2,
"success": 3,
"errorDetails": [
{
"message": "sample string 1"
},
{
"message": "sample string 1"
}
]
}