retentionPolicy are automatically deleted 72 hours after creation. Set a TimeToLiveRetentionPolicy to use a custom duration (within the allowed minimum and maximum). See best practices for guidance on organizing containers.1 000 Import Containers can be created per Project. Merchant Center users may see a message that the maximum number of Import Containers has been reached. This is a soft limit that can be increased per Project after a performance impact review. See Limit increase guidance. For more information on using Import Containers effectively for your requirements, see best practices.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",
"expiresAt": "2018-02-08T09:47:16.648Z"
}Get ImportSummary of ImportContainer
importContainerKey. The returned values are eventually consistent.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,
"partiallyImported": 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. |
limitInt64 | Number of results requested. Default: 20Minimum: 0Maximum: 500 |
offsetInt64 | 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",
"expiresAt": "2018-02-08T09:47:16.648Z"
}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",
"expiresAt": "2018-02-08T09:47:16.648Z"
}Representations
ImportContainer
resourceType is specified, the ImportContainer can import all of the supported ImportResourceTypes.retentionPolicy, it expires 72 hours after createdAt. If a TimeToLiveRetentionPolicy was set, expiry follows the configured timeToLive (between the minimum and maximum allowed values). The expiresAt field holds the calculated deletion time.versionInt64 | 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. |
retentionPolicy | Retention policy for this ImportContainer. If not set, the ImportContainer will expire 72 hours after creation. |
expiresAt | Date and time (UTC) when the ImportContainer is automatically deleted.
If no retentionPolicy was set at creation, this is 72 hours after createdAt. If a TimeToLiveRetentionPolicy was set, it is derived from timeToLive. |
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",
"expiresAt": "2018-02-08T09:47:16.648Z"
}ImportContainerDraft
retentionPolicy, the new ImportContainer uses the default 72-hour time to live. Set a TimeToLiveRetentionPolicy to use a custom duration (within the allowed minimum and maximum).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. |
retentionPolicy | Optional. When set, defines how long the ImportContainer is kept before automatic deletion.
When omitted, the ImportContainer receives the default 72-hour lifetime. |
{
"key": "my-import-container"
}ImportContainerPagedResponse
limitInt | Number of results requested. Default: 20Minimum: 0Maximum: 500 |
offsetInt64 | Number of elements skipped. Default: 0Maximum: 10000 |
countInt64 | Actual number of results returned. |
totalInt64 | 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.
versionInt64 | 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-tailoring- The Product Tailoring 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.
variant- The Variant import resource type.
type- The Type import resource type.
ImportSummary
states | The current ProcessingStates of ImportOperations in an ImportContainer. |
totalInt64 | The total number of ImportOperations in states. |
{
"states": {
"processing": 3,
"validationFailed": 0,
"unresolved": 0,
"waitForMasterVariant": 0,
"imported": 2,
"rejected": 0,
"canceled": 0,
"partiallyImported": 0
},
"total": 5
}OperationStates
processingInt64 | The number of ImportOperations in the processing state. |
validationFailedInt64 | The number of ImportOperations in the validationFailed state. |
unresolvedInt64 | The number of ImportOperations in the unresolved state. |
waitForMasterVariantInt64 | The number of ImportOperations in the waitForMasterVariant state. |
importedInt64 | The number of ImportOperations in the imported state. |
rejectedInt64 | The number of ImportOperations in the rejected state. |
canceledInt64 | The number of ImportOperations in the canceled state. |
partiallyImportedInt64 | The number of ImportOperations in the partiallyImported state. |
{
"processing": 3,
"validationFailed": 0,
"unresolved": 0,
"waitForMasterVariant": 0,
"imported": 2,
"rejected": 0,
"canceled": 0,
"partiallyImported": 0
}RetentionPolicy
strategy field.TimeToLiveRetentionPolicy
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
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)$ |