次の方法で共有


Digital Platform API - リージョン サービス

読み取り専用リージョン サービスを使用すると、各リージョン/状態が属する国など、Xandr システムに登録されているリージョンと状態に関する情報を表示できます。 このサービスを使用して、キャンペーンのターゲット設定用のリージョン ID を取得できます (プロファイル サービスを参照)。region_targets

REST API

HTTP メソッド エンドポイント 説明
GET https://api.appnexus.com/region すべてのリージョンを表示します。
GET https://api.appnexus.com/region?id=ID 特定のリージョンを ID で表示します。
GET https://api.appnexus.com/region?name=NAME 特定のリージョンを NAME で表示します。
GET https://api.appnexus.com/region?code=CODE 特定のリージョンを CODE で表示します。
GET https://api.appnexus.com/region/meta フィルター処理および並べ替えの対象となるフィールドを確認します。

JSON フィールド

フィールド 種類 説明
active ブール型 の場合 true、リージョンはターゲット設定に使用できます。 の場合 false、リージョンの位置情報データがないため、配信できません。

メモ: リージョンは、 active IP アドレス指定や inactive 位置情報テクノロジの変更、および地理的境界の変更に基づく場合があります。
code string 廃止。
country_code 列挙 リージョンが属する国の ISO コードCountry Service を使用して、国コードの完全な一覧を取得できます。
country_id int リージョンが属する国の ID。
country_name string リージョンが属する国の名前。 Country Service を使用して、国名の完全な一覧を取得できます。
id int リージョンの ID。
iso_3166_2 string リージョンの ISO 3166-2 コード。
name string リージョンの名前。
sales_tax_rate_pct 浮動小数点数 購入者として機能する地域のメンバーの売上税。

ドイツのすべてのリージョンを表示する

$ curl -b cookies -c cookies 'https://api.appnexus.com/region?country_code=DE'
{
    "response": {
        "status": "OK",
        "count": 16,
        "start_element": null,
        "num_elements": null,
        "regions": [
            {
                "id": 825,
                "name": "Baden-Wurttemberg",
                "code": "01",
                "iso_3166_2": "BW",
                "country_id": 59,
                "country_name": "Germany",
                "country_code": "DE",
                "active": true
            },
            {
                "id": 826,
                "name": "Bayern",
                "code": "02",
                "iso_3166_2": "BY",
                "country_id": 59,
                "country_name": "Germany",
                "country_code": "DE",
                "active": true
            },
            {
                "id": 827,
                "name": "Bremen",
                "code": "03",
                "iso_3166_2": "HB",
                "country_id": 59,
                "country_name": "Germany",
                "country_code": "DE",
                "active": true
            },
            {
                "id": 828,
                "name": "Hamburg",
                "code": "04",
                "iso_3166_2": "HH",
                "country_id": 59,
                "country_name": "Germany",
                "country_code": "DE",
                "active": true
            },
            {
                "id": 829,
                "name": "Hessen",
                "code": "05",
                "iso_3166_2": "HE",
                "country_id": 59,
                "country_name": "Germany",
                "country_code": "DE",
                "active": true
            },
            {
                "id": 830,
                "name": "Niedersachsen",
                "code": "06",
                "iso_3166_2": "NI",
                "country_id": 59,
                "country_name": "Germany",
                "country_code": "DE",
                "active": true
            },
            {
                "id": 831,
                "name": "Nordrhein-Westfalen",
                "code": "07",
                "iso_3166_2": "NW",
                "country_id": 59,
                "country_name": "Germany",
                "country_code": "DE",
                "active": true
            },
            {
                "id": 832,
                "name": "Rheinland-Pfalz",
                "code": "08",
                "iso_3166_2": "RP",
                "country_id": 59,
                "country_name": "Germany",
                "country_code": "DE",
                "active": true
            },
            {
                "id": 833,
                "name": "Saarland",
                "code": "09",
                "iso_3166_2": "SL",
                "country_id": 59,
                "country_name": "Germany",
                "country_code": "DE",
                "active": true
            },
            {
                "id": 834,
                "name": "Schleswig-Holstein",
                "code": "10",
                "iso_3166_2": "SH",
                "country_id": 59,
                "country_name": "Germany",
                "country_code": "DE",
                "active": true
            },
            {
                "id": 835,
                "name": "Brandenburg",
                "code": "11",
                "iso_3166_2": "BR",
                "country_id": 59,
                "country_name": "Germany",
                "country_code": "DE",
                "active": true
            },
            {
                "id": 836,
                "name": "Mecklenburg-Vorpommern",
                "code": "12",
                "iso_3166_2": "MV",
                "country_id": 59,
                "country_name": "Germany",
                "country_code": "DE",
                "active": true
            },
            {
                "id": 837,
                "name": "Sachsen",
                "code": "13",
                "iso_3166_2": "SN",
                "country_id": 59,
                "country_name": "Germany",
                "country_code": "DE",
                "active": true
            },
            {
                "id": 838,
                "name": "Sachsen-Anhalt",
                "code": "14",
                "iso_3166_2": "ST",
                "country_id": 59,
                "country_name": "Germany",
                "country_code": "DE",
                "active": true
            },
            {
                "id": 839,
                "name": "Thuringen",
                "code": "15",
                "iso_3166_2": "TH",
                "country_id": 59,
                "country_name": "Germany",
                "country_code": "DE",
                "active": true
            },
            {
                "id": 840,
                "name": "Berlin",
                "code": "16",
                "iso_3166_2": "BE",
                "country_id": 59,
                "country_name": "Germany",
                "country_code": "DE",
                "active": true
            }
        ]
    }
}

