CommonService

Document created by pubmatic-archivist on Mar 27, 2017Last modified by catherine.racette on Jun 5, 2017
Version 10Show Document
  • View in full screen mode

This interface allows you to retrieve the ad networks, ad categories, verticals and micro-verticals, ad size and geographical information from the PubMatic system.

It includes the following methods:

 

Method

Description

getAdNetworks

This method allows you to retrieve the ad network's details for all the publishers.

getAdSizes

This method allows you to retrieve all the ad sizes.

getAdCategories

This method allows you to retrieve all the ad categories.

getGeos

This method allows you to retrieve all the geographical locations.

getVerticals

This method allows you to retrieve all the verticals and micro-verticals.


getAdNetworks

 

This method allows you to retrieve the ad network's details for all the publishers.

Input Parameters

Parameters

Type

Status

Description

accessToken

String

Mandatory

Indicates the access token, which you have obtained from PubMatic. For more information, refer to the Getting Started with PubMatic APIs 

adNetworkType

AdNetworkType

Mandatory

Indicates the type of ad network whose information you want to retrieve.

Note: This API currently supports only the "NON-INTEGRATED" type of ad networks.

adNetworkIds

List of Long

Optional

Indicates a list of IDs of the ad networks whose information you want to retrieve.

Note: If this value is not specified, then this method retrieves the details of all the ad networks associated with all the publishers from the PubMatic system.

 

AdNetworkType Enum

This enum indicates the type of ad network.

It supports the following values:

 

Values

Description

INTEGRATED

Indicates an ad network integrated with the PubMatic system.

NON-INTEGRATED

Indicates an ad network which is not integrated with the PubMatic system.

GROUP

Indicates an ad network which is associated with a group of ad networks.

 

Output

This method generates the output data as a list of AdNetwork beans.

 

AdNetwork Bean

This bean contains the details of an ad network.

 

Members

                         

Field

Type

Description

adNetworkId

Long

Indicates the ID of the ad network.

adNetworkType

AdNetworkType

Indicates the type of ad network.

name

String

Indicates the name of the ad network.

getAdSizes

This method allows you to retrieve all the ad sizes.

 

Input Parameters

Parameters

Type

Status

Description

accessToken

String

Mandatory

Indicates the access token, which you have obtained from PubMatic. For more information, refer to Getting Started with PubMatic APIs

platform

Platform

Mandatory

Indicates the platform for which the ad sizes need to be retrieved.

adSizeIds

List of Long

Optional

Indicates a list of IDs of specific ad sizes whose information you want to retrieve.

Note: If this value is not specified, then this method retrieves the details of all the ad sizes for the specified platform from the PubMatic system.

 

Platform Enum

This enum indicates the type of platform on which the ad will be served. It supports the following values:

 

Values

Description

MOBILE_WEB

Indicates a Web page viewed on a mobile device.

MOBLIE_APP_IOS

Indicates an iOS-based mobile application.

MOBLIE_APP_ANDROID

Indicates an Android-based mobile application.

WEB

Indicates a Web page viewed on a computer.

 

Output

This method generates the output data as a list of AdSize beans.

 

AdSize Bean

This bean contains the details of an ad size.

 

Members

                                             

Field

Type

Description

adSizeCategory

AdSizeCategory

Indicates the category of the ad size.

adSizeType

AdType

Indicates the type of ad.

height

Long

Indicates the height of the ad.

id

Long

Indicates the unique ID of the ad.

name

String

Indicates the name of the ad.

platform

Platform

Indicates the platform on which the ad will be displayed.

width

Long

Indicates the width of the ad.

 

AdSizeCategory Enum

This enum indicates the category of an ad size. It supports the following values:

                               

Values

Description

HORIZONTAL

Indicates a horizontal ad.

INLINE

Indicates an inline ad.

POP

Indicates a popup ad.

PRE_ROLL_VIDEO

Indicates a pre-roll video ad.

