GET
/api/v2/audience
Name | Type | Required | Description |
---|---|---|---|
enabled | boolean | N | |
id | number | N | Use to retrieve a specific audience by its ID |
name | string | N | |
realtime | boolean | N |
curl -X GET \ 'https://platform.flxone.com/api/v2/audience?id=3423' \ -H 'Cache-Control: no-cache' \ -H 'X-Auth: es5a88dmlpktb5t6k9eifm6Pqjd0l70otkm1p2dv6g13h3h2thkptomb3k8dqe3ms3Xvorgr72h99uec0n92mf9hki9d23aprtsmds3' \ -H 'X-CSRF: 14f61670139eb434adf7f148bbea1a30' |
{ "response": { "status": "OK", "audience": { "id": "3423", "type": "lookalike", "environment": null, "realtime": false, "customerId": "11", "categoryId": "0", "userId": "29", "scheduleId": null, "name": "Black Friday - TV Sales", "configuration": null, "cost_per_thousand": null, "size": null, "size_previous": "0", "status": "N/A", "error": null, "enabled": true, "deleted": "0", "created": "2015-01-12 14:16:54", "modified": "2018-02-15 23:00:49", "last_run": null, "last_bloomfilter_update": "2018-02-15 23:00:49" } } } |
GET
/api/v2/pre-realtime-eligible
Name | Type | Required | Description |
---|---|---|---|
platform_integration_id | number | Y | |
rules | string (JSON) | Y |
curl -X GET \ 'https://platform.flxone.com/api/v2/audience/pre-realtime-eligible?platform_integration_id=123&rules=[{%22id%22:%22flx_pixel_id%22,%22comparator%22:%22%3E%22,%22value%22:%220%22}]' \ -H 'Cache-Control: no-cache' \ -H 'X-Auth: es5a88dmlpktb5t6k9eifm6Pqjd0l70otkm1p2dv6g13h3h2thkptomb3k8dqe3ms3Xvorgr72h99uec0n92mf9hki9d23aprtsmds3' \ -H 'X-CSRF: 14f61670139eb434adf7f148bbea1a30' |
{ "response": { "status": "OK", "realtime_eligible_errors": [] } } |
GET
/api/v2/audience/query
Name | Type | Required | Description |
---|---|---|---|
id | number | Y |
curl -X GET \ https://platform.flxone.com/api/v2/audience/query?id=2157 \ -H 'Cache-Control: no-cache' \ -H 'X-Auth: es5a88dmlpktb5t6k9eifm6Pqjd0l70otkm1p2dv6g13h3h2thkptomb3k8dqe3ms3Xvorgr72h99uec0n92mf9hki9d23aprtsmds3' \ -H 'X-CSRF: 14f61670139eb434adf7f148bbea1a30' |
{ "response": { "status": "OK", "query": "SELECT /* audience_id=2157 */ DISTINCT goc.uuid FROM flxone_internal.go_customer_orc goc WHERE (bdate >= '{$date-7}' AND bdate <= '{$date}') AND goc.uuid NOT IN ('0','1','2','3','4','5') GROUP BY 1 HAVING ((count_if(\"interaction_type\" = 4 and \"interaction_value\" >= 5) > 0)) LIMIT 5000000" } } |
GET
/api/v2/audience/realtime-eligible
none
curl -X GET \ https://platform.flxone.com/api/v2/audience/realtime-eligible \ -H 'Cache-Control: no-cache' \ -H 'X-Auth: es5a88dmlpktb5t6k9eifm6Pqjd0l70otkm1p2dv6g13h3h2thkptomb3k8dqe3ms3Xvorgr72h99uec0n92mf9hki9d23aprtsmds3' \ -H 'X-CSRF: 14f61670139eb434adf7f148bbea1a30' |
{ "response": { "status": "OK", "audiences": [ { "id": "1132", "type": "custom", "environment": "staging", "realtime": true, "customerId": "11", "categoryId": "0", "userId": "156", "scheduleId": "5926", "name": "Black Friday - TV Sales", "configuration": { "rules": [ { "name": "Country", "id": "flx_geo_country", "type": "dimension", "value": "NLD", "comparator": "=", "orRule": [] } ], "filters": [ { "name": "Country", "dimension": "flx_geo_country", "include": "NLD", "orFilters": [] } ], "dimensions": null, "platform": "flxone", "userPlatform": "appnexus", "googleAdvertiser": "", "googleRefreshToken": "", "createGoogleAudience": false, "audienceListId": "", "mailchimpLists": "", "marketoList": "", "integration_id": 12, "outputs": [ { "platform": "appnexus", "segments": [ "3113277" ] } ], "map_uids": "appnexus", "query": "SELECT DISTINCT goc.uuid FROM flxone_internal.go_customer_orc goc WHERE (bdate >= '{$date-7}' AND bdate < '{$date}') AND goc.uuid NOT IN ('0','1','2','3','4','5') AND (( ((\"geo_country\" IN ('NLD'))) )) " }, "cost_per_thousand": null, "size": "1423220", "size_previous": "527069", "status": "N/A", "error": null, "enabled": true, "deleted": "0", "created": "2015-07-14 09:30:13", "modified": "2018-02-15 23:01:03", "last_run": "2015-12-17 04:01:02", "last_bloomfilter_update": "2018-02-15 23:01:03" }, { "id": "1514", "type": "custom", "environment": "production", "realtime": true, "customerId": "11", "categoryId": "0", "userId": "966", "scheduleId": "6346", "name": "Black Friday - Console Sales", "configuration": { "rules": [ { "name": "Recency", "id": "recency", "type": "dimension", "value": "30", "comparator": ">=", "orRule": [] }, { "name": "Segment", "id": "flx_interaction_segment", "type": "dimension", "value": "855", "comparator": "=", "orRule": [] }, { "name": "Pixel Loads", "id": "flx_pixel_loads_dmp", "type": "measure", "value": "3", "min": "3", "comparator": ">=", "orRule": [] } ], "filters": [ { "name": "Recency", "dimension": "date", "date_start": "date-30", "date_end": "date-1", "orFilters": [] }, { "name": "Segment", "dimension": "flx_interaction_segment", "include": "855", "orFilters": [] }, { "name": "Pixel Loads", "measure": "flx_pixel_loads_dmp", "min": "3", "orFilters": [] } ], "dimensions": null, "platform": "flxone", "userPlatform": "appnexus", "googleAdvertiser": "", "googleRefreshToken": "", "createGoogleAudience": false, "audienceListId": "", "mailchimpLists": "", "optimizelyProjects": "", "marketoList": "", "integration_id": "23", "outputs": [ { "platform": "appnexus", "segments": [ "3730281" ] } ], "map_uids": "appnexus", "query": "SELECT DISTINCT goc.uuid FROM flxone_internal.go_customer_orc goc WHERE (bdate >= '{$date-30}' AND bdate <= '{$date-1}') AND goc.uuid NOT IN ('0','1','2','3','4','5') AND (( (((case when \"interaction_type\" = 15 and \"interaction_user_defined_subtype\" != 0 then (( cast(\"interaction_user_defined_subtype\" AS varchar))) else null end) IN ('855'))) )) GROUP BY 1 HAVING (((ROUND(SUM(case when ((\"event_type\")) = 2 OR ((\"interaction_type\")) = 10 OR ((\"interaction_type\")) = 15 then 1 end), 6)) >= 3))" }, "cost_per_thousand": null, "size": "1", "size_previous": "2", "status": "N/A", "error": null, "enabled": true, "deleted": "0", "created": "2015-10-30 11:59:35", "modified": "2018-02-15 23:01:16", "last_run": "2017-03-07 11:42:25", "last_bloomfilter_update": "2018-02-15 23:01:16" } ] } } |
This is only available for custom audiences. The endpoint will attempt to analyze the filters, rules, and query to reduce unnecessary calculations and mappings. It will NOT save changes by default (see the Parameters below).
PUT
/audience/optimize
Name | Type | Required | Description |
---|---|---|---|
id | number | Y | |
commit | number | N | set this parameter to 1 to have the optimizations saved |
curl -X PUT \ https://platform.flxone.com/api/v2/audience/optimize?id=1792 \ -H 'Cache-Control: no-cache' \ -H 'X-Auth: es5a88dmlpktb5t6k9eifm6Pqjd0l70otkm1p2dv6g13h3h2thkptomb3k8dqe3ms3Xvorgr72h99uec0n92mf9hki9d23aprtsmds3' \ -H 'X-CSRF: 14f61670139eb434adf7f148bbea1a30' |
{ "response": { "status": "OK", "changes": [], "rules_before": [ { "name": "Country", "id": "flx_geo_country", "type": "dimension", "value": "NLD", "comparator": "=", "orRule": [] } ], "rules_after": [ { "name": "Country", "id": "flx_geo_country", "type": "dimension", "value": "NLD", "comparator": "=", "orRule": [] } ], "filters_before": [ { "name": "Country", "dimension": "flx_geo_country", "include": "NLD", "orFilters": [] } ], "filters_after": [ { "name": "Country", "dimension": "flx_geo_country", "include": "NLD", "orFilters": [] } ], "query_before": "SELECT /* audience_id=1172 */ DISTINCT goc.uuid FROM flxone_internal.go_customer_orc goc WHERE (bdate >= '{$date-7}' AND bdate <= '{$date}') AND goc.uuid NOT IN ('0','1','2','3','4','5') AND (( ((\"geo_country\" IN ('NLD'))) )) LIMIT 5000000", "query_after": "SELECT /* audience_id=1172 */ DISTINCT goc.uuid FROM flxone_internal.go_customer_orc goc WHERE (bdate >= '{$date-7}' AND bdate <= '{$date}') AND goc.uuid NOT IN ('0','1','2','3','4','5') AND (( ((\"geo_country\" IN ('NLD'))) )) LIMIT 5000000", "committed": false } } |
PUT
/audience/xdev
Name | Type | Required | Description |
---|---|---|---|
id | number | Y | |
xdev | number | N | set to 1 to enable cross-device matching; set to 0 to disable |
xdev_prob | number | N | set to 1 to enable probablistic cross-device matching; set to 0 to disable |
curl -X PUT \ 'https://platform.flxone.com/api/v2/audience/xdev?id=2157&xdev=1&xdev_prob=1' \ -H 'Cache-Control: no-cache' \ -H 'X-Auth: es5a88dmlpktb5t6k9eifm6Pqjd0l70otkm1p2dv6g13h3h2thkptomb3k8dqe3ms3Xvorgr72h99uec0n92mf9hki9d23aprtsmds3' \ -H 'X-CSRF: 14f61670139eb434adf7f148bbea1a30' |
{ "response": { "status": "OK", "audience": { "id": "2157", "type": "custom", "environment": "staging", "realtime": true, "customerId": "121", "categoryId": "0", "userId": "97", "scheduleId": "7194", "name": "Test 2", "configuration": { "rules": [ { "name": "Time on Page", "id": "time_on_page", "type": "dimension", "value": "5", "min": "5", "comparator": ">=", "orRule": [] } ], "filters": [ { "name": "Time on Page", "measure": "flx_time_on_site_avg", "method": "count_if", "min": "5", "orFilters": [] } ], "dimensions": null, "platform": "flxone", "userPlatform": "appnexus", "googleAdvertiser": "", "googleRefreshToken": "", "createGoogleAudience": false, "audienceListId": "", "mailchimpLists": "", "optimizelyProjects": "", "marketoList": "", "integration_id": "32", "xdev": true, "outputs": [ { "platform_integration_id": 32, "platform": "appnexus", "segments": [ "75126362" ] } ], "map_uids": "appnexus", "query": "SELECT DISTINCT goc.uuid FROM flxone_internal.go_customer_orc goc WHERE (bdate >= '{$date-7}' AND bdate <= '{$date}') AND goc.uuid NOT IN ('0','1','2','3','4','5') GROUP BY 1 HAVING ((count_if(\"interaction_type\" = 4 and \"interaction_value\" >= 5) > 0)) LIMIT 5000000", "xdev_prob": true }, "cost_per_thousand": null, "size": "108", "size_previous": null, "status": "N/A", "error": null, "enabled": true, "deleted": "0", "created": "2017-01-06 13:55:54", "modified": "2018-04-20 18:56:45", "last_run": "2017-01-06 14:26:00", "last_bloomfilter_update": "2018-04-19 23:06:10" } } } |
PUT
/audience/realtime
Name | Type | Required | Description |
---|---|---|---|
id | number | Y | |
realtime | number | N | set to 1 to enable realtime processing; set to 0 to disable |
curl -X PUT \ 'https://platform.flxone.com/api/v2/audience/xdev?id=2157&realtime=1' \ -H 'Cache-Control: no-cache' \ -H 'X-Auth: es5a88dmlpktb5t6k9eifm6Pqjd0l70otkm1p2dv6g13h3h2thkptomb3k8dqe3ms3Xvorgr72h99uec0n92mf9hki9d23aprtsmds3' \ -H 'X-CSRF: 14f61670139eb434adf7f148bbea1a30' |
{ "response": { "status": "OK", "audience": { "id": "2157", "type": "custom", "environment": "staging", "realtime": true, "customerId": "121", "categoryId": "0", "userId": "97", "scheduleId": "7194", "name": "Test 2", "configuration": { "rules": [ { "name": "Time on Page", "id": "time_on_page", "type": "dimension", "value": "5", "min": "5", "comparator": ">=", "orRule": [] } ], "filters": [ { "name": "Time on Page", "measure": "flx_time_on_site_avg", "method": "count_if", "min": "5", "orFilters": [] } ], "dimensions": null, "platform": "flxone", "userPlatform": "appnexus", "googleAdvertiser": "", "googleRefreshToken": "", "createGoogleAudience": false, "audienceListId": "", "mailchimpLists": "", "optimizelyProjects": "", "marketoList": "", "integration_id": "32", "xdev": true, "outputs": [ { "platform_integration_id": 32, "platform": "appnexus", "segments": [ "75126362" ] } ], "map_uids": "appnexus", "query": "SELECT DISTINCT goc.uuid FROM flxone_internal.go_customer_orc goc WHERE (bdate >= '{$date-7}' AND bdate <= '{$date}') AND goc.uuid NOT IN ('0','1','2','3','4','5') GROUP BY 1 HAVING ((count_if(\"interaction_type\" = 4 and \"interaction_value\" >= 5) > 0)) LIMIT 5000000", "xdev_prob": true }, "cost_per_thousand": null, "size": "108", "size_previous": null, "status": "N/A", "error": null, "enabled": true, "deleted": "0", "created": "2017-01-06 13:55:54", "modified": "2018-04-20 18:56:45", "last_run": "2017-01-06 14:26:00", "last_bloomfilter_update": "2018-04-19 23:06:10" } } } |
PUT
/audience/name
Name | Type | Required | Description |
---|---|---|---|
id | number | Y | |
name | string | Y |
curl -X PUT \ 'https://platform.flxone.com/api/v2/audience/name?id=2157&name=Black%20Friday%20Sales' \ -H 'Cache-Control: no-cache' \ -H 'X-Auth: es5a88dmlpktb5t6k9eifm6Pqjd0l70otkm1p2dv6g13h3h2thkptomb3k8dqe3ms3Xvorgr72h99uec0n92mf9hki9d23aprtsmds3' \ -H 'X-CSRF: 14f61670139eb434adf7f148bbea1a30' |
{ "response": { "status": "OK", "audience": { "id": "2157", "type": "custom", "environment": "staging", "realtime": "1", "customerId": "11", "categoryId": "0", "userId": "77", "scheduleId": "7794", "name": "Black Friday Sales", "configuration": "{\"rules\":\"[{\"name\":\"Time on Page\",\"id\":\"time_on_page\",\"type\":\"dimension\",\"value\":\"5\",\"min\":\"5\",\"comparator\":\">=\",\"orRule\":[]}]\",\"filters\":\"[{\"name\":\"Time on Page\",\"measure\":\"flx_time_on_site_avg\",\"method\":\"count_if\",\"min\":\"5\",\"orFilters\":[]}]\",\"dimensions\":null,\"platform\":\"flxone\",\"userPlatform\":\"appnexus\",\"googleAdvertiser\":\"\",\"googleRefreshToken\":\"\",\"createGoogleAudience\":false,\"audienceListId\":\"\",\"mailchimpLists\":\"\",\"optimizelyProjects\":\"\",\"marketoList\":\"\",\"integration_id\":\"32\",\"xdev\":true,\"outputs\":[{\"platform_integration_id\":32,\"platform\":\"appnexus\",\"segments\":[\"7512662\"]}],\"map_uids\":\"appnexus\",\"query\":\"SELECT DISTINCT goc.uuid FROM flxone_internal.go_customer_orc goc WHERE (bdate >= '{$date-7}' AND bdate <= '{$date}') AND goc.uuid NOT IN ('0','1','2','3','4','5') GROUP BY 1 HAVING ((count_if(\"interaction_type\" = 4 and \"interaction_value\" >= 5) > 0)) LIMIT 5000000\",\"xdev_prob\":true}", "cost_per_thousand": null, "size": "108", "size_previous": null, "status": "N/A", "error": null, "enabled": "1", "deleted": "0", "created": "2017-01-06 13:55:54", "modified": "2018-04-20 19:06:34", "last_run": "2017-01-06 14:26:00", "last_bloomfilter_update": "2018-04-19 23:06:10" } } } |
GET
/audience/uploads-and-matches
Name | Type | Required | Description |
---|---|---|---|
id | number | Y |
curl -X GET \ 'https://platform.flxone.com/api/v2/audience/uploads-and-matches?id=2157' \ -H 'Cache-Control: no-cache' \ -H 'X-Auth: es5a88dmlpktb5t6k9eifm6Pqjd0l70otkm1p2dv6g13h3h2thkptomb3k8dqe3ms3Xvorgr72h99uec0n92mf9hki9d23aprtsmds3' \ -H 'X-CSRF: 14f61670139eb434adf7f148bbea1a30' |
{ "response": { "status": "OK", "dailyUploadsAndMatches": [ { "date": "2018-04-13", "matches": 0, "uploads": 0 }, { "date": "2018-04-14", "matches": 0, "uploads": 0 }, { "date": "2018-04-15", "matches": 0, "uploads": 0 }, { "date": "2018-04-16", "matches": 0, "uploads": 0 }, { "date": "2018-04-17", "matches": 0, "uploads": 0 }, { "date": "2018-04-18", "matches": 0, "uploads": 0 }, { "date": "2018-04-19", "matches": 0, "uploads": 0 } ], "weeklyUploadsAndMatches": { "matches": 0, "uploads": 0 } } } |
GET
/audience/sizes
none
Example cURL
curl -X GET \ 'https://platform.flxone.com/api/v2/audience/sizes' \ -H 'Cache-Control: no-cache' \ -H 'X-Auth: es5a88dmlpktb5t6k9eifm6Pqjd0l70otkm1p2dv6g13h3h2thkptomb3k8dqe3ms3Xvorgr72h99uec0n92mf9hki9d23aprtsmds3' \ -H 'X-CSRF: 14f61670139eb434adf7f148bbea1a30' |
{ "response": { "status": "OK", "sizes": { "11765": 4237, "13966": 12033, "19367": 26, "29208": 1023, "29935": 317, "31183": 12931, "39324": 9123 } } } |