Digital Platform API - コンテンツ カテゴリ サービス

Xandr には一連の "ユニバーサル" カテゴリが用意されています。これは、メンバーが後でターゲット設定や情報を得るためにサイト (配置グループ) や配置に適用できる一般的に使用されるカテゴリです。 このサービスを使用して、独自のカスタム カテゴリを作成することもできます。

このサービスから取得したコンテンツ カテゴリ ID を使用して、 サイト サービス と 配置サービス を通じてコンテンツ カテゴリをサイトと配置に適用します。 その後、コンテンツ カテゴリは、 プロファイル サービスを通じて直接キャンペーンのサイトとプレースメントのターゲット設定に使用できます。

REST API

HTTP メソッド エンドポイント 説明
GET https://api.appnexus.com/content-category?type=standard メンバーに属するすべての標準カスタム コンテンツ カテゴリを表示します。
GET https://api.appnexus.com/content-category?category_type=universal&id=CONTENT_CATEGORY_ID 特定のカスタム コンテンツ カテゴリを表示します。
GET https://api.appnexus.com/content-category?id=1,2,3 コンマ区切りリストを使用して、ID で複数のコンテンツ カテゴリを表示します。
POST https://api.appnexus.com/content-category カスタム コンテンツ カテゴリを追加します。
PUT https://api.appnexus.com/content-category?id=CONTENT_CATEGORY_ID カスタム コンテンツ カテゴリを変更します。
DELETE https://api.appnexus.com/content-category?id=CONTENT_CATEGORY_ID カスタム コンテンツ カテゴリを削除します。

先端: ユニバーサル コンテンツ カテゴリ ( is_system が true に設定されている場合) を追加、変更、または削除することはできません。 ユニバーサル コンテンツ カテゴリは Xandr によって管理されます。

JSON フィールド

フィールド 型 (長さ) 説明
code string 取引にのみ使用されます。
description string (255) コンテンツ カテゴリの説明
id int カテゴリの ID。
必須:PUT
デフォルト: 自動生成された数値。
is_system ブール値 読み取り専用です。 true場合、これは Xandr によって作成された "ユニバーサル" コンテンツ カテゴリです。 ユニバーサル コンテンツ カテゴリは、サイトや配置に適用できますが、編集することはできません。
last_modified timestamp 読み取り専用です。 このコンテンツ カテゴリが最後に変更された日時。
member_id int 読み取り専用です。 メンバー ID。
name string (100) カテゴリの名前。
必須:POST
parent_category object カテゴリが親カテゴリの子である場合、親の ID と名前が 形式で一覧表示されます。
type 列挙 コンテンツ カテゴリの種類。 使用可能な値は、 "standard"、 "deal"、または "deal_priority"です。

parent_category 形式

"parent_category": {
"id": 10,
"name": "Games"
}

例

メンバーに属するすべてのカスタム コンテンツ カテゴリを表示する

$ curl -b cookies 'https://api.appnexus.com/content-category'
{
   "response":{
      "status":"OK",
      "content-categories":[
         {
            "id":9999,
            "name":"Animals",
            "description":null,
            "is_system":false,
            "type":"standard",
            "code": null,
            "last_modified":"2010-05-12 22:46:42"
         },
         {
            "id":8888,
            "name":"Arts & Humanities",
            "description":null,
            "is_system":false,
            "type":"standard",
            "code": null,
            "last_modified":"2010-05-12 22:46:42"
         },
         ...
         {
            "id":7777,
            "name":"Travel",
            "description":null,
            "is_system":false,
            "type":"standard",
            "code": null,
            "last_modified":"2010-05-12 22:46:42"
         }
      ]
   }
}

すべてのユニバーサル コンテンツ カテゴリを表示する

$ curl -b cookies -c cookies 'https://api.appnexus.com/content-category?is_system=true'
{
    "response": {
        "status": "OK",
        "content-categories": [
            {
              "id": 1,
              "name": "Music",
              "description": null,
              "is_system": true,
              "parent_category": null,
              "type": "standard",
              "code": null,
              "last_modified": "2010-03-04 18:18:52"
            },
            
            {
              "id": 2,
              "name": "Pets & Animals",
              "description": null,
              "is_system": true,
              "parent_category": null,
              "type": "standard",
              "code": null,
              "last_modified": "2010-10-24 02:43:16"
            },
            {
              "id": 3,
              "name": "Fun & Trivia",
              "description": null,
              "is_system": true,
              "parent_category": {
                "id": "10",
                "name": "Arts & Entertainment"
              },
              "type": "standard",
              "code": null,
              "last_modified": "2010-10-24 02:43:16"
            },
            {
              "id": 4,
              "name": "Autos & Vehicles",
              "description": null,
              "is_system": true,
              "parent_category": null,
              "type": "standard",
              "code": null,
              "last_modified": "2010-10-24 02:43:16"
            },
            ...
        ],
        "count": 34,
        "start_element": null,
        "num_elements": null
    }
}

特定のカスタム コンテンツ カテゴリを表示する

$ curl -b cookies -c cookies 'https://api.appnexus.com/content-category?category_type=universal&id=11111'
{
    "response": {
        "status": "OK",
        "content-category": {
            "id": 11111,
            "name": "A fine and private placement",
            "description": null,
            "is_system": false,
            "parent_category": null,
            "type": "standard",
            "code": null,
            "last_modified": "2012-08-29 15:42:01"
        },
        "count": 1,
        "start_element": 0,
        "num_elements": 100
    }
}

特定のユニバーサル コンテンツ カテゴリを表示する

$ curl -b cookies -c cookies 'https://api.appnexus.com/content-category?is_system=true&id=2222'
{
    "response": {
        "status": "OK",
        "content-category": {
            "id": 2222,
            "name": "Small Business",
            "description": null,
            "is_system": true,
            "type": "standard",
            "code": null,
            "parent_category": {
                "id": "8"
            },
            "last_modified": "2010-10-24 02:43:16"
        },
        "count": 1,
        "start_element": 0,
        "num_elements": 100
    }
}