# Acquisition

Acquisition related endpoints

## Get acquisition predictions

> Returns acquisition 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.\
> \
> {% hint style="info" %}\
> \
> \## 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\`.\
> \
> {% endhint %}\
> \
> \
> This delegates to \`/api/crm/predictions/acquisition\`.\
> \
> \## Returned values\
> \
> The acquisition models predict the Gross Gaming Revenue (GGR) of a user\
> for the first 30, 60, 90 and 180 days after the first active day.\
> \
> The predictive fields are the following:\
> \
> \`\`\`json\
> {\
> &#x20; "predicted\_ev\_first\_030": 4.9,\
> &#x20; "predicted\_ev\_first\_060": 7.3,\
> &#x20; "predicted\_ev\_first\_090": 13.6,\
> &#x20; "predicted\_ev\_first\_180": 24.2,\
> &#x20; "predicted\_ev\_first\_365": 45.9,\
> &#x20; "predicted\_ggr\_first\_030": 0.8,\
> &#x20; "predicted\_ggr\_first\_060": 1.24,\
> &#x20; "predicted\_ggr\_first\_090": 2.1,\
> &#x20; "predicted\_ggr\_first\_180": 4.12,\
> &#x20; "predicted\_ggr\_first\_365": 7.9,\
> }\
> \`\`\`<br>

````json
{"openapi":"3.0.1","info":{"title":"","version":"0.1.0"},"tags":[{"description":"Acquisition related endpoints","name":"Acquisition"}],"servers":[{"description":"Production API","url":"https://api.vaix.ai"},{"description":"Staging (integration) API","url":"https://staging-api.vaix.ai"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"scheme":"bearer","type":"http"}},"schemas":{"AcquisitionPredictions":{"additionalProperties":false,"description":"CRM retention predictions","properties":{"acquisition_source":{"description":"The acquisition source for this specific user","nullable":true,"type":"string"},"apds":{"description":"Total number of days the user was active","type":"integer"},"apds_last_30":{"description":"Total active days over the last 30 days","type":"integer"},"ccf_group":{"description":"The ccf group of the user","nullable":true,"type":"string"},"ccf_score":{"description":"The ccf score of the user","nullable":true,"type":"number"},"country":{"description":"The country of the user","nullable":true,"type":"string"},"currency":{"description":"The user currency","nullable":true,"type":"string"},"gender":{"description":"The gender of the user (if available)","nullable":true,"type":"string"},"ggr_last_365":{"description":"The total GGR for the last 365 days","nullable":true,"type":"number"},"group":{"description":"The group of the user (in case of AB tests)","type":"string"},"inactive_days":{"description":"How many days have passed since the last active day","type":"integer"},"last_active_date":{"description":"The last date the user was active","format":"date","type":"string"},"last_deposit_date":{"description":"The last known date the user deposited","format":"date","nullable":true,"type":"string"},"predicted_ev_first_030":{"description":"The predicted EV 30 days after first user activity","nullable":true,"type":"number"},"predicted_ev_first_060":{"description":"The predicted EV 60 days since first user activity","nullable":true,"type":"number"},"predicted_ev_first_090":{"description":"The predicted EV 90 days since first user activity","nullable":true,"type":"number"},"predicted_ev_first_180":{"description":"The predicted EV 180 days since first user activity","nullable":true,"type":"number"},"predicted_ev_first_365":{"description":"The predicted EV 365 days since first user activity","nullable":true,"type":"number"},"predicted_ggr_first_030":{"description":"The predicted GGR 30 days after first user activity","nullable":true,"type":"number"},"predicted_ggr_first_060":{"description":"The predicted GGR 60 days since first user activity","nullable":true,"type":"number"},"predicted_ggr_first_090":{"description":"The predicted GGR 90 days since first user activity","nullable":true,"type":"number"},"predicted_ggr_first_180":{"description":"The predicted GGR 180 days since first user activity","nullable":true,"type":"number"},"predicted_ggr_first_365":{"description":"The predicted GGR 365 days since first user activity","nullable":true,"type":"number"},"prediction_date":{"description":"The date the prediction models were executed","format":"date","type":"string"},"product":{"description":"The product the predictions refer to (e.g. sports, casino)","type":"string"},"signup_date":{"description":"The registration date of the user","format":"date-time","type":"string"},"state":{"description":"The state of the user","nullable":true,"type":"string"},"total_ev":{"description":"The total Expected Value (EV) of the user till now","nullable":true,"type":"number"},"total_ggr":{"description":"The total Gross Gaming Revenue (GGR) of the user till now","type":"number"},"user_id":{"description":"The user id","type":"string"}},"type":"object"},"Error":{"additionalProperties":false,"description":"The generic API's error response","properties":{"error":{"description":"Description of the error","type":"string"},"status":{"description":"response status","type":"string"}},"type":"object"},"Errors":{"additionalProperties":false,"description":"The generic API's errors response","properties":{"errors":{"description":"An object with the request errors","type":"object"}},"type":"object"},"UnprocessableEntityError":{"oneOf":[{"additionalProperties":false,"description":"The generic API's error response","properties":{"error":{"description":"Description of the error","type":"string"},"status":{"description":"response status","type":"string"}},"type":"object"},{"additionalProperties":false,"description":"The generic API's errors response","properties":{"errors":{"description":"An object with the request errors","type":"object"}},"type":"object"}]}}},"paths":{"/api/crm/predictions/acquisition":{"get":{"description":"Returns acquisition predictions for the given `date`.\n\nYou can specify a single user to get predictions for by setting the `user`\nfield or get predictions for all users. Notice that in the latter case the\nresults will be paginated so you will need to query the endpoint multiple\ntimes in order to get the predictions for all users.\n\n{% hint style=\"info\" %}\n\n## Specify product\n\n\nNotice that you must specify the `product` query parameter in order to get\nretention predictions for a specific product. For example if both `sports` and\n`casino` retention predictions are generated you must set to the `product`,\nfield one of `sports`, `casino` or `combined`.\n\nIf not set it defaults to `sports`.\n\n{% endhint %}\n\n\nThis delegates to `/api/crm/predictions/acquisition`.\n\n## Returned values\n\nThe acquisition models predict the Gross Gaming Revenue (GGR) of a user\nfor the first 30, 60, 90 and 180 days after the first active day.\n\nThe predictive fields are the following:\n\n```json\n{\n  \"predicted_ev_first_030\": 4.9,\n  \"predicted_ev_first_060\": 7.3,\n  \"predicted_ev_first_090\": 13.6,\n  \"predicted_ev_first_180\": 24.2,\n  \"predicted_ev_first_365\": 45.9,\n  \"predicted_ggr_first_030\": 0.8,\n  \"predicted_ggr_first_060\": 1.24,\n  \"predicted_ggr_first_090\": 2.1,\n  \"predicted_ggr_first_180\": 4.12,\n  \"predicted_ggr_first_365\": 7.9,\n}\n```\n","operationId":"get_crm_acquisition_predictions","parameters":[{"description":"Custom client header, the value should be the name of the group the user belongs to","in":"header","name":"x-vaix-client-id","required":true,"schema":{"type":"string"}},{"description":"Authentication method to be used, supported values [`vaix`, `iam`]. Defaults to `vaix`","in":"header","name":"x-vaix-authentication-method","required":false,"schema":{"type":"string"}},{"description":"The user to get information for.","in":"query","name":"user","required":false,"schema":{"type":"string"}},{"description":"The date to get predictions for. Can be `latest` for latest available data.\nIf not set, defaults to the current date.\n","in":"query","name":"date","required":false,"schema":{"default":"now","format":"date","type":"string"}},{"description":"The operator to use for querying data. Notice that this is applied only\nif your account has access to multiple operators. In a different case\nthe assigned operator to your account is used and the value of this\nfield is ignored.\n","in":"query","name":"operator","required":false,"schema":{"type":"string"}},{"description":"The bookmaker id to use for querying data. Notice that this is applied only\nif your account has access to multiple operators. In a different case\nthe assigned operator to your account is used and the value of this\nfield is ignored. Note that this parameter is used together with the\n`sub_bookmaker_id` parameter.\n","in":"query","name":"bookmaker_id","required":false,"schema":{"type":"integer"}},{"description":"The sub-bookmaker id to use for querying data. Notice that this is applied only\nif your account has access to multiple operators. In a different case\nthe assigned operator to your account is used and the value of this\nfield is ignored. Note that this parameter is used together with the\n`bookmaker_id` parameter.\n","in":"query","name":"sub_bookmaker_id","required":false,"schema":{"type":"integer"}},{"description":"The type of product to get predictions for. If an operator has the CRM\npackage for more than one products, then this must be set. Can be one\nof sports, casino, horses, combined. If not set it defaults to `sports`.\n","in":"query","name":"product","required":false,"schema":{"default":"sports","enum":["sports","casino","horses","combined"],"type":"string"}},{"description":"The columns to sort the results by. It expects a string adhering to\nthe ordering format, as described in the ordering section, e.g.\n`+predicted_ggr_first_030,-predicted_ggr_first_060`.\n","in":"query","name":"order_by","required":false,"schema":{"default":"+user_id","enum":["predicted_ggr_first_030","predicted_ggr_first_060","predicted_ggr_first_090","predicted_ggr_first_180","predicted_ggr_first_365","predicted_ev_first_030","predicted_ev_first_060","predicted_ev_first_090","predicted_ev_first_180","predicted_ev_first_365","current_value_segment","current_frequency_segment","country","state","gender","group","signup_date","apds","apds_last_30","total_ggr","total_ev","inactive_days","last_active_date","last_deposit_date","acquisition_source","user_id","currency","ccf_score","user_id"],"type":"string"}},{"description":"Optional filtering of the results. It expects a string adhering to the\nfiltering format, as described in the filtering section, e.g.\n`churn_score_007:gt:0.7;predicted_ggr_030:lt:5000`.\n","in":"query","name":"filters","required":false,"schema":{"default":"","enum":["predicted_ggr_first_030","predicted_ggr_first_060","predicted_ggr_first_090","predicted_ggr_first_180","predicted_ggr_first_365","predicted_ev_first_030","predicted_ev_first_060","predicted_ev_first_090","predicted_ev_first_180","predicted_ev_first_365","current_value_segment","current_frequency_segment","country","state","gender","group","signup_date","apds","apds_last_30","total_ggr","total_ev","inactive_days","last_active_date","last_deposit_date","acquisition_source","user_id","currency","ccf_score","ccf_group"],"type":"string"}},{"description":"The page to retrieve. Notice that if set the random access pagination\nmechanism will be used. If not set the pagination mechanism default to\nthe keyset mode.\n","in":"query","name":"page","required":false,"schema":{"minimum":1,"type":"integer"}},{"description":"The number of items ot include in each page.\n","in":"query","name":"page_size","required":false,"schema":{"default":100,"maximum":1000,"minimum":1,"type":"integer"}},{"description":"The cursor to get data from. It should be retrieved from the `pagination`\nsection of a previous response in case of `keyset` pagination.\n\nThis value will be ignored if the `page` parameter has been provided\nand random access pagination will be used instead.\n\nNotice that the the cursor is cryptographically signed and verified,\nmake sure to set the exact value it was returned.\n","in":"query","name":"page_cursor","required":false,"schema":{"type":"string"}},{"description":"The underlying schema version. Some endpoints can operate on multiple\ninternal database schemas. Must be one of the allowed values. If not\nset it defaults to `v2`.\n","in":"query","name":"schema_version","required":false,"schema":{"default":"v2","enum":["v2","v2.5"],"type":"string"}},{"description":"Optional selection of the object fields to retrieve. It expects a comma\nseparated list of strings, as described in the field selection section,\ne.g. `acquisition_source,apds`.\n","in":"query","name":"fields","required":false,"schema":{"enum":["acquisition_source","apds","apds_last_30","ccf_group","ccf_score","country","currency","gender","ggr_last_365","group","inactive_days","last_active_date","last_deposit_date","predicted_ev_first_030","predicted_ev_first_060","predicted_ev_first_090","predicted_ev_first_180","predicted_ev_first_365","predicted_ggr_first_030","predicted_ggr_first_060","predicted_ggr_first_090","predicted_ggr_first_180","predicted_ggr_first_365","prediction_date","product","signup_date","state","total_ev","total_ggr","user_id","bookmaker_id","sub_bookmaker_id"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"API response","properties":{"data":{"oneOf":[{"$ref":"#/components/schemas/AcquisitionPredictions"},{"description":"Array of objects","items":{"$ref":"#/components/schemas/AcquisitionPredictions"},"type":"array"}]},"pagination":{"description":"Pagination info","properties":{"next":{"description":"Cursor to the next page for the current query. Applicable only for keyset pagination.","nullable":true,"type":"string"},"page":{"description":"The current page. Applicable only for random access pagination.","minimum":0,"type":"integer"},"page_count":{"description":"The total number of pages. Applicable only for random access pagination.","minimum":0,"type":"integer"},"page_size":{"description":"The number of items per page.","minimum":0,"type":"integer"},"total_count":{"description":"The total number of items across all pages. Applicable only for random access pagination.","minimum":0,"type":"integer"}},"type":"object"},"status":{"description":"The status of the request","enum":["success","error"],"type":"string"}},"type":"object"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Forbidden"},"406":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Errors"}}},"description":"Not Acceptable"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Errors"}}},"description":"Request Entity Too Large"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnprocessableEntityError"}}},"description":"Unprocessable Entity"},"425":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Errors"}}},"description":"Too Early"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Internal Server Error"}},"summary":"Get acquisition predictions","tags":["Acquisition"]}}}}
````

