Initiate a data import

First step of an import. Validates the declared files against the selected provider (enabled provider/sub-provider, accepted extensions, single vs multiple files, required files, required customerManager / validityMonth parameters), creates a data import record in status INITIATED and returns a pre-signed S3 uploadUrl, valid for 15 minutes. The client must then PUT all the declared files as a single ZIP archive (Content-Type: application/zip) to that URL and call startDataImport.

Single set (default, multiSet absent or false): all files must form one set; the response holds record and uploadUrl. Validation errors are returned immediately (400). The request is rejected with 403 if an import uploaded by the same user is still running and was created less than 60 minutes ago.

Multi set (multiSet: true): for providers that auto-detect their sub-provider, files are split into sets (e.g. one per agent or file type) and one record is created per set; the response holds records, each with its own uploadUrl. A set that fails validation does not fail the request: its record is saved directly as FAILED with a failureReason, has no uploadUrl, and a data-import-record-failed event is published.

Authorization: any authenticated user. Imports are always created for the caller's own agency: agencyId, when given, must be the caller's agency. The customerManager parameter must be a user of that agency unless the import targets a specific customer (customerId).

Errors: 400 for an unknown/disabled provider or sub-provider, empty or unnamed files, files the provider does not accept, missing or invalid parameters (a validityMonth must be a past month, format YYYY-MM, year 2000 or later); 403 for another agency or a still-running import.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Body Params

The provider to import with, the files that will be uploaded (names and sizes) and the provider-specific parameters.

Request to initiate a data import: the provider, the files that will be uploaded as one ZIP archive, and provider-specific parameters.

uuid

Agency to import into. Optional; defaults to the caller's agency and, when given, must be the caller's agency.

uuid
required

ID of the import provider, from getDataImportProviders. Must exist and be enabled.

files
array of objects, unique
required
length between 1 and 2147483647

The files that will be uploaded (at least one). Each needs a non-blank fileName (its extension must be accepted by the provider) and optionally its fileSize in bytes.

files*
flattenFiles
array of objects, unique

Optional flattened list of the files contained in the uploaded archives, used to check the files required by the sub-provider. Ignored for files listed in archiveEntries.

flattenFiles
params
object

Provider-specific parameters. Known keys: subProvider (sub-provider UUID; required when the provider has sub-providers and does not auto-detect them), validityMonth (YYYY-MM, a past month from 2000 on; required when the provider has validityMonthRequired), customerManager (UUID of a user of the import agency; required when the provider has managerRequired), customerId (customer UUID, for a customer-specific import), password (password of protected files).

boolean

When true, files are split into sets (for providers that auto-detect their sub-provider) and one record is created per set, returned in records. Absent or false: a single record.

archiveEntries
object

Content of the uploaded archive files, keyed by the archive's fileName in files; used to detect the sub-provider and check the required files of each set.

Responses

400

Invalid request: unknown or disabled provider, unaccepted or unrecognized files, missing or invalid parameters

403

agencyId is not the caller's agency, or a previous import of the caller is still running

Language
Credentials
OAuth2
Required Scopes
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
*/*