Parameter | Type | Required? | Description |
---|---|---|---|
channel | String | yes | Channel of sending. One of ["email", "push", "sms"]. |
kpi | String | yes | KPI to predict. One of ["ctr", "open_rate"]. |
sending_date | Date | yes | Date of sending. |
sending_hour | Integer | yes | Hour of sending in local time. |
text | String | yes | Sending text. For emails, it should contain both title and content, separated with a space. |
When successful, returns:
{
"feature_influences": {
"sending_hour": 0.011576919053739497,
"forecast": -0.017071377705380756,
"text_pred": -0.16006355483664164,
"historical_median": 0.3328648681685314
}
}
{
"channel": "sms",
"kpi": "open_rate",
"sending_date": "2024-04-20",
"sending_hour": 16,
"text": "Canis acervus maxime trepide conculco strues. Calco placeat ipsam tibi."
}
curl --location --request POST 'https://api.mpc.dev.placewise.com/v1/ml/sending/explain_kpi_prediction' \
--header 'X-User-Agent;' \
--header 'X-Product-Name;' \
--header 'X-Loyalty-Club-Slug;' \
--header 'X-Customer;' \
--header 'Authorization;' \
--header 'X-Client-Authorization: ' \
--header 'Content-Type: application/json' \
--data-raw '{
"channel": "sms",
"kpi": "open_rate",
"sending_date": "2024-04-20",
"sending_hour": 16,
"text": "Canis acervus maxime trepide conculco strues. Calco placeat ipsam tibi."
}'
{
"feature_influences": {
"sending_hour": 0,
"forecast": 0,
"text_pred": 0,
"historical_median": 0
}
}