API – Batch import of users (in CSV format)
- To batch import users in CSV format, you need to send POST request to URI /api/v2/users-import/csv
- The request must be accompanied by a file in the format described in Synchronization users using CSV.
- The request must contain the headings Authorization: Bearer xxxxxxx.
curl 'https://your-domain.davintoo.com/api/v2/users-import/csv' -H 'Authorization: Bearer xxxxxx' -H 'Content-Type: multipart/form-data' -F '[email protected]/path/to/users.csv'
In case of successful request (HTTP response code - 200), will reply in JSON format with information about the number of processed records:
created_count - will be 1 if a new user was created in the system
updated_count - will be 1 if the existing user has been updated in the system
blocked_count - will be 1 if the previously active user was blocked during the update process
unblocked_count - will be 1 if the previously blocked user was enabled during the update process
In case of error (HTTP response code - 400) it returns JSON object with error information