Manojkumar Kasiviswanathan
04/17/2024, 1:50 PMManojkumar Kasiviswanathan
04/17/2024, 1:56 PMLee Turner
04/17/2024, 4:38 PMLee Turner
04/17/2024, 5:06 PMassign
but I already had an example where I was using this so I left it in.
This response file should do what you are looking for:
{{#assign 'correctionID'}}{{request.headers.correctionID}}{{/assign}}
{
"field1": "{{#eq correctionID '1'}}{{now offset='1 years' format='yyyy/MM/dd'}}{{else}}{{now offset='3 years' format='yyyy/MM/dd'}}{{/eq}}"
}
When I send a request with a correctionID
header of 1
I get the following response:
{
"field1": "2025/04/17"
}
Any other value in that same header returns:
{
"field1": "2027/04/17"
}
Manojkumar Kasiviswanathan
04/24/2024, 8:14 AMLee Turner
04/24/2024, 10:47 AM