Import data source from file
This endpoint allows users to upload a file (CSV, XLS, or XLSX) containing data source records for import. The file is validated and processed in the background via queue. The import process supports multiple import types: datasource, task, visit, and route. After upload, the import is queued for processing and can be monitored via the import-monitoring endpoints.
Background Processing:
- Queue Name:
readingImportDatasource - Processing is chunked for large files
- Status updates are tracked in real-time
File Requirements:
- Max Size: 20MB
- Supported Formats: CSV, XLS, XLSX
- File structure must match the data type schema
Important Notes:
- For datasource import:
dataTypeIdis required - For datasource with hub-specific data:
hubIdis required (depends oncommonDatasetting) - Failed records are exported to a separate file for review
- Template file is generated based on data type schema
Authorizations
Use a valid Bearer token to authenticate.
Body
The file containing data to import. Supported formats: CSV, XLS, XLSX. Maximum file size: 20MB.
Example: datasource_import.xlsx
The identifier for the data type. Required for datasource import type. Use GET /data-types API to get the list of Data Type IDs.
Example: 63db2fb476bc679c540369c4
The identifier for the hub. Required if the data type has commonData set to false (hub-specific data). Use GET /hubs API to get the list of Hub IDs.
Example: 63c63ab1b6972d3150348172