Import Containers
Import Containers are the entry point for Import API requests and serve as data containers for importing resources.
Each create, update, or patch request sent to the Import API is first accumulated in an Import Container and then asynchronously imported into commercetools Composable Commerce. For more information on using Import Containers effectively for your requirements, see best practices.
Representations
ImportContainer
Serves as the entry point of resources. An Import Container is not resource type-specific.
versionInt | The version of the ImportContainer. |
keyString | 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 | The time when the ImportContainer was created. |
lastModifiedAt | 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
The representation sent to the server when creating an ImportContainer.
keyString | 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.
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 types that can be imported.
categoryThe Category import resource type.
customerThe Customer import resource type.
inventoryThe Inventory import resource type.
orderThe Order import resource type.
order-patchThe Order patch import resource type.
priceThe Embedded Price import resource type.
productThe Product import resource type.
product-draftThe Product draft import resource type.
product-typeThe Product Type import resource type.
product-variantThe Product Variant import resource type.
product-variant-patchThe Product Variant patch resource type.
standalone-priceThe Standalone Price import resource type.
typeThe Type import resource type.
discount-codeThe Discount Code import resource type.
ImportContainerPagedResponse
PagedQueryResult for ImportContainers. Used as a response to a query request for ImportContainers.
limitInt | Number of results requested. Default:20Maximum: 500 |
offsetInt | Number of elements skipped. Default:0Maximum: 10 000 |
countInt | The actual number of results returned. |
totalInt | The total number of results matching the query. |
resultsArray 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}regionString | The Region in which the Project is hosted. |
projectKeyString | The Project key. |
importContainerKeyString | The key of the import container. |
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"}
Query ImportContainers
Retrieves all import containers of a given project key.
manage_import_containers:{projectKey}view_import_containers:{projectKey}regionString | The Region in which the Project is hosted. |
projectKeyString | The Project key. |
sortString | See Sorting. The parameter can be passed multiple times. |
limitInt | Number of results requested. Default: 20 |
offsetInt | Number of elements skipped. Default: 0 |
application/jsoncurl --get https://import.{region}.commercetools.com/{projectKey}/import-containers -i \--header "Authorization: Bearer ${BEARER_TOKEN}"
Create ImportContainer
Creates a new import container.
manage_import_containers:{projectKey}regionString | The Region in which the Project is hosted. |
projectKeyString | The Project key. |
application/jsonapplication/json{"key": "my-import-container","version": 1,"createdAt": "2018-02-05T09:47:16.648Z","lastModifiedAt": "2018-02-05T09:47:16.649Z"}
Update ImportContainer
Updates the import container given by the key.
manage_import_containers:{projectKey}regionString | The Region in which the Project is hosted. |
projectKeyString | The Project key. |
importContainerKeyString | The key of the import container. |
application/jsonapplication/json{"key": "my-import-container","version": 1,"createdAt": "2018-02-05T09:47:16.648Z","lastModifiedAt": "2018-02-05T09:47:16.649Z"}
Delete ImportContainer
Deletes the import container given by the key.
manage_import_containers:{projectKey}regionString | The Region in which the Project is hosted. |
projectKeyString | The Project key. |
importContainerKeyString | The key of the import container. |
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"}