1 000 Import Containers can be created per Project. Learn more about this limit here. For more information on using Import Containers effectively for your requirements, see best practices.Representations
ImportContainer
resourceType is specified, the ImportContainer can import all of the supported ImportResourceTypes.versionInt | Current version of the ImportContainer. |
keyString | User-defined unique identifier of the ImportContainer. |
resourceType | The resource type the ImportContainer supports. If not present, the ImportContainer can import all of the supported ImportResourceTypes. |
retentionPolicyBETA | The retention policy of the ImportContainer. |
expiresAtBETA | Date and time (UTC) the ImportContainer is automatically deleted. Only present if a retentionPolicy is set. ImportContainers without expiresAt are permanent until manually deleted. |
createdAt | Date and time (UTC) the ImportContainer was initially created. |
lastModifiedAt | Date and time (UTC) the ImportContainer was last updated. |
{
"key": "my-import-container",
"version": 1,
"createdAt": "2018-02-05T09:47:16.648Z",
"lastModifiedAt": "2018-02-05T09:47:16.649Z"
}ImportContainerDraft
keyString | User-defined unique identifier of the ImportContainer. Pattern:^[a-zA-Z0-9_-]+$ |
resourceType | The resource type the ImportContainer will accept. If not specified, the ImportContainer can import all of the supported ImportResourceTypes. |
retentionPolicyBETA | Set a retention policy to automatically delete the ImportContainer after a defined period. |
{
"key": "my-import-container"
}ImportContainerPagedResponse
limitInt | Number of results requested. Default: 20Minimum: 0Maximum: 500 |
offsetInt | Number of elements skipped. Default: 0Maximum: 10000 |
countInt | Actual number of results returned. |
totalInt | Total number of results matching the query. |
resultsArray of ImportContainer | ImportContainers matching the query. |
{
"limit": 20,
"offset": 0,
"count": 1,
"total": 1,
"results": [
{
"key": "my-import-container",
"version": 1,
"createdAt": "2018-02-05T09:47:16.648Z",
"lastModifiedAt": "2018-02-05T09:47:16.649Z"
}
]
}ImportContainerUpdateDraft
The representation sent to the server when updating an ImportContainer.
versionInt | Current version of the ImportContainer. |
resourceType | The resource type to be imported.
If not given, the ImportContainer is able to import all of the supported ImportResourceTypes. |
{
"version": 1,
"resourceType": "product"
}ImportResourceType
The resource type that can be imported.
business-unit- The Business Unit import resource type.
category- The Category import resource type.
customer- The Customer import resource type.
discount-code- The Discount Code import resource type.
inventory- The Inventory import resource type.
order- The Order import resource type.
order-patch- The Order patch import resource type.
price- The Embedded Price import resource type.
product- The Product import resource type.
product-draft- The Product draft import resource type.
product-selection- The Product Selection import resource type.
product-type- The Product Type import resource type.
product-variant- The Product Variant import resource type.
product-variant-patch- The Product Variant patch resource type.
standalone-price- The Standalone Price import resource type.
type- The Type import resource type.
ImportSummary
states | The current ProcessingStates of ImportOperations in an ImportContainer. |
totalInt | The total number of ImportOperations in states. |
{
"states": {
"processing": 3,
"validationFailed": 0,
"unresolved": 0,
"waitForMasterVariant": 0,
"imported": 2,
"rejected": 0,
"canceled": 0
},
"total": 5
}OperationStates
processingInt | The number of ImportOperations in the processing state. |
validationFailedInt | The number of ImportOperations in the validationFailed state. |
unresolvedInt | The number of ImportOperations in the unresolved state. |
waitForMasterVariantInt | The number of ImportOperations in the waitForMasterVariant state. |
importedInt | The number of ImportOperations in the imported state. |
rejectedInt | The number of ImportOperations in the rejected state. |
canceledInt | The number of ImportOperations in the canceled state. |
{
"processing": 3,
"validationFailed": 0,
"unresolved": 0,
"waitForMasterVariant": 0,
"imported": 2,
"rejected": 0,
"canceled": 0
}RetentionPolicy BETA
strategy field.TimeToLiveRetentionPolicy BETA
Set a time to live retention policy for the ImportContainer.
strategyStrategyEnum | ttlThe strategy of the retention policy. Used to determine how the ImportContainer should be retained. |
config | The configuration of the time to live retention policy. |
TimeToLiveConfig BETA
timeToLiveString | The time to live of the ImportContainer. Used to generate the Pattern: expiresAt value of the ImportContainer. The lowest accepted value is 1h and the highest accepted value is 30d.^(?:(d+)d|(d+)h|(d+)m)$ |
Get ImportContainer
importContainerKey.manage_import_containers:{projectKey}view_import_containers:{projectKey}regionString | The Region in which the Project is hosted. |
projectKeyString | key of the Project. |
importContainerKeyString | key of the ImportContainer. |
application/jsoncurl --get https://import.{region}.commercetools.com/{projectKey}/import-containers/{importContainerKey} -i \
--header "Authorization: Bearer ${BEARER_TOKEN}" {
"key": "my-import-container",
"version": 1,
"createdAt": "2018-02-05T09:47:16.648Z",
"lastModifiedAt": "2018-02-05T09:47:16.649Z"
}Get ImportSummary of ImportContainer
manage_import_containers:{projectKey}view_import_containers:{projectKey}regionString | The Region in which the Project is hosted. |
projectKeyString | key of the Project. |
importContainerKeyString | key of the ImportContainer. |
application/jsoncurl --get https://import.{region}.commercetools.com/{projectKey}/import-containers/{importContainerKey}/import-summaries -i \
--header "Authorization: Bearer ${BEARER_TOKEN}"{
"states": {
"processing": 3,
"validationFailed": 0,
"unresolved": 0,
"waitForMasterVariant": 0,
"imported": 2,
"rejected": 0,
"canceled": 0
},
"total": 5
}Query ImportContainers
Retrieves all ImportContainers in the Project.
manage_import_containers:{projectKey}view_import_containers:{projectKey}regionString | The Region in which the Project is hosted. |
projectKeyString | key of the Project. |
sortString | See Sorting. The parameter can be passed multiple times. |
limitInt | Number of results requested. Default: 20Minimum: 0Maximum: 500 |
offsetInt | Number of elements skipped. Default: 0Maximum: 10000 |
application/jsoncurl --get https://import.{region}.commercetools.com/{projectKey}/import-containers -i \
--header "Authorization: Bearer ${BEARER_TOKEN}"{
"limit": 20,
"offset": 0,
"count": 1,
"total": 1,
"results": [
{
"key": "my-import-container",
"version": 1,
"createdAt": "2018-02-05T09:47:16.648Z",
"lastModifiedAt": "2018-02-05T09:47:16.649Z"
}
]
}Create ImportContainer
Creates an Import Container in the Project.
manage_import_containers:{projectKey}regionString | The Region in which the Project is hosted. |
projectKeyString | key of the Project. |
application/jsonapplication/jsoncurl https://import.{region}.commercetools.com/{projectKey}/import-containers -i \
--header "Authorization: Bearer ${BEARER_TOKEN}" \
--header 'Content-Type: application/json' \
--data-binary @- << DATA
{
"key" : "my-import-container"
}
DATA{
"key": "my-import-container",
"version": 1,
"createdAt": "2018-02-05T09:47:16.648Z",
"lastModifiedAt": "2018-02-05T09:47:16.649Z"
}Update ImportContainer
manage_import_containers:{projectKey}regionString | The Region in which the Project is hosted. |
projectKeyString | key of the Project. |
importContainerKeyString | key of the ImportContainer. |
application/jsonapplication/jsoncurl -X PUT https://import.{region}.commercetools.com/{projectKey}/import-containers/{importContainerKey} -i \
--header "Authorization: Bearer ${BEARER_TOKEN}" \
--header 'Content-Type: application/json' \
--data-binary @- << DATA
{
"version" : 1,
"resourceType" : "product"
}
DATA{
"version": 2,
"resourceType": "product",
"key": "my-import-container",
"createdAt": "2018-02-05T09:47:16.648Z",
"lastModifiedAt": "2025-01-05T12:22:20.649Z"
}Delete ImportContainer
Deletes an Import Container in the Project.
manage_import_containers:{projectKey}regionString | The Region in which the Project is hosted. |
projectKeyString | key of the Project. |
importContainerKeyString | key of the ImportContainer. |
application/jsoncurl -X DELETE https://import.{region}.commercetools.com/{projectKey}/import-containers/{importContainerKey} -i \
--header "Authorization: Bearer ${BEARER_TOKEN}"{
"key": "my-import-container",
"version": 1,
"createdAt": "2018-02-05T09:47:16.648Z",
"lastModifiedAt": "2018-02-05T09:47:16.649Z"
}