BETA

Import Sinks

Representations

ImportSink

An import sink is the entry point for import resources from other systems.

It has an unique key and is specific to an import resource type.

version
Int

The version of this resource.

key
String

The unique key of the import sink.

createdAt
DateTime

When the import sink was created.

lastModifiedAt
DateTime

When the import sink was modified.

resourceType
ImportResourceType

The type of import resource sent to this import sink. You can only send one resource type per import sink.

Example: minimaljson
{
"key" : "product-import-sink",
"resourceType" : "product",
"version" : 1,
"createdAt" : "2018-02-05T09:47:16.648Z",
"lastModifiedAt" : "2018-02-05T09:47:16.649Z"
}

ImportSinkDraft

The representation sent to the server when creating or updating an import sink.

version
Int

The version of this resource.

key
String

The unique key of the import sink.

resourceType
ImportResourceType

The type of import resource sent to this import sink.

Example: minimaljson
{
"key" : "product-import-sink",
"version" : 1,
"resourceType" : "product"
}

ImportResourceType

The Import API supports the following resource types:

  • category
  • price
  • product
  • product-draft
  • product-type
  • product-variant
  • order
  • customer

Endpoints

Retrieve all ImportSinks

Retrieves all import sinks of a project key.

GET
https://import.europe-west1.gcp.commercetools.com/{projectKey}/import-sinks
OAuth 2.0 Scopes:
manage_project:{projectKey}, manage_import_sinks:{projectKey}, view_import_sinks:{projectKey}
Path Parameters:
projectKey
String
The commercetools project key.
Query Parameters:
limit
Float
-
offset
Float
-
Response:

200ImportSinkPagedResponse

Request Example:cURL
curl -X GET https://import.europe-west1.gcp.commercetools.com/{projectKey}/import-sinks?limit={limit}&offset={offset} -i \
--header 'Authorization: Bearer ${BEARER_TOKEN}'

Retrieve an ImportSink by its Key

Retrieves the import sink given by the key.

GET
https://import.europe-west1.gcp.commercetools.com/{projectKey}/import-sinks/{importSinkKey}
OAuth 2.0 Scopes:
manage_project:{projectKey}, manage_import_sinks:{projectKey}, view_import_sinks:{projectKey}
Path Parameters:
projectKey
String
The commercetools project key.
importSinkKey
String
The key of the import sink.
Response:
Request Example:cURL
curl -X GET https://import.europe-west1.gcp.commercetools.com/{projectKey}/import-sinks/{importSinkKey} -i \
--header 'Authorization: Bearer ${BEARER_TOKEN}'
Response Example:json
{
"key" : "product-import-sink",
"resourceType" : "product",
"version" : 1,
"createdAt" : "2018-02-05T09:47:16.648Z",
"lastModifiedAt" : "2018-02-05T09:47:16.649Z"
}

Create an ImportSink

Creates a new import sink.

POST
https://import.europe-west1.gcp.commercetools.com/{projectKey}/import-sinks
OAuth 2.0 Scopes:
manage_project:{projectKey}, manage_import_sinks:{projectKey}
Path Parameters:
projectKey
String
The commercetools project key.
Request Body:ImportSinkDraft
Response:
Response Example:json
{
"key" : "product-import-sink",
"resourceType" : "product",
"version" : 1,
"createdAt" : "2018-02-05T09:47:16.648Z",
"lastModifiedAt" : "2018-02-05T09:47:16.649Z"
}

Update an ImportSink

Updates the import sink given by the key.

PUT
https://import.europe-west1.gcp.commercetools.com/{projectKey}/import-sinks/{importSinkKey}
OAuth 2.0 Scopes:
manage_project:{projectKey}, manage_import_sinks:{projectKey}
Path Parameters:
projectKey
String
The commercetools project key.
importSinkKey
String
The key of the import sink.
Request Body:ImportSinkDraft
Response:
Response Example:json
{
"key" : "product-import-sink",
"resourceType" : "product",
"version" : 1,
"createdAt" : "2018-02-05T09:47:16.648Z",
"lastModifiedAt" : "2018-02-05T09:47:16.649Z"
}

Delete an ImportSink by its Key

Deletes the import sink given by the key.

DELETE
https://import.europe-west1.gcp.commercetools.com/{projectKey}/import-sinks/{importSinkKey}
OAuth 2.0 Scopes:
manage_project:{projectKey}, manage_import_sinks:{projectKey}
Path Parameters:
projectKey
String
The commercetools project key.
importSinkKey
String
The key of the import sink.
Response:
Request Example:cURL
curl -X DELETE https://import.europe-west1.gcp.commercetools.com/{projectKey}/import-sinks/{importSinkKey} -i \
--header 'Authorization: Bearer ${BEARER_TOKEN}'
Response Example:json
{
"key" : "product-import-sink",
"resourceType" : "product",
"version" : 1,
"createdAt" : "2018-02-05T09:47:16.648Z",
"lastModifiedAt" : "2018-02-05T09:47:16.649Z"
}