# Start DNB Import Job

To start a D&B Import Job use the following request

```
curl -X POST \
  --url 'https://api.corporate-data-league.ch/data-exchange/rest/jobs/dnbimportjobs?dnbUser=optional&dnbPassword=optional' \
  -u 'BasicAuthUserName:your_credentials'\
  -H 'Accept: application/json' \
  -F 'file=@your_file.csv'
```
with using this sample file:

```
DUNS
305211311
DNB:305211311
```
The file can be a `csv` or `xlsx`. The file should contain only one column with the DUNS number.
In the first row should the header `DUNS`. The DUNS number can be in following forms:
- As CDQ-ID. Example or
`DNB:305211311`
- as raw DUNS
`305211311`

The DUNS consist of 9 digits. When the input DUNS does not consist of 9 digits, leading zeros are added.

Endpoint: POST /jobs/dnbimportjobs
Version: 5
Security: apiKey

## Security:

  - `apiKey` (unknown)
    apiKey in header X-API-KEY

## Query parameters:

  - `name` (string)
    Name of the job.

  - `description` (string)
    Description of the job.

  - `dnbUser` (string)
    Optional, if credentials are available in user or organization settings.

  - `dnbPassword` (string)
    Optional, if credentials are available in user or organization settings.

  - `featuresOn` (array)
    Feature to be activated.

  - `dnbDataSource` (string)
    D&B product that should be downloaded from D&B and put into specific D&B storage.

## Request fields (multipart/form-data):

  - `file` (string)
    XLSX or CSV file to be uploaded, containing mandatory DUNS column (SOAP currently only supports CSV).
    Example: CH-import.csv

## Response 200:

  - `200` (unknown)
    OK

## Response 200 fields (application/json):

  - `id` (string)
    Unique identifier of a job.
    Example: 35f23c03-1c22-45fe-9484-3ffe769325de

  - `name` (string)
    Name of a Job.
    Example: Process vendor data.

  - `description` (string)
    Detailed description of a Job.
    Example: I started this job to improve quality of our data.

  - `progress` (integer)
    Progress (%) of the job.
    Example: 77

  - `status` (string)
    Job execution status.
    Enum: "ARCHIVED", "UNKNOWN", "CREATED", "PERSISTED", "SCHEDULED", "WAITING", "COULDNT_START", "RUNNING", "FINISHED", "DIED", "CANCELED", "FAILED"

  - `statusMessage` (string)
    Message describing the status of the job.
    Example: Job is running

  - `createdBy` (string)
    Creator of a resource.
    Example: 76248934691294444

  - `createdAt` (string)
    Date of creation (ISO 8601-compliant).
    Example: 2026-11-30T10:28:48Z

  - `modifiedAt` (string)
    Date of modification (ISO 8601-compliant).
    Example: 2026-11-30T10:28:48Z

  - `result` (object)
    Result of D&B import job.

  - `result.statistics` (object)
    Statistics of D&B import job.

  - `result.statistics.numberOfRecords` (integer)
    Number of records in the Business Partner Storage.
    Example: 500

  - `result.statistics.numberOfDuplicates` (number)
    Number of duplicates in input file which have the same DUNS.
    Example: 5

  - `result.statistics.numberOfInserts` (number)
    Number of newly created records.
    Example: 100

  - `result.statistics.numberOfUpdates` (number)
    Number of updated records.
    Example: 100

  - `result.statistics.numberOfFailed` (number)
    Number of records updates / retrieves fails.
    Example: 50

  - `result.statistics.numberOfQuotaExceeded` (integer)
    Number of not processed records which exceeded defined quota limit.
    Example: 100

  - `result.statistics.numberOfUnknown` (number)
    Number of non-retrieved records from D&B service.
    Example: 100

## Response 400:

  - `400` (unknown)
    The sent request is malformed.

## Response 400 fields (application/json):

  - `status` (object)
    Details about status or error of a service

  - `status.code` (integer)
    RFC 7231 status code for this error.
    Example: 200

  - `status.technicalKey` (string)
    Technical key describing the status or error
    Example: OK

  - `status.details` (array)

  - `status.details.id` (integer, required)
    9-digit code which is uniquely identifying a message
    Example: 200000004

  - `status.details.message` (string, required)
    Human-readable message which may also be presented in user interface.
    Example: The job came to an end and finished successfully.

  - `status.details.technicalKey` (string)
    Technical key to uniquely identify a message.
    Example: JOB_FINISHED

  - `status.details.jsonPath` (string)
    JSONPath as specified by the IETF standard
    Example: $.businessPartner.names[0].value

  - `status.details.jsonRecord` (string)
    Object provided in plain JSON format.
    Example: { "key" : "value"}

  - `status.path` (string)
    Requested path which caused this error.
    Example: /v2/businesspartners/lookup

  - `status.timestamp` (string)
    ISO 8601 representation of the timestamp.
    Example: 2026-11-30T10:28:48Z

