ImportUsers
Imports users into your organization. The import file must not exceed 100,000 rows or 30 MB in size.
|
https://my.portatour.net/a/api/ImportUsers?parameters
|
| Required URL parameters | |
| mode | Either Insert, UpdateOrInsert, or UpdateOrInsertOrDelete. Controls whether existing users will be updated or their login options removed if the users are missing in the import file. |
|---|---|
| Option 1 (recommended): Data file and import configuration file as multipart/form-data | |
| For details see the RFC 2388 for multipart/form-data. It is sufficient if the content type of each part is application/octet-stream. | |
| file | The file to import as form value of the POST. Supported file formats are xlsx, xls, ods, csv, simplecsv, or xlsxtable. |
| importConfig | The import configuration file as form value of the POST. |
| Option 2: Data file as binary request body | |
| <request body> | The file to import as as binary body of the POST. When the file is provided as request body, the fileFormat parameter must be set. An import configuration must be uploaded using the UploadUserImportConfig call beforehand. |
| Optional URL parameters | |
| language | Recommended. Language used for the import. |
| fileFormat | Specifies the format of the import file. Supported formats are xlsx, xls, ods, or csv. If the import file is provided as a form parameter (Option 1) and this parameter is omitted, the file format is inferred from the file name extension. If the import file is provided as request body (Option 2), this parameter is required. |
| delimiter | If uploading a CSV, controls which character is used as delimiter. The default is automatic, supported values are commadelimited, semicolondelimited, tabdelimited, or automatic. |
| encodingName | If uploading a CSV, sets the encoding used to interpret the data. The default is automatic. Some other popular choices are utf-8, utf-16, and Windows-1252. |
|
curl -o result.txt -u
admin_username:admin_password
-F file=@users.xls -F importConfig=@users.importcfg "https://my.portatour.net/a/api/ImportUsers?language=en-US&mode=Insert"
|
Caution: If using curl, don't forget the @-sign in front of the file names
Field Description
You can import the following fields for users. See importConfig for a description on how to create the import configuration file. For the sake of clarity the fields are grouped like in the UI import. The groups themselves are only for informational purposes and have no bearing on the import configuration file.