Targeting

Abstract

Describes Yahoo DSP and Native GET targeting, in addition to and Native and DSP POST Age targeting with endpoints, CURL and JSON example code.

Overview

Line-level targeting rules specify how the ads served by a line ads are delivered to consumers. Lines can target specific exchanges, deals, locations, demographics, ad positions, frequency, audiences, devices, days of the week, apps, URLs, page relevancy, mobile carriers, and languages.

DSP enables you to target exchanges, deals, locations, demographics, ad positions, frequency, audiences, devices, and more.

Use the following HTTP methods:

  • Use the GET method to view existing line targeting.

  • Use the POST method to create new line targeting.

  • Use the PUT method to update existing line targeting.

GET Targeting

Yahoo Native

Endpoint:

https://api.gemini.yahoo.com/v3/rest/targetingattribute/?advertiserId=advertiser_id&parentId=campaignId&parentType=CAMPAIGN

Method: GET

Header:

Content-Type: application/json Authorization: Bearer <access_token>

CURL

curl --location --request GET 'https://api.gemini.yahoo.com/v3/rest/targetingattribute/?advertiserId=advertiserId&parentId=campaignId&parentType=CAMPAIGN' \
--header 'Authorization: Bearer access_token'

Response

{
    "errors": null,
    "timestamp": "2021-02-15 16:28:03",
    "response": [
        {
            "lastUpdateDate": 1589296381696,
            "createdDate": 1588778783796,
            "advertiserId": 1878800,
            "exclude": "FALSE",
            "parentType": "CAMPAIGN",
            "parentId": 389332437,
            "lookBack": null,
            "funnel": null,
            "type": "AGE",
            "status": "ACTIVE",
            "id": 311721349098,
            "value": "45-54",
            "bidModifier": null
        },
        {
            "lastUpdateDate": 1589296381696,
            "createdDate": 1588778832466,
            "advertiserId": 1878800,
            "exclude": "FALSE",
            "parentType": "CAMPAIGN",
            "parentId": 389332437,
            "lookBack": null,
            "funnel": null,
            "type": "AGE",
            "status": "ACTIVE",
            "id": 311721349099,
            "value": "55-64",
            "bidModifier": null
        },
        {
            "lastUpdateDate": 1589312987014,
            "createdDate": 1589211603969,
            "advertiserId": 1878800,
            "exclude": "FALSE",
            "parentType": "CAMPAIGN",
            "parentId": 389332437,
            "lookBack": null,
            "funnel": null,
            "type": "AGE",
            "status": "ACTIVE",
            "id": 311751203086,
            "value": "65-120",
            "bidModifier": null
        },
        {
            "lastUpdateDate": 1589481225502,
            "createdDate": 1589479685538,
            "advertiserId": 1878800,
            "exclude": "FALSE",
            "parentType": "CAMPAIGN",
            "parentId": 389332437,
            "lookBack": null,
            "funnel": null,
            "type": "SITE_X_DEVICE",
            "status": "ACTIVE",
            "id": 311781467340,
            "value": "HOMEPAGE_US|DESKTOP",
            "bidModifier": 1.3
        },
        {
            "lastUpdateDate": 1589482033214,
            "createdDate": 1589480702300,
            "advertiserId": 1878800,
            "exclude": "FALSE",
            "parentType": "CAMPAIGN",
            "parentId": 389332437,
            "lookBack": null,
            "funnel": null,
            "type": "SITE_X_DEVICE",
            "status": "ACTIVE",
            "id": 311781525410,
            "value": "NEWS_US|DESKTOP",
            "bidModifier": 1.3
        },
        {
            "lastUpdateDate": 1589995247222,
            "createdDate": 1589995247222,
            "advertiserId": 1878800,
            "exclude": "TRUE",
            "parentType": "CAMPAIGN",
            "parentId": 389332437,
            "lookBack": null,
            "funnel": null,
            "type": "SITE_BLOCK",
            "status": "ACTIVE",
            "id": 311833467818,
            "value": "bijan.com",
            "bidModifier": null
        },
        {
            "lastUpdateDate": 1589995247222,
            "createdDate": 1589995247222,
            "advertiserId": 1878800,
            "exclude": "TRUE",
            "parentType": "CAMPAIGN",
            "parentId": 389332437,
            "lookBack": null,
            "funnel": null,
            "type": "SITE_BLOCK",
            "status": "ACTIVE",
            "id": 311833467819,
            "value": "123.com",
            "bidModifier": null
        },
        {
            "lastUpdateDate": 1589995247212,
            "createdDate": 1589995155199,
            "advertiserId": 1878800,
            "exclude": "TRUE",
            "parentType": "CAMPAIGN",
            "parentId": 389332437,
            "lookBack": null,
            "funnel": null,
            "type": "SITE_BLOCK",
            "status": "ACTIVE",
            "id": 311833711248,
            "value": "345.com",
            "bidModifier": null
        }
    ]
}

