BETA

Import Operations

An ImportOperation tracks the status of a single import resource as it is imported into the commercetools project.

Since the endpoint depends on a resource type, the endpoint methods are documented under the API Specification chapter for each resource type individually. See, for example, the Importing Categories page for import operations for categories.

Representations

ImportOperation

Tracks the status of a single import resource as it is imported into the commercetools project.

id
String

The identifier of the operaton that is to be commited

version
Int

The import operation version.

createdAt
DateTime

When the import operation was created.

lastModifiedAt
DateTime

When the import operation was modified.

importSinkKey
String

The key of the import sink.

resourceKey
String

The key of the import resource.

The status of the import resource.

resourceVersion
Int

When the resource is successfully imported, this represents the imported resource version

retryCount
Int

The number of request retries for processing the import resource.

errors
Array of ErrorObject

If an import resource does not import correctly, the state is set to Rejected or ValidationFailed and this property contains the errors.

expiresAt
DateTime

When the import operation expires.

Example: unresolvedjson
{
"version" : 1,
"state" : "Unresolved",
"importSinkKey" : "category-import-sink",
"resourceKey" : "child-category",
"resourceType" : "category",
"resourceAsString" : "'{}'",
"id" : "252c6ed3-c668-4610-afe9-87b9255e62e0",
"createdAt" : "2018-02-05T09:47:16.648Z",
"lastModifiedAt" : "2018-02-05T09:47:16.649Z",
"expiresAt" : "2018-02-08T09:47:16.649Z",
"retryCount" : 0,
"unresolvedReferences" : [ {
"typeId" : "category",
"key" : "my-parent-category-key"
} ]
}
Example: validationFailedjson
{
"version" : 3,
"state" : "ValidationFailed",
"errors" : [ {
"code" : "RequiredField",
"message" : "The required field 'key' is missing.",
"field" : "key"
} ],
"importSinkKey" : "category-import-sink",
"id" : "252c6ed3-c668-4610-afe9-87b9255e62e0",
"resourceKey" : "root-category",
"resourceType" : "category",
"resourceAsString" : "'{}'",
"createdAt" : "2018-02-05T09:47:16.648Z",
"lastModifiedAt" : "2018-02-05T09:47:16.649Z",
"expiresAt" : "2018-02-08T09:47:16.649Z",
"retryCount" : 0
}

ImportOperationPagedResponse

This type represents a paged import operation result.

limit
Int

The maximum number of import operations returned for a page.

offset
Int

The offset supplied by the client or the server default. It is the number of elements skipped.

count
Int

The actual number of results returned by this response.

results

The results for this paged response.