ドイツとフランスのすべてのリージョンを表示する

$ curl -b cookies -c cookies 'https://api.appnexus.com/region?country_code=DE,FR'
{
    "response": {
        "status": "OK",
        "count": 38,
        "start_element": 0,
        "num_elements": 100,
        "regions": [
            {
                "id": 825,
                "name": "Baden-Wurttemberg",
                "code": "01",
                "iso_3166_2": "BW",
                "country_id": 59,
                "country_name": "Germany",
                "country_code": "DE",
                "active": true
            },
            {
                "id": 826,
                "name": "Bayern",
                "code": "02",
                "iso_3166_2": "BY",
                "country_id": 59,
                "country_name": "Germany",
                "country_code": "DE",
                "active": true
            },
            {
                "id": 827,
                "name": "Bremen",
                "code": "03",
                "iso_3166_2": "HB",
                "country_id": 59,
                "country_name": "Germany",
                "country_code": "DE",
                "active": true
            },
            {
                "id": 828,
                "name": "Hamburg",
                "code": "04",
                "iso_3166_2": "HH",
                "country_id": 59,
                "country_name": "Germany",
                "country_code": "DE",
                "active": true
            },
            ...
            {
                "id": 1070,
                "name": "Aquitaine",
                "code": "97",
                "iso_3166_2": "B",
                "country_id": 78,
                "country_name": "France",
                "country_code": "FR",
                "active": true
            },
            {
                "id": 1071,
                "name": "Auvergne",
                "code": "98",
                "iso_3166_2": "C",
                "country_id": 78,
                "country_name": "France",
                "country_code": "FR",
                "active": true
            },
            {
                "id": 1072,
                "name": "Basse-Normandie",
                "code": "99",
                "iso_3166_2": "P",
                "country_id": 78,
                "country_name": "France",
                "country_code": "FR",
                "active": true
            },
            ...
        ]
    }
}

名前に含まれる "California" すべてのリージョンを表示する

$ curl -b cookies -c cookies 'https://api.appnexus.com/region?like_name=California'
{
    "response": {
        "status": "OK",
        "count": 3,
        "start_element": 0,
        "num_elements": 100,
        "regions": [
            {
                "id": 2600,
                "name": "Baja California",
                "code": "02",
                "iso_3166_2": "BCN",
                "country_id": 159,
                "country_name": "Mexico",
                "country_code": "MX",
                "active": true
            },
            {
                "id": 2601,
                "name": "Baja California Sur",
                "code": "03",
                "iso_3166_2": "BCS",
                "country_id": 159,
                "country_name": "Mexico",
                "country_code": "MX",
                "active": true
            },
            {
                "id": 3922,
                "name": "California",
                "code": "CA",
                "iso_3166_2": "CA",
                "country_id": 233,
                "country_name": "United States",
                "country_code": "US",
                "active": true
            }
        ]
    }
}