Przejdź do głównej zawartości

Utwórz produkty wraz z zależnościami

POST
/api/products/v2/products/bulkCreateWithDependencies
curl --request POST \
--url https://twoja-instancja-pim-api.enterprise.sellrocket.pl/api/products/v2/products/bulkCreateWithDependencies \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "products": [ { "id": 1, "externalId": "example", "name": "example", "catalogId": 1, "sku": "example", "ean": "example", "manufacturerId": { "id": 1, "name": "example" }, "weight": 1, "height": 1, "width": 1, "length": 1, "vat": 1, "categoryId": { "id": 1, "name": "example", "parentId": 1 }, "parentId": 1, "isBundle": true, "stocks": [ { "warehouseId": 1, "quantity": 1, "locationName": "example", "vatAmount": 1, "vatSymbol": "example" } ], "productPriceGroups": [ { "priceGroupId": 1, "price": 1 } ], "isAsteriskMarked": true, "properties": [ { "name": "example", "value": "example" } ], "overwriteProductLinks": true, "productLinks": [ { "externalProductId": "example", "externalVariantId": "example", "externalConnectionId": "example", "connectionId": 1 } ], "complexFields": [ { "name": "example", "description": "example", "caption": "example", "type": "example", "additionalFieldMapping": "example", "options": [ "example" ], "id": 1, "value": "example" } ], "bundleItems": [ { "bundleItemProductId": 1, "quantity": 1 } ], "replaceAllExistingImages": true, "images": [ { "slot": 1, "imageLink": "example", "imageFile": "example" } ], "additionalEans": [ { "id": "example", "ean": "example", "quantity": 1, "description": "example" } ], "translations": { "additionalProperty": { "name": "example", "descriptionComplexFields": [ { "name": "example", "description": "example" } ], "productProperties": [ { "name": "example", "value": "example" } ] } } } ] }'

Masowo tworzy produkty, zakładając brakujące elementy powiązane (np. kategorie, producentów), i zwraca wynik dla każdego produktu.

object
products
Array<object>
nullable
object
id
integer format: int64
nullable
externalId
string
nullable
name
string
nullable
catalogId
integer format: int64
sku
string
nullable
ean
string
nullable
manufacturerId
object
id
integer format: int64
nullable
name
string
nullable
weight
number format: double
nullable
height
number format: double
nullable
width
number format: double
nullable
length
number format: double
nullable
vat
number format: double
nullable
categoryId
object
id
integer format: int64
nullable
name
string
nullable
parentId
integer format: int64
nullable
parentId
integer format: int64
nullable
isBundle
boolean
nullable
stocks
Array<object>
nullable
object
warehouseId
integer format: int64
quantity
integer format: int32
locationName
string
nullable
vatAmount
number format: double
nullable
vatSymbol
string
nullable
productPriceGroups
Array<object>
nullable
object
priceGroupId
integer format: int64
price
number format: double
isAsteriskMarked
boolean
nullable
properties
Array<object>
nullable
object
name
string
nullable
value
string
nullable
overwriteProductLinks
boolean
nullable
productLinks
Array<object>
nullable
object
externalProductId
string
nullable
externalVariantId
string
nullable
externalConnectionId
string
nullable
connectionId
integer format: int64
complexFields
Array<object>
nullable
object
name
string
nullable
description
string
nullable
caption
string
nullable
type
string
nullable
additionalFieldMapping
string
nullable
options
Array<string>
nullable
id
integer format: int64
nullable
value
string
nullable
bundleItems
Array<object>
nullable
object
bundleItemProductId
integer format: int64
quantity
integer format: int32
replaceAllExistingImages
boolean
nullable
images
Array<object>
nullable
object
slot
integer format: int32
imageLink
string
nullable
imageFile
string
nullable
additionalEans
Array<object>
nullable
object
id
string
nullable
ean
string
nullable
quantity
integer format: int32
description
string
nullable
translations
object
key
additional properties
object
name
string
nullable
descriptionComplexFields
Array<object>
nullable
object
name
string
nullable
description
string
nullable
productProperties
Array<object>
nullable
object
name
string
nullable
value
string
nullable
Examplegenerated
{
"products": [
{
"id": 1,
"externalId": "example",
"name": "example",
"catalogId": 1,
"sku": "example",
"ean": "example",
"manufacturerId": {
"id": 1,
"name": "example"
},
"weight": 1,
"height": 1,
"width": 1,
"length": 1,
"vat": 1,
"categoryId": {
"id": 1,
"name": "example",
"parentId": 1
},
"parentId": 1,
"isBundle": true,
"stocks": [
{
"warehouseId": 1,
"quantity": 1,
"locationName": "example",
"vatAmount": 1,
"vatSymbol": "example"
}
],
"productPriceGroups": [
{
"priceGroupId": 1,
"price": 1
}
],
"isAsteriskMarked": true,
"properties": [
{
"name": "example",
"value": "example"
}
],
"overwriteProductLinks": true,
"productLinks": [
{
"externalProductId": "example",
"externalVariantId": "example",
"externalConnectionId": "example",
"connectionId": 1
}
],
"complexFields": [
{
"name": "example",
"description": "example",
"caption": "example",
"type": "example",
"additionalFieldMapping": "example",
"options": [
"example"
],
"id": 1,
"value": "example"
}
],
"bundleItems": [
{
"bundleItemProductId": 1,
"quantity": 1
}
],
"replaceAllExistingImages": true,
"images": [
{
"slot": 1,
"imageLink": "example",
"imageFile": "example"
}
],
"additionalEans": [
{
"id": "example",
"ean": "example",
"quantity": 1,
"description": "example"
}
],
"translations": {
"additionalProperty": {
"name": "example",
"descriptionComplexFields": [
{
"name": "example",
"description": "example"
}
],
"productProperties": [
{
"name": "example",
"value": "example"
}
]
}
}
}
]
}

Success

Array<object>
object
externalId
string
nullable
id
integer format: int64

Conflict

object
type
string
nullable
title
string
nullable
status
integer format: int32
nullable
detail
string
nullable
instance
string
nullable
key
additional properties