Retention
Retention related endpoints
Returns retention predictions for the given date.
You can specify a single user to get predictions for by setting the user field or get predictions for all users. Notice that in the latter case the results will be paginated so you will need to query the endpoint multiple times in order to get the predictions for all users.
The type query parameter can be used for returning predictions only for a specific package (e.g. churn). If not set all available predictions will be returned.
Specify product
Notice that you must specify the product query parameter in order to get retention predictions for a specific product. For example if both sports and casino retention predictions are generated you must set to the product, field one of sports, casino or combined.
If not set it defaults to sports.
Returned values
The returned predictions depend on the packages you have access to.
Access control
If your account has not access to any of the required packages, then the outputs of this packages will not be included in the response.
The output fields that are included in each package can be seen below.
crm_retention_churn
crm_retention_churnIf this package is enabled then churn predictions will be included, e.g.
{
"churn_score_07": 0.31630000472068787,
"churn_score_14": 0.22290000319480896,
"churn_score_30": 0.20389999449253082,
}crm_retention_ggr
crm_retention_ggrIf this package is enabled then ggr predictions will be included, e.g.
{
"predicted_ggr_030": 0.8,
"predicted_ggr_060": 1.24,
"predicted_ggr_090": 2.1,
"predicted_ggr_180": 4.12,
}crm_retention_apds
crm_retention_apdsIf this package is enabled then APDs predictions will be included, e.g.
{
"predicted_apds_007": 0.20000000298023224,
"predicted_apds_014": 0.4000000059604645,
"predicted_apds_030": 0.699999988079071,
"predicted_apds_060": 1.2000000476837158,
"predicted_apds_090": 1.899999976158142,
}crm_retention_stake
crm_retention_stakeIf this package is enabled then stake predictions will be included, e.g.
{
"predicted_stake_007": 2.1500000953674316,
"predicted_stake_014": 4.71999979019165,
"predicted_stake_030": 7.139999866485596,
"predicted_stake_060": 31.0,
"predicted_stake_090": 33.54999923706055,
"predicted_stake_180": 58.720001220703125,
}crm_retention_ev
crm_retention_evIf this package is enabled then ev predictions will be included, e.g.
{
"predicted_ev_007": 5.79,
"predicted_ev_014": 21.63,
"predicted_ev_030": 136.11,
"predicted_ev_060": 507.48,
"predicted_ev_090": 100.38,
"predicted_ev_180": 103.58,
}crm_retention_segments
crm_retention_segmentsIf this package is enabled then segment related predictions will be included, e.g.
{
"current_frequency_segment": "High",
"current_player_segment": "High - High",
"predicted_frequency_segment": "High",
"predicted_value_segment": "High",
"segment_change": "None",
"frequency_segment_change": +1
"value_segment_change": +3
}The user to get information for.
The date to get predictions for. Can be latest for latest available data.
If not set, defaults to the current date.
nowThe users list for which we ask predictions. Has priority over user.
[]The type of predictions to return. Notice that you must have access to the underlying package, otherwise an unauthorized response will be returned.
allPossible values: The operator to use for querying data. Notice that this is applied only if your account has access to multiple operators. In a different case the assigned operator to your account is used and the value of this field is ignored.
The bookmaker id to use for querying data. Notice that this is applied only
if your account has access to multiple operators. In a different case
the assigned operator to your account is used and the value of this
field is ignored. Note that this parameter is used together with the
sub_bookmaker_id parameter.
The sub-bookmaker id to use for querying data. Notice that this is applied only
if your account has access to multiple operators. In a different case
the assigned operator to your account is used and the value of this
field is ignored. Note that this parameter is used together with the
bookmaker_id parameter.
The type of product to get predictions for. If an operator has the CRM
package for more than one products, then this must be set. Can be one
of sports, casino, horses, combined. If not set it defaults to sports.
sportsPossible values: The columns to sort the results by. It expects a string adhering to
the ordering format, as described in the ordering section, e.g.
+churn_score_007,-churn_score_014.
+user_idPossible values: Optional filtering of the results. It expects a string adhering to the
filtering format, as described in the filtering section, e.g.
churn_score_007:gt:0.7;predicted_ggr_030:lt:5000.
""Possible values: The page to retrieve. Notice that if set the random access pagination mechanism will be used. If not set the pagination mechanism default to the keyset mode.
The number of items ot include in each page.
100The cursor to get data from. It should be retrieved from the pagination
section of a previous response in case of keyset pagination.
This value will be ignored if the page parameter has been provided
and random access pagination will be used instead.
Notice that the the cursor is cryptographically signed and verified, make sure to set the exact value it was returned.
The underlying schema version. Some endpoints can operate on multiple
internal database schemas. Must be one of the allowed values. If not
set it defaults to v2.
v2Possible values: Optional selection of the object fields to retrieve. It expects a comma
separated list of strings, as described in the field selection section,
e.g. churn_score_060,campaign_segment.
If set to true, the response will be formatted for export.
This will include all users.
falseA comma-separated list of email addresses to which the export file will be sent. If the resulting file is smaller than 25MB it will be sent as an attachment, otherwise a download link will be provided. If not set, the file will not be emailed.
[]Custom client header, the value should be the name of the group the user belongs to
Authentication method to be used, supported values [vaix, iam]. Defaults to vaix
OK
Bad Request
Unauthorized
Forbidden
Not Acceptable
Request Entity Too Large
Unprocessable Entity
Too Early
Internal Server Error
GET /api/crm/predictions/retention HTTP/1.1
Host: api.vaix.ai
Authorization: Bearer YOUR_SECRET_TOKEN
x-vaix-client-id: text
Accept: */*
{
"data": [
{
"churn_score_060": null,
"campaign_segment": null,
"predicted_stake_014": 0.6299999952316284,
"predicted_ev_007": null,
"predicted_ggr_014": null,
"predicted_value_segment": "Low",
"predicted_apds_030": 2.4000000953674316,
"predicted_ggr_007": null,
"apds": 6,
"last_active_date": "2021-05-07",
"predicted_apds_365": null,
"apds_last_30": 5,
"predicted_apds_014": 1.399999976158142,
"predicted_ev_060": null,
"user_id": "999993",
"total_ev": null,
"predicted_ggr_180": 1.9,
"predicted_apds_007": 0.699999988079071,
"predicted_ev_030": null,
"predicted_stake_007": 0.3400000035762787,
"predicted_ggr_060": 1.72,
"predicted_ev_090": null,
"churn_score_030": 0.12759999930858612,
"predicted_ev_365": null,
"gender": null,
"prediction_date": "2021-05-10",
"predicted_deposit_amount_030": null,
"frequency_segment_change": null,
"acquisition_source": "KCWVVSD",
"predicted_stake_030": 1.1100000143051147,
"predicted_stake_180": 3.7100000381469727,
"churn_score_014": 0.18940000236034393,
"predicted_deposit_amount_007": null,
"ggr_last_365": null,
"currency": "EUR",
"total_ggr": 1.528,
"predicted_ggr_030": 1.64,
"predicted_apds_060": 4.099999904632568,
"country": "ke",
"current_value_segment": "Low",
"predicted_ev_014": null,
"group": "control",
"bonus_type": null,
"predicted_apds_180": 8.100000381469727,
"predicted_deposit_amount_014": null,
"state": null,
"last_deposit_date": "2021-05-07",
"current_frequency_segment": "Medium",
"predicted_ev_180": null,
"bonus_amount": null,
"predicted_stake_090": 2.9100000858306885,
"churn_score_007": 0.2434999942779541,
"inactive_days": 2,
"signup_date": "2021-01-11",
"value_segment_change": null,
"product": "sports",
"predicted_stake_365": null,
"predicted_ggr_365": null,
"predicted_apds_090": 6.300000190734863,
"predicted_ggr_090": 1.82,
"segment_change": "Down",
"predicted_stake_060": 1.8799999952316284,
"predicted_frequency_segment": "Low"
},
{
"churn_score_060": null,
"campaign_segment": null,
"predicted_stake_014": 2.069999933242798,
"predicted_ev_007": null,
"predicted_ggr_014": null,
"predicted_value_segment": "Medium",
"predicted_apds_030": 2.5999999046325684,
"predicted_ggr_007": null,
"apds": 34,
"last_active_date": "2021-05-09",
"predicted_apds_365": null,
"apds_last_30": 1,
"predicted_apds_014": 1.5,
"predicted_ev_060": null,
"user_id": "999964",
"total_ev": null,
"predicted_ggr_180": 43.42,
"predicted_apds_007": 0.800000011920929,
"predicted_ev_030": null,
"predicted_stake_007": 1.149999976158142,
"predicted_ggr_060": 39.41,
"predicted_ev_090": null,
"churn_score_030": 0.3181999921798706,
"predicted_ev_365": null,
"gender": null,
"prediction_date": "2021-05-10",
"predicted_deposit_amount_030": null,
"frequency_segment_change": null,
"acquisition_source": "KCWVVFX01",
"predicted_stake_030": 3.6700000762939453,
"predicted_stake_180": 55.060001373291016,
"churn_score_014": 0.30230000615119934,
"predicted_deposit_amount_007": null,
"ggr_last_365": null,
"currency": null,
"total_ggr": 37.9102,
"predicted_ggr_030": 38.28,
"predicted_apds_060": 10.699999809265137,
"country": "ke",
"current_value_segment": "Low",
"predicted_ev_014": null,
"group": "control",
"bonus_type": null,
"predicted_apds_180": 39.20000076293945,
"predicted_deposit_amount_014": null,
"state": null,
"last_deposit_date": "2021-04-11",
"current_frequency_segment": "Low",
"predicted_ev_180": null,
"bonus_amount": null,
"predicted_stake_090": 20.100000381469727,
"churn_score_007": 0.4596000015735626,
"inactive_days": 0,
"signup_date": "2020-06-12",
"value_segment_change": null,
"product": "sports",
"predicted_stake_365": null,
"predicted_ggr_365": null,
"predicted_apds_090": 14.300000190734863,
"predicted_ggr_090": 39.92,
"segment_change": "Up",
"predicted_stake_060": 14.979999542236328,
"predicted_frequency_segment": "Low"
},
{
"churn_score_060": null,
"campaign_segment": null,
"predicted_stake_014": 0.5400000214576721,
"predicted_ev_007": null,
"predicted_ggr_014": null,
"predicted_value_segment": "Low",
"predicted_apds_030": 1.600000023841858,
"predicted_ggr_007": null,
"apds": 51,
"last_active_date": "2021-04-29",
"predicted_apds_365": null,
"apds_last_30": 1,
"predicted_apds_014": 0.800000011920929,
"predicted_ev_060": null,
"user_id": "999781",
"total_ev": null,
"predicted_ggr_180": 2.07,
"predicted_apds_007": 0.5,
"predicted_ev_030": null,
"predicted_stake_007": 0.30000001192092896,
"predicted_ggr_060": 1.43,
"predicted_ev_090": null,
"churn_score_030": 0.19359999895095825,
"predicted_ev_365": null,
"gender": null,
"prediction_date": "2021-05-10",
"predicted_deposit_amount_030": null,
"frequency_segment_change": null,
"acquisition_source": "KCWVVFX01",
"predicted_stake_030": 1.0800000429153442,
"predicted_stake_180": 9.760000228881836,
"churn_score_014": 0.4368000030517578,
"predicted_deposit_amount_007": null,
"ggr_last_365": null,
"currency": null,
"total_ggr": 1.093,
"predicted_ggr_030": 1.2,
"predicted_apds_060": 5.099999904632568,
"country": "ke",
"current_value_segment": "Low",
"predicted_ev_014": null,
"group": "control",
"bonus_type": null,
"predicted_apds_180": 14.699999809265137,
"predicted_deposit_amount_014": null,
"state": null,
"last_deposit_date": "2021-04-29",
"current_frequency_segment": "Low",
"predicted_ev_180": null,
"bonus_amount": null,
"predicted_stake_090": 4.400000095367432,
"churn_score_007": 0.3720000088214874,
"inactive_days": 10,
"signup_date": "2020-10-24",
"value_segment_change": null,
"product": "sports",
"predicted_stake_365": null,
"predicted_ggr_365": null,
"predicted_apds_090": 6.599999904632568,
"predicted_ggr_090": 1.53,
"segment_change": "None",
"predicted_stake_060": 3.359999895095825,
"predicted_frequency_segment": "Low"
},
{
"churn_score_060": null,
"campaign_segment": null,
"predicted_stake_014": 0,
"predicted_ev_007": null,
"predicted_ggr_014": null,
"predicted_value_segment": "Low",
"predicted_apds_030": 0,
"predicted_ggr_007": null,
"apds": 2,
"last_active_date": "2021-04-10",
"predicted_apds_365": null,
"apds_last_30": 1,
"predicted_apds_014": 0,
"predicted_ev_060": null,
"user_id": "999768",
"total_ev": null,
"predicted_ggr_180": 0.31,
"predicted_apds_007": 0,
"predicted_ev_030": null,
"predicted_stake_007": 0,
"predicted_ggr_060": 0.31,
"predicted_ev_090": null,
"churn_score_030": 0.9347000122070312,
"predicted_ev_365": null,
"gender": null,
"prediction_date": "2021-05-10",
"predicted_deposit_amount_030": null,
"frequency_segment_change": null,
"acquisition_source": "KCWVVFBZ",
"predicted_stake_030": 0,
"predicted_stake_180": 0.699999988079071,
"churn_score_014": 0.9557999968528748,
"predicted_deposit_amount_007": null,
"ggr_last_365": null,
"currency": null,
"total_ggr": 0.3124,
"predicted_ggr_030": 0.31,
"predicted_apds_060": 0.20000000298023224,
"country": "ke",
"current_value_segment": "Low",
"predicted_ev_014": null,
"group": "test",
"bonus_type": null,
"predicted_apds_180": 4.5,
"predicted_deposit_amount_014": null,
"state": null,
"last_deposit_date": "2020-08-29",
"current_frequency_segment": "Low",
"predicted_ev_180": null,
"bonus_amount": null,
"predicted_stake_090": 0.10999999940395355,
"churn_score_007": 0.9854000210762024,
"inactive_days": 29,
"signup_date": "2020-08-29",
"value_segment_change": null,
"product": "sports",
"predicted_stake_365": null,
"predicted_ggr_365": null,
"predicted_apds_090": 0.699999988079071,
"predicted_ggr_090": 0.31,
"segment_change": "None",
"predicted_stake_060": 0.029999999329447746,
"predicted_frequency_segment": "Low"
},
{
"churn_score_060": null,
"campaign_segment": null,
"predicted_stake_014": 0.07999999821186066,
"predicted_ev_007": null,
"predicted_ggr_014": null,
"predicted_value_segment": "Low",
"predicted_apds_030": 0.5,
"predicted_ggr_007": null,
"apds": 6,
"last_active_date": "2021-04-24",
"predicted_apds_365": null,
"apds_last_30": 2,
"predicted_apds_014": 0.30000001192092896,
"predicted_ev_060": null,
"user_id": "999756",
"total_ev": null,
"predicted_ggr_180": -0.49,
"predicted_apds_007": 0.10000000149011612,
"predicted_ev_030": null,
"predicted_stake_007": 0.03999999910593033,
"predicted_ggr_060": -0.49,
"predicted_ev_090": null,
"churn_score_030": 0.6816999912261963,
"predicted_ev_365": null,
"gender": null,
"prediction_date": "2021-05-10",
"predicted_deposit_amount_030": null,
"frequency_segment_change": null,
"acquisition_source": "KCWVVFX01",
"predicted_stake_030": 0.15000000596046448,
"predicted_stake_180": 0.7400000095367432,
"churn_score_014": 0.5924000144004822,
"predicted_deposit_amount_007": null,
"ggr_last_365": null,
"currency": null,
"total_ggr": -0.4863,
"predicted_ggr_030": -0.49,
"predicted_apds_060": 1.2999999523162842,
"country": "ke",
"current_value_segment": "Low",
"predicted_ev_014": null,
"group": "test",
"bonus_type": null,
"predicted_apds_180": 2.5,
"predicted_deposit_amount_014": null,
"state": null,
"last_deposit_date": "2021-04-23",
"current_frequency_segment": "Low",
"predicted_ev_180": null,
"bonus_amount": null,
"predicted_stake_090": 0.5199999809265137,
"churn_score_007": 0.7339000105857849,
"inactive_days": 15,
"signup_date": "2020-10-03",
"value_segment_change": null,
"product": "sports",
"predicted_stake_365": null,
"predicted_ggr_365": null,
"predicted_apds_090": 1.7999999523162842,
"predicted_ggr_090": -0.49,
"segment_change": "None",
"predicted_stake_060": 0.3799999952316284,
"predicted_frequency_segment": "Low"
}
],
"pagination": {
"page": 1,
"page_count": 25525,
"page_size": 5,
"total_count": 127625
},
"status": "success"
}Returns retention churn predictions for the given date.
You can specify a single user to get predictions for by setting the user field or get predictions for all users. Notice that in the latter case the results will be paginated so you will need to query the endpoint multiple times in order to get the predictions for all users.
This delegates to /api/crm/predictions/retention.
Returned values
It includes all APDs predictions for the requested user(s).
{
"predicted_apds_007": 0.20000000298023224,
"predicted_apds_014": 0.4000000059604645,
"predicted_apds_030": 0.699999988079071,
"predicted_apds_060": 1.2000000476837158,
"predicted_apds_090": 1.899999976158142,
}The user to get information for.
The date to get predictions for. Can be latest for latest available data.
If not set, defaults to the current date.
nowThe users list for which we ask predictions. Has priority over user.
[]The operator to use for querying data. Notice that this is applied only if your account has access to multiple operators. In a different case the assigned operator to your account is used and the value of this field is ignored.
The bookmaker id to use for querying data. Notice that this is applied only
if your account has access to multiple operators. In a different case
the assigned operator to your account is used and the value of this
field is ignored. Note that this parameter is used together with the
sub_bookmaker_id parameter.
The sub-bookmaker id to use for querying data. Notice that this is applied only
if your account has access to multiple operators. In a different case
the assigned operator to your account is used and the value of this
field is ignored. Note that this parameter is used together with the
bookmaker_id parameter.
The type of product to get predictions for. If an operator has the CRM
package for more than one products, then this must be set. Can be one
of sports, casino, horses, combined. If not set it defaults to sports.
sportsPossible values: The columns to sort the results by. It expects a string adhering to
the ordering format, as described in the ordering section, e.g.
+churn_score_007,-churn_score_014.
+user_idPossible values: Optional filtering of the results. It expects a string adhering to the
filtering format, as described in the filtering section, e.g.
churn_score_007:gt:0.7;predicted_ggr_030:lt:5000.
""Possible values: The page to retrieve. Notice that if set the random access pagination mechanism will be used. If not set the pagination mechanism default to the keyset mode.
The number of items ot include in each page.
100The cursor to get data from. It should be retrieved from the pagination
section of a previous response in case of keyset pagination.
This value will be ignored if the page parameter has been provided
and random access pagination will be used instead.
Notice that the the cursor is cryptographically signed and verified, make sure to set the exact value it was returned.
The underlying schema version. Some endpoints can operate on multiple
internal database schemas. Must be one of the allowed values. If not
set it defaults to v2.
v2Possible values: Optional selection of the object fields to retrieve. It expects a comma
separated list of strings, as described in the field selection section,
e.g. acquisition_source,apds.
If set to true, the response will be formatted for export.
This will include all users.
falseA comma-separated list of email addresses to which the export file will be sent. If the resulting file is smaller than 25MB it will be sent as an attachment, otherwise a download link will be provided. If not set, the file will not be emailed.
[]Custom client header, the value should be the name of the group the user belongs to
Authentication method to be used, supported values [vaix, iam]. Defaults to vaix
OK
Bad Request
Unauthorized
Forbidden
Not Acceptable
Request Entity Too Large
Unprocessable Entity
Too Early
Internal Server Error
GET /api/crm/predictions/retention/apds HTTP/1.1
Host: api.vaix.ai
Authorization: Bearer YOUR_SECRET_TOKEN
x-vaix-client-id: text
Accept: */*
{
"data": [
{
"acquisition_source": "KCWVVFBZ",
"apds": 1,
"apds_last_30": 1,
"country": "ke",
"currency": null,
"gender": null,
"ggr_last_365": null,
"group": "test",
"inactive_days": 16,
"last_active_date": "2021-04-23",
"last_deposit_date": "2021-04-23",
"predicted_apds_007": 0.10000000149011612,
"predicted_apds_014": 0.10000000149011612,
"predicted_apds_030": 0.20000000298023224,
"predicted_apds_060": 0.4000000059604645,
"predicted_apds_090": 0.6000000238418579,
"predicted_apds_180": 0.800000011920929,
"predicted_apds_365": null,
"prediction_date": "2021-05-10",
"product": "sports",
"signup_date": "2021-04-23",
"state": null,
"total_ev": null,
"total_ggr": 0.1524,
"user_id": "1000006"
},
{
"acquisition_source": "KSWVVSYS",
"apds": 6,
"apds_last_30": 6,
"country": "ke",
"currency": null,
"gender": null,
"ggr_last_365": null,
"group": "control",
"inactive_days": 9,
"last_active_date": "2021-04-30",
"last_deposit_date": "2021-04-30",
"predicted_apds_007": 0.30000001192092896,
"predicted_apds_014": 0.5,
"predicted_apds_030": 1.2000000476837158,
"predicted_apds_060": 2.299999952316284,
"predicted_apds_090": 2.5999999046325684,
"predicted_apds_180": 4.5,
"predicted_apds_365": null,
"prediction_date": "2021-05-10",
"product": "sports",
"signup_date": "2021-04-22",
"state": null,
"total_ev": null,
"total_ggr": 1.0334,
"user_id": "1000152"
},
{
"acquisition_source": "KCWVVSYS",
"apds": 148,
"apds_last_30": 17,
"country": "ke",
"currency": null,
"gender": null,
"ggr_last_365": null,
"group": "control",
"inactive_days": 1,
"last_active_date": "2021-05-08",
"last_deposit_date": "2021-05-08",
"predicted_apds_007": 4.300000190734863,
"predicted_apds_014": 7.599999904632568,
"predicted_apds_030": 18.700000762939453,
"predicted_apds_060": 33.79999923706055,
"predicted_apds_090": 37.5,
"predicted_apds_180": 57.099998474121094,
"predicted_apds_365": null,
"prediction_date": "2021-05-10",
"product": "sports",
"signup_date": "2020-06-26",
"state": null,
"total_ev": null,
"total_ggr": -47.3801,
"user_id": "1000384"
},
{
"acquisition_source": "KCWVVFBF",
"apds": 110,
"apds_last_30": 5,
"country": "ke",
"currency": null,
"gender": null,
"ggr_last_365": null,
"group": "control",
"inactive_days": 1,
"last_active_date": "2021-05-08",
"last_deposit_date": "2021-05-08",
"predicted_apds_007": 2.799999952316284,
"predicted_apds_014": 5.599999904632568,
"predicted_apds_030": 11.399999618530273,
"predicted_apds_060": 15.899999618530273,
"predicted_apds_090": 19.100000381469727,
"predicted_apds_180": 63.599998474121094,
"predicted_apds_365": null,
"prediction_date": "2021-05-10",
"product": "sports",
"signup_date": "2020-07-10",
"state": null,
"total_ev": null,
"total_ggr": 105.3584,
"user_id": "100051"
},
{
"acquisition_source": "KCWVVFBF",
"apds": 1,
"apds_last_30": 1,
"country": "ke",
"currency": null,
"gender": null,
"ggr_last_365": null,
"group": "control",
"inactive_days": 1,
"last_active_date": "2021-05-08",
"last_deposit_date": "2021-05-08",
"predicted_apds_007": 0.20000000298023224,
"predicted_apds_014": 0.30000001192092896,
"predicted_apds_030": 0.5,
"predicted_apds_060": 0.8999999761581421,
"predicted_apds_090": 1.100000023841858,
"predicted_apds_180": 1.5,
"predicted_apds_365": null,
"prediction_date": "2021-05-10",
"product": "sports",
"signup_date": "2021-05-08",
"state": null,
"total_ev": null,
"total_ggr": 0.3082,
"user_id": "1000600"
}
],
"pagination": {
"page": 1,
"page_count": 25525,
"page_size": 5,
"total_count": 127625
},
"status": "success"
}Returns the retention bonus predictions for the given date.
You can specify a single user to get predictions for by setting the user field or get predictions for all users. Notice that in the latter case the results will be paginated so you will need to query the endpoint multiple times in order to get the predictions for all users.
This delegates to /api/crm/predictions/retention.
Returned values
It includes all segments predictions for the requested user(s).
{
"bonus_amount": 1500.0,
"bonus_type": "daily_login_bonus",
"campaign_segment": "S9"
}The user to get information for.
The date to get predictions for. Can be latest for latest available data.
If not set, defaults to the current date.
nowThe users list for which we ask predictions. Has priority over user.
[]The operator to use for querying data. Notice that this is applied only if your account has access to multiple operators. In a different case the assigned operator to your account is used and the value of this field is ignored.
The bookmaker id to use for querying data. Notice that this is applied only
if your account has access to multiple operators. In a different case
the assigned operator to your account is used and the value of this
field is ignored. Note that this parameter is used together with the
sub_bookmaker_id parameter.
The sub-bookmaker id to use for querying data. Notice that this is applied only
if your account has access to multiple operators. In a different case
the assigned operator to your account is used and the value of this
field is ignored. Note that this parameter is used together with the
bookmaker_id parameter.
The type of product to get predictions for. If an operator has the CRM
package for more than one products, then this must be set. Can be one
of sports, casino, horses, combined. If not set it defaults to sports.
sportsPossible values: The columns to sort the results by. It expects a string adhering to
the ordering format, as described in the ordering section, e.g.
+churn_score_007,-churn_score_014.
+user_idPossible values: Optional filtering of the results. It expects a string adhering to the
filtering format, as described in the filtering section, e.g.
churn_score_007:gt:0.7;predicted_ggr_030:lt:5000.
""Possible values: The page to retrieve. Notice that if set the random access pagination mechanism will be used. If not set the pagination mechanism default to the keyset mode.
The number of items ot include in each page.
100The cursor to get data from. It should be retrieved from the pagination
section of a previous response in case of keyset pagination.
This value will be ignored if the page parameter has been provided
and random access pagination will be used instead.
Notice that the the cursor is cryptographically signed and verified, make sure to set the exact value it was returned.
The underlying schema version. Some endpoints can operate on multiple
internal database schemas. Must be one of the allowed values. If not
set it defaults to v2.
v2Possible values: Optional selection of the object fields to retrieve. It expects a comma
separated list of strings, as described in the field selection section,
e.g. acquisition_source,apds.
If set to true, the response will be formatted for export.
This will include all users.
falseA comma-separated list of email addresses to which the export file will be sent. If the resulting file is smaller than 25MB it will be sent as an attachment, otherwise a download link will be provided. If not set, the file will not be emailed.
[]Custom client header, the value should be the name of the group the user belongs to
Authentication method to be used, supported values [vaix, iam]. Defaults to vaix
OK
Bad Request
Unauthorized
Forbidden
Not Acceptable
Request Entity Too Large
Unprocessable Entity
Too Early
Internal Server Error
GET /api/crm/predictions/retention/bonus HTTP/1.1
Host: api.vaix.ai
Authorization: Bearer YOUR_SECRET_TOKEN
x-vaix-client-id: text
Accept: */*
{
"data": [
{
"acquisition_source": "KCWVVFBZ",
"apds": 1,
"apds_last_30": 1,
"bonus_amount": null,
"bonus_type": null,
"campaign_segment": null,
"country": "ke",
"currency": null,
"gender": null,
"ggr_last_365": null,
"group": "test",
"inactive_days": 16,
"last_active_date": "2021-04-23",
"last_deposit_date": "2021-04-23",
"prediction_date": "2021-05-10",
"product": "sports",
"signup_date": "2021-04-23",
"state": null,
"total_ev": null,
"total_ggr": 0.1524,
"user_id": "1000006"
},
{
"acquisition_source": "KSWVVSYS",
"apds": 6,
"apds_last_30": 6,
"bonus_amount": null,
"bonus_type": null,
"campaign_segment": null,
"country": "ke",
"currency": null,
"gender": null,
"ggr_last_365": null,
"group": "control",
"inactive_days": 9,
"last_active_date": "2021-04-30",
"last_deposit_date": "2021-04-30",
"prediction_date": "2021-05-10",
"product": "sports",
"signup_date": "2021-04-22",
"state": null,
"total_ev": null,
"total_ggr": 1.0334,
"user_id": "1000152"
},
{
"acquisition_source": "KCWVVSYS",
"apds": 148,
"apds_last_30": 17,
"bonus_amount": null,
"bonus_type": null,
"campaign_segment": null,
"country": "ke",
"currency": null,
"gender": null,
"ggr_last_365": null,
"group": "control",
"inactive_days": 1,
"last_active_date": "2021-05-08",
"last_deposit_date": "2021-05-08",
"prediction_date": "2021-05-10",
"product": "sports",
"signup_date": "2020-06-26",
"state": null,
"total_ev": null,
"total_ggr": -47.3801,
"user_id": "1000384"
},
{
"acquisition_source": "KCWVVFBF",
"apds": 110,
"apds_last_30": 5,
"bonus_amount": null,
"bonus_type": null,
"campaign_segment": null,
"country": "ke",
"currency": null,
"gender": null,
"ggr_last_365": null,
"group": "control",
"inactive_days": 1,
"last_active_date": "2021-05-08",
"last_deposit_date": "2021-05-08",
"prediction_date": "2021-05-10",
"product": "sports",
"signup_date": "2020-07-10",
"state": null,
"total_ev": null,
"total_ggr": 105.3584,
"user_id": "100051"
},
{
"acquisition_source": "KCWVVFBF",
"apds": 1,
"apds_last_30": 1,
"bonus_amount": null,
"bonus_type": null,
"campaign_segment": null,
"country": "ke",
"currency": null,
"gender": null,
"ggr_last_365": null,
"group": "control",
"inactive_days": 1,
"last_active_date": "2021-05-08",
"last_deposit_date": "2021-05-08",
"prediction_date": "2021-05-10",
"product": "sports",
"signup_date": "2021-05-08",
"state": null,
"total_ev": null,
"total_ggr": 0.3082,
"user_id": "1000600"
}
],
"pagination": {
"page": 1,
"page_count": 25525,
"page_size": 5,
"total_count": 127625
},
"status": "success"
}Returns retention churn predictions for the given date.
You can specify a single user to get predictions for by setting the user field or get predictions for all users. Notice that in the latter case the results will be paginated so you will need to query the endpoint multiple times in order to get the predictions for all users.
This delegates to /api/crm/predictions/retention.
Returned values
It includes all churn predictions for the requested user(s).
{
"churn_score_07": 0.31630000472068787,
"churn_score_14": 0.22290000319480896,
"churn_score_30": 0.20389999449253082,
}The user to get information for.
The date to get predictions for. Can be latest for latest available data.
If not set, defaults to the current date.
nowThe users list for which we ask predictions. Has priority over user.
[]The operator to use for querying data. Notice that this is applied only if your account has access to multiple operators. In a different case the assigned operator to your account is used and the value of this field is ignored.
The bookmaker id to use for querying data. Notice that this is applied only
if your account has access to multiple operators. In a different case
the assigned operator to your account is used and the value of this
field is ignored. Note that this parameter is used together with the
sub_bookmaker_id parameter.
The sub-bookmaker id to use for querying data. Notice that this is applied only
if your account has access to multiple operators. In a different case
the assigned operator to your account is used and the value of this
field is ignored. Note that this parameter is used together with the
bookmaker_id parameter.
The type of product to get predictions for. If an operator has the CRM
package for more than one products, then this must be set. Can be one
of sports, casino, horses, combined. If not set it defaults to sports.
sportsPossible values: The columns to sort the results by. It expects a string adhering to
the ordering format, as described in the ordering section, e.g.
+churn_score_007,-churn_score_014.
+user_idPossible values: Optional filtering of the results. It expects a string adhering to the
filtering format, as described in the filtering section, e.g.
churn_score_007:gt:0.7;predicted_ggr_030:lt:5000.
""Possible values: The page to retrieve. Notice that if set the random access pagination mechanism will be used. If not set the pagination mechanism default to the keyset mode.
The number of items ot include in each page.
100The cursor to get data from. It should be retrieved from the pagination
section of a previous response in case of keyset pagination.
This value will be ignored if the page parameter has been provided
and random access pagination will be used instead.
Notice that the the cursor is cryptographically signed and verified, make sure to set the exact value it was returned.
The underlying schema version. Some endpoints can operate on multiple
internal database schemas. Must be one of the allowed values. If not
set it defaults to v2.
v2Possible values: Optional selection of the object fields to retrieve. It expects a comma
separated list of strings, as described in the field selection section,
e.g. acquisition_source,apds.
If set to true, the response will be formatted for export.
This will include all users.
falseA comma-separated list of email addresses to which the export file will be sent. If the resulting file is smaller than 25MB it will be sent as an attachment, otherwise a download link will be provided. If not set, the file will not be emailed.
[]Custom client header, the value should be the name of the group the user belongs to
Authentication method to be used, supported values [vaix, iam]. Defaults to vaix
OK
Bad Request
Unauthorized
Forbidden
Not Acceptable
Request Entity Too Large
Unprocessable Entity
Too Early
Internal Server Error
GET /api/crm/predictions/retention/churn HTTP/1.1
Host: api.vaix.ai
Authorization: Bearer YOUR_SECRET_TOKEN
x-vaix-client-id: text
Accept: */*
{
"data": [
{
"acquisition_source": "KCWVVFBZ",
"apds": 1,
"apds_last_30": 1,
"churn_score_007": 0.8112000226974487,
"churn_score_014": 0.7784000039100647,
"churn_score_030": 0.7231000065803528,
"churn_score_060": null,
"country": "ke",
"currency": null,
"gender": null,
"ggr_last_365": null,
"group": "test",
"inactive_days": 16,
"last_active_date": "2021-04-23",
"last_deposit_date": "2021-04-23",
"prediction_date": "2021-05-10",
"product": "sports",
"signup_date": "2021-04-23",
"state": null,
"total_ev": null,
"total_ggr": 0.1524,
"user_id": "1000006"
},
{
"acquisition_source": "KSWVVSYS",
"apds": 6,
"apds_last_30": 6,
"churn_score_007": 0.5241000056266785,
"churn_score_014": 0.5289999842643738,
"churn_score_030": 0.48730000853538513,
"churn_score_060": null,
"country": "ke",
"currency": null,
"gender": null,
"ggr_last_365": null,
"group": "control",
"inactive_days": 9,
"last_active_date": "2021-04-30",
"last_deposit_date": "2021-04-30",
"prediction_date": "2021-05-10",
"product": "sports",
"signup_date": "2021-04-22",
"state": null,
"total_ev": null,
"total_ggr": 1.0334,
"user_id": "1000152"
},
{
"acquisition_source": "KCWVVSYS",
"apds": 148,
"apds_last_30": 17,
"churn_score_007": 0.03290000185370445,
"churn_score_014": 0.013199999928474426,
"churn_score_030": 0.009499999694526196,
"churn_score_060": null,
"country": "ke",
"currency": null,
"gender": null,
"ggr_last_365": null,
"group": "control",
"inactive_days": 1,
"last_active_date": "2021-05-08",
"last_deposit_date": "2021-05-08",
"prediction_date": "2021-05-10",
"product": "sports",
"signup_date": "2020-06-26",
"state": null,
"total_ev": null,
"total_ggr": -47.3801,
"user_id": "1000384"
},
{
"acquisition_source": "KCWVVFBF",
"apds": 110,
"apds_last_30": 5,
"churn_score_007": 0.04100000113248825,
"churn_score_014": 0.012299999594688416,
"churn_score_030": 0.00930000003427267,
"churn_score_060": null,
"country": "ke",
"currency": null,
"gender": null,
"ggr_last_365": null,
"group": "control",
"inactive_days": 1,
"last_active_date": "2021-05-08",
"last_deposit_date": "2021-05-08",
"prediction_date": "2021-05-10",
"product": "sports",
"signup_date": "2020-07-10",
"state": null,
"total_ev": null,
"total_ggr": 105.3584,
"user_id": "100051"
},
{
"acquisition_source": "KCWVVFBF",
"apds": 1,
"apds_last_30": 1,
"churn_score_007": 0.6283000111579895,
"churn_score_014": 0.599399983882904,
"churn_score_030": 0.5734000205993652,
"churn_score_060": null,
"country": "ke",
"currency": null,
"gender": null,
"ggr_last_365": null,
"group": "control",
"inactive_days": 1,
"last_active_date": "2021-05-08",
"last_deposit_date": "2021-05-08",
"prediction_date": "2021-05-10",
"product": "sports",
"signup_date": "2021-05-08",
"state": null,
"total_ev": null,
"total_ggr": 0.3082,
"user_id": "1000600"
}
],
"pagination": {
"page": 1,
"page_count": 25525,
"page_size": 5,
"total_count": 127625
},
"status": "success"
}Returns retention ev predictions for the given date.
You can specify a single user to get predictions for by setting the user field or get predictions for all users. Notice that in the latter case the results will be paginated so you will need to query the endpoint multiple times in order to get the predictions for all users.
This delegates to /api/crm/predictions/retention.
Returned values
It includes all ev predictions for the requested user(s).
{
"predicted_ev_007": 5.79,
"predicted_ev_014": 21.63,
"predicted_ev_030": 136.11,
"predicted_ev_060": 507.48,
"predicted_ev_090": 100.38,
"predicted_ev_180": 103.58,
}The user to get information for.
The date to get predictions for. Can be latest for latest available data.
If not set, defaults to the current date.
nowThe users list for which we ask predictions. Has priority over user.
[]The operator to use for querying data. Notice that this is applied only if your account has access to multiple operators. In a different case the assigned operator to your account is used and the value of this field is ignored.
The bookmaker id to use for querying data. Notice that this is applied only
if your account has access to multiple operators. In a different case
the assigned operator to your account is used and the value of this
field is ignored. Note that this parameter is used together with the
sub_bookmaker_id parameter.
The sub-bookmaker id to use for querying data. Notice that this is applied only
if your account has access to multiple operators. In a different case
the assigned operator to your account is used and the value of this
field is ignored. Note that this parameter is used together with the
bookmaker_id parameter.
The type of product to get predictions for. If an operator has the CRM
package for more than one products, then this must be set. Can be one
of sports, casino, horses, combined. If not set it defaults to sports.
sportsPossible values: The columns to sort the results by. It expects a string adhering to
the ordering format, as described in the ordering section, e.g.
+churn_score_007,-churn_score_014.
+user_idPossible values: Optional filtering of the results. It expects a string adhering to the
filtering format, as described in the filtering section, e.g.
churn_score_007:gt:0.7;predicted_ggr_030:lt:5000.
""Possible values: The page to retrieve. Notice that if set the random access pagination mechanism will be used. If not set the pagination mechanism default to the keyset mode.
The number of items ot include in each page.
100The cursor to get data from. It should be retrieved from the pagination
section of a previous response in case of keyset pagination.
This value will be ignored if the page parameter has been provided
and random access pagination will be used instead.
Notice that the the cursor is cryptographically signed and verified, make sure to set the exact value it was returned.
The underlying schema version. Some endpoints can operate on multiple
internal database schemas. Must be one of the allowed values. If not
set it defaults to v2.
v2Possible values: Optional selection of the object fields to retrieve. It expects a comma
separated list of strings, as described in the field selection section,
e.g. acquisition_source,apds.
If set to true, the response will be formatted for export.
This will include all users.
falseA comma-separated list of email addresses to which the export file will be sent. If the resulting file is smaller than 25MB it will be sent as an attachment, otherwise a download link will be provided. If not set, the file will not be emailed.
[]Custom client header, the value should be the name of the group the user belongs to
Authentication method to be used, supported values [vaix, iam]. Defaults to vaix
OK
Bad Request
Unauthorized
Forbidden
Not Acceptable
Request Entity Too Large
Unprocessable Entity
Too Early
Internal Server Error
GET /api/crm/predictions/retention/ev HTTP/1.1
Host: api.vaix.ai
Authorization: Bearer YOUR_SECRET_TOKEN
x-vaix-client-id: text
Accept: */*
{
"data": [
{
"acquisition_source": "KCWVVFBZ",
"apds": 1,
"apds_last_30": 1,
"country": "ke",
"currency": null,
"gender": null,
"ggr_last_365": null,
"group": "test",
"inactive_days": 16,
"last_active_date": "2021-04-23",
"last_deposit_date": "2021-04-23",
"predicted_ev_007": null,
"predicted_ev_014": null,
"predicted_ev_030": null,
"predicted_ev_060": null,
"predicted_ev_090": null,
"predicted_ev_180": null,
"predicted_ev_365": null,
"prediction_date": "2021-05-10",
"product": "sports",
"signup_date": "2021-04-23",
"state": null,
"total_ev": null,
"total_ggr": 0.1524,
"user_id": "1000006"
},
{
"acquisition_source": "KSWVVSYS",
"apds": 6,
"apds_last_30": 6,
"country": "ke",
"currency": null,
"gender": null,
"ggr_last_365": null,
"group": "control",
"inactive_days": 9,
"last_active_date": "2021-04-30",
"last_deposit_date": "2021-04-30",
"predicted_ev_007": null,
"predicted_ev_014": null,
"predicted_ev_030": null,
"predicted_ev_060": null,
"predicted_ev_090": null,
"predicted_ev_180": null,
"predicted_ev_365": null,
"prediction_date": "2021-05-10",
"product": "sports",
"signup_date": "2021-04-22",
"state": null,
"total_ev": null,
"total_ggr": 1.0334,
"user_id": "1000152"
},
{
"acquisition_source": "KCWVVSYS",
"apds": 148,
"apds_last_30": 17,
"country": "ke",
"currency": null,
"gender": null,
"ggr_last_365": null,
"group": "control",
"inactive_days": 1,
"last_active_date": "2021-05-08",
"last_deposit_date": "2021-05-08",
"predicted_ev_007": null,
"predicted_ev_014": null,
"predicted_ev_030": null,
"predicted_ev_060": null,
"predicted_ev_090": null,
"predicted_ev_180": null,
"predicted_ev_365": null,
"prediction_date": "2021-05-10",
"product": "sports",
"signup_date": "2020-06-26",
"state": null,
"total_ev": null,
"total_ggr": -47.3801,
"user_id": "1000384"
},
{
"acquisition_source": "KCWVVFBF",
"apds": 110,
"apds_last_30": 5,
"country": "ke",
"currency": null,
"gender": null,
"ggr_last_365": null,
"group": "control",
"inactive_days": 1,
"last_active_date": "2021-05-08",
"last_deposit_date": "2021-05-08",
"predicted_ev_007": null,
"predicted_ev_014": null,
"predicted_ev_030": null,
"predicted_ev_060": null,
"predicted_ev_090": null,
"predicted_ev_180": null,
"predicted_ev_365": null,
"prediction_date": "2021-05-10",
"product": "sports",
"signup_date": "2020-07-10",
"state": null,
"total_ev": null,
"total_ggr": 105.3584,
"user_id": "100051"
},
{
"acquisition_source": "KCWVVFBF",
"apds": 1,
"apds_last_30": 1,
"country": "ke",
"currency": null,
"gender": null,
"ggr_last_365": null,
"group": "control",
"inactive_days": 1,
"last_active_date": "2021-05-08",
"last_deposit_date": "2021-05-08",
"predicted_ev_007": null,
"predicted_ev_014": null,
"predicted_ev_030": null,
"predicted_ev_060": null,
"predicted_ev_090": null,
"predicted_ev_180": null,
"predicted_ev_365": null,
"prediction_date": "2021-05-10",
"product": "sports",
"signup_date": "2021-05-08",
"state": null,
"total_ev": null,
"total_ggr": 0.3082,
"user_id": "1000600"
}
],
"pagination": {
"page": 1,
"page_count": 25525,
"page_size": 5,
"total_count": 127625
},
"status": "success"
}Returns retention GGR predictions for the given date.
You can specify a single user to get predictions for by setting the user field or get predictions for all users. Notice that in the latter case the results will be paginated so you will need to query the endpoint multiple times in order to get the predictions for all users.
This delegates to /api/crm/predictions/retention.
Returned values
It includes all GGR predictions for the requested user(s).
{
"predicted_ggr_030": 0.8,
"predicted_ggr_060": 1.24,
"predicted_ggr_090": 2.1,
"predicted_ggr_180": 4.12,
}The user to get information for.
The date to get predictions for. Can be latest for latest available data.
If not set, defaults to the current date.
nowThe users list for which we ask predictions. Has priority over user.
[]The operator to use for querying data. Notice that this is applied only if your account has access to multiple operators. In a different case the assigned operator to your account is used and the value of this field is ignored.
The bookmaker id to use for querying data. Notice that this is applied only
if your account has access to multiple operators. In a different case
the assigned operator to your account is used and the value of this
field is ignored. Note that this parameter is used together with the
sub_bookmaker_id parameter.
The sub-bookmaker id to use for querying data. Notice that this is applied only
if your account has access to multiple operators. In a different case
the assigned operator to your account is used and the value of this
field is ignored. Note that this parameter is used together with the
bookmaker_id parameter.
The type of product to get predictions for. If an operator has the CRM
package for more than one products, then this must be set. Can be one
of sports, casino, horses, combined. If not set it defaults to sports.
sportsPossible values: The columns to sort the results by. It expects a string adhering to
the ordering format, as described in the ordering section, e.g.
+churn_score_007,-churn_score_014.
+user_idPossible values: Optional filtering of the results. It expects a string adhering to the
filtering format, as described in the filtering section, e.g.
churn_score_007:gt:0.7;predicted_ggr_030:lt:5000.
""Possible values: The page to retrieve. Notice that if set the random access pagination mechanism will be used. If not set the pagination mechanism default to the keyset mode.
The number of items ot include in each page.
100The cursor to get data from. It should be retrieved from the pagination
section of a previous response in case of keyset pagination.
This value will be ignored if the page parameter has been provided
and random access pagination will be used instead.
Notice that the the cursor is cryptographically signed and verified, make sure to set the exact value it was returned.
The underlying schema version. Some endpoints can operate on multiple
internal database schemas. Must be one of the allowed values. If not
set it defaults to v2.
v2Possible values: Optional selection of the object fields to retrieve. It expects a comma
separated list of strings, as described in the field selection section,
e.g. acquisition_source,apds.
If set to true, the response will be formatted for export.
This will include all users.
falseA comma-separated list of email addresses to which the export file will be sent. If the resulting file is smaller than 25MB it will be sent as an attachment, otherwise a download link will be provided. If not set, the file will not be emailed.
[]Custom client header, the value should be the name of the group the user belongs to
Authentication method to be used, supported values [vaix, iam]. Defaults to vaix
OK
Bad Request
Unauthorized
Forbidden
Not Acceptable
Request Entity Too Large
Unprocessable Entity
Too Early
Internal Server Error
GET /api/crm/predictions/retention/ggr HTTP/1.1
Host: api.vaix.ai
Authorization: Bearer YOUR_SECRET_TOKEN
x-vaix-client-id: text
Accept: */*
{
"data": [
{
"acquisition_source": "KCWVVFBZ",
"apds": 1,
"apds_last_30": 1,
"country": "ke",
"currency": null,
"gender": null,
"ggr_last_365": null,
"group": "test",
"inactive_days": 16,
"last_active_date": "2021-04-23",
"last_deposit_date": "2021-04-23",
"predicted_ggr_007": null,
"predicted_ggr_014": null,
"predicted_ggr_030": -0.01,
"predicted_ggr_060": 0.15,
"predicted_ggr_090": 0.15,
"predicted_ggr_180": 0.15,
"predicted_ggr_365": null,
"prediction_date": "2021-05-10",
"product": "sports",
"signup_date": "2021-04-23",
"state": null,
"total_ev": null,
"total_ggr": 0.1524,
"user_id": "1000006"
},
{
"acquisition_source": "KSWVVSYS",
"apds": 6,
"apds_last_30": 6,
"country": "ke",
"currency": null,
"gender": null,
"ggr_last_365": null,
"group": "control",
"inactive_days": 9,
"last_active_date": "2021-04-30",
"last_deposit_date": "2021-04-30",
"predicted_ggr_007": null,
"predicted_ggr_014": null,
"predicted_ggr_030": 1.06,
"predicted_ggr_060": 1.08,
"predicted_ggr_090": 1.09,
"predicted_ggr_180": 1.13,
"predicted_ggr_365": null,
"prediction_date": "2021-05-10",
"product": "sports",
"signup_date": "2021-04-22",
"state": null,
"total_ev": null,
"total_ggr": 1.0334,
"user_id": "1000152"
},
{
"acquisition_source": "KCWVVSYS",
"apds": 148,
"apds_last_30": 17,
"country": "ke",
"currency": null,
"gender": null,
"ggr_last_365": null,
"group": "control",
"inactive_days": 1,
"last_active_date": "2021-05-08",
"last_deposit_date": "2021-05-08",
"predicted_ggr_007": null,
"predicted_ggr_014": null,
"predicted_ggr_030": 74.48,
"predicted_ggr_060": 90.98,
"predicted_ggr_090": 95,
"predicted_ggr_180": 116.36,
"predicted_ggr_365": null,
"prediction_date": "2021-05-10",
"product": "sports",
"signup_date": "2020-06-26",
"state": null,
"total_ev": null,
"total_ggr": -47.3801,
"user_id": "1000384"
},
{
"acquisition_source": "KCWVVFBF",
"apds": 110,
"apds_last_30": 5,
"country": "ke",
"currency": null,
"gender": null,
"ggr_last_365": null,
"group": "control",
"inactive_days": 1,
"last_active_date": "2021-05-08",
"last_deposit_date": "2021-05-08",
"predicted_ggr_007": null,
"predicted_ggr_014": null,
"predicted_ggr_030": 110.02,
"predicted_ggr_060": 111.89,
"predicted_ggr_090": 113.22,
"predicted_ggr_180": 131.47,
"predicted_ggr_365": null,
"prediction_date": "2021-05-10",
"product": "sports",
"signup_date": "2020-07-10",
"state": null,
"total_ev": null,
"total_ggr": 105.3584,
"user_id": "100051"
},
{
"acquisition_source": "KCWVVFBF",
"apds": 1,
"apds_last_30": 1,
"country": "ke",
"currency": null,
"gender": null,
"ggr_last_365": null,
"group": "control",
"inactive_days": 1,
"last_active_date": "2021-05-08",
"last_deposit_date": "2021-05-08",
"predicted_ggr_007": null,
"predicted_ggr_014": null,
"predicted_ggr_030": 0.32,
"predicted_ggr_060": 0.34,
"predicted_ggr_090": 0.34,
"predicted_ggr_180": 0.35,
"predicted_ggr_365": null,
"prediction_date": "2021-05-10",
"product": "sports",
"signup_date": "2021-05-08",
"state": null,
"total_ev": null,
"total_ggr": 0.3082,
"user_id": "1000600"
}
],
"pagination": {
"page": 1,
"page_count": 25525,
"page_size": 5,
"total_count": 127625
},
"status": "success"
}Returns retention segments predictions for the given date.
You can specify a single user to get predictions for by setting the user field or get predictions for all users. Notice that in the latter case the results will be paginated so you will need to query the endpoint multiple times in order to get the predictions for all users.
This delegates to /api/crm/predictions/retention.
Returned values
It includes all segments predictions for the requested user(s).
{
"current_frequency_segment": "High",
"current_player_segment": "High - High",
"predicted_frequency_segment": "High",
"predicted_value_segment": "High",
"segment_change": "None",
"frequency_segment_change": +1
"value_segment_change": +3
}The user to get information for.
The date to get predictions for. Can be latest for latest available data.
If not set, defaults to the current date.
nowThe users list for which we ask predictions. Has priority over user.
[]The operator to use for querying data. Notice that this is applied only if your account has access to multiple operators. In a different case the assigned operator to your account is used and the value of this field is ignored.
The bookmaker id to use for querying data. Notice that this is applied only
if your account has access to multiple operators. In a different case
the assigned operator to your account is used and the value of this
field is ignored. Note that this parameter is used together with the
sub_bookmaker_id parameter.
The sub-bookmaker id to use for querying data. Notice that this is applied only
if your account has access to multiple operators. In a different case
the assigned operator to your account is used and the value of this
field is ignored. Note that this parameter is used together with the
bookmaker_id parameter.
The type of product to get predictions for. If an operator has the CRM
package for more than one products, then this must be set. Can be one
of sports, casino, horses, combined. If not set it defaults to sports.
sportsPossible values: The columns to sort the results by. It expects a string adhering to
the ordering format, as described in the ordering section, e.g.
+churn_score_007,-churn_score_014.
+user_idPossible values: Optional filtering of the results. It expects a string adhering to the
filtering format, as described in the filtering section, e.g.
churn_score_007:gt:0.7;predicted_ggr_030:lt:5000.
""Possible values: The page to retrieve. Notice that if set the random access pagination mechanism will be used. If not set the pagination mechanism default to the keyset mode.
The number of items ot include in each page.
100The cursor to get data from. It should be retrieved from the pagination
section of a previous response in case of keyset pagination.
This value will be ignored if the page parameter has been provided
and random access pagination will be used instead.
Notice that the the cursor is cryptographically signed and verified, make sure to set the exact value it was returned.
The underlying schema version. Some endpoints can operate on multiple
internal database schemas. Must be one of the allowed values. If not
set it defaults to v2.
v2Possible values: Optional selection of the object fields to retrieve. It expects a comma
separated list of strings, as described in the field selection section,
e.g. acquisition_source,apds.
If set to true, the response will be formatted for export.
This will include all users.
falseA comma-separated list of email addresses to which the export file will be sent. If the resulting file is smaller than 25MB it will be sent as an attachment, otherwise a download link will be provided. If not set, the file will not be emailed.
[]Custom client header, the value should be the name of the group the user belongs to
Authentication method to be used, supported values [vaix, iam]. Defaults to vaix
OK
Bad Request
Unauthorized
Forbidden
Not Acceptable
Request Entity Too Large
Unprocessable Entity
Too Early
Internal Server Error
GET /api/crm/predictions/retention/segments HTTP/1.1
Host: api.vaix.ai
Authorization: Bearer YOUR_SECRET_TOKEN
x-vaix-client-id: text
Accept: */*
{
"data": [
{
"acquisition_source": "KCWVVFBZ",
"apds": 1,
"apds_last_30": 1,
"campaign_segment": null,
"country": "ke",
"currency": null,
"current_frequency_segment": "Low",
"current_value_segment": "Low",
"frequency_segment_change": null,
"gender": null,
"ggr_last_365": null,
"group": "test",
"inactive_days": 16,
"last_active_date": "2021-04-23",
"last_deposit_date": "2021-04-23",
"predicted_frequency_segment": "Low",
"predicted_value_segment": "Low",
"prediction_date": "2021-05-10",
"product": "sports",
"segment_change": "None",
"signup_date": "2021-04-23",
"state": null,
"total_ev": null,
"total_ggr": 0.1524,
"user_id": "1000006",
"value_segment_change": null
},
{
"acquisition_source": "KSWVVSYS",
"apds": 6,
"apds_last_30": 6,
"campaign_segment": null,
"country": "ke",
"currency": null,
"current_frequency_segment": "Medium",
"current_value_segment": "Low",
"frequency_segment_change": null,
"gender": null,
"ggr_last_365": null,
"group": "control",
"inactive_days": 9,
"last_active_date": "2021-04-30",
"last_deposit_date": "2021-04-30",
"predicted_frequency_segment": "Low",
"predicted_value_segment": "Low",
"prediction_date": "2021-05-10",
"product": "sports",
"segment_change": "Down",
"signup_date": "2021-04-22",
"state": null,
"total_ev": null,
"total_ggr": 1.0334,
"user_id": "1000152",
"value_segment_change": null
},
{
"acquisition_source": "KCWVVSYS",
"apds": 148,
"apds_last_30": 17,
"campaign_segment": null,
"country": "ke",
"currency": null,
"current_frequency_segment": "High",
"current_value_segment": "High",
"frequency_segment_change": null,
"gender": null,
"ggr_last_365": null,
"group": "control",
"inactive_days": 1,
"last_active_date": "2021-05-08",
"last_deposit_date": "2021-05-08",
"predicted_frequency_segment": "High",
"predicted_value_segment": "High",
"prediction_date": "2021-05-10",
"product": "sports",
"segment_change": "None",
"signup_date": "2020-06-26",
"state": null,
"total_ev": null,
"total_ggr": -47.3801,
"user_id": "1000384",
"value_segment_change": null
},
{
"acquisition_source": "KCWVVFBF",
"apds": 110,
"apds_last_30": 5,
"campaign_segment": null,
"country": "ke",
"currency": null,
"current_frequency_segment": "Medium",
"current_value_segment": "Medium",
"frequency_segment_change": null,
"gender": null,
"ggr_last_365": null,
"group": "control",
"inactive_days": 1,
"last_active_date": "2021-05-08",
"last_deposit_date": "2021-05-08",
"predicted_frequency_segment": "High",
"predicted_value_segment": "High",
"prediction_date": "2021-05-10",
"product": "sports",
"segment_change": "Up",
"signup_date": "2020-07-10",
"state": null,
"total_ev": null,
"total_ggr": 105.3584,
"user_id": "100051",
"value_segment_change": null
},
{
"acquisition_source": "KCWVVFBF",
"apds": 1,
"apds_last_30": 1,
"campaign_segment": null,
"country": "ke",
"currency": null,
"current_frequency_segment": "Low",
"current_value_segment": "Low",
"frequency_segment_change": null,
"gender": null,
"ggr_last_365": null,
"group": "control",
"inactive_days": 1,
"last_active_date": "2021-05-08",
"last_deposit_date": "2021-05-08",
"predicted_frequency_segment": "Low",
"predicted_value_segment": "Low",
"prediction_date": "2021-05-10",
"product": "sports",
"segment_change": "None",
"signup_date": "2021-05-08",
"state": null,
"total_ev": null,
"total_ggr": 0.3082,
"user_id": "1000600",
"value_segment_change": null
}
],
"pagination": {
"page": 1,
"page_count": 25525,
"page_size": 5,
"total_count": 127625
},
"status": "success"
}Returns retention stake predictions for the given date.
You can specify a single user to get predictions for by setting the user field or get predictions for all users. Notice that in the latter case the results will be paginated so you will need to query the endpoint multiple times in order to get the predictions for all users.
This delegates to /api/crm/predictions/retention.
Returned values
It includes all stake predictions for the requested user(s).
{
"predicted_stake_007": 0.07000000029802322,
"predicted_stake_014": 0.10000000149011612,
"predicted_stake_030": 0.1599999964237213,
"predicted_stake_060": 0.2800000011920929,
"predicted_stake_090": 0.3499999940395355,
"predicted_stake_180": 0.46000000834465027,
"predicted_stake_365": null,
}The user to get information for.
The date to get predictions for. Can be latest for latest available data.
If not set, defaults to the current date.
nowThe users list for which we ask predictions. Has priority over user.
[]The operator to use for querying data. Notice that this is applied only if your account has access to multiple operators. In a different case the assigned operator to your account is used and the value of this field is ignored.
The bookmaker id to use for querying data. Notice that this is applied only
if your account has access to multiple operators. In a different case
the assigned operator to your account is used and the value of this
field is ignored. Note that this parameter is used together with the
sub_bookmaker_id parameter.
The sub-bookmaker id to use for querying data. Notice that this is applied only
if your account has access to multiple operators. In a different case
the assigned operator to your account is used and the value of this
field is ignored. Note that this parameter is used together with the
bookmaker_id parameter.
The type of product to get predictions for. If an operator has the CRM
package for more than one products, then this must be set. Can be one
of sports, casino, horses, combined. If not set it defaults to sports.
sportsPossible values: The columns to sort the results by. It expects a string adhering to
the ordering format, as described in the ordering section, e.g.
+churn_score_007,-churn_score_014.
+user_idPossible values: Optional filtering of the results. It expects a string adhering to the
filtering format, as described in the filtering section, e.g.
churn_score_007:gt:0.7;predicted_ggr_030:lt:5000.
""Possible values: The page to retrieve. Notice that if set the random access pagination mechanism will be used. If not set the pagination mechanism default to the keyset mode.
The number of items ot include in each page.
100The cursor to get data from. It should be retrieved from the pagination
section of a previous response in case of keyset pagination.
This value will be ignored if the page parameter has been provided
and random access pagination will be used instead.
Notice that the the cursor is cryptographically signed and verified, make sure to set the exact value it was returned.
The underlying schema version. Some endpoints can operate on multiple
internal database schemas. Must be one of the allowed values. If not
set it defaults to v2.
v2Possible values: Optional selection of the object fields to retrieve. It expects a comma
separated list of strings, as described in the field selection section,
e.g. acquisition_source,apds.
If set to true, the response will be formatted for export.
This will include all users.
falseA comma-separated list of email addresses to which the export file will be sent. If the resulting file is smaller than 25MB it will be sent as an attachment, otherwise a download link will be provided. If not set, the file will not be emailed.
[]Custom client header, the value should be the name of the group the user belongs to
Authentication method to be used, supported values [vaix, iam]. Defaults to vaix
OK
Bad Request
Unauthorized
Forbidden
Not Acceptable
Request Entity Too Large
Unprocessable Entity
Too Early
Internal Server Error
GET /api/crm/predictions/retention/stake HTTP/1.1
Host: api.vaix.ai
Authorization: Bearer YOUR_SECRET_TOKEN
x-vaix-client-id: text
Accept: */*
{
"data": [
{
"acquisition_source": "KCWVVFBZ",
"apds": 1,
"apds_last_30": 1,
"country": "ke",
"currency": null,
"gender": null,
"ggr_last_365": null,
"group": "test",
"inactive_days": 16,
"last_active_date": "2021-04-23",
"last_deposit_date": "2021-04-23",
"predicted_stake_007": 0.009999999776482582,
"predicted_stake_014": 0.009999999776482582,
"predicted_stake_030": 0.029999999329447746,
"predicted_stake_060": 0.05000000074505806,
"predicted_stake_090": 0.09000000357627869,
"predicted_stake_180": 0.10999999940395355,
"predicted_stake_365": null,
"prediction_date": "2021-05-10",
"product": "sports",
"signup_date": "2021-04-23",
"state": null,
"total_ev": null,
"total_ggr": 0.1524,
"user_id": "1000006"
},
{
"acquisition_source": "KSWVVSYS",
"apds": 6,
"apds_last_30": 6,
"country": "ke",
"currency": null,
"gender": null,
"ggr_last_365": null,
"group": "control",
"inactive_days": 9,
"last_active_date": "2021-04-30",
"last_deposit_date": "2021-04-30",
"predicted_stake_007": 0.05999999865889549,
"predicted_stake_014": 0.11999999731779099,
"predicted_stake_030": 0.27000001072883606,
"predicted_stake_060": 0.49000000953674316,
"predicted_stake_090": 0.5699999928474426,
"predicted_stake_180": 0.9700000286102295,
"predicted_stake_365": null,
"prediction_date": "2021-05-10",
"product": "sports",
"signup_date": "2021-04-22",
"state": null,
"total_ev": null,
"total_ggr": 1.0334,
"user_id": "1000152"
},
{
"acquisition_source": "KCWVVSYS",
"apds": 148,
"apds_last_30": 17,
"country": "ke",
"currency": null,
"gender": null,
"ggr_last_365": null,
"group": "control",
"inactive_days": 1,
"last_active_date": "2021-05-08",
"last_deposit_date": "2021-05-08",
"predicted_stake_007": 46.36000061035156,
"predicted_stake_014": 83.12000274658203,
"predicted_stake_030": 203.74000549316406,
"predicted_stake_060": 368.75,
"predicted_stake_090": 408.989990234375,
"predicted_stake_180": 622.530029296875,
"predicted_stake_365": null,
"prediction_date": "2021-05-10",
"product": "sports",
"signup_date": "2020-06-26",
"state": null,
"total_ev": null,
"total_ggr": -47.3801,
"user_id": "1000384"
},
{
"acquisition_source": "KCWVVFBF",
"apds": 110,
"apds_last_30": 5,
"country": "ke",
"currency": null,
"gender": null,
"ggr_last_365": null,
"group": "control",
"inactive_days": 1,
"last_active_date": "2021-05-08",
"last_deposit_date": "2021-05-08",
"predicted_stake_007": 11.680000305175781,
"predicted_stake_014": 22.790000915527344,
"predicted_stake_030": 46.630001068115234,
"predicted_stake_060": 65.36000061035156,
"predicted_stake_090": 78.5999984741211,
"predicted_stake_180": 261.1400146484375,
"predicted_stake_365": null,
"prediction_date": "2021-05-10",
"product": "sports",
"signup_date": "2020-07-10",
"state": null,
"total_ev": null,
"total_ggr": 105.3584,
"user_id": "100051"
},
{
"acquisition_source": "KCWVVFBF",
"apds": 1,
"apds_last_30": 1,
"country": "ke",
"currency": null,
"gender": null,
"ggr_last_365": null,
"group": "control",
"inactive_days": 1,
"last_active_date": "2021-05-08",
"last_deposit_date": "2021-05-08",
"predicted_stake_007": 0.07000000029802322,
"predicted_stake_014": 0.10000000149011612,
"predicted_stake_030": 0.1599999964237213,
"predicted_stake_060": 0.2800000011920929,
"predicted_stake_090": 0.3499999940395355,
"predicted_stake_180": 0.46000000834465027,
"predicted_stake_365": null,
"prediction_date": "2021-05-10",
"product": "sports",
"signup_date": "2021-05-08",
"state": null,
"total_ev": null,
"total_ggr": 0.3082,
"user_id": "1000600"
}
],
"pagination": {
"page": 1,
"page_count": 25525,
"page_size": 5,
"total_count": 127625
},
"status": "success"
}This is a generic endpoint for retrieving CRM retention related statistics.
You can apply any filtering you want on the CRM data, group them in many ways and apply multiple aggregations on the prediction fields.
Aggregations
By setting the aggregations parameter you can select the set of aggregations to be applied on the given fields. The following aggregation operations are supported:
min: return the minimum valuemax: return the maximum valueavg: return the average valuesum: return the sum
Multiple aggregations
You can apply multiple aggregations at once by providing a comma separated list of aggregation operations. For example if you wanted to get the min, max and avg value of ggr you could simply call the endpoint with the following parameters:
aggregations=min,max,avg
fields=ggr{
"data": [
{
"avg_ggr": -96.62872752506948,
"count": 6881,
"max_ggr": 8837.9103,
"min_ggr": -115770.3471
}
],
"status": "success"
}Implied count
As you will notice a count is always returned no matter what aggregations or fields you select. If you run the endpoint without any parameters you simply run a count(*) on the underlying database table.
Grouping results
You can group the results by any supported field or any combination of fields, by using the group_by parameter. A comma separated list of fields to group by is expected.
Counts by segment
Imagine that you want to get the counts of users, by country and current segment for a specific prediction date. You can simply do it by using the following query parameters:
filters=prediction_date:eq:2021-07-21
group_by=country,current_value_segmentwhich would give the following results
{
"data": [
{
"count": 420,
"country": "gh",
"current_value_segment": "High"
},
{
"count": 503,
"country": "gh",
"current_value_segment": "Medium"
},
{
"count": 249,
"country": "gh",
"current_value_segment": "Medium"
},
{
"count": 71,
"country": "gh",
"current_value_segment": "Low"
},
...
]
}Filtering the result set
Similarly to many other endpoints the stats/crm/retention endpoint supports filtering of the result set. By setting the filters parameter you can apply any combination of filters you may wish.
Average predictions for churn score cohorts
Assume you want to get the average, minimum and maximum APDs predictions for users with predicted churn score for the next 7 days between 0.25 and 0.5 grouped by the current player segment for a specific prediction date.
You can use the following parameters:
aggregations=min,max,avg
fields=predicted_apds_007,predicted_apds_014,predicted_apds_030,predicted_apds_060,predicted_apds_090
filters=prediction_date:eq:2021-07-15;churn_score_007:gt:0.25;churn_score_007:lt:0.5
group_by=current_value_segmentand you will get results of the form:
{
"data": [
{
"avg_predicted_apds_007": 0.7309392287256968,
"avg_predicted_apds_014": 1.6430939190624827,
"avg_predicted_apds_030": 3.526243087583484,
"avg_predicted_apds_060": 6.153038674461249,
"avg_predicted_apds_090": 9.673480654619016,
"count": 362,
"max_predicted_apds_007": 3.299999952316284,
"max_predicted_apds_014": 7.300000190734863,
"max_predicted_apds_030": 15.399999618530273,
"max_predicted_apds_060": 27.200000762939453,
"max_predicted_apds_090": 56.5,
"min_predicted_apds_007": 0.0,
"min_predicted_apds_014": 0.30000001192092896,
"min_predicted_apds_030": 0.4000000059604645,
"min_predicted_apds_060": 0.699999988079071,
"min_predicted_apds_090": 1.7000000476837158
},
...
]
}Avoid empty filters
In most use cases you will need to provide a set of filters in order to limit the result set on which the aggregations will be applied. Notice that if you do not provide any filter the operation will be applied to the complete database table and may cause system performance hiccups, especially if the table is big.
Check your parameters carefully before calling this endpoint. In most cases you will need to add a prediction_date filter to limit the result set on predictions for a specific date.
The columns to group the results by. It should be a comma separated list
with the columns to use for grouping in the format col1,col2.
The columns to use in aggregations. It should be a comma separated list,
e.g. predicted_apds_030,predicted_ggr_030.
The aggregations to be applied on all selected fields. You can pass
more than one aggregations through a comma separated list, e.g.
min,max,avg.
The type of product to get predictions for. If an operator has the CRM
package for more than one products, then this must be set. Can be one
of sports, casino, horses, combined. If not set it defaults to sports.
sportsPossible values: Optional filtering of the results. It expects a string adhering to the
filtering format, as described in the filtering section, e.g.
churn_score_007:gt:0.7;predicted_ggr_030:lt:5000.
""Possible values: The underlying schema version. Some endpoints can operate on multiple
internal database schemas. Must be one of the allowed values. If not
set it defaults to v2.
v2Possible values: Custom client header, the value should be the name of the group the user belongs to
Authentication method to be used, supported values [vaix, iam]. Defaults to vaix
OK
Bad Request
Unauthorized
Forbidden
Not Acceptable
Request Entity Too Large
Unprocessable Entity
Too Early
Internal Server Error
GET /api/stats/crm/retention HTTP/1.1
Host: api.vaix.ai
Authorization: Bearer YOUR_SECRET_TOKEN
x-vaix-client-id: text
Accept: */*
{
"data": [
{
"count": 127625
}
],
"status": "success"
}Was this helpful?