Native Image Size API

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

Description

The Native Image Size API retrieves the supported Native Image Sizes for the "Image" Asset Type.

For more information, please refer to the Native Ad Specification Document.

For more information about UAS Native Template Services APIs, refer to Native Template Services (UAS)

 

Supported Operations

Service Name: /common/nativeimagesize/

                     

Method PathHTTP Method TypeDescriptionLink to Definition
/common/nativeimagesize/{id}GETRetrieves the Native Image Size details using the Native Image Size id.Retrieve Details of a Native Image Size
/common/nativeimagesize/GET

Retrieves a list of supported Native Image Sizes. In the query, you can also apply supported dimensions, filters and sorting options to retrieve a list with a specific set of details according to your requirements.

Retrieve a List of Native Image Ad Sizes

 

Retrieve Details of a Native Image Size

 

Overview

This API enables you to retrieve the details for a Native Image Size.

Request        

URIHTTP Method
https://$URI_/PREFIX/{apiVersion}/api/common/nativeimagesize/{id}GET

Request Headers                        

Header nameType ValueRequiredDescription
Content-TypeStringapplication/jsonYesMedia type for request.
pubTokenString${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.

Sample Request URL

https://$URI_PREFIX/{apiVersion}/api/common/nativeimagesize/1

Response

Response Body

                                           

Parameter NameTypeDescription
aspectRatioStringImage Aspect Ratio
idNumericNative Image Size Identifier
widthNumericWidth in Pixels
heightNumericHeight in Pixels
nameStringMime Type String
isDefaultNumericDefault value for a given image type
subtypeString

Applicable Image Asset Sub Types for given Image Size. Possible Image sub Types include:

  • icon
  • logo
  • main

Sample Response JSON

    

 

{
    "id": 1,
    "name": "75x75",
    "isDefault": 1,
    "aspectRatio": "1:1",
    "subtype": "icon",
    "width": 75,
    "height": 75
}

 

 Retrieve a List of Native Image Ad Sizes

Overview

This API enables you to retrieve a List of Native Image Sizes

Request

           

URIHTTP Method
https://$URI_/PREFIX/{apiVersion}/api/common/nativeimagesize/GET

Request Headers

                        

Header nameType ValueRequiredDescription
Content-TypeStringapplication/jsonYesMedia type for request.
pubTokenString${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.

Sample Request URL

https://$URI_PREFIX/{apiVersion}/api/common/nativeimagesize

Response

Sample Response

    

 This will return a list of Native Image Sizes

 

Error Codes for Native Image Size

             

Sr. NoError CodesDescription
1.MISSING_OR_INVALID_PARAMETERRequested details for a Native Image Size with an id that does not exist or is invalid.

 

 

Unified Ad Server References

Common Request Query Parameters for Web Services

Supported Operations for Filters

HTTP Status Codes

Unified Ad Server Specific Error Codes

 

 

 

Version 0.1

Attachments

    Outcomes