Yahoo DSP

Endpoint:

https://dspapi.admanagerplus.yahoo.com/traffic/lines/lineId/targeting

Method: GET

Header:

Content-Type: application/json X-Auth-Token: access_token X-Auth-Method: OAUTH2

CURL

curl --location --request GET 'https://dspapi.admanagerplus.yahoo.com/traffic/lines/lineId/targeting' \
--header 'X-Auth-Token: access_token' \
--header 'X-Auth-Method: OAUTH2' \
--header 'Content-Type: application/json' \

Response

{
    "response": {
        "enableViewabilityFreqCap": false,
        "frequencyCapValue": 0,
        "serveUnknownUser": true,
        "frequencyCapPeriod": "UNLIMITED",
        "adInitiations": [
            "ALL"
        ],
        "playerSizes": [
            "ALL"
        ],
        "positions": [
            "ALL"
        ],
        "weatherTemperatures": {
            "allTemperatures": true
        },
        "weatherConditions": [
            "ALL"
        ],
        "weatherUVs": [
            "ALL"
        ],
        "weatherHumidities": {
            "allHumidities": true
        },
        "inventoryTypes": [
            "ALL"
        ],
        "languages": [
            "ALL"
        ],
        "browsers": [
            "ALL"
        ],
        "os": [
            "ALL"
        ],
        "mobileOs": [
            "ALL"
        ],
        "deviceTypes": [
            "ALL"
        ],
        "videoContentLength": [
            "ALL"
        ],
        "mobileMakes": [
            "ALL"
        ],
        "mobileModels": [
            "ALL"
        ],
        "segmentsIncluded": [
            {
                "id": "50471669",
                "name": "Basketball",
                "recency": 90,
                "createdAt": "2018-03-24",
                "audienceType": "Yahoo",
                "segmentType": "OIC",
                "reachCount": 74862377
            }
        ],
        "segmentsExcluded": [],
        "geosIncluded": [
            {
                "id": "########usa",
                "name": "United States",
                "description": "united states of america/usa",
                "level": "Country",
                "key": "usa",
                "code": "840",
                "excluded": false
            }
        ],
        "geosExcluded": [],
        "mobileCarriers": [
            "ALL"
        ],
        "isps": [
            "ALL"
        ],
        "mobilePlacements": [
            "ALL"
        ],
        "types": [
            {
                "isTargeted": true,
                "name": "PRIORITIZED_INVENTORY"
            },
            {
                "isTargeted": true,
                "name": "GEOGRAPHY"
            },
            {
                "isTargeted": false,
                "name": "DEMOGRAPHIC"
            },
            {
                "isTargeted": false,
                "name": "INVENTORY_TYPE"
            },
            {
                "isTargeted": false,
                "name": "WEATHER"
            },
            {
                "isTargeted": true,
                "name": "CROSS_DEVICE_ID_ESCALATION"
            },
            {
                "isTargeted": false,
                "name": "AUCTION_TYPE"
            },
            {
                "isTargeted": false,
                "name": "MOBILE_MEASUREMENT"
            },
            {
                "isTargeted": false,
                "name": "SELLER_RELATIONSHIPS"
            },
            {
                "isTargeted": false,
                "name": "AD_POSITION"
            },
            {
                "isTargeted": false,
                "name": "VIEWABILITY"
            },
            {
                "isTargeted": false,
                "name": "FREQUENCY_CAPPING"
            },
            {
                "isTargeted": false,
                "name": "AB_TESTING"
            },
            {
                "isTargeted": true,
                "name": "SEGMENT"
            },
            {
                "isTargeted": false,
                "name": "TECHNOLOGY"
            },
            {
                "isTargeted": false,
                "name": "DAY_PARTING"
            },
            {
                "isTargeted": false,
                "name": "ENHANCED_DAY_PARTING"
            },
            {
                "isTargeted": false,
                "name": "SITE_LISTS"
            },
            {
                "isTargeted": false,
                "name": "CONTEXTUALS"
            },
            {
                "isTargeted": false,
                "name": "LANGUAGES"
            },
            {
                "isTargeted": false,
                "name": "EXCHANGES"
            },
            {
                "isTargeted": false,
                "name": "CONNECTION"
            },
            {
                "isTargeted": false,
                "name": "SEAT_LEVEL_SITE_LISTS"
            },
            {
                "isTargeted": false,
                "name": "MOBILE_PLACEMENT"
            },
            {
                "isTargeted": false,
                "name": "BOT"
            },
            {
                "isTargeted": true,
                "name": "AUDIENCE_ESCALATION_TYPE"
            },
            {
                "isTargeted": false,
                "name": "TARGET_PRODUCT_FUNNEL"
            }
        ]
    },
    "errors": null,
    "timeStamp": "2021-02-14T01:29:47.676Z"
}

