Page tree



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

The Label Type API lets you retrieve various types of labels supported by the Unified Ad Server.


For more information about UAS Account and Admin Services APIs, refer to Account & Admin Services (UAS) 

Supported Operations

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

Retrieve the details of a specific Label Type for a requested id.

The following Label Types are supported:

IDLabel Type
1Ad Exclusion
2Competitive Exclusion
Retrieve the Details of a Label Type
/labeltype/GET 

Retrieve a list of all Label Types

You can apply supported dimensions, filters and sorting options to retrieve a list of Label Types with a  specific  set   of details.

Retrieve a List of Label Types


Retrieve the Details of a Label Type

This API lets you retrieve details for a specific Label Type supported in the Unified Ad Server.


Request


Request Headers

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


Sample Request URL

https://api.pubmatic.com/v1/uas/labeltype/1

Response

Sample Response JSON

{
    "id": 1,
    "name": "Ad Exclusion",
    "description": "Defines Ad exclusion"
}‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍


Retrieve a List of Label Types

The API lets you retrieve a list of supported Label Types. In the query, you can also apply supported dimensions, filters and sorting options to retrieve a list of Label Types with a specific set of details according to your requirements.

See 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.
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 Sample URL

https://api.pubmatic.com/v1/uas/labeltype?dimensions=name,description&filters=id eq 1


Response

Sample Response


Response will return all Label Types associated with your account based on filter criteria.


Error Codes for Label Type

Sr. No.Error CodesDescription
1.MISSING_OR_INVALID_PARAMETERRequested details for a Label Type with an ID that does not exist or is invalid.


Unified Ad Server References