Create audience from API call gives me Token Recognition error
Hi,
I am trying to create an audience in AEP using API to get profiles that have a certain date attribute before or on a certain date attribute +30 days.
I am using this as the API body:;
-d '{
"name": "LatestCQdt lte LatestDD + 30",
"profileInstanceId": "AEPSegments",
"description": "Latest Cheque Redeem Date is before or on Most Recent Drop Date + 30 days",
"type": "SegmentDefinition",
"expression": {
"type": "PQL",
"format": "pql/text",
"value": "_myTenant.abnCalculatedAttributes.LastChequeRedeemedDate <=
_myTenant.abnCalculatedAttributes.Most_Recent_Drop_Date_DM + INTERVAL '\''30 days'\'' "
},
"schema": {
"name": "_xdm.context.profile"
}
}'
but it gives me this error:
{
"code": "400",
"message": "Error in parsing PQL expression \"_myTenant.abnCalculatedAttributes.LastChequeRedeemedDate <= _myTenant.abnCalculatedAttributes.Most_Recent_Drop_Date_DM + INTERVAL '30 days' \": line 1:130 token recognition error at: '''"
}
It is probably because of the wrong syntax for INTERVAL function, but I cannot find anywhere how to use this function and what is, in fact the syntax. I want to just add 30 days to the date.
Any suggestions?


