Skip to content

Commit 01e4fa4

Browse files
committed
Updated API from documentation release
1 parent 5b0e1a3 commit 01e4fa4

9 files changed

+32
-13
lines changed

api-specs/api/examples/product-create.example.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,5 +33,9 @@
3333
"label": "Variant Image",
3434
"dimensions": {"w": 303,"h": 197}
3535
}]
36+
}],
37+
"attributes": [{
38+
"name": "label",
39+
"value": "product-attribute"
3640
}]
3741
}

api-specs/api/examples/product-discount-create.example.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
}
1616
]
1717
},
18-
"predicate": "(product.id = \"{{product-id}}\" and variant.id = 1) or variant.key = \"{{product-variant-key}}\"",
18+
"predicate": "(product.id = \"{{product-id}}\" and variant.id = 1) or variant.key = \"{{product-variant-key}}\" or attributes.label = \"{{product-attribute-label}}\"",
1919
"sortOrder": "0.9534",
2020
"isActive": true
2121
}

api-specs/api/examples/product-discount.example.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
}
2020
]
2121
},
22-
"predicate": "(product.id = \"{{product-id}}\" and variant.id = 1) or variant.key = \"{{product-variant-key}}\"",
22+
"predicate": "(product.id = \"{{product-id}}\" and variant.id = 1) or variant.key = \"{{product-variant-key}}\" or attributes.label = \"{{product-attribute-label}}\"",
2323
"sortOrder": "0.9534",
2424
"isActive": true,
2525
"references": [

api-specs/api/examples/product-tailoring-create.example.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,5 +38,6 @@
3838
"attributes": [{ "name": "my-attribute", "value": "attribute-2" }]
3939
}
4040
],
41+
"attributes": [{ "name": "label", "value": "product-attribute" }],
4142
"publish": false
4243
}

api-specs/api/examples/product-tailoring.example.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
}
5555
],
5656
"assets": [],
57-
"attributes": []
57+
"attributes": [{ "name": "my-attribute", "value": "attribute-1" }]
5858
},
5959
{
6060
"id": 2,
@@ -68,9 +68,10 @@
6868
}
6969
],
7070
"assets": [],
71-
"attributes": []
71+
"attributes": [{ "name": "my-attribute", "value": "attribute-2" }]
7272
}
73-
]
73+
],
74+
"attributes": [{ "name": "label", "value": "product-attribute" }]
7475
},
7576
"published": false,
7677
"hasStagedChanges": true

api-specs/api/examples/product-type-create.example.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
"en": "The right size is important."
1313
},
1414
"isRequired": false,
15-
"attributeConstraint": "CombinationUnique"
15+
"attributeConstraint": "None",
16+
"level": "Product"
1617
}]
17-
}
18+
}

api-specs/api/examples/product-type.example.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
"en": "The right size is important."
1515
},
1616
"isRequired": false,
17-
"attributeConstraint": "CombinationUnique",
18-
"level": "Variant"
17+
"attributeConstraint": "None",
18+
"level": "Product"
1919
}],
2020
"createdAt": "1970-01-01T00:00:00.001Z",
2121
"lastModifiedAt": "1970-01-01T00:00:00.001Z"

api-specs/api/examples/product.example.json

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,10 @@
4545
},
4646
"variants": [],
4747
"searchKeywords": {},
48-
"attributes": []
48+
"attributes": [{
49+
"name": "label",
50+
"value": "product-attribute"
51+
}]
4952
},
5053
"hasStagedChanges": false,
5154
"published": true,
@@ -92,7 +95,10 @@
9295
},
9396
"variants": [],
9497
"searchKeywords": {},
95-
"attributes": []
98+
"attributes": [{
99+
"name": "label",
100+
"value": "product-attribute"
101+
}]
96102
}
97103
},
98104
"productType": {

api-specs/api/examples/products.example.json

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,10 @@
5050
},
5151
"variants": [],
5252
"searchKeywords": {},
53-
"attributes": []
53+
"attributes": [{
54+
"name": "label",
55+
"value": "product-attribute"
56+
}]
5457
},
5558
"hasStagedChanges": false,
5659
"published": true,
@@ -97,7 +100,10 @@
97100
},
98101
"variants": [],
99102
"searchKeywords": {},
100-
"attributes": []
103+
"attributes": [{
104+
"name": "label",
105+
"value": "product-attribute"
106+
}]
101107
}
102108
},
103109
"productType": {

0 commit comments

Comments
 (0)