Ad Unit Format API (UAS)

Document created by pubmatic-archivist on Mar 27, 2017Last modified by catherine.racette on Jan 23, 2018
Version 10Show Document
  • View in full screen mode

Description

Unified Ad Server Ad Unit Format API retrieves the Ad Unit Format details. In the query, you can also apply supported dimensions, filters and sorting options to retrieve a list of Ad Units with a specific set of details according to your requirements.

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

Supported Operations

Service Name: /adunitformats/

                     

Method PathHTTP Method TypeDescriptionLink to Definition
/adunitformats/GET

Retrieve details for all supported ad unit formats. 

Apply supported dimensions, filters and sorting options to retrieve a list of Ad Unit Formats with a specific set of details as required.

Retrieve list of Ad Unit Formats
/adunitformats/{id}GETRetrieve the details of a specific Ad Unit format for a specific Ad Unit Format.Retrieve Details of Ad Unit Format

Retrieve list of Ad Unit Formats

 

Overview

This API retrieves the list of Ad Units associated with your account. In the query, you can also apply supported dimensions, filters and sorting options to retrieve a list of Ad Units with a specific set of details according to your requirements.

Refer to Common Request Query Parameters to learn more about using dimensions, sort and filter options.

 

Request

           

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.

Request Sample URL

https://api.pubmatic.com/v1/uas/adunitformats/ 

Response

Sample Response JSON

    

{
    "metaData": {
        "startIndex": 1,
        "totalRecords": 3,
        "pageNumber": 1,
        "endIndex": 3,
        "pageSize": 100
    },
    "items": [{
        "id": 3,
        "name": "Banner/Rich Media",
        "adUnitResponseFormat": {
            "id": 1,
            "url": "http://$URI_PREFIX/phoenix/adunitresponseformats/1"
        },
        "description": "Banner/Rich Media Ad Unit"
    }, {
        "id": 12,
        "name": "Native",
        "adUnitResponseFormat": {
            "id": 1,
            "url": "http://$URI_PREFIX/phoenix/adunitresponseformats/1"
        },
        "description": "Native Ads"
    }, {
        "id": 13,
        "name": "Video",
        "adUnitResponseFormat": {
            "id": 1,
            "url": "http://$URI_PREFIX/phoenix/adunitresponseformats/1"
        },
        "description": "Video Ads"
    }]
}

 

Retrieve Details of Ad Unit Format

 

Overview

This API enables you to retrieve the details of a specific Ad Unit format for the requested Ad Unit Format Id.

Request

           

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.

Request Sample URL

https://api.pubmatic.com/v1/uas/adunitformats/3 

 

Response

Response Body Parameters

                                      

Parameter NameTypeRequiredValidationsDescription
idNumericNo

Must exist and be a a valid id.

PubMatic identifier for Ad Unit Format
nameStringYes

Name can be a maximum of 64 characters.

Name should be unique for your account.

Ad Unit format name 
descriptionStringNo

Description can be a maximum of 1024 characters.

Default is null.

Description to stor more details for ad unit format.
adUnitResponseFormatNumericYesAd Unit Response Format is valid and must exist.Every ad unit format is associated with one or more than one ad unit response format.

Sample Response JSON

    

{
    "id": 3,
    "name": "Banner/Rich Media",
    "adUnitResponseFormat": {
        "id": 1,
        "url": "http://api.pubmatic.com/v1/uas/adunitresponseformats/1"
    },
    "description": "Banner/Rich Media Ad Unit"
}

Error Codes for Ad Unit Format

Sr. No.Error CodeDescription
1.MISSING_OR_INVALID_PARAMETER

This error message will occur when an Ad Unit request is missing or contains an invalid parameter in the request.

This can occur for the following parameters:

  • Ad Unit Format Id
  • Ad Unit Response Format Id
  • Name

 

 

 

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