Macro Category API

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

Description

The Macro Category API retrieves Macro categories used by the Unified Ad Server.  

For more information about UAS Creative Management Services, refer to Creative Management Services (UAS)

Supported Operations

Service Name: /common/macrocategory/

                     

Method PathHTTP Method TypeDescriptionLink to Definition
/macrocategory/{id}GET

Retrieves the details of the macro category for the Id provided. The following are supported macro categories:

                               
IDName
1Ad Request Macros
2Ad Response Macros
3Standard Macros
4Location Macros
5Mobile Device Macros
6Custom Macros

You can create and add custom macros by prefixing with %%VAR_<Custom Key Name >%%. You can retrieve the available custom key for your account using the Custom Key API.

Note: The Unified Ad Server will replace the custom macro if it receives the key and value in the ad request and it finds the exact match (it is case sensitive). 

Retrieve details of Macro Category
/macrocategory/GET

Retrieves a list of supported macro categories supported by the Unified Ad Server.

You can apply supported dimensions, filters and sorting options to retrieve a list of macro categories with a specific set of details as needed.

Retrieve a list of Macro Categories

 

Retrieve details of Macro Category

Overview

This API retrieves the details of a macro category for the specified Id.

Request

           

URIHTTP Method
$URI_/PREFIX/common/macrocategory/{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/common/macrocategory/1

Response

Response Body Parameters

                       

Parameter NameTypeDescription
idIntegerUnique identifier of the macro category
nameStringName of the macro category
descriptionStringDescription for the macro category

Sample Response JSON

{
  "id": 1,
  "name": "Ad Request Macros",
  "description": "Macros related to Ad Request "
}

 

Retrieve a List of Macro Category

Overview

This API retrieves a list of macro categories supported by the Unified Ad Server.

Request

           

URIHTTP Method
$URI_/PREFIX/common/macrocategory/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/common/macrocategory/

Response

Response Body Parameters

                       

Parameter NameTypeDescription
idIntegerUnique identifier of the macro category
nameStringName of the macro category
descriptionStringDescription for the macro category

Sample Response 

    

It will return a list of all macro categories supported by the Unified Ad Server.

References

HTTP Status Codes 

Error Codes for Macro Category API

           

Error CodeError Description
CC03_004Resource not found

Attachments

    Outcomes