Account Groups

This article describes services for reading, adding, and updating updating account groups.

Overview

An account group enables you to categorize advertisers by regions, brands, business units, or another category that makes sense to your organization.

Advertiser groups enable you to save time in the following ways:

  • Filtering information for a group of advertisers
  • Targeting exchanges and deals for groups of advertisers
  • Blacklisting and whitelisting apps and sites for a group
  • Reporting on all the advertisers within a group

Hierarchy

An Account Group is a seat-level object.

Endpoint

/traffic/accountgroups

The action taken depends on the HTTP method and the parameters specified.

  • Use the GET method to read an existing account group.
  • Use the POST method to create a new account group.
  • Use the PUT method to update an existing account group.

Resources

The Account Group object contains the following fields:

Table 15 Account Group Fields
Field Description Data Type Create Update
id Specifies the account group ID. integer N/A Required
name Specifies the name of the account group. string Required Optional
code

Specifies the shortname of the account group.

Note: The code value cannot be more than ten characters long.

string Required Optional
seatId

Specifies the seat ID of the account group.

Note: Once an account group has been assigned to a seat, it cannot be transferred to another seat.

string Required N/A

Read Account Group

Get data for a specific account group.

GET /traffic/accountgroups/{id}

Parameters

Table 16 Read Account Group Parameters
Parameter Paramerer Type Description Data Type Required
id path Specifies the account group ID. integer Y

Example Request URL

GET https://dspapi.admanagerplus.yahoo.com/traffic/accountgroups/1

Example Response

{
  "response": {
    "id": 1,
    "name": "North America Region",
    "code": "NAR",
    "seatId": 1
  },
  "errors": null,
  "timeStamp": "2017-04-12T04:49:06Z"
}

Read Account Groups

Get a filtered list of account groups belonging to the specified seat.

GET /traffic/accountgroups?query={query}&sort={sort}&dir={dir}

Parameters

Table 17 Read Account Groups Parameters
Parameter Paramerer Type Description Data Type Required
query query

Specifies the search term.

Use URL encoding conventions (i.e. a space should be replaced with a + or %20).

string N
sort query Specifies the column to sort by. string N
dir query

Specifies the sort direction. Allowed values:

  • ASC: data is sorted in ascending order.
  • DESC: data is sorted in decending order.
string N

Example Request URL

GET https://dspapi.admanagerplus.yahoo.com/traffic/accountgroups?query=Test&sort=code&dir=asc

Example Response

{
  "response": [
    {
      "id": 2491,
      "name": "TWO_POST_3_PUT_Change2",
      "code": "TestCng",
      "seatId": 2
    },
    {
     "id": 2492,
     "name": "Test_ADGroup2",
     "code": "TestAG2",
     "seatId": 2
    }
  ],
  "errors": null,
  "timeStamp": "2017-04-12T04:49:06Z"
}

Update Account Group

Update an existing account group.

PUT /traffic/accountgroups/{id}

Partial updates are supported; values of supported fields which are not in the payload will remain unchanged.

Parameters

The Account Group id is specified in the url path. All other fields are specified in the body of the application/json payload.

Example Request URL

PUT https://dspapi.admanagerplus.yahoo.com/traffic/accountgroups/16546

Example Request Body

{
  "name": "MNX_Changed",
  "code": "MNX2_PUT"
}

Example Response

{
  "response": {
    "id": 16546,
    "name": "MNX_Changed",
    "code": "MNX2_PUT",
    "seatId": 2
  },
  "errors": null,
  "timeStamp": "2017-12-18T19:19:11Z"
}

Create Account Group

Create a new account group.

POST /traffic/accountgroups

Parameters

All parameters are specified in the body of the application/json payload.

Example Request URL

POST https://dspapi.admanagerplus.yahoo.com/traffic/accountgroups

Example Request Body

{
  "name": "MNX",
  "code": "MNX2",
  "seatId": 2
}

Example Response

{
  "response": {
    "id": 16546,
    "name": "MNX",
    "code": "MNX2",
    "seatId": 2
  },
  "errors": null,
  "timeStamp": "2017-12-18T19:11:06Z"
}

Delete Account Group

The DSP Traffic API does not support deletion of account groups.