Age Targeting

Yahoo Native

Endpoint:

https://api.gemini.yahoo.com/v3/rest/targetingattribute

Method: POST

Body:

[
    {
        "type": "AGE",
        "status": "ACTIVE",
        "advertiserId": advertiser_id,
        "parentType": "CAMPAIGN",
        "parentId": campaign_id,
        "value": "45-54"
    },
    {
        "type": "AGE",
        "status": "ACTIVE",
        "advertiserId": advertiser_id,
        "parentType": "CAMPAIGN",
        "parentId": campaign_id,
        "value": "55-64"
    },
]

CURL

curl --location --request POST 'https://api.gemini.yahoo.com/v3/rest/targetingattribute/' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer access_token' \
--data-raw '[
    {
        "type": "AGE",
        "status": "ACTIVE",
        "advertiserId": advertiser_id,
        "parentType": "CAMPAIGN",
        "parentId": campaign_id,
        "value": "45-54"
    },
    {
        "type": "AGE",
        "status": "ACTIVE",
        "advertiserId": advertiser_id,
        "parentType": "CAMPAIGN",
        "parentId": campaign_id,
        "value": "55-64"
    }
]'

Yahoo DSP

Endpoint:

https://dspapi.admanagerplus.yahoo.com/traffic/lines/lineId/targeting/

Method: POST

Body:

{
    "id": lineId,
    "genders": [
        "MALE"
    ],
    "ages": [
        "25-34"

    ],
    "threshold": "60",
    "types": [
        {
            "name": "DEMOGRAPHIC",
            "isTargeted": true
        }
    ]
}

CURL

curl --location --request POST 'https://dspapi.admanagerplus.yahoo.com/traffic/lines/lineId/targeting/' \
--header 'X-Auth-Token: access_token' \
--header 'X-Auth-Method: OAUTH2' \
--header 'Content-Type: application/json' \
--data-raw '{
    "id": lineId,
    "genders": [
        "MALE"
    ],
    "ages": [
        "25-34"

    ],
    "threshold": "60",
    "types": [
        {
            "name": "DEMOGRAPHIC",
            "isTargeted": true
        }
    ]
}'