Przejdź do głównej zawartości

Utwórz produkt

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

Dodaje nowy produkt do katalogu. Odpowiednik addInventoryProduct w BaseLinker.

object
id
integer format: int64
nullable
name
string
nullable
catalogId
integer format: int64
sku
string
nullable
ean
string
nullable
manufacturerId
integer format: int64
nullable
weight
number format: double
height
number format: double
width
number format: double
length
number format: double
vat
number format: double
categoryId
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
basePriceGroupData
object
basePriceGroupId
integer format: int64
priceMultiplier
number format: double
addToPrice
number format: double
isAsteriskMarked
boolean
nullable
properties
Array<object>
nullable
object
name
string
nullable
value
string
nullable
externalId
string
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
value
string
nullable
bundleItems
Array<object>
nullable
object
bundleItemProductId
integer format: int64
quantity
integer format: int32
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
vatSymbol
string
nullable
additionalEans
Array<object>
nullable
object
id
string
nullable
ean
string
nullable
quantity
integer format: int32
description
string
nullable
Examplegenerated
{
"id": 1,
"name": "example",
"catalogId": 1,
"sku": "example",
"ean": "example",
"manufacturerId": 1,
"weight": 1,
"height": 1,
"width": 1,
"length": 1,
"vat": 1,
"categoryId": 1,
"parentId": 1,
"isBundle": true,
"stocks": [
{
"warehouseId": 1,
"quantity": 1,
"locationName": "example",
"vatAmount": 1,
"vatSymbol": "example"
}
],
"productPriceGroups": [
{
"priceGroupId": 1,
"price": 1,
"basePriceGroupData": {
"basePriceGroupId": 1,
"priceMultiplier": 1,
"addToPrice": 1
}
}
],
"isAsteriskMarked": true,
"properties": [
{
"name": "example",
"value": "example",
"externalId": "example"
}
],
"productLinks": [
{
"externalProductId": "example",
"externalVariantId": "example",
"externalConnectionId": "example",
"connectionId": 1
}
],
"complexFields": [
{
"name": "example",
"value": "example"
}
],
"bundleItems": [
{
"bundleItemProductId": 1,
"quantity": 1
}
],
"translations": {
"additionalProperty": {
"name": "example",
"descriptionComplexFields": [
{
"name": "example",
"description": "example"
}
],
"productProperties": [
{
"name": "example",
"value": "example"
}
]
}
},
"vatSymbol": "example",
"additionalEans": [
{
"id": "example",
"ean": "example",
"quantity": 1,
"description": "example"
}
]
}

Success

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