Line Item Goal Unit API (UAS)

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

Description

The Goal Unit API retrieves supported Goal Units.

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

Supported Operations

Service Name: /goalunits/

                     

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

Retrieves the details of a specific Goal Unit for the requested Id.

Currently, the Unified Ad Server supports the following types of Goal Units:

  • Absolute
  • Percentage
Retrieve the Details of a Goal Unit
/goalunits/GET

Retrieves a list of supported Goal Units.

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.

Find more details about how to use dimensions, sort and filter options here.

Retrieve a List of Goal Units

 

Retrieve the Details of a Goal Unit

 

Overview

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

Request

           

URIHTTP Method
ttps://$URI_PREFIX/{apiVersion}/phoenix/goalunits/{id}GET

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 systemGoal Unit Identifier
nameStringYes

Name can be a maximum of 32 characters.

Name should be unique for your account.

Name for the Goal Unit 
descriptionStringNo

Description can be a maximum of 1024 characters.

Goal Unit description (if any)

Request Sample URL

https://$URI_PREFIX/{apiVersion}/phoenix/goalunits/1

Response

Sample Response JSON

{
    "id": 1,
    "name": "Absolute",
    "description": "Represents absolute value"
}

Retrieve a List of Goal Units

Overview

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

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

           

URIHTTP Method
ttps://$URI_PREFIX/{apiVersion}/phoenix/goalunits/GET

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.Goal Unit Identifier
nameStringYes

Name can be a maximum of 32 characters.

Name should be unique for your account.

Name for the Goal Unit 
descriptionStringNo

Description can be a maximum of 1024 characters.

Goal Unit description (if any)

Request Sample URL

https://$URI_PREFIX/{apiVersion}/phoenix/goalunits/

Response

Sample Response JSON

    

This will retrieve a list of supported Goal Units.

 

Error Codes for Goal Units API

             

Sr. NoError CodesDescription
1.PH_MISSING_OR_INVALID_PARAMETERThis error occurs when the id for the requested goal unit 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