SQUARE

Indicates a square ad.

VERTICAL

Indicates a vertical ad.

 

AdType Enum

 

This enum indicates the type of an ad. It supports the following values:

                                               

Values

Description

FLASH

Indicates a flash ad.

HTML

Indicates an HTML-based ad.

IMAGE_ONLY

Indicates an image ad.

LINK_UNIT

Indicates an ad that contains links to a list of topics related to the content of the Web page on which the ad will be displayed.

TEXT_FLASH

Indicates either a text ad or a flash ad.

TEXT_HTML

Indicates either a text ad or a HTML-based ad.

TEXT_IMAGE

Indicates either a text ad or an image ad.

TEXT_IMAGE_FLASH

Indicates either a text ad, an image ad or a flash ad.

TEXT_IMAGE_FLASH_HTML

Indicates either a text ad, an image ad, a flash ad or a HTML-based ad.

TEXT_ONLY

Indicates a text ad.

 

getAdCategories

Indicates the access token, which you have obtained from PubMatic. For more information, refer to Getting Started with PubMatic APIs

 

This method allows you to retrieve all the ad categories.

Input Parameters

Parameters

Type

Status

Description

accessToken

String

Mandatory

 

Output

This method generates the output data as a list of AdCategory beans.

 

AdCategory Bean

This bean contains the details of an ad category.

Members

                    

Field

Type

Description

id

Long

Indicates the unique ID of the ad category.

name

String

Indicates the name of the ad category.

 

 

getGeos

This method allows you to retrieve all the geographical locations.

 

Input Parameters

Parameters

Type

Status

Description

accessToken

String

Mandatory

Indicates the access token, which you have obtained from PubMatic. For more information, refer to Getting Started with PubMatic APIs 

geoLevel

GeoLevel

Mandatory

Indicates the type of geographical location whose information you want to retrieve.

parentGeoId

Long

Optional

Indicates the ID of the parent geographical location whose child locations will be retrieved.

For example, if you specify the ID of a country such as France in this parameter and specify CITY in the geoLevel parameter, then the method will retrieve all the cities of France configured in the system.

Note: If this value is not specified, then this method retrieves the details of all the geographical locations associated with the specified location type from the PubMatic system.

 

Output

This method generates the output data as a list of Geo beans.

 

GeoLevel Enum

This enum indicates the types of geographical location.

It supports the following values:

                       

Values

Description

COUNTRY

Indicates a country.

REGION

Indicates a region.

CITY

Indicates a city.

DMA

Indicates a Designated Market Area (DMA).

 

Geo Bean

This bean contains the details of a geographical location.

 

Members

  

Field

Type

Description

geoId

Long

Indicates the unique ID of the geographical location.

name

String

Indicates the name of the geographical location.

 

getVerticals

 

This method allows you to retrieve all the verticals and micro-verticals.

Input Parameters

Parameters

Type

Status

Description

accessToken

String

Mandatory

Indicates the access token, which you have obtained from PubMatic. For more information, refer to Getting Started with PubMatic APIs 

 

Output

This method generates the output data as the VerticalDetails beans.

 

VerticalDetails Bean

This bean contains the details of all the verticals and micro-verticals.

Members

                    

Field

Type

Description

microVerticals

List of MicroVertical

Indicates a list containing the details of all the micro-verticals.

verticals

List of Vertical

Indicates a list containing the details of all the verticals.

 

MicroVertical Bean

This bean contains the details of a micro-vertical.

 

Members

 

Field

Type

Description

microVerticalId

Long

Indicates the unique ID of the micro-vertical.

name

String

Indicates the name of the micro-vertical.

 

Vertical Bean

This bean contains the details of a vertical.

Members

                    

Field

Type

Description

verticalId

Long

Indicates the unique ID of the vertical.

name

String

Indicates the name of the vertical.

 

Exception

This method generates the APIException class as an exception if there is any issue.

Attachments

    Outcomes