Skip to main content

Import SKUs and categories

Description

Imports 2 types of entities at the same time: SKUs and categories.

Request URL

Method: POST

https://example.com/api/v1.1/market/sku/import

Request parameters

ParameterTypeExampleRequiredDescription
tokenstring"abcdefghijklmnqrstuvwxyz"YesAPI token

Make sure that market roles are available for the token.
custom_fieldsarray of objects
[ 
   {
      "external_id": "1234",
      "name": "1234",
      "entity_type": "sku",
      "required": false,
      "value_type": "unicode",
      "default_value": "data"
   }
]
NoCreating custom fields for the following entities:
  • product
  • SKU
  • order
  • order item
Learn more
categoriesarray of objects
[
   {
      "external_id": "1234",
      "name": "Camera & Photo",
      "parent_external_id": "123"
   }
]
NoCreating categories and subcategories
Learn more
dataarray of objects
[
   {
      "name": "iPhone",
      "external_id": "123456"
   }
]
YesSKU data
Learn more

Request example

{
"token": "abcdefghijklmnqrstuvwxyz",
"custom_fields": [
{
"external_id": "test_field_string",
"name": "Custom field for SKU",
"entity_type": "sku",
"required": false,
"value_type": "unicode",
"default_value": "Default value of the SKU custom field"
}
],
"categories": [
{
"external_id": "test_category_2",
"name": "Electronics"
}
],
"data": [
{
"name": "Apple iPhone 13 256GB",
"external_id": "sku_test_1",
"price": "1000",
"old_price": "1100",
"currency": "USD",
"description":"SKU description",
"product_external_id": "iphone_test_1",
"categories": [
"test_category_2"
],
"tags": [
"phone",
"Apple"
],
"manufacturer_name": "Apple",
"url": "https://example.com",
"pictures": [
"https://example.com",
"https://example.com"
],
"count": 10,
"expiration_time": "730",
"is_available": true,
"delivery": true,
"barcode": [
23346346,
23546362,
76834566
],
"manufacturer_warranty": true,
"custom_fields": {
"test_field_string": "Test field value",
},
"regional_data": [
{
"external_id": "region_YnCrJj8Y1",
"price": "75000",
"old_price": "80000",
"currency": "RUB",
"custom_fields": {
"test_field_string": "Test field value for this region",
},
"count": 8,
"is_available": true,
"delivery": true
}
]
}
]
}

Response example

{
"error": 0,
"error_text": "",
"result": [
{
"error": 0,
"external_id": "sku_test_1"
}
]
}

Response parameters

ParameterTypeDescription
errorintError code
error_textstringError text
resultarrayIDs of SKUs that were successfully imported