...
Path
/api/audience-builder
Usage
This endpoint creates a new Audience with the given rules and filters
Parameters
Name | Type | Required | Description | |
---|---|---|---|---|
advertiser_id | number | N | ID of the advertiser to use with the new audience | |
category | number | N | ID of the category to assign to the new audience | |
data_provider_ids | number list | N | List of IDs for data providers with which a contract has been established to be connected to the audience | |
filters | string (JSON) | Y | ||
integration_id | number | Y | ID of the platform to use with the new audience | |
mailchimpList | string | N* | *When "userPlatform" is "mailchimp" this parameter is required | |
marketoList | string | N* | *When "userPlatform" is "marketo" this parameter is required | |
optimizelyProject | string | N* | *When "userPlatform" is "optimizely" this parameter is required | |
rules | string (JSON) | Y | ||
title | string | Y | The name of the new audience |
...
This endpoint posts a filter and gets back the estimates for users, impression, etc. for the dimension/measure in the filter.
Parameters
Name | Type | Required | Description | |
---|---|---|---|---|
filters | string (JSON) | N |
Example cURL
Code Block |
---|
curl -X POST \ 'https://platform.flxone.com/api/audience-builder/estimates?filters=[{%22dimension%22:%22flx_geo_country%22,%22include%22:%22FRA%22}]' \ -H 'Cache-Control: no-cache' \ -H 'X-Auth: es5a88dmlpktb5t6k9eifm6Pqjd0l70otkm1p2dv6g13h3h2thkptomb3k8dqe3ms3Xvorgr72h99uec0n92mf9hki9d23aprtsmds3' \ -H 'X-CSRF: 14f61670139eb434adf7f148bbea1a30' |
...
Code Block |
---|
{ "response": { "status": "OK", "estimates": [ { "primary_dim": "device_type", "secondary_dim": "4", "agg": "count", "value": 11648 }, { "primary_dim": "device_type", "secondary_dim": "0", "agg": "count", "value": 1364608 }, { "primary_dim": "geo_country", "secondary_dim": "FRA", "agg": "count", "value": 7189280 }, { "primary_dim": "device_type", "secondary_dim": "3", "agg": "count", "value": 2255120 }, { "primary_dim": "impressions", "secondary_dim": "", "agg": "count", "value": 0 }, { "primary_dim": "device_type", "secondary_dim": "1", "agg": "count", "value": 5215728 }, { "primary_dim": "total", "secondary_dim": "", "agg": "count", "value": 9761360 }, { "primary_dim": "device_type", "secondary_dim": "2", "agg": "count", "value": 914256 }, { "primary_dim": "pixels", "secondary_dim": "", "agg": "count", "value": 2263408 }, { "primary_dim": "users", "secondary_dim": "", "agg": "approx_distinct", "value": 7189280 } ] } } |
Get a list of existing audiences
...
Code Block |
---|
curl -X GET \ https://platform.flxone.com/api/audience-builder?audienceType=lookalike&realtime_eligible=0&userPlatform=appnexus \ -H 'Cache-Control: no-cache' \ -H 'X-Auth: es5a88dmlpktb5t6k9eifm6Pqjd0l70otkm1p2dv6g13h3h2thkptomb3k8dqe3ms3Xvorgr72h99uec0n92mf9hki9d23aprtsmds3' |
Output
Code Block |
---|
{ "response": { "status": "OK", "audiences": [ { "id": "1253", "type": "lookalike", "environment": null, "realtime": "0", "customerId": "1", "categoryId": "0", "userId": null, "scheduleId": "3064", "name": "DO NOT REMOVE", "configuration": { "title": "test5", "rules": "[{\"name\":\"Advertiser\",\"id\":\"flx_advertiser_id\",\"type\":\"dimension\",\"value\":\"1234\",\"comparator\":\"=\",\"orRule\":[]}]", "filters": "[{\"dimension\":\"flx_advertiser_id\",\"include\":\"1234\",\"orFilters\":[]}]", "platform": "appnexus", "outputs": [ { "platform": "appnexus", "segments": [ "1948859" ] } ], "query": "SELECT DISTINCT goc.uuid FROM flxone.go_customer_columnar goc WHERE (( (((\"advertiser_id\" = '1234'))) )) AND (bdate >= '{$date-7}') AND (bdate < '{$date}') AND goc.uuid NOT IN ('0','1','2','3','4','5') " }, "cost_per_thousand": null, "size": null, "size_previous": "0", "status": "N/A", "error": null, "enabled": "1", "deleted": "0", "created": "2014-08-11 08:41:17", "modified": "2017-07-31 11:40:02", "last_run": null, "last_bloomfilter_update": "2017-07-31 11:40:02", "user": null } ], "categories": [] } } |
...
Name | Type | Required | Description |
---|---|---|---|
audienceId | number | Y |
Example cURL
Code Block |
---|
curl -X GET \ 'https://platform.flxone.com/api/audience-builder/audience-job-conf?audienceId=1253' \ -H 'Cache-Control: no-cache' \ -H 'X-Auth: es5a88dmlpktb5t6k9eifm6Pqjd0l70otkm1p2dv6g13h3h2thkptomb3k8dqe3ms3Xvorgr72h99uec0n92mf9hki9d23aprtsmds3' |
...
Output
Code Block |
---|
{ "response": { "status": "OK", "job-conf": "eyJqb2J0eXBlIjoiYXVkaWVuY2VfYnVpbGRlciIsInRpdGxlIjoidGVzdDUiLCJwbGF0Zm9ybSI6ImZseG9uZSIsInF1ZXJ5IjoiU0VMRUNUIERJU1RJTkNUIGdvYy51dWlkIEZST00gZmx4b25lLmdvX2N1c3RvbWVyX2NvbHVtbmFyIGdvYyAgV0hFUkUgICgoICgoKFwiYWR2ZXJ0aXNlcl9pZFwiID0gJzEyMzQnKSkpICkpIEFORCAoYmRhdGUgPj0gJ3skZGF0ZS03fScpIEFORCAoYmRhdGUgPCAneyRkYXRlfScpIEFORCBnb2MudXVpZCBOT1QgSU4gKCcwJywnMScsJzInLCczJywnNCcsJzUnKSAiLCJvdXRwdXRzIjoiW3tcInBsYXRmb3JtXCI6XCJhcHBuZXh1c1wiLFwic2VnbWVudHNcIjpbXCIxOTQ4ODU5XCJdfV0iLCJhdWRpZW5jZV9pZCI6IjE1MyIsImVuZ2luZSI6InByZXN0byIsIm1hcF91aWRzIjpudWxsLCJqb2JfdGltZW91dF9taWxsaXNlY29uZHMiOiIzNjAwMDAwMCIsImN1c3RvbWVyX2lkIjoiMSJ9" } } |
...
Code Block |
---|
{ "response": { "status": "OK" } } |
Get example data for filters and dimensions
...
Name | Type | Required | Description | |
---|---|---|---|---|
dimensions | string (JSON) | Y | ||
filters | string (JSON) | N | ||
platform | string | N | Defaults to appnexus |
...
Code Block |
---|
{ "response": { "status": "OK", "data": { "metrics": [ [ "2", "DZA" ], [ "4", "DZA" ] ] } } } |
...
Execute the job for an existing audience
...
Code Block |
---|
{ "response": { "status": "OK", "audiences": { "id": "1253", "type": "custom", "environment": null, "realtime": "0", "customerId": "1", "categoryId": "0", "userId": null, "scheduleId": "3064", "name": "DO NOT REMOVE", "configuration": { "title": "test5", "rules": "[{"name":"Advertiser","id":"flx_advertiser_id","type":"dimension","value":"1234","comparator":"=","orRule":[]}]", "filters": "[{"dimension":"flx_advertiser_id","include":"1234","orFilters":[]}]", "platform": "flxone", "outputs": [ { "platform": "appnexus", "segments": [ "1948859" ] } ], "query": "SELECT DISTINCT goc.uuid FROM flxone.go_customer_columnar goc WHERE (( ((("advertiser_id" = '1234'))) )) AND (bdate >= '{$date-7}') AND (bdate < '{$date}') AND goc.uuid NOT IN ('0','1','2','3','4','5') " }, "cost_per_thousand": null, "size": null, "size_previous": "0", "status": "N/A", "error": null, "enabled": "1", "deleted": "0", "created": "2014-08-11 08:41:17", "modified": "2017-07-31 11:40:02", "last_run": null, "last_bloomfilter_update": "2017-07-31 11:40:02" } } } |
Manage the job schedule of an existing audience
...
Name | Type | Required | Description | |
---|---|---|---|---|
buyerMemberId | number | Y | ||
integration_id | number | Y | ID of the platform to use with the new audience | |
segments | string (JSON) | N | JSON array of segment IDs to add |
...
Name | Type | Required | Description | |
---|---|---|---|---|
integration_id | number | Y | ||
title | string | Y |
Example cURL
Code Block |
---|
curl -X POST \ 'https://platform.flxone.com/api/audience-builder/segment?integration_id=1234&title=My%20Segment' \ -H 'Cache-Control: no-cache' \ -H 'X-Auth: es5a88dmlpktb5t6k9eifm6Pqjd0l70otkm1p2dv6g13h3h2thkptomb3k8dqe3ms3Xvorgr72h99uec0n92mf9hki9d23aprtsmds3' \ -H 'X-CSRF: 14f61670139eb434adf7f148bbea1a30' |
...