import/ endpoint provides an interface for importing data into the system. The API can be used to start, pause, resume, cancel, and query the current progress of import processes.
Supported methods
List of all supported methods.| Command/info | Endpoints | GET | PUT | POST | DELETE |
|---|---|---|---|---|---|
| Import | import/ |
General
Supported services and formats
Theimport/ endpoint provides an interface for importing data into the system. The API can be used to start, pause, resume, cancel, and query the current progress of import processes.
The import function is currently supported for the following services:
| Service | Supported formats |
|---|---|
adminUser | json, csv |
category | json, csv |
customerAccount | json, csv |
dataFeed | json, csv |
dataFeedTemplate | json, csv |
inquiry | json, csv, xml |
inventory | json, csv |
order | json, xml |
newsletterSubscriber | json, csv |
product | json, csv |
productRating | json, csv |
seoViews | json, csv |
voucher | json, csv |
voucherPreset | json, csv |
voucherTemplate | json, csv |
Methods for data import
GET import/{service}/status
This endpoint returns the current status of a running or most recently executed import process for a given service (e.g.newsletterSubscriber).
The response contains detailed information about the progress, processed and erroneous data records, the start time, and — if available — the end time of the import.
The status of an import process is represented by numeric values:0 = READY1 = STARTING2 = RUNNING3 = PAUSED4 = CANCELED5 = FINISHED6 = ERROR
These status values provide information about the current progress or result of an import.
Appropriate permissions for the respective service are required for access — either write and create permissions, or an administrator account with full access.
Example
Response
Error codes
| Error | Type | Reason |
| 401 Unauthorized | Not authorized: you are not logged in or do not have the required permissions for the service. | |
| 400 Bad Request | service is unknown. | |
| 503 Service Unavailable | ”internalError” | Redis did not return a status. |
POST import/{service}/start
This endpoint starts the import process for a given service. The data to be uploaded (e.g. as JSON or CSV) is passed in the request body. If an import process is already running for the service, it is automatically canceled before the new import is started. The response immediately returns the current status of the started import. It contains information about progress, the number of processed and erroneous data records, and start/end times. The status value is returned as a numeric code according to the import definition. Write and create permissions for the respective service (e.g. newsletter) are required to start an import. Alternatively, an administrator account with full access is required.Query parameters
| Parameter | Required | Description |
|---|---|---|
format | No | The data format of the import file (e.g. json, csv). The supported formats depend on the respective service (see section 2.1). |
sendMail | No | Only for the adminUser service: controls whether an email is sent to the imported users. |
Example
Request body
Response
Error codes
| Error | Type | Reason |
|---|---|---|
| 401 Unauthorized | Not authorized: you are not logged in or do not have the required permissions to write or create the service’s data. | |
| 400 Bad Request | service is unknown. The service does not support the format. | |
| 503 Service Unavailable | ”serviceUnavailable” | The import process could not be triggered. |
| 503 Service Unavailable | ”internalError” | Redis did not return a status. The internal FileService cannot be reached.Request could not be stored in a file. The status could not be updated in Redis. The import process did not start within 10 seconds. |
POST import/{service}/pause
This endpoint pauses a running import process for a given service. The response contains the current status of the paused process, including processed data records, progress, and any errors. After a successful pause, the status value is set toPAUSED (3).
Write and create permissions for the respective service (e.g. newsletter) are required to pause an import. Alternatively, an administrator account with full access is required.
Example
Response
Error codes
| Error | Type | Reason |
|---|---|---|
| 401 Unauthorized | Not authorized: you are not logged in or do not have the required permissions. | |
| 400 Bad Request | service is unknown. | |
| 404 Not found | The process is not running or is not in the RUNNING status. | |
| 503 Service Unavailable | ”internalError” | Redis did not return a status. Redis cannot be reached. The process could not be stopped. |
POST import/{service}/resume
This endpoint resumes a paused import process for a given service. The response contains the current status of the resumed process, including processed data records, progress, and any errors. Write and create permissions for the respective service (e.g. newsletter) are required to resume an import. Alternatively, an administrator account with full access is required.Example
Response
Error codes
| Error | Type | Reason |
|---|---|---|
| 401 Unauthorized | Not authorized: you are not logged in or do not have the required permissions. | |
| 400 Bad Request | service is unknown. | |
| 404 Not found | The process is not in the PAUSED status. | |
| 503 Service Unavailable | ”internalError” | Redis did not return a status. Redis cannot be reached. The process could not be stopped. |
DELETE import/{service}/cancel
This endpoint cancels a running import process for a given service. The response contains the current status of the canceled process, including processed data records, progress, and any errors. After a successful cancel, the status value is set toCANCELED (4).
Write and create permissions for the respective service (e.g. newsletter) are required to cancel an import. Alternatively, an administrator account with full access is required.
Example
Response
Error codes
| Error | Type | Reason |
|---|---|---|
| 401 Unauthorized | Not authorized: you are not logged in or do not have the required permissions. | |
| 400 Bad Request | service is unknown. | |
| 404 Not found | The process is not running or is not in a cancelable status (RUNNING, STARTING, or PAUSED). | |
| 503 Service Unavailable | ”internalError” | Redis did not return a status. Redis cannot be reached. The process could not be stopped. |