## Get CRM acquisition statistics

> This is a generic endpoint for retrieving CRM acquisition 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 value\
> \- \`max\`: return the maximum value\
> \- \`avg\`: return the average value\
> \- \`sum\`: return the sum\
> \
> {% hint style="info" %}\
> \
> \## 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\_first\_30\
> \`\`\`\
> \
> \`\`\`json\
> {\
> &#x20;   "data": \[\
> &#x20;       {\
> &#x20;           "avg\_ggr\_first\_30": 32.24,\
> &#x20;           "count": 2881,\
> &#x20;           "max\_ggr": 8837.9103,\
> &#x20;           "min\_ggr": -115770.3471\
> &#x20;       }\
> &#x20;   ],\
> &#x20;   "status": "success"\
> }\
> \`\`\`\
> \
> {% endhint %}\
> \
> \
> {% hint style="info" %}\
> \
> \## 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.\
> \
> {% endhint %}\
> \
> \
> \### 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.\
> \
> {% hint style="info" %}\
> \
> \## Counts by acquisition source\
> \
> \
> Imagine that you want to get the counts of users, by acquisition source\
> 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=acquisition\_source\
> \`\`\`\
> \
> which would give the following results\
> \
> \`\`\`json\
> {\
> &#x20; "data": \[\
> &#x20;     {\
> &#x20;         "count": 420,\
> &#x20;         "acquisition\_source": "facebook"\
> &#x20;     },\
> &#x20;     {\
> &#x20;         "count": 503,\
> &#x20;         "acquisition\_source": "google\_ads"\
> &#x20;     },\
> &#x20;     {\
> &#x20;         "count": 249,\
> &#x20;         "acquisition\_source": "other"\
> &#x20;     }\
> &#x20;     ...\
> &#x20; ]\
> }\
> \`\`\`\
> \
> {% endhint %}\
> \
> \
> \### Filtering the result set\
> \
> Similarly to many other endpoints the \`stats/crm/acquisition\` endpoint\
> supports filtering of the result set. By setting the \`filters\` parameter\
> you can apply any combination of filters you may wish.\
> \
> {% hint style="info" %}\
> \
> \## Average predictions for churn score cohorts\
> \
> \
> Assume you want to get the average, minimum and maximum GGR predictions for\
> users with predicted ggr value for the first 30 days between 0 and 100\
> grouped by the acquisition source for a specific prediction date.\
> \
> You can use the following parameters:\
> \
> \`\`\`\
> aggregations=min,max,avg\
> fields=predicted\_ggr\_first\_030,predicted\_ggr\_first\_060\
> filters=prediction\_date:eq:2021-07-15;predicted\_ggr\_first\_030:gte:0;predicted\_ggr\_first\_030:lt:100\
> group\_by=acquisition\_source\
> \`\`\`\
> \
> and you will get results of the form:\
> \
> \`\`\`json\
> {\
> &#x20;   "data": \[\
> &#x20;       {\
> &#x20;           "acquisition\_source": "defmoney",\
> &#x20;           "avg\_predicted\_ggr\_first\_030": -0.24308623298033255,\
> &#x20;           "avg\_predicted\_ggr\_first\_060": 0.22650529500756464,\
> &#x20;           "count": 661,\
> &#x20;           "max\_predicted\_ggr\_first\_030": 388.99,\
> &#x20;           "max\_predicted\_ggr\_first\_060": 430.65,\
> &#x20;           "min\_predicted\_ggr\_first\_030": -179.12,\
> &#x20;           "min\_predicted\_ggr\_first\_060": -179.12\
> &#x20;       },\
> &#x20;       ...\
> &#x20; ]\
> }\
> \`\`\`\
> \
> {% endhint %}\
> \
> \
> {% hint style="danger" %}\
> \
> \## 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.\
> \
> {% endhint %}\ <br>

````json
{"openapi":"3.0.1","info":{"title":"","version":"0.1.0"},"tags":[{"description":"Acquisition related endpoints","name":"Acquisition"}],"servers":[{"description":"Production API","url":"https://api.vaix.ai"},{"description":"Staging (integration) API","url":"https://staging-api.vaix.ai"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"scheme":"bearer","type":"http"}},"schemas":{"StatEntry":{"description":"A statistics result. Notice that the result depends on the query and the\nparameters provided to it.\n","type":"object"},"Error":{"additionalProperties":false,"description":"The generic API's error response","properties":{"error":{"description":"Description of the error","type":"string"},"status":{"description":"response status","type":"string"}},"type":"object"},"Errors":{"additionalProperties":false,"description":"The generic API's errors response","properties":{"errors":{"description":"An object with the request errors","type":"object"}},"type":"object"},"UnprocessableEntityError":{"oneOf":[{"additionalProperties":false,"description":"The generic API's error response","properties":{"error":{"description":"Description of the error","type":"string"},"status":{"description":"response status","type":"string"}},"type":"object"},{"additionalProperties":false,"description":"The generic API's errors response","properties":{"errors":{"description":"An object with the request errors","type":"object"}},"type":"object"}]}}},"paths":{"/api/stats/crm/acquisition":{"get":{"description":"This is a generic endpoint for retrieving CRM acquisition related statistics.\n\nYou can apply any filtering you want on the CRM data, group them in many\nways and apply multiple aggregations on the prediction fields.\n\n### Aggregations\n\nBy setting the `aggregations` parameter you can select the set of aggregations\nto be applied on the given `fields`. The following aggregation operations\nare supported:\n\n- `min`: return the minimum value\n- `max`: return the maximum value\n- `avg`: return the average value\n- `sum`: return the sum\n\n{% hint style=\"info\" %}\n\n## Multiple aggregations\n\n\nYou can apply multiple aggregations at once by providing a comma separated\nlist of aggregation operations. For example if you wanted to get the `min`,\n`max` and `avg` value of `ggr` you could simply call the endpoint with the\nfollowing parameters:\n\n```\naggregations=min,max,avg\nfields=ggr_first_30\n```\n\n```json\n{\n    \"data\": [\n        {\n            \"avg_ggr_first_30\": 32.24,\n            \"count\": 2881,\n            \"max_ggr\": 8837.9103,\n            \"min_ggr\": -115770.3471\n        }\n    ],\n    \"status\": \"success\"\n}\n```\n\n{% endhint %}\n\n\n{% hint style=\"info\" %}\n\n## Implied count\n\n\nAs you will notice a count is always returned no matter what aggregations or\nfields you select. If you run the endpoint without any parameters you simply\nrun a `count(*)` on the underlying database table.\n\n{% endhint %}\n\n\n### Grouping results\n\nYou can group the results by any supported field or any combination of\nfields, by using the `group_by` parameter. A comma separated list of\nfields to group by is expected.\n\n{% hint style=\"info\" %}\n\n## Counts by acquisition source\n\n\nImagine that you want to get the counts of users, by acquisition source\nfor a specific prediction date. You can simply do it by using the\nfollowing query parameters:\n\n```\nfilters=prediction_date:eq:2021-07-21\ngroup_by=acquisition_source\n```\n\nwhich would give the following results\n\n```json\n{\n  \"data\": [\n      {\n          \"count\": 420,\n          \"acquisition_source\": \"facebook\"\n      },\n      {\n          \"count\": 503,\n          \"acquisition_source\": \"google_ads\"\n      },\n      {\n          \"count\": 249,\n          \"acquisition_source\": \"other\"\n      }\n      ...\n  ]\n}\n```\n\n{% endhint %}\n\n\n### Filtering the result set\n\nSimilarly to many other endpoints the `stats/crm/acquisition` endpoint\nsupports filtering of the result set. By setting the `filters` parameter\nyou can apply any combination of filters you may wish.\n\n{% hint style=\"info\" %}\n\n## Average predictions for churn score cohorts\n\n\nAssume you want to get the average, minimum and maximum GGR predictions for\nusers with predicted ggr value for the first 30 days between 0 and 100\ngrouped by the acquisition source for a specific prediction date.\n\nYou can use the following parameters:\n\n```\naggregations=min,max,avg\nfields=predicted_ggr_first_030,predicted_ggr_first_060\nfilters=prediction_date:eq:2021-07-15;predicted_ggr_first_030:gte:0;predicted_ggr_first_030:lt:100\ngroup_by=acquisition_source\n```\n\nand you will get results of the form:\n\n```json\n{\n    \"data\": [\n        {\n            \"acquisition_source\": \"defmoney\",\n            \"avg_predicted_ggr_first_030\": -0.24308623298033255,\n            \"avg_predicted_ggr_first_060\": 0.22650529500756464,\n            \"count\": 661,\n            \"max_predicted_ggr_first_030\": 388.99,\n            \"max_predicted_ggr_first_060\": 430.65,\n            \"min_predicted_ggr_first_030\": -179.12,\n            \"min_predicted_ggr_first_060\": -179.12\n        },\n        ...\n  ]\n}\n```\n\n{% endhint %}\n\n\n{% hint style=\"danger\" %}\n\n## Avoid empty filters\n\n\nIn most use cases you will need to provide a set of filters in order to limit\nthe result set on which the aggregations will be applied. Notice that if you\ndo not provide any filter the operation will be applied to the complete database\ntable and may cause system performance hiccups, especially if the table is\nbig.\n\nCheck your parameters carefully before calling this endpoint. In most cases\nyou will need to add a `prediction_date` filter to limit the result set on\npredictions for a specific date.\n\n{% endhint %}\n\n","operationId":"get_acquisition_statistics","parameters":[{"description":"Custom client header, the value should be the name of the group the user belongs to","in":"header","name":"x-vaix-client-id","required":true,"schema":{"type":"string"}},{"description":"Authentication method to be used, supported values [`vaix`, `iam`]. Defaults to `vaix`","in":"header","name":"x-vaix-authentication-method","required":false,"schema":{"type":"string"}},{"description":"The columns to group the results by. It should be a comma separated list\nwith the columns to use for grouping in the format `col1,col2`.\n","in":"query","name":"group_by","required":false,"schema":{"enum":["current_value_segment","current_frequency_segment","country","state","gender","group","signup_date","apds","apds_last_30","total_ggr","total_ev","inactive_days","last_active_date","last_deposit_date","acquisition_source","user_id","currency","ccf_score"],"type":"string"}},{"description":"The columns to use in aggregations. It should be a comma separated list,\ne.g. `predicted_apds_030,predicted_ggr_030`.\n","in":"query","name":"fields","required":false,"schema":{"enum":["predicted_ggr_first_030","predicted_ggr_first_060","predicted_ggr_first_090","predicted_ggr_first_180","predicted_ggr_first_365","predicted_ev_first_030","predicted_ev_first_060","predicted_ev_first_090","predicted_ev_first_180","predicted_ev_first_365"],"type":"string"}},{"description":"The aggregations to be applied on all selected fields. You can pass\nmore than one aggregations through a comma separated list, e.g.\n`min,max,avg`.\n","in":"query","name":"aggregations","required":false,"schema":{"enum":["min","max","avg","sum","median"],"type":"string"}},{"description":"The type of product to get predictions for. If an operator has the CRM\npackage for more than one products, then this must be set. Can be one\nof sports, casino, horses, combined. If not set it defaults to `sports`.\n","in":"query","name":"product","required":false,"schema":{"default":"sports","enum":["sports","casino","horses","combined"],"type":"string"}},{"description":"Optional filtering of the results. It expects a string adhering to the\nfiltering format, as described in the filtering section, e.g.\n`churn_score_007:gt:0.7;predicted_ggr_030:lt:5000`.\n","in":"query","name":"filters","required":false,"schema":{"default":"","enum":["churn_score_007","churn_score_014","churn_score_030","churn_score_060","predicted_ggr_007","predicted_ggr_014","predicted_ggr_030","predicted_ggr_060","predicted_ggr_090","predicted_ggr_180","predicted_ggr_365","predicted_apds_007","predicted_apds_014","predicted_apds_030","predicted_apds_060","predicted_apds_090","predicted_apds_180","predicted_apds_365","predicted_stake_007","predicted_stake_014","predicted_stake_030","predicted_stake_060","predicted_stake_090","predicted_stake_180","predicted_stake_365","predicted_ev_007","predicted_ev_014","predicted_ev_030","predicted_ev_060","predicted_ev_090","predicted_ev_180","predicted_ev_365","predicted_value_segment","predicted_frequency_segment","segment_change","frequency_segment_change","value_segment_change","campaign_segment","campaign_segment","bonus_type","bonus_amount","current_value_segment","current_frequency_segment","country","state","gender","group","signup_date","apds","apds_last_30","total_ggr","total_ev","inactive_days","last_active_date","last_deposit_date","acquisition_source","user_id","currency","ccf_score","prediction_date"],"type":"string"}},{"description":"The underlying schema version. Some endpoints can operate on multiple\ninternal database schemas. Must be one of the allowed values. If not\nset it defaults to `v2`.\n","in":"query","name":"schema_version","required":false,"schema":{"default":"v2","enum":["v2","v2.5"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"API response","properties":{"data":{"description":"Array of objects","items":{"$ref":"#/components/schemas/StatEntry"},"type":"array"},"status":{"description":"The status of the request","enum":["success","error"],"type":"string"}},"type":"object"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Forbidden"},"406":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Errors"}}},"description":"Not Acceptable"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Errors"}}},"description":"Request Entity Too Large"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnprocessableEntityError"}}},"description":"Unprocessable Entity"},"425":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Errors"}}},"description":"Too Early"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Internal Server Error"}},"summary":"Get CRM acquisition statistics","tags":["Acquisition"]}}}}
````


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.sportradar.com/retention/api-reference/acquisition.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
