Publisher API

Abstract

The Publisher API is managed by Yahoo Ad Tech.

Overview

As a publisher, you can create, update and read publisher data using standing POST and GET calls. You can pass in the fields shown in the table below.

Endpoint

Resource URI

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

Fields

The Publisher API contains the following fields:

Name

Description

Type

Add

Update

id

The ID of the publisher to retrieve.

long

N/A

Required

name

The name of the publisher.

string

Required

Optional

status

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

enum

Required

Optional

currency

The currency of the account.

Currency

Required

Optional

timezone

The timezone of the publisher account. For example: GMT, UTC and so on.

string

Required

Optional

sourceType

The External Source Type. Can be one of the following: SYNDICATION, RECOMMENDS, FLURRY, SSP.

enum

Required

Optional

sourceId

The external source ID that belongs in the external system for bookkeeping purposes.

long

Optional

Optional

country

The two-letter country code of the site. For example, valid input values such as: AU, CA, UK and so on. When this field is not populated, it will default to US.

enum

Required

Optional

Operations

Create a New Publisher

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

For example:

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

Data passed

     [
       {
             "name": "UniMarketing_TW",
             "type": "EXTERNAL",
             "currency": "USD",
             "timezone": "Asia/Taipei",
             "status": "ACTIVE",
             "sourceType":"SSP" ,
             "sourceId": 1212,
             "country": "US"
       }

     ]

     Example response

       {
         "errors": null,
         "dataObject": [{
            "id": 5605348,
                     "name": "UniMarketing_TW",
                     "type": "EXTERNAL",
                     "currency": "USD",
                     "timezone": "Asia/Taipei",
                     "status": "ACTIVE",
                     "sourceType":"SSP",
                     "sourceId": 1212,
                     "country": "US",
            "createdDate": 1561425064919,
            "lastUpdatedByUser": "edwardsu",
            "lastUpdated": 1561425064989,
            "createdByUser": "edwardsu"
         }]
       }

Update an Existing Publisher

Method: To update one or more existing publishers, make a PUT call to the publisher endpoint with one or more publisher objects. Specify the fields to update; note that id is the only required parameter, all other fields are optional. The result will be the list of updated publishers. Partial update is supported; fields that are either not passed or passed as null will be ignored for the update.

For example: Make a PUT call to update an existing publisher with ID=5605348

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

Data passed
{
 "id": 5605348,
 "name": "Unimarketing TW"
}

Example response
 {
             "errors": null,
             "dataObject": {
          "id": 5605348,
             "name": "Unimarketing TW",
             "type": "EXTERNAL",
             "currency": "USD",
             "timezone": "Asia/Taipei",
             "status": "ACTIVE",
             "sourceType":"SSP",
             "sourceId": 1212,
             "country": "US",
           "createdDate": 1561425064919,
           "lastUpdatedByUser": "edwardsu",
           "lastUpdated": 1561425064989,
           "createdByUser": "edwardsu"
    }
  }

Read Specific Publisher Data

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

Example: Make a GET call to retrieve publisher data with ID=5605348.

GET https://api.gemini.yahoo.com/v3/rest/publisher/5605348

Response:
 {
       "id": 5605348,
             "name": "Unimarketing TW",
             "type": "EXTERNAL",
             "currency": "USD",
             "timezone": "Asia/Taipei",
             "status": "ACTIVE",
             "sourceType":"SSP",
             "sourceId": 1212,
             "country": "US",
       "createdDate": 1561425064919,
       "lastUpdatedByUser": "edwardsu",
       "lastUpdated": 1561425064989,
       "createdByUser": "edwardsu"
    }

Read Data for a Filtered list of Publishers

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

Name

Description

Type

id

The ID of the publisher.

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

enum

name

The name of the placement.

string

sourceId

The source Id of the publisher.

long

sourceType

The source type where this publisher originated from.

string

Example: Make a GET call to retrieve all the publishers under sourceType=SSP and source ID 3434 and limit the maximum number of rows to 2.

GET https://api.gemini.yahoo.com/v3/rest/publisher?sourceId=3434&sourceType=SSP&mr=2

Response:

[
 {
     "id": 455,
             "name": "Unimarketing TW",
             "type": "EXTERNAL",
             "currency": "USD",
             "timezone": "Asia/Taipei",
             "status": "ACTIVE",
             "sourceType":"SSP",
             "sourceId": 3434,
             "country": "US",
     "createdDate": 1561425064919,
     "lastUpdatedByUser": "edwardsu",
     "lastUpdated": 1561425064989,
     "createdByUser": "edwardsu"
    },
  {
     "id": 1002,
             "name": "Campbell TW",
             "type": "EXTERNAL",
             "currency": "USD",
             "timezone": "Asia/Taipei",
             "status": "ACTIVE",
             "sourceType":"SSP",
             "sourceId": 3434,
             "country": "US",
     "createdDate": 1561425064919,
     "lastUpdatedByUser": "edwardsu",
     "lastUpdated": 1561425064989,
     "createdByUser": "edwardsu"
    }
]