Create an import job
Updates a list's contents asynchronously by uploading a file.
You can create a new import job only if no other import jobs or purge jobs are running on the list.
The Character Separated Values (CSV) data file must contain a header record as the first row. The header record must contain the name of the columns. An import job uploads the contents of a data file if the file that contains a header includes matching names and positions as defined in the list's 'columns' property. A column value can be empty if the column value is not a part of a key value or the column data type is not a number.
The List Data API verifies that all the records are in the required format before it loads them into the data store. Because a large number of records could contain errors, there is a threshold of the number of errors that can occur before the validation is terminated. No records are loaded if there are validation errors.
1{2 "id": "b791e348-984e-439d-bff4-5b4163d897af",3 "version": 1,4 "state": "completed",5 "fileName": "data.csv",6 "sha256Sum": "69091e2c774812266d577dc83472a2ab81687efde1e276feb0aaa77d637df11c",7 "creationTimeStamp": "2022-05-31T14:31:57Z",8 "createdBy": "userA",9 "completedTimeStamp": "2022-05-31T14:32:57Z",10 "listId": "3659ea38-2618-4474-aeac-0bf6cfd3c322",11 "totalErrors": 1,12 "results": {13 "recordCount": 10014 },15 "errors": [16 {17 "message": "string",18 "id": "string",19 "errorCode": 0,20 "httpStatusCode": 0,21 "details": [22 "string"23 ],24 "remediation": "string",25 "version": 226 }27 ],28 "links": [29 {30 "href": "...",31 "method": "...",32 "rel": "...",33 "uri": "..."34 }35 ]36}
Name | Type | Required | Description |
---|---|---|---|
listId | string | true | A universally unique identifier for a list. |
Name | Type | Required | Description |
---|---|---|---|
dataFile | string | false | A file that contains records (data) that are added to a list's contents. Example: "data.csv" |
delimiter | string | false | The character delimiter that is used in the CSV data file. The character delimiter is typically a comma. Newline characters (for example, \n or \r) cannot be used as a delimiter. Default: , Example: "," |
Status | Meaning | Description | ||
---|---|---|---|---|
202 | Accepted | The request has been accepted for processing, but the processing has not been completed. | Headers | Schema |
400 | Bad Request | The request was invalid. | Schema | |
403 | Forbidden | The user did not have the necessary permissions. | Schema | |
404 | Not Found | No item exists at the requested path. | Schema | |
409 | Conflict | The request could not be completed due to a conflict with an existing resource. | Schema | |
500 | Internal Server Error | The request could not be fulfilled because of an unexpected server error. | Schema |