Promotion created via REST Api
Summary
A promotion is created via rest api using rawpmdl template.But the discount amount is not fetched during the creation.Code Snippet
{
"displayName":"Get 1255rs Off in Reseller Products",
"description":"A sample item discount promotion",
"priceListGroups":["defaultPriceGroup"],
"enabled":true,
"priority":"1",
"startDate":"2020-07-10T00:00:00.000-05:00",
"endDate":"2116-03-30T00:00:00.000-05:00",
"templatePath": "item",
"templateName": "rawPmdlTemplate",
"templateValues":
{"pmdl": {"xml": "<pricing-model><qualifier><quantifier name=\"at-least\" number=\"10\"><collection-name>items</collection-name><element-name>item</element-name><aggregator name= \"spendAmount\" operation=\"total\"/></quantifier></qualifier><offer><discount-structure calculator-type=\"standard\" discount-type=\"amountOff\" adjuster=\"1255\"></discount-structure></offer></pricing-model>"
}
}
}
Tagged:
1