Page tree



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

The Line Item Type API retrieves details of various types of line items supported by the Unified Ad Server.

Different types of line Item, currently supported include:

  1. Sponsorship
  2. Standard
  3. House
  4. PMP
  5. RTB
  6. Wrapper
For more information about UAS Line Item Management Services, refer to Line Item Management Services (UAS) 

Supported Operations

Service Name: /lineitemtypes/

                     

Method PathHTTP Method TypeDescriptionLink to Definition
/lineitemtypes/{id}GETRetrieve the line item type details using line item type id.Retrieve the Details of a Line Item Type
/lineitemtypesGET

Retrieve a list of all Line Item Types.

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.

Refer to Common Request Query Parameters for more information about using dimensions, filters and sorting, 

Retrieve a List of Line Item Types


Retrieve the Details of a Line Item Type

This API enables you to retrieve the details of a Line Item Type. 

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 Body Parameters

Parameter NameTypeRequiredValidationsDescription
nameStringYes

Name can be a maximum of 64 characters.

Name should be unique for your account.

Name of Line Item Type
descriptionStringNo

Description can be a maximum of 1024 characters.

Line Item Type description (if any)


Request Sample URL

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


Response

Sample Response JSON

{
    "id": 1,
    "name": "Sponsorship",
 }‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍


Retrieve a List of Line Item Types

This API enables you to retrieve a list of a Line Item Types.  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. Refer to Common Request Query Parameters for more information about using dimensions, filters and sorting, 

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 Body Parameters

Parameter NameTypeRequiredValidationsDescription
nameStringYes

Name can be a maximum of 64 characters.

Name should be unique for your account.

Name of Line Item Type
descriptionStringNo

Description can be a maximum of 1024 characters.

Line Item Type description (if any)


Request Sample URL

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


Response

Sample Response

This will return a list of supported Line Item Types.


Error Codes For Line Item Type

Sr. No

Error Codes

Description

1.

PH_MISSING_OR_INVALID_PARAMETER

This error occurs when requested details for line item type with id which is does not exists or is invalid.



⇧ Top