Page tree


Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

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

Description

The Native Ads API manages operations related to Native Ad configuration.

...

Header NameTypeRequiredValidationsDescription
PubTokenStringYes 

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/Response

1. Get Image Mime Types

...

Header NameTypeRequiredValidationsDescription
PubTokenStringYes 

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.

Path Parameters

Parameter NameTypeRequiredDefaultPossible ValuesDescriptionSample Data
idIntegerYes  Template Id whose information needs to be read. 2

...

Header NameTypeRequiredValidationsDescription
PubTokenStringYes 

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.

 

Response Body

Response Body ParameterTypeDescription
IdIntegerId of the layout/template
nameStringName of the layout/template
descriptionStringShort description about the layout/template
nativeAttributesArrayNative attributes array, which can be configured for this layout/template
nativeAttributes.nameStringName of asset attribute
nativeAttributes.descriptionStringDescription of the asset attribute
nativeAttributes.typeIdIntegerAsset attribute Type Id in the system
nativeAttributes.subTypeIdIntegerAsset attribute subtype Id in the system. It will not be present if the asset attribute is a parent type and doesn't have subtypes.

...

Header NameTypeRequiredValidationsDescription
PubTokenStringYes 

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.

Response Body

Response Body ParameterTypeDescription
descriptionStringShort description about the layout/template
nameStringName of the layout/template
IdIntegerId of the layout/template

...

Header NameTypeRequiredValidationsDescription
PubTokenStringYes 

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/Response

Sample URL: http://localhost:8080/nativeads/nativeassetsubtype/

...

Header NameTypeRequiredValidationsDescription
PubTokenStringYes 

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.

Response Body

Response Body ParameterTypeDescription
IdIntegerNative Asset Type Id
nameStringName of the Native Asset Type
descriptionStringDescription of Native Asset Type

...

Header NameTypeRequiredValidationsDescription
PubTokenStringYes 

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.

Response Body

Response Body ParameterTypeDescription
IdIntegerID of the Native Asset Property
nameStringNative Asset Property Name
typeIdIntegerType ID of the Native Asset for which the property applies
typeStringType of the Native Asset for which the property is applicable
requiredBooleanThis field defines whether the parameter is a mandatory parameter or not
defaultValueStringDefault value of the property that will be considered if not provided by user during configuration.
displayNameStringField name that will be displayed on PubMatic UI. This is for UI purposes only.

...

Header NameTypeRequiredValidationsDescription
PubTokenStringYes 

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

...

Header NameTypeRequiredValidationsDescription
PubTokenStringYes 

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.

Path Parameters

Parameter NameTypeRequiredDefaultPossible ValuesDescriptionSample Data
IdIntegerYes  Native Configuration Id for which the details are required2

...

Header NameTypeRequiredValidationsDescription
PubTokenStringYes 

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

...

Header NameTypeRequiredValidationsDescription
PubTokenStringYes 

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

...

Header NameTypeRequiredValidationsDescription
PubTokenStringYes 

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

...

Header NameTypeRequiredValidationsDescription
PubTokenStringYes 

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/Response JSON

...