Import products, SKUs and categories
Description
Allows you to import 3 types of entities at the same time: products, SKUs and categories.
Request URL
Method: POST
https://example.com/api/v1.1/market/products/import
Request parameters
Parameter | Type | Example | Required | Description |
---|---|---|---|---|
token | string | "abcdefghijklmnqrstuvwxyz" | Yes | API token Make sure that market roles are available for the token. |
custom_fields | array of objects | [ | No | Creating custom fields for the following entities:
Learn more |
categories | array of objects | [ | No | Creating categories and subcategories Learn more |
data | array of objects | [ | Yes | Data about products and their SKUs Learn more |
Request example
{
"token": "abcdefghijklmnqrstuvwxyz",
"custom_fields": [
{
"external_id": "test_field_1",
"name": "Custom field for products",
"entity_type": "product",
"required": false,
"value_type": "unicode",
"default_value": "Default value of the product custom field"
},
{
"external_id": "test_field_2",
"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_1",
"name": "Test category"
}
],
"data": [
{
"name": "Apple iPhone 13",
"external_id": "iphone_test_1",
"price": "900",
"old_price": "950",
"currency": "USD",
"tags": [
"phone",
"Apple"
],
"manufacturer_name": "Apple",
"description":"Product description",
"url": "https://example.com",
"pictures": [
"https://example.com",
"https://example.com"
],
"count": 20,
"expiration_time": "730",
"is_available": true,
"delivery": true,
"barcode": [
5235235,
347347,
335578769
],
"manufacturer_warranty": true,
"custom_fields": {
"test_field_1": "Custom field value"
},
"regional_data": [
{
"external_id": "region_YnCrJj8Y1",
"price": "65000",
"old_price": "70000",
"currency": "RUB",
"count": 5,
"is_available": true,
"delivery": false
}
],
"categories": [
"test_category_1"
],
"sku": [
{
"name": "Apple iPhone 13 256GB",
"external_id": "sku_test_1",
"price": "1000",
"old_price": "1100",
"currency": "USD",
"tags": [
"phone",
"Apple"
],
"manufacturer_name": "Apple",
"description":"SKU description",
"url": "https://example.com",
"count": 10,
"expiration_time": "730",
"is_available": true,
"delivery": true,
"barcode": [
5235235,
347347,
335578769
],
"manufacturer_warranty": true,
"custom_fields": {
"test_field_2": "Custom field value"
},
"regional_data": [
{
"external_id": "region_Un7rdJoBT",
"price": "75000",
"old_price": "80000",
"currency": "RUB",
"count": 5,
"is_available": true,
"delivery": true
}
]
}
]
}
]
}
Response example
{
"error": 0,
"error_text": "",
"result": [
{
"error": 0,
"external_id": "iphone_test_1"
}
]
}
Response parameters
Parameter | Type | Description |
---|---|---|
error | int | Error code |
error_text | string | Error text |
result | array | Product IDs that were successfully imported |