Blocklist

Abstract

Use blocklist to block certain demand on the specified supply.

Overview

Blocklist is created with a combination of supply and demand entities. Following are two different flavors:

  • Global Blocklists are blocklists that block demand on the entire publisher supply and will contain only 1 supply entity which is the Publisher Id.

  • Other Blocklists can contain single/multiple sites and/or single/multiple placements.

Flow

  1. Create a blocklist entity.

  2. Create Supply Entity(s) with blocklistId created in step 1.

  3. Create Demand Entity(s) with blocklistId created in step 1.

Fields

The Blocklist contains the following fields:

Name

Description

Type

Add

Update

id

The ID of the blocklist to retrieve.

long

N/A

Required

status

The status of the blocklist. Valid input values are: ACTIVE, DELETED.

enum

Required

Optional

name

The name of the blocklist.

string

Required

Optional

publisherId

The publisher ID that this blocklist belongs to.

long

Required

Required

Endpoint

Resource URI

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

Operations

Create a New Blocklist

Method: To create one or more blocklists, make a POST call to the blocklist endpoint with the required fields. Batch create is supported; either a blocklist or a blocklist array can be passed. The response will be the newly created blocklist, or a list of multiple new blocklists if an array is passed.

Example:

POST https://api.gemini.yahoo.com/v3/rest/blocklist

Data passed
[
  {
             "status": "ACTIVE",
             "name": "Control for Publisher",
             "publisherId": 1534310
  }
]
Example response

[
  {
             "id": 100
         "status": "ACTIVE",
             "name": "Control for Publisher",
             "publisherId": 1534310,
         "createdDate": 1561480942110,
         "lastUpdatedByUser": "edwardsu",
         "createdByUser": "edwardsu",
          "lastUpdated": 1561480942110
  }
]

Update an Existing blocklist

Method: To update one or more existing blocklists, make a PUT call to the blocklist endpoint with one or more blocklist objects. We can update the status and name of the blocklist. Specify the status to update; note that id is the only required parameter. The result will be the list of updated blocklists. Partial update is supported; fields that are either not passed or passed as null will be ignored for the update.

Example: Make a PUT call to update an existing blocklist with ID=232.

PUT https://api.gemini.yahoo.com/v3/rest/blocklist

Data passed
{
 "id": 232,
 "status": "DELETED"
}

Example response
 {
             "errors": null,
             "response": {
                     "id": 232
                 "status": "DELETED",
                     "name": "Control for Publisher",
                     "publisherId": 1534310,
                 "createdDate": 1561480942110,
                 "lastUpdatedByUser": "edwardsu",
                 "createdByUser": "edwardsu",
                  "lastUpdated": 1561480942110
             }
  }

Read Specific blocklist Data

Method: To retrieve data for a specific blocklist, make a GET call with the ID parameter.

Example: Make a GET call to retrieve a blocklist with ID=223.

GET  https://api.gemini.yahoo.com/v3/rest/blocklist/223

Response:
{
             "id": 232
         "status": "ACTIVE",
             "name": "Control for Publisher",
             "publisherId": 1534310,
         "createdDate": 1561480942110,
         "lastUpdatedByUser": "edwardsu",
         "createdByUser": "edwardsu",
         "lastUpdated": 1561480942110
 }

Read data for filtered list of supplyentity

Method: To retrieve data for a filtered list of blocklists, make a GET call using the following parameters:

Name

Description

Type

publisherId

The ID of the publisher to filter blocklists by.

long

blocklistId

The ID of the blockList.

long

id

The id of the demandentity.

long

mr

The maximum number of rows to retrieve.

int

si

The start index or the first element to retrieve.

int

status

The status of the blocklist to filter by.

enum

name

The name of the blocklist.

string

Example: Make a GET call to retrieve all the blocklists under publisher account ID 1534310 and blocklistId and limit the maximum number of rows to 2.

GET https://api.gemini.yahoo.com/v3/rest/blocklist/demandentity/publisherId=1534310&blocklistId=130&mr=2

Response:

[
  {
             "id": 232
         "status": "ACTIVE",
             "name": "Control for Publisher",
             "publisherId": 1534310,
         "createdDate": 1561480942110,
         "lastUpdatedByUser": "edwardsu",
         "createdByUser": "edwardsu",
          "lastUpdated": 1561480942110
 },
  {
             "id": 235
         "status": "ACTIVE",
             "name": "Control for Site 1233",
             "publisherId": 1534310,
         "createdDate": 1561480942110,
         "lastUpdatedByUser": "edwardsu",
         "createdByUser": "edwardsu",
         "lastUpdated": 1571480942110
 }
]