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

Endpoints

You can use this endpoint to read, create, and update deal objects.

/traffic/accountgroups

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

  • Use the GET method to read existing account groups.
  • Use the POST method to add new account groups.
  • Use the PUT method to update existing account groups.

Resources

The Account Group object contains the following fields:

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

Specifies the shortname of the account group.

The code string cannot be more than ten characters long.

string Required Optional
seatId

Specifies the seat ID of the account group.

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

string Required N/A

Read Account Group by ID

Returns account group data for the specified account group ID.

GET /traffic/accountgroups/{id}

Parameters

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

Example Request

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

Example Response

The response returns the account group associated with the specified ID.

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

Read Account Groups by Query

Retrieves a list of the account groups belonging to the specified seat.

GET /traffic/accountgroups

Parameters

Table 17 Read Account Groups by Query Parameters
Parameter Parameter Type Description Data Type Required?
limit query Specifies the total number of items to return. The maximum value is 100. integer N
sort query Specifies the column to sort by. string N
dir query

Specifies the sort direction. Options include:

  • If ASC, data is sorted in ascending order.
  • If DESC, data is sorted in decending order.
string N
query query

Specifies the search term.

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

string N

Example Request

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

Example Response (Partial)

The response returns the account group associated with the specified ID.

{
  "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 Groups

Updates the account group associated with the specified ID.

PUT /traffic/accountgroups/{id}

The |traffic| supports partial updates; parameters that are either not passed or passed as null are ignored.

Parameters

Table 18 Update Account Groups Parameters
Field Parameter Type Description Data Type Required
id path Specifies the ID of the account group. integer Y
name body Specifies the name of the account group. string N
code body

Specifies the shortname of the account group.

The code string cannot be more than ten characters long.

string N

Example Request

The account group ID is specified in the endpoint path.

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

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

{
  "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 Groups

Creates a new account group.

POST /traffic/accountgroups

Parameters

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

Table 19 Create Account Groups Parameters
Parameter Parameter Type Description Data Type Required
name body Specifies the name of the account group. string Y
code body

Specifies the shortname of the account group.

The code string cannot be more than ten characters long.

string Y
seatId body

Specifies the seat ID.

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

integer Y

Example Request

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

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

{
  "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"
}