Hi community. I’m trying to setup an scenario to manage the management of products from webflow ecommerce. So this is my scenario so far:
Here is the blueprint:
blueprint.json (77.0 KB)
I manage to got all the data in order to make an API Call. I can’t do it within the generic module cause it doesn’t have the option of multiple SKU with multiple Options.
So this is the API call structure I’m trying to emulate, I took and test it straight from Webflow API documentation that can be fount here: https://docs.developers.webflow.com/data/v2.0.0-beta/reference/create-product-1
{
“publishStatus”: “staging”,
“product”: {
“isArchived”: false,
“isDraft”: false,
“fieldData”: {
“name”: “Ticket 1”,
“slug”: “ticket-1”,
“sku-properties”: [
{
“id”: “ff42fee0113744f693a764e3431a9cc2”,
“name”: “Horarios”,
“enum”: [
{
“id”: “64a74715c456e36762fc39a1”,
“name”: “6:00”,
“slug”: “6-00”
},
{
“id”: “64a74715c456e36762fc39a1”,
“name”: “Royal Blue”,
“slug”: “royal-blue”
}
]
}
]
}
},
“sku”: {
“fieldData”: {
“sku-values”: {
“12412312412412”: “1241412412412412”
},
“name”: “My new item”,
“slug”: “my-new-item”
}
}
}
…and here the request I was able to create:
{
“publishStatus”: “staging”,
“product”: {
“isArchived”: false,
“isDraft”: false,
“fieldData”: {
“name”: “Actividad A - 01-04-2024”,
“slug”: “ActividadA-01-04-2024”,
“sku-properties”:
[
{
“id”: “tbl1jLL1leg8n2QZk”,
“enum”: [
{
“id”: “recvK0tTDXhWF5AnJ”,
“name”: “0:00”,
“slug”: “0-00”
},
{
“id”: “reckmHBksNfQ5XELK”,
“name”: “6:30”,
“slug”: “6-30”
}
],
“name”: “Horarios”
},
{
“id”: “tblmbZMhBCot3jmHk”,
“enum”: [
{
“id”: “recC4Ud5giHF63ecT”,
“name”: “Menor”,
“slug”: “recC4Ud5giHF63ecT”
},
{
“id”: “rech36EZ3wBW5jOOW”,
“name”: “Adulto”,
“slug”: “rech36EZ3wBW5jOOW”
},
{
“id”: “recfhs5N5BKO1YyC0”,
“name”: “Anciano”,
“slug”: “recfhs5N5BKO1YyC0”
}
],
“name”: “Edad”
}
]
}
},
[
{
“sku”: {
“fieldData”: {
“name”: “0:00”,
“slug”: “0-00”,
“price”: {
“value”: 2000,
“unit”: “EUR”
},
“sku-values”: {
“tbl1jLL1leg8n2QZk”: “recvK0tTDXhWF5AnJ”
}
}
}
},
{
“sku”: {
“fieldData”: {
“name”: “6:30”,
“slug”: “6-30”,
“price”: {
“value”: 2000,
“unit”: “EUR”
},
“sku-values”: {
“tbl1jLL1leg8n2QZk”: “reckmHBksNfQ5XELK”
}
}
}
},
{
“sku”: {
“fieldData”: {
“name”: “Menor”,
“slug”: “recC4Ud5giHF63ecT”,
“price”: {
“value”: 2000,
“unit”: “EUR”
},
“sku-values”: {
“tblmbZMhBCot3jmHk”: “recC4Ud5giHF63ecT”
}
}
}
},
{
“sku”: {
“fieldData”: {
“name”: “Adulto”,
“slug”: “rech36EZ3wBW5jOOW”,
“price”: {
“value”: 2000,
“unit”: “EUR”
},
“sku-values”: {
“tblmbZMhBCot3jmHk”: “rech36EZ3wBW5jOOW”
}
}
}
},
{
“sku”: {
“fieldData”: {
“name”: “Anciano”,
“slug”: “recfhs5N5BKO1YyC0”,
“price”: {
“value”: 2000,
“unit”: “EUR”
},
“sku-values”: {
“tblmbZMhBCot3jmHk”: “recfhs5N5BKO1YyC0”
}
}
}
}
]
}
As you could notice there is a significant detail when comparing both which attach to “sku”.
Demo request:
},
“sku”: {
“fieldData”: {
“sku-values”: {
“12412312412412”: “1241412412412412”
},
“name”: “My new item”,
“slug”: “my-new-item”
}
}
My request:
[
{
“sku”: {
“fieldData”: {
“name”: “0:00”,
“slug”: “0-00”,
“price”: {
“value”: 2000,
“unit”: “EUR”
},
“sku-values”: {
“tbl1jLL1leg8n2QZk”: “recvK0tTDXhWF5AnJ”
}
}
}
},
{
“sku”: {
“fieldData”: {
“name”: “6:30”,
“slug”: “6-30”,
“price”: {
“value”: 2000,
“unit”: “EUR”
},
“sku-values”: {
“tbl1jLL1leg8n2QZk”: “reckmHBksNfQ5XELK”
}
}
}
},
{
“sku”: {
“fieldData”: {
“name”: “Menor”,
“slug”: “recC4Ud5giHF63ecT”,
“price”: {
“value”: 2000,
“unit”: “EUR”
},
“sku-values”: {
“tblmbZMhBCot3jmHk”: “recC4Ud5giHF63ecT”
}
}
}
},
{
“sku”: {
“fieldData”: {
“name”: “Adulto”,
“slug”: “rech36EZ3wBW5jOOW”,
“price”: {
“value”: 2000,
“unit”: “EUR”
},
“sku-values”: {
“tblmbZMhBCot3jmHk”: “rech36EZ3wBW5jOOW”
}
}
}
},
{
“sku”: {
“fieldData”: {
“name”: “Anciano”,
“slug”: “recfhs5N5BKO1YyC0”,
“price”: {
“value”: 2000,
“unit”: “EUR”
},
“sku-values”: {
“tblmbZMhBCot3jmHk”: “recfhs5N5BKO1YyC0”
}
}
}
}
]
As you notices in my sku are part of an arraywhile the correct request have the sku as individual objects.
I’m not the best in order to manage JSON and I have been trying to fix it during a lot of time now so I’m asking for your help if it’s possible. I can pay for the service.
Thank you very much in advance!