Import Containers are the entry point for Import API requests and serve as data containers for importing resources.
1 000
Import Containers can be created per Project. Learn more about this limit here.Representations
ImportContainer
Serves as the entry point of resources. An Import Container is not resource type-specific.
version Int | The version of the ImportContainer. |
key String | User-defined unique identifier for the ImportContainer. Keys can only contain alphanumeric characters (a-Z, 0-9), underscores and hyphens (_, -). |
resourceType | The resource type the ImportContainer is able to handle.
If not present, the ImportContainer is able to import all of the supported ImportResourceTypes. |
createdAt DateTime | The time when the ImportContainer was created. |
lastModifiedAt DateTime | The last time when the ImportContainer was modified. |
{
"key": "my-import-container",
"version": 1,
"createdAt": "2018-02-05T09:47:16.648Z",
"lastModifiedAt": "2018-02-05T09:47:16.649Z"
}
ImportContainerDraft
key String | User-defined unique identifier of the ImportContainer. Keys can only contain alphanumeric characters (a-Z, 0-9), underscores and hyphens (_, -). |
resourceType | The resource type to be imported.
If not given, the ImportContainer is able to import all of the supported ImportResourceTypes. |
{
"key": "my-import-container"
}
ImportContainerUpdateDraft
The representation sent to the server when updating an Import Container.
version Int | 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 types that can be imported.
category
- The Category import resource type.
customer
- The Customer 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-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.
discount-code
- The Discount Code import resource type.
ImportContainerPagedResponse
limit Int | Number of results requested. Default: 20 Minimum: 0 Maximum: 500 |
offset Int | Number of elements skipped. Default: 0 Maximum: 10000 |
count Int | The actual number of results returned. |
total Int | The total number of results matching the query. |
results Array of ImportContainer | The array of Import Containers matching the query. |
Get ImportContainer
Retrieves the Import Container given by the key.
manage_import_containers:{projectKey}
view_import_containers:{projectKey}
region String | The Region in which the Project is hosted. |
projectKey String | The Project key. |
importContainerKey String | The key of the Import Container. |
application/json
curl --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"
}
Query ImportContainers
Retrieves all Import Containers of a given project key.
manage_import_containers:{projectKey}
view_import_containers:{projectKey}
region String | The Region in which the Project is hosted. |
projectKey String | The Project key. |
sort String | See Sorting. The parameter can be passed multiple times. |
limit Int | Number of results requested. Default: 20 Minimum: 0 Maximum: 500 |
offset Int | Number of elements skipped. Default: 0 Maximum: 10000 |
application/json
curl --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 a new Import Container.
manage_import_containers:{projectKey}
region String | The Region in which the Project is hosted. |
projectKey String | The Project key. |
application/json
application/json
Update ImportContainer
Updates the Import Container given by the key.
manage_import_containers:{projectKey}
region String | The Region in which the Project is hosted. |
projectKey String | The Project key. |
importContainerKey String | The key of the Import Container. |
application/json
application/json
Delete ImportContainer
importContainerKey
.manage_import_containers:{projectKey}
region String | The Region in which the Project is hosted. |
projectKey String | The Project key. |
importContainerKey String | The key of the Import Container. |
application/json
curl -X DELETE https://import.{region}.commercetools.com/{projectKey}/import-containers/{importContainerKey} -i \
--header "Authorization: Bearer ${BEARER_TOKEN}"