Discovery needs no key. Ratings and market analysis are Pro.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we
store it to create your key and to recognise you if you sign in with another
provider. See our Privacy Policy and
Terms.
openapi: 3.2.0
info:
title: commercetools Import Import Operations API
description: The commercetools Import API enables bulk importing of commerce data into a Composable Commerce project. It supports importing categories, product types, products, product variants, prices, inventory entries, orders, customers, business units, discount codes, product selections, standalone prices, and type definitions. Imports are processed asynchronously through import containers, and the API provides endpoints for monitoring import operation status and handling validation errors. The Import API is hosted on separate regional endpoints from the main HTTP API and uses the same OAuth 2.0 authorization model.
version: '1.0'
contact:
name: commercetools Support
url: https://support.commercetools.com
termsOfService: https://commercetools.com/terms-conditions
servers:
- url: https://import.{region}.commercetools.com
description: Production Import Server
variables:
region:
default: us-central1.gcp
enum:
- us-central1.gcp
- us-east-2.aws
- europe-west1.gcp
- eu-central-1.aws
- australia-southeast1.gcp
description: The deployment region.
security:
- bearerAuth: []
tags:
- name: ImportOperations
description: Monitor the status of individual import operations.
paths:
/{projectKey}/import-containers/{importContainerKey}/import-operations:
get:
operationId: listImportOperations
summary: List import operations in a container
description: Returns a paginated list of import operations for the given container. Import operations track the processing status of individual resources within an import request. Supports filtering by state.
tags:
- ImportOperations
parameters:
- $ref: '#/components/parameters/projectKey'
- $ref: '#/components/parameters/importContainerKey'
- $ref: '#/components/parameters/limit'
- $ref: '#/components/parameters/offset'
- name: state
in: query
required: false
schema:
type: string
enum:
- Accepted
- ValidationFailed
- Unresolved
- WaitForMasterVariant
- Imported
- Rejected
- Cancelled
description: Filter operations by their current processing state.
responses:
'200':
description: A paged list of import operations.
content:
application/json:
schema:
$ref: '#/components/schemas/ImportOperationPagedQueryResponse'
'401':
$ref: '#/components/responses/Unauthorized'
/{projectKey}/import-containers/{importContainerKey}/import-operations/{id}:
get:
operationId: getImportOperationById
summary: Get an import operation by ID
description: Retrieves a single import operation by its ID. The operation record includes the processing state, any validation errors, and a reference to the resource that was imported or failed validation.
tags:
- ImportOperations
parameters:
- $ref: '#/components/parameters/projectKey'
- $ref: '#/components/parameters/importContainerKey'
- $ref: '#/components/parameters/id'
responses:
'200':
description: The requested import operation.
content:
application/json:
schema:
$ref: '#/components/schemas/ImportOperation'
'404':
$ref: '#/components/responses/NotFound'
components:
responses:
NotFound:
description: The requested resource was not found.
content:
application/json:
schema:
type: object
properties:
statusCode:
type: integer
message:
type: string
Unauthorized:
description: The request lacked valid authentication credentials.
content:
application/json:
schema:
type: object
properties:
statusCode:
type: integer
message:
type: string
parameters:
importContainerKey:
name: importContainerKey
in: path
required: true
schema:
type: string
description: The user-defined key of the import container.
id:
name: id
in: path
required: true
schema:
type: string
description: The unique identifier of the resource.
projectKey:
name: projectKey
in: path
required: true
schema:
type: string
description: The unique key of the commercetools project.
offset:
name: offset
in: query
required: false
schema:
type: integer
minimum: 0
default: 0
description: Number of results to skip for pagination.
limit:
name: limit
in: query
required: false
schema:
type: integer
minimum: 1
maximum: 500
default: 20
description: Maximum number of results to return.
schemas:
ErrorObject:
type: object
description: An error object describing a validation or processing failure.
required:
- code
- message
properties:
code:
type: string
description: Machine-readable error code.
message:
type: string
description: Human-readable description of the error.
ImportOperation:
type: object
description: A record tracking the processing status of a single resource within an import request.
required:
- version
- importContainerKey
- resourceKey
- state
properties:
id:
type: string
description: System-generated unique identifier for the operation.
version:
type: integer
description: Current version of the import operation record.
importContainerKey:
type: string
description: Key of the container this operation belongs to.
resourceKey:
type: string
description: User-defined key of the resource being imported.
state:
type: string
enum:
- Accepted
- ValidationFailed
- Unresolved
- WaitForMasterVariant
- Imported
- Rejected
- Cancelled
description: Current processing state of the import operation.
resourceType:
type: string
description: The type of resource being imported.
errors:
type: array
items:
$ref: '#/components/schemas/ErrorObject'
description: Validation or processing errors if the operation failed.
createdAt:
type: string
format: date-time
description: ISO 8601 timestamp when the operation was created.
lastModifiedAt:
type: string
format: date-time
description: ISO 8601 timestamp when the operation was last modified.
ImportOperationPagedQueryResponse:
type: object
description: Paginated response containing a list of import operations.
required:
- limit
- offset
- count
- total
- results
properties:
limit:
type: integer
offset:
type: integer
count:
type: integer
total:
type: integer
results:
type: array
items:
$ref: '#/components/schemas/ImportOperation'
securitySchemes:
bearerAuth:
type: http
scheme: bearer
description: OAuth 2.0 Bearer token obtained from the commercetools authentication service using client credentials flow.
externalDocs:
description: commercetools Import API Documentation
url: https://docs.commercetools.com/api/import-export/overview