Page tree



Before using PubMatic APIs, first generate the API Token. For more information, refer to  Getting Started with PubMatic APIs

Overview

This API enables you to retrieve the list of all the ad sizes present in the PubMatic system.

What is difference between /adSize (old) and /adSize/search (new)

This API provides the list of Ad Sizes that are not mapped to any platform. Existing adSize API, list the ad sizes  that are mapped to at least one platform. 

EXAMPLE:

Ad Size id 226 and 263 are not mapped to any platform. Hence, it will not be listed by this old API

http://api-mgmt.pubmatic.com/common/adSize?filters=id+eq+226 and http://api-mgmt.pubmatic.com/common/adSize?filters=id+eq+263 will return 'Record Not Found' in the old adSize API.

In the Unified Ad Server (UAS) ad size will not be mapped to any platform, but will be mapped to Ad Type instead. If ad size is mapped to any platform, with the new adSize/search API, we can pass platforms as filter parameter, to list ad sizes mapped to a platform.

Request

URIhttp://{domainName}/common/adSize/search
HTTP MethodGET

 

Request Headers

Header NameTypeValueRequiredDescription
AuthorizationStringBearer ${access_token}Yes

Publisher Token to authenticate and authorize the user calling the Unified Ad Server API. Send the access token generated for authentication at the place of ${access_token} in the request.


For more information about access tokens, refer to Getting Started with PubMatic APIs.

 

Request Query Parameters

Though API will accept these quey parameters. But it is not supported. Hence, API will return all the records always.

The existing API not supports, pageSize parameter. If passed, it is not honored. But it supports pageNumber


Parameter NameTypeRequiredDescription

pageNumber
 
Not Supported 

IntegerOptional

Page number to be fetched in case of multiple pages.
Its default value is 1.

pageSize
 
Not Supported 

IntegerOptional

Maximum number of rows to be included in the response.
Its default value is 100.

 

Dimensions

This API will always return all the dimensions. Selecting only required dimensions is not supported as of now.

Selecting only required dimension, is also not supported by existing API 

Filters

DimensionData TypeDescription
nameStringFilter ad sizes by name
widthNumericFilter ad sizes by name
heightNumericFilter ad sizes by name
categoryIdNumeric

Search ad size by Ad Size Category

platformsNumeric

Search ad size by Platform

IdDescription
1Web
2Mobile Web
3Not Defined
4Mobile App iOS
5Mobile App Android
adTypesNumeric

Search Ad Sizes by mapped Ad Types. Currently SSP uses only following ad types

IdDescription
3Banner / Rich Media
12Native
13Video

Note : Production database already contains mappings with ad type 1 and 2

Response

Response Headers

Response Header NameType
Content-typeapplication-json

Response Body

Response Body ParameterTypeDescription
metaDataObjectPagination details
idIntegerUnique identifier of the ad size.
nameStringName of the ad size.
widthIntegerWidth of the ad size.
heightIntegerHeight of the ad size.
platforms.idIntegerUnique identifier of the platform.
platforms.nameStringName of the platform.
adTypes.idIntegerUnique Identifier of Ad Type
categoryIdIntegerUniquer Identifier of Ad Size Category

Sample Response JSON


{
     "metaData": {
         "startIndex": 1,
         "request": {
             "pageSize": 100,
             "pageNumber": 1,
             "filters": [
                 "adTypes eq 13"
             ],
             "originalQuery": "pageSize=100&pageNumber=0&&filters=adTypes eq 13"
         },
         "totalRecords": 5,
         "endIndex": 5
     },
     "items": [{
             "name": "Pre-Roll Video - 756x260",
             "width": 756,
             "height": 260,
             "categoryId": 0,
             "id": 46,
             "platforms": [{
                 "id": 1,
                 "name": "Web"
             }],
             "adTypes": [{
                 "id": 13
             }]
         },
         {
             "name": "Pre-Roll Video - 800x480",
             "width": 800,
             "height": 480,
             "categoryId": 0,
             "id": 47,
             "platforms": [{
                 "id": 1,
                 "name": "Web"
             }],
             "adTypes": [{
                 "id": 13
             }]
         },
         {
             "name": "640x480 VAST/VPAID Preroll",
             "width": 640,
             "height": 480,
             "categoryId": 0,
             "id": 64,
             "platforms": [{
                 "id": 1,
                 "name": "Web"
             }],
             "adTypes": [{
                 "id": 13
             }]
         },
         {
             "name": "Video N/A",
             "width": 0,
             "height": 0,
             "categoryId": 0,
             "id": 97,
             "platforms": [{
                     "id": 5,
                     "name": "Mobile App Android"
                 },
                 {
                     "id": 1,
                     "name": "Web"
                 },
                 {
                     "id": 2,
                     "name": "Mobile Web"
                 },
                 {
                     "id": 4,
                     "name": "Mobile App IOS"
                 }
             ],
             "adTypes": [{
                 "id": 13
             }]
         },
         {
             "name": "620x249",
             "width": 620,
             "height": 249,
             "categoryId": 0,
             "id": 130,
             "platforms": [{
                     "id": 1,
                     "name": "Web"
                 },
                 {
                     "id": 2,
                     "name": "Mobile Web"
                 }
             ],
             "adTypes": [{
                 "id": 13
             }]
         }
     ]
 }‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍

Version 3.0