Closed flowl closed 1 year ago
@flowl the configuratorSettings are referred to in the property-group-option endpoint under productConfiguratorSettings and are named optionId
The documented reference is correct, tested with the latest version:
POST http://production.test/api/product
Accept: application/json
Content-Type: application/json
Authorization: Bearer {{ token }}
{
"price": [{
"net": 512.5,
"gross": 615,
"linked": true,
"currencyId": "b7d2554b0ce847cd82f3ac9bd1c0dfca"
}],
"stock": 10,
"productNumber": "random2",
"name": "random2",
"taxId": "0189e474ed7c71649b7a46aad30f0780",
"configuratorGroupConfig": [
{
"id": "5193ffa5de8648a1bcfba1fa8a26c02b",
"representation": "box",
"expressionForListings": true
}
],
"children": [
{
"productNumber": "random.4",
"stock": 10,
"options": [
{ "id": "2bfd278e87204807a890da4a3e81dd90" },
{ "id": "5193ffa5de8648a1bcfba1fa8a26c02b" }
]
}
],
"configuratorSettings": [
{ "optionId": "2bfd278e87204807a890da4a3e81dd90" },
{ "optionId": "5193ffa5de8648a1bcfba1fa8a26c02b" }
]
}
Response code: 204 (No Content); Time: 136ms (136 ms); Content length: 0 bytes (0 B)
Go to https://shopware.stoplight.io/docs/admin-api/935c55fbf5072-product-data#configurator-handling
click on
javascript
In the upper array, the primary key of options is just
id
(looks like a system wide convention) but in thisconfiguratorSettings
array, the options suddenly haveoptionId
where I'd expect justid
.I don't find this
optionId
anywhere in the other references:https://shopware.stoplight.io/docs/admin-api/5459ab6392f41-create-a-new-property-group-option-resources https://shopware.stoplight.io/docs/admin-api/c515447ad4771-detailed-information-about-a-property-group-option-resource