Supply Entity

Abstract

Supply entity holds the supply information for “blocklistId” the demand on. Supply can be of following:

  • Publisher

  • Site

  • Placement

Overview

The Supply Entity provides methods for creating, updating, and retrieving supply entity data.

Fields

The Supply Entity contains the following fields:

Name

Description

Type

Add

Update

id

The ID of the denylist to retrieve.

long

N/A

Required

status

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

enum

Required

Optional

entityType

The type of the entity that demand should be blacklisted on. Available types are PUBLISHER, SITE, SECTION.

enum

Required

Optional

entityRef

The id of the entity, that is, the publisherId, placementId or siteId.

long

Required

Optional

blocklistId

The denylist ID that this entity belongs to.

long

Required

Optional

publisherId

The publisher ID for which this supply belongs.

long

Required

Optional

Endpoint

Resource URI

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

Operations

Create a New supplyentity

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

For example:

 POST https://api.gemini.yahoo.com/v3/rest/blacklist/supplyentity

 Data passed
 {
         "blocklistId": 130,
     "entityType": "SITE",
     "entityRef": "200",
     "status": "ACTIVE",
         "publisherId": 1534310
  }
]
Example response
[
[
  {
      "id": 400,
        "blocklistId": 130,
        "entityType": "SITE",
        "entityRef": "200",
        "status": "ACTIVE",
      "publisherId": 1534310,
      "createdDate": 1561480942110,
      "lastUpdatedByUser": "edwardsu",
      "createdByUser": "edwardsu",
      "lastUpdated": 1561480942110
  }
]

Update an Existing supplyentity

Method: To update one or more existing supplyentity, make a PUT call to the supplyentity endpoint with one or more supplyentity objects. We can update the status of the supplyentity. Specify the status to update; note that id is the only required parameter. The result will be the list of updated supplyentities. 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 supplyentity with ID=400

PUT https://api.gemini.yahoo.com/v3/rest/blacklist/supplyentity

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

Example response
 {
     "errors": null,
     "response": {
     "id": 400,
        "blocklistId": 130,
        "entityType": "SITE",
        "entityRef": "200",
        "status": "DELETED",
     "publisherId": 1534310,
     "createdDate": 1561480942110,
     "lastUpdatedByUser": "edwardsu",
     "createdByUser": "edwardsu",
     "lastUpdated": 1561480942110
  }

  }

Read Specific supplyentity Data

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

Example: Make a GET call to retrieve a supplyentity with ID=400

GET  https://api.gemini.yahoo.com/v3/rest/blacklist/supplyentity/400

Response:
{
     "id": 400,
        "blocklistId": 130,
        "entityType": "SITE",
        "entityRef": "200",
        "status": "ACTIVE",
     "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 supplyentity, make a GET call using the following parameters:

Name

Description

Type

publisherId

The ID of the publisher to filter supplyentity by. Only one publisherId to be passed.

long

blacklistId

TThe ID of the denyList to filter supplyentity by.

long

id

The id of the supplyentity.

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 entity to filter by.

enum

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

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

Response:

[
  {
     "id": 400,
        "blocklistId": 130,
        "entityType": "SITE",
        "entityRef": "200",
        "status": "ACTIVE",
     "publisherId": 1534310,
     "createdDate": 1561480942110,
     "lastUpdatedByUser": "edwardsu",
     "createdByUser": "edwardsu",
     "lastUpdated": 1561480942110

 },
  {
     "id": 420,
        "blocklistId": 130,
        "entityType": "SITE",
        "entityRef": "300",
        "status": "ACTIVE",
     "publisherId": 1534310,
     "createdDate": 1561480942110,
     "lastUpdatedByUser": "edwardsu",
     "createdByUser": "edwardsu",
     "lastUpdated": 1571480942110

     }
]