Salta ai contenuti

Upsert product (create or update)

POST
/v2/product-catalog/products
curl --request POST \
--url https://api-crm-staging.divinea.com/api/v2/product-catalog/products \
--header 'APIKey: <APIKey>' \
--header 'Content-Type: application/json' \
--data '{ "active": true, "attributeAssignments": [ { "attributeId": 1, "attributeValueId": 1 } ], "barcode": "example", "categoryIds": [ "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" ], "channels": [ { "active": true, "maxUnitsPerOrder": 1, "priceCents": 1, "wineryChannelId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" } ], "defaultVatRate": 1, "descriptionEn": "example", "descriptionIt": "example", "descriptionTranslationId": "example", "descriptionTranslations": { "additionalProperty": "example" }, "displayOrder": 1, "displayStatus": "example", "fiscalNatureId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "hasVariants": true, "isBundle": true, "isGiftCard": true, "metaDescriptionTranslationId": "example", "metaTitleTranslationId": "example", "metadata": [ { "key": "example", "value": "example" } ], "nameEn": "example", "nameIt": "example", "nameTranslationId": "example", "nameTranslations": { "additionalProperty": "example" }, "pointOfSaleWineSuiteId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "posNameTranslationId": "example", "posNameTranslations": { "additionalProperty": "example" }, "priceCents": 1, "priceCurrency": "example", "productId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "shortDescriptionTranslationId": "example", "showPos": true, "showWebsite": true, "sku": "example", "status": "example", "typeId": "example", "validityFrom": "2026-04-15", "validityTo": "2026-04-15", "variantMasterId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" }'

Request

Media typeapplication/json
UpsertProductRequest
object
active
boolean
attributeAssignments
Array<object>
ProductAttributeAssignmentDTO
object
attributeId
integer format: int64
attributeValueId
integer format: int64
barcode
string
categoryIds
Array<string>
channels
Array<object>
ProductChannelDTO
object
active
boolean
maxUnitsPerOrder
integer format: int32
priceCents
integer format: int64
wineryChannelId
string format: uuid
defaultVatRate
number
descriptionEn
string
descriptionIt
string
descriptionTranslationId
string
descriptionTranslations
object
key
additional properties
string
displayOrder
integer format: int32
displayStatus
string
fiscalNatureId
string format: uuid
hasVariants
boolean
isBundle
boolean
isGiftCard
boolean
metaDescriptionTranslationId
string
metaTitleTranslationId
string
metadata
Array<object>
ProductMetadataDTO
object
key
string
value
string
nameEn
string
nameIt
string
nameTranslationId
string
nameTranslations
object
key
additional properties
string
pointOfSaleWineSuiteId
string format: uuid
posNameTranslationId
string
posNameTranslations
object
key
additional properties
string
priceCents
integer format: int64
priceCurrency
string
productId
string format: uuid
shortDescriptionTranslationId
string
showPos
boolean
showWebsite
boolean
sku
string
status
string
typeId
string
validityFrom
string format: date
validityTo
string format: date
variantMasterId
string format: uuid
Examplegenerated
{
"active": true,
"attributeAssignments": [
{
"attributeId": 1,
"attributeValueId": 1
}
],
"barcode": "example",
"categoryIds": [
"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"
],
"channels": [
{
"active": true,
"maxUnitsPerOrder": 1,
"priceCents": 1,
"wineryChannelId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"
}
],
"defaultVatRate": 1,
"descriptionEn": "example",
"descriptionIt": "example",
"descriptionTranslationId": "example",
"descriptionTranslations": {
"additionalProperty": "example"
},
"displayOrder": 1,
"displayStatus": "example",
"fiscalNatureId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"hasVariants": true,
"isBundle": true,
"isGiftCard": true,
"metaDescriptionTranslationId": "example",
"metaTitleTranslationId": "example",
"metadata": [
{
"key": "example",
"value": "example"
}
],
"nameEn": "example",
"nameIt": "example",
"nameTranslationId": "example",
"nameTranslations": {
"additionalProperty": "example"
},
"pointOfSaleWineSuiteId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"posNameTranslationId": "example",
"posNameTranslations": {
"additionalProperty": "example"
},
"priceCents": 1,
"priceCurrency": "example",
"productId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"shortDescriptionTranslationId": "example",
"showPos": true,
"showWebsite": true,
"sku": "example",
"status": "example",
"typeId": "example",
"validityFrom": "2026-04-15",
"validityTo": "2026-04-15",
"variantMasterId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"
}

OK

Media type*/*
CreationResponse
object
id
string
message
string
status
string