Page tree


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

Description

The Line Item Goal Pricing API retrieves details of supported Goal Pricing Models.

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

Supported Operations

Service Name: /goalpricing/

                     

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

Retrieves the details of a specific goal pricing for the requested id.

Supported Goal Pricing Models:

IDNameDescription
1CPMCost per impression
2CPCCost per click
Retrieve details of Goal Pricing
/goalpricing/GET

Retrieve a list of supported goal pricing.

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.

Retrieve a list of Goal Pricing

 


Retrieve details of Goal Pricing

Overview

This API enables you to retrieve the details of a Goal Pricing. 

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

                               

Parameter NameTypeRequiredValidationsDescription
idNumericYesAd Identifier for Goal PricingGoal Pricing Identifier
nameStringYes

Name can be a maximum of 32 characters.

Name should be unique for your account.

Name for the Goal Pricing 
descriptionStringNo

Description can be a maximum of 1024 characters.

Goal Pricing description (if any)

Request Sample URL

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

Response

Sample Response JSON

    

{
    "id": 1,
    "name": "CPM",
    "description": "Cost per impression"
}‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍


Retrieve a list of Goal Pricing

Overview

This API enables you to retrieve a list of a Goal Pricing. 

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

                               

Parameter NameTypeRequiredValidationsDescription
idNumericYesAd Identifier for Goal PricingGoal Pricing Identifier
nameStringYes

Name can be a maximum of 32 characters.

Name should be unique for your account.

Name for the Goal Pricing 
descriptionStringNo

Description can be a maximum of 1024 characters.

Goal Pricing description (if any)

Request Sample URL

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


Response

Sample Response JSON

    

This will return a list of supported Goal Pricing.


Error Codes for the Goal Pricing API

             

Sr. NoError CodeDescription
1.PH_MISSING_OR_INVALID_PARAMETERThis error occurs when goal pricing is requested for an id that does not exist or is invalid.