JSON API » people » people/import

Imports a list of persons from a CSV file under the customer that the authenticated user belongs to.

Input parameters

Requires authentication and the administrator or wholesale role privileges.

NameTypeDescriptionRequiredDefault value
auth_usernameStringAuthentication username.Yes
auth_passwordStringAuthentication password.Yes
csvStringThe contents of the CSV file.Yes
overwriteInteger1 to allow overwriting of existing people, 0 not to.No0

The email address is not required if the system is configured not to require it.

Responses

CodeDescription
200Success.
400Invalid input parameters specified. Check the key and message fields for more details.
401The authentication details provided are invalid.
402Your role does not allow this.
409Multiple persons exist with the same email.
500An error occurred within the server. Check the key and message fields for more details.

Data returned

The number of users created..

Example: With required parameters

http://enswitch.example.com/api/json/people/import/?auth_username=user;auth_password=password;csv=...

{ "responses":[ { "code":"200", "key":"", "message":"OK" } ], "data":{ "count":10 } }

Change history

VersionChanges
3.15Function added.