Hello,
I am sending request wit couple of string, boolean fields. I have many requests so I am sending it via RUNNER. I would need as well to send array of objects so in my real request it looks something like:
"Variants": [ { "EAN": "ean1", "ReservedStock": 10, "Price": 20, }, { "EAN": "ean2", "ReservedStock": 100, "Price": 200 } ],
My raw request:
{
"id": "DomainProduct/__NEW__",
"ProductDetails": {
"ERPNumber": "{{ERP_NUMBER}}",
"LidlProductNumber": "{{LIDL_PRODUCT_NUMBER}}",
"ProductName": "{{SHORT_DESCRIPTION}}",
"OnlineProduct": {{ONLINE_PRODUCT},
"Variants": "{{VARIANTS}}"
}
}
In prerequest script I have:
pm.environment.set('VARIANTS', JSON.stringify(data.VARIANTS));
In my source file:
[
{
"ERP_NUMBER": "000000000100007147",
"LIDL_PRODUCT_NUMBER": "123456",
"SHORT_DESCRIPTION": "Calvin Klein MGM WE Regression 1.1_17 Sammel",
"PRICE": 200.89,
"ONLINE_PRODUCT": true,
"VARIANTS": [
{
"EAN": "ean1",
"ReservedStock": 10,
"Price": 20,
},
{
"EAN": "ean2",
"ReservedStock": 100,
"Price": 200
}
],
}
]
Problem is that variants are not sent.
Can someone help me?