Page tree



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

Overview

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

Request

         

URIhttp://{domainName}/common/adSize?pageSize=20&pageNumber=1
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

                     

Parameter NameTypeRequiredDescription
pageNumberIntegerOptional

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

pageSizeIntegerOptional

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

Response

Response Headers

           

Response Header NameType
Content-typeapplication-json


Response Body

                                           

Response Body ParameterTypeDescription
metaDataObjectPagination details
adSizeIdIntegerUnique 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.


Sample Response JSON


{
    "metaData": {
        "startIndex": 4,
        "request": {
            "pageSize": 3,
            "pageNumber": 2
        },
        "totalRecords": 64,
        "endIndex": 6
    },
    "items": [
        {
            "adSizeId": 4,
            "name": "Small Rectangle",
            "width": 180,
            "height": 150,
            "platforms": [
                {
                    "id": 1,
                    "name": "Web"
                }
            ]
        },
        {
            "adSizeId": 5,
            "name": "Button",
            "width": 125,

            "height": 125,
            "platforms": [
                {
                    "id": 1,
                    "name": "Web"
                }
            ]
        },
        {
            "adSizeId": 6,
            "name": "Vertical Banner",
            "width": 120,
            "height": 240,
            "platforms": [
                {
                    "id": 1,
                    "name": "Web"
                }

            ]

        }

    ]


‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