Utwórz produkt
POST
/api/products/v2/products
const url = 'https://twoja-instancja-pim-api.enterprise.sellrocket.pl/api/products/v2/products';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"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"}]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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.
Autoryzacja
Dział zatytułowany „Autoryzacja”Treść żądania
Dział zatytułowany „Treść żądania”object
id
integer format: int64
name
string
catalogId
integer format: int64
sku
string
ean
string
manufacturerId
integer format: int64
weight
number format: double
height
number format: double
width
number format: double
length
number format: double
vat
number format: double
categoryId
integer format: int64
parentId
integer format: int64
isBundle
boolean
stocks
Array<object>
object
warehouseId
integer format: int64
quantity
integer format: int32
locationName
string
vatAmount
number format: double
vatSymbol
string
productPriceGroups
Array<object>
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
properties
Array<object>
object
name
string
value
string
externalId
string
productLinks
Array<object>
object
externalProductId
string
externalVariantId
string
externalConnectionId
string
connectionId
integer format: int64
complexFields
Array<object>
object
name
string
value
string
bundleItems
Array<object>
object
bundleItemProductId
integer format: int64
quantity
integer format: int32
translations
object
key
additional properties
object
name
string
descriptionComplexFields
Array<object>
object
name
string
description
string
productProperties
Array<object>
object
name
string
value
string
vatSymbol
string
additionalEans
Array<object>
object
id
string
ean
string
quantity
integer format: int32
description
string
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" } ]}object
id
integer format: int64
name
string
catalogId
integer format: int64
sku
string
ean
string
manufacturerId
integer format: int64
weight
number format: double
height
number format: double
width
number format: double
length
number format: double
vat
number format: double
categoryId
integer format: int64
parentId
integer format: int64
isBundle
boolean
stocks
Array<object>
object
warehouseId
integer format: int64
quantity
integer format: int32
locationName
string
vatAmount
number format: double
vatSymbol
string
productPriceGroups
Array<object>
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
properties
Array<object>
object
name
string
value
string
externalId
string
productLinks
Array<object>
object
externalProductId
string
externalVariantId
string
externalConnectionId
string
connectionId
integer format: int64
complexFields
Array<object>
object
name
string
value
string
bundleItems
Array<object>
object
bundleItemProductId
integer format: int64
quantity
integer format: int32
translations
object
key
additional properties
object
name
string
descriptionComplexFields
Array<object>
object
name
string
description
string
productProperties
Array<object>
object
name
string
value
string
vatSymbol
string
additionalEans
Array<object>
object
id
string
ean
string
quantity
integer format: int32
description
string
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" } ]}object
id
integer format: int64
name
string
catalogId
integer format: int64
sku
string
ean
string
manufacturerId
integer format: int64
weight
number format: double
height
number format: double
width
number format: double
length
number format: double
vat
number format: double
categoryId
integer format: int64
parentId
integer format: int64
isBundle
boolean
stocks
Array<object>
object
warehouseId
integer format: int64
quantity
integer format: int32
locationName
string
vatAmount
number format: double
vatSymbol
string
productPriceGroups
Array<object>
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
properties
Array<object>
object
name
string
value
string
externalId
string
productLinks
Array<object>
object
externalProductId
string
externalVariantId
string
externalConnectionId
string
connectionId
integer format: int64
complexFields
Array<object>
object
name
string
value
string
bundleItems
Array<object>
object
bundleItemProductId
integer format: int64
quantity
integer format: int32
translations
object
key
additional properties
object
name
string
descriptionComplexFields
Array<object>
object
name
string
description
string
productProperties
Array<object>
object
name
string
value
string
vatSymbol
string
additionalEans
Array<object>
object
id
string
ean
string
quantity
integer format: int32
description
string
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" } ]}Odpowiedzi
Dział zatytułowany „Odpowiedzi”Success
integer format: int64
integer format: int64
Examplegenerated
1integer format: int64
Examplegenerated
1Conflict
object
type
string
title
string
status
integer format: int32
detail
string
instance
string
key
additional properties
object
type
string
title
string
status
integer format: int32
detail
string
instance
string
key
additional properties
Examplegenerated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example"}object
type
string
title
string
status
integer format: int32
detail
string
instance
string
key
additional properties
Examplegenerated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example"}
