Retrieving List of Ad Sizes (New)

Document created by catherine.racette on Jul 6, 2017Last modified by catherine.racette on Jul 6, 2017
Version 1Show Document
  • View in full screen mode

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

URI
http://{domainName}/common/adSize/search
HTTP Method
GET

 

Request Headers

Header Name
Type
Value
Required
Description
Authorization
String
Bearer ${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 Name
Type
Required
Description
pageNumber
 
Not Supported
Integer
Optional
Page number to be fetched in case of multiple pages.
Its default value is 1.
pageSize
 
Not Supported
Integer
Optional
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 Name
Type
Content-type
application-json

Response Body

Response Body Parameter
Type
Description
metaData
Object
id
Integer
Unique identifier of the ad size.
name
String
Name of the ad size.
width
Integer
Width of the ad size.
height
Integer
Height of the ad size.
Integer
Unique identifier of the platform.
String
Name 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 

Attachments

    Outcomes