Line Item Goal Type (UAS)

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

Description

The Goal Type API enables you to retrieve details of supported Goal Types.

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

Supported Operations

Service Name: /goaltypes/

                     

Method PathHTTP Method Type DescriptionLink to Definition
/goaltypes/{id}GET

Retrieve the details of a specific goal type.

The following goal types are supported in the Unified Ad Server:

1=Impressions

2=Clicks

Retrieve Details of Goal Type
/goaltypes/GET

Retrieve a list of supported Goal Types.

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 Types

 

Retrieve Details of Goal Type

Overview

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

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
idNumericYesMust be valid and exist in the systemIdentifier for Goal Type
nameStringYes

Name can be a maximum of 32 characters.

Name should be unique for your account.

Name of the Goal Type
descriptionStringNo

Description can be a maximum of 1024 characters.

Goal Type description (if any)

Request Sample URL

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

Response

Sample Response JSON

    

{
    "id": 1,
    "name": "Impressions",
    "description": "Represents impressions"
}

 

Retrieve a List of Goal Types

 

Overview

This API enables you to retrieve a list of Goal 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.
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
idNumericYesMust be valid and exist in the system.Identifier for Goal Type
nameStringYes

Name can be a maximum of 32 characters.

Name should be unique for your account.

Name of the Goal Type
descriptionStringNo

Description can be a maximum of 1024 characters.

Goal Type description (if any)

Request Sample URL

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

Response

Sample Response JSON

    

This will return a list of supported Goal Types.

 

Error Codes for the Goal Type API 

             

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

 

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