Ergonode docs
Search…
Creating variable product with mutation
This how you can create variable product via API.
Please note that for this to work, you need to create template beforehand. This mutatnion can only assignt product to allready existed template, and will NOT create new one.
While templateCode is required, categoryCodes is not. But if used, also needed to be created beforehand.
1
mutation {
2
productCreateVariable(
3
input: {
4
sku: "SKU_VAR_PRODUCT"
5
templateCode: "Tshirts"
6
categoryCodes: "DELL"
7
}
8
) {
9
__typename
10
}
11
}
Copied!
Copy link