Automated Guaranteed (AG) Line Items API

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

Supported Methods

Note: Line Items must be associated with an Order. Create Line Items using the Create Order API or the  Order Update API.

     

                                                   

Method PathHTTP Method TypeDescriptionLink to Definition

/aglineitems/{id}

GET

Retrieves a line item by ID

Retrieving the Details of a Line Item

/aglineitems

GET

Retrieves all line items

Retrieving a List of Line Items

/aglineitems/summaries

GET

Retrieves a page of line items

Retrieve all Line Items Associated with an Order
/aglineitems/{id}PUTUpdates a line itemUpdating a Line Item

/aglineitems/licreativeassocs

PUT

Updates line item - creative associations

Associating Creatives with a Line Item

/aglineitems/creatives

GET

Retrieves all creatives for all line items

Retrieving all Creatives for all Line Items

/aglineitems/creatives/{id}

GET

Retrieves all line items associated with creative

Retrieving all Line Items associated with a Creative

 

 

Retrieving Details of a Line Item

Overview

This API allows you to retrieve the details of a line item.

Request           

URIHTTP Method
$URI_PREFIX/aglineitems/{id}GET

Request Headers                               

Header Name

Type

Value

Required

Description

pubToken

String

${access_token}

Yes

Need to send the access token generating for authentication at the place of ${access_token}.

 

For more information about access tokens, refer to Getting Started with PubMatic APIs

resourceId

Integer

 

Yes

Resource ID (Owner ID)

resourceTypeId

Integer

 

Yes

Type of Resource (e.g., Publisher = 1, Demand Partner = 5)

Path Parameter               

Parameter Name
Type
Required
Description
 idLong Yes Line Item ID for which details need to extracted 

Sample Request URL

GET$URI_PREFIX/aglineitems/737

Response

Sample Response JSON

{
  "adServerLiId": null,
  "assocAdvertisers": null,
  "assocDemandPartners": null,
  "associateId": 737,
  "associateTypeId": 5,
  "costType": "CPM",
  "creationTime": "2016-03-25T16:01:47Z",
  "creativeRequired": true,
  "creatives": [],
  "endDate": "2016-03-31",
  "id": 42,
  "modificationTime": "2016-03-28T10:38:11Z",
  "name": "AMG-1890-LI",
  "offer": {
    "id": 17,
    "name": "AMG-1973-offer",
    "description": "AMG-1973",
    "ownerId": 31445,
    "ownerTypeId": 1,
    "associateId": null,
    "associateTypeId": null,
    "tags": "",
    "currency": "USD",
    "priceAmount": 11.11,
    "minSpendAmount": 0.11,
    "publicRateCardAmount": 1.11,
    "costType": "CPM",
    "status": "ACTIVE",
    "productId": 15300,
    "product": {
      "id": 15300,
      "name": "QQQQ",
      "description": "QQQQ",
      "deleted": false,
      "adSizes": [
        {
          "id": 7,
          "name": "Leaderboard-728X90",
          "width": 728,
          "height": 90,
          "uri": "http://localhost:7070/common/adSize/7"
        }
      ],
      "adServerInventoryUnits": [
        {
          "id": 12,
          "name": "ca-pub-4798227666512375:",
          "uri": "http://localhost:7070/inventory/adserverinventory/12",
          "adserverConfId": 1,
          "iuType": 1,
          "externalId": "14671365"
        }
      ]
    },
    "maxDailyImpressions": null,
    "url": "google.com",
    "logoPath": "http://apps.pubmatic.com/AdGainMgmt/publisher/images/31445.png",
    "userGeneratedContent": false,
    "creativeTypes": [
      "SWF",
      "JPG",
      "GIF"
    ],
    "creationTime": "2016-03-23T15:25:14Z",
    "modificationTime": "2016-03-23T15:25:43Z",
    "viewStartDate": "2016-03-23",
    "viewEndDate": "2032-12-31",
    "runStartDate": "2016-03-23",
    "runEndDate": "2032-12-31",
    "notes": null,
    "publisherEmail": "test_lpederson@triadretail.com",
    "targeting": "(country = (2008,2010,2012,2016,2020,2024)) AND (region = (2660)) & (browser != (500011,500012,500013,500014,500105)) & (bandwidth = (1,2,3,4,5,6,7))",
    "offerVisibilityMapping": [
      {
        "demandPartner": {
          "id": 737,
          "name": "Adazzle",
          "uri": "http://localhost:7070/common/advertisingEntity/737"
        },
        "buyers": [
          {
            "id": 6516,
            "name": "Kantar_Buyer1",
            "uri": "http://localhost:7070/common/buyer/6516",
            "dspBuyerId": 45
          }
        ]
      }
    ]
  },
  "offerId": 17,
  "optlock": 2,
  "orderId": 51,
  "ownerId": 31445,
  "ownerTypeId": 1,
  "predecessorId": 41,
  "priceAmount": 11.11,
  "priceCurrency": "USD",
  "quantity": 11,
  "startDate": "2016-03-25",
  "status": null,
  "targeting": "(country = (2008,2010,2012,2016,2020,2024)) AND (region = (2660)) & (browser != (500011,500012,500013,500014,500105)) & (bandwidth = (1,2,3,4,5,6,7))",
  "timezone": 0
}

Response Code           

TypeDescription
200OK

Response Header

             
Response Header Name
Type
Description
content-typeapplication/jsonMedia type that is to be returned in search/sort operation

Error Codes

                       

Status

Error Message

Description

 400

Bad Request

There is some validation failure; check the response body for error details.

 401

Unauthorized

Authentication or Authorization failure. Check the response body for specific details.

 403

Forbidden

You are not subscribed to this feature of the Platform.

 

 

Retrieving a List of Line Items

Overview

This API allows you to retrieve a list of all line items.

Request           

URIHTTP Method
$URI_PREFIX/aglineitemsGET

Request Headers

                               
Header Name
Type
Value
Required
Description
pubTokenString${access_token}Yes

Need to send the access token generating for authentication at the place of ${access_token}.

 

For more information about access tokens, refer to Getting Started with PubMatic APIs.

resourceIdInteger YesResource ID (Owner ID)
resourceTypeIdInteger YesType of Resource (e.g., Publisher = 1, Demand Partner = 5)
 

Query Parameter

               
Parameter Name
Type
Required
Description
 filtersArray of String NoFilters list, filter syntax: [field operation value], valid operations: eq noteq like notlike. See Filter Parameter Details for more information.

Sample Request URL

GET$URI_PREFIX/aglineitems/

Response

Sample Response JSON

    

{[
  {
    "adServerLiId": null,
    "assocAdvertisers": null,
    "assocDemandPartners": null,
    "associateId": 737,
    "associateTypeId": 5,
    "costType": "CPM",
    "creationTime": "2016-01-21T22:11:28Z",
    "creativeRequired": true,
    "creatives": [],
    "endDate": "2016-01-26",
    "id": 1,
    "modificationTime": "2016-01-21T22:11:28Z",
    "name": "al12",
    "offer": {
      "id": 1,
      "name": "aa1",
      "description": "as",
      "ownerId": 31445,
      "ownerTypeId": 1,
      "associateId": null,
      "associateTypeId": null,
      "tags": "",
      "currency": "USD",
      "priceAmount": 1.21,
      "minSpendAmount": 0.12,
      "publicRateCardAmount": 0.21,
      "costType": null,
      "status": "ACTIVE",
      "productId": 15170,
      "product": {
        "id": 15170,
        "name": "Create Product 358",
        "description": null,
        "deleted": false,
        "adSizes": [
          {
            "id": 65,
            "name": "Leaderboard",
            "width": 990,
            "height": 100,
            "uri": "http://localhost:7070/common/adSize/65"
          },
          {
            "id": 7,
            "name": "Leaderboard-728X90",
            "width": 728,
            "height": 90,
            "uri": "http://localhost:7070/common/adSize/7"
          },
          {
            "id": 66,
            "name": "Double Leaderboard",
            "width": 990,
            "height": 210,
            "uri": "http://localhost:7070/common/adSize/66"
          }
        ],
        "adServerInventoryUnits": [
          {
            "id": 1,
            "name": "Test1 UI ",
            "uri": "http://localhost:7070/inventory/adserverinventory/1",
            "adserverConfId": 1,
            "iuType": 1,
            "externalId": "333"
          }
        ]
      },
      "maxDailyImpressions": 222,
      "url": "a.com",
      "logoPath": "http://apps.pubmatic.com/AdGainMgmt/publisher/images/31445.png",
      "userGeneratedContent": false,
      "creativeTypes": [
        "SWF",
        "JPG",
        "GIF"
      ],
      "creationTime": "2016-01-21T22:10:14Z",
      "modificationTime": "2016-01-21T22:10:14Z",
      "viewStartDate": "2016-01-21",
      "viewEndDate": "2032-12-31",
      "runStartDate": "2016-01-21",
      "runEndDate": "2032-12-31",
      "notes": null,
      "publisherEmail": null,
      "targeting": "(country = (2024)) & (bandwidth != (7))",
      "offerVisibilityMapping": [
        {
          "demandPartner": {
            "id": 737,
            "name": "DP Partner",
            "uri": "http://localhost:7070/common/advertisingEntity/737"
          },
          "buyers": [
            {
              "id": 0,
              "name": null,
              "uri": null,
              "dspBuyerId": null
            }
          ]
        }
      ]
    },
    "offerId": 1,
    "optlock": 0,
    "orderId": 4,
    "ownerId": 31445,
    "ownerTypeId": 1,
    "predecessorId": null,
    "priceAmount": 1.21,
    "priceCurrency": "USD",
    "quantity": 121,
    "startDate": "2016-01-22",
    "status": null,
    "targeting": "(country = (2024,2004)) & (bandwidth != (7))",
    "timezone": 0
  },
  {
    "adServerLiId": null,
    "assocAdvertisers": null,
    "assocDemandPartners": null,
    "associateId": 737,
    "associateTypeId": 5,
    "costType": "CPM",
    "creationTime": "2016-01-22T16:21:49Z",
    "creativeRequired": true,
    "creatives": [],
    "endDate": "2016-01-27",
    "id": 2,
    "modificationTime": "2016-01-22T16:21:49Z",
    "name": "aali3",
    "offer": {
      "id": 2,
      "name": "aa2",
      "description": "fgg",
      "ownerId": 31445,
      "ownerTypeId": 1,
      "associateId": null,
      "associateTypeId": null,
      "tags": "",
      "currency": "USD",
      "priceAmount": 0.76,
      "minSpendAmount": 0.45,
      "publicRateCardAmount": 5.67,
      "costType": null,
      "status": "ACTIVE",
      "productId": 15170,
      "product": {
        "id": 15170,
        "name": "Create Product 358",
        "description": null,
        "deleted": false,
        "adSizes": [
          {
            "id": 65,
            "name": "Leaderboard",
            "width": 990,
            "height": 100,
            "uri": "http://localhost:7070/common/adSize/65"
          },
          {
            "id": 7,
            "name": "Leaderboard-728X90",
            "width": 728,
            "height": 90,
            "uri": "http://localhost:7070/common/adSize/7"
          },
          {
            "id": 66,
            "name": "Double Leaderboard",
            "width": 990,
            "height": 210,
            "uri": "http://localhost:7070/common/adSize/66"
          }
        ],
        "adServerInventoryUnits": [
          {
            "id": 1,
            "name": "Test1 UI ",
            "uri": "http://localhost:7070/inventory/adserverinventory/1",
            "adserverConfId": 1,
            "iuType": 1,
            "externalId": "333"
          }
        ]
      },
      "maxDailyImpressions": 222,
      "url": "a.com",
      "logoPath": "http://apps.pubmatic.com/AdGainMgmt/publisher/images/31445.png",
      "userGeneratedContent": false,
      "creativeTypes": [
        "SWF",
        "JPG",
        "GIF"
      ],
      "creationTime": "2016-01-22T15:58:06Z",
      "modificationTime": "2016-01-22T15:58:06Z",
      "viewStartDate": "2016-01-22",
      "viewEndDate": "2032-12-31",
      "runStartDate": "2016-01-22",
      "runEndDate": "2032-12-31",
      "notes": null,
      "publisherEmail": null,
      "targeting": "(country != (2008)) & (bandwidth = (4))",
      "offerVisibilityMapping": [
        {
          "demandPartner": {
            "id": 737,
            "name": "DP Partner",
            "uri": "http://localhost:7070/common/advertisingEntity/737"
          },
          "buyers": [
            {
              "id": 0,
              "name": null,
              "uri": null,
              "dspBuyerId": null
            }
          ]
        }
      ]
    },
    "offerId": 2,
    "optlock": 0,
    "orderId": 5,
    "ownerId": 31445,
    "ownerTypeId": 1,
    "predecessorId": null,
    "priceAmount": 0.76,
    "priceCurrency": "USD",
    "quantity": 1228,
    "startDate": "2016-01-22",
    "status": null,
    "targeting": "(country != (2008,2012)) & (browser = (500011)) & (bandwidth = (4))",
    "timezone": 0
  }
]

Response Code

           

TypeDescription
200OK

Response Header

             
Response Header Name
Type
Description
content-typeapplication/jsonMedia type that is to be returned in search/sort operation

Error Codes

                       

Status

Error Message

Description

 400

Bad Request

There is some validation failure; check the response body for error details.

 401

Unauthorized

Authentication or Authorization failure. Check the response body for specific details.

 403

Forbidden

You are not subscribed to this feature of the Platform.

 

 

Retrieving All Creatives for All Line Items

Overview

This API allows you to retrieve a list of all Creatives for all Line Items

 

Request

           

URIHTTP Method
$URI_PREFIX/aglineitems/creatives/GET

Request Headers

                               
Header Name
Type
Value
Required
Description
pubTokenString${access_token}Yes

Need to send the access token generating for authentication at the place of ${access_token}.

 

For more information about access tokens, refer to Getting Started with PubMatic APIs.

resourceIdInteger YesResource ID (Owner ID)
resourceTypeIdInteger YesType of Resource (e.g., Publisher = 1, Demand Partner = 5)

Request Query Parameters

                           

Parameter Name

Type

Required

Description

filters

Array [String]

No

Filters list, filter syntax:[field operation value], valid operations: eq noteq like notlike. See Filter Parameter Details for more information.

pageNumber

Integer

No

The page number the response should begin (in the case of multiple pages). Default value is 1.

pageSize

Integer

No

Maximum number of records to be included in the response. Its default value is 100.

Request Body Parameters

                        
Body Parameter
Type
Required
Validations
Description
ownerIdIntegerYesOwner ID should be validOwner ID
ownerTypeIdIntegerYesOwner Valid Resource Type 

Owner Type (e.g., Publisher = 1; Demand Partner = 5)

Sample Request URL

GET$URI_PREFIX//aglineitems/creatives?{pageNumber}&{pageSize}

Response

Sample Response JSON

    

{
  "items": [
    {
      "advertiser": "Advert Company",
      "url": "http://ourdomain.com",
      "tag": "<script type='text/javascript'>var ACE_SHOST = 'https://secure.ace.advertising.com';var ACE_AR = { Site: '78080', CallType: 'IFRAME', Region: '1', Size: '728090', CsOnly: '1', exchmap: '0', rclk: 'http://google.com', Anonymous: '0' };</script><script type='text/javascript' src='https://secure.uac.advertising.com/wrapper/aceUAC.js'></script>",
      "width": 160,
      "height": 600,
      "creativeId": 11
    },
    {
      "advertiser": "American Book Company",
      "url": "http://pubmatic.com",
      "tag": "<script type='text/javascript'>var ACE_SHOST = 'https://secure.ace.advertising.com';var ACE_AR = { Site: '78080', CallType: 'IFRAME', Region: '1', Size: '728090', CsOnly: '1', exchmap: '0', rclk: 'http://google.com', Anonymous: '0' };</script><script type='text/javascript' src='https://secure.uac.advertising.com/wrapper/aceUAC.js'></script>",
      "width": 728,
      "height": 90,
      "creativeId": 15
    }
  ],
  "metaData": {
    "endIndex": 2,
    "startIndex": 1,
    "totalRecords": 2
  }
}

Response Code

           

TypeDescription
200OK

Response Header

             
Response Header Name
Type
Description
content-typeapplication/jsonMedia type that is to be returned in search/sort operation

Error Codes

                       

Status

Error Message

Description

 400

Bad Request

There is some validation failure; check the response body for error details.

 401

Unauthorized

Authentication or Authorization failure. Check the response body for specific details.

 403

Forbidden

You are not subscribed to this feature of the Platform.

 

 

Updating a Line Item

Overview

This API allows you to update details of an existing order.

Request

           

URIHTTP Method
$URI_PREFIX/aglineitems/{id}PUT

 

Request Headers

                               

Header NameTypeValueRequiredDescription
pubTokenString${access_token}Yes

Need to send the access token generating for authentication at the place of ${access_token}.

 

For more information about access tokens, refer to Getting Started with PubMatic APIs

resourceIdInteger YesResource ID
resourceTypeIdInteger YesType of Resource (Publisher = 1, Demand Partner = 5)

Path Parameters

               

Parameter Name

Type

Required

Description

id

Long

Yes

ID of the Line Item that needs updating

Request

Request Body Parameters

                                                           

Body ParameterTypeRequiredValidationsDescription
ownerIdInteger YesOwner ID should be valid. Value should already exist in the system.ID of the owner.
ownerTypeIdIntegerYes
Valid Resource Type ID. 
Resource Type ID
Example:
For Demand Partner resource type
ownerTypeId=5
associateIdIntegerYes Associate ID should be validAssociate ID
associateTypeIdIntegerYes
Resource Type ID should be valid
Resource Type ID of the other party 
Example:
If the update is being made by the publisher (Type = 1) then the associateTypeId will be for the Demand Partner (Type = 5)
nameStringYes Name of the order
timezoneIdIntegerNo Timezone ID
statusStringNoACTIVE, INACTIVE
Status of order.
This is currently an unused field.

Sample Request JSON

    

{
    "adServerLiId": null,
    "assocAdvertisers": null,
    "assocDemandPartners": null,
    "associateId": 737,
    "associateTypeId": 5,
    "costType": "CPM",
    "creativeRequired": true,
    "creatives": [],
    "id": 185,
    "name": "CR-Line Item - 714-5",
    "offer": {
      "id": 51,
      "name": "CR-Offer-714-5",
      "description": "AG Offer Description New",
      "ownerId": 31445,
      "ownerTypeId": 1,
      "associateId": null,
      "associateTypeId": null,
      "tags": "",
      "currency": "USD",
      "priceAmount": 5,
      "minSpendAmount": 5000,
      "publicRateCardAmount": 6,
      "costType": "CPM",
      "status": "ACTIVE",
      "productId": 15456,
      "product": {
        "id": 15456,
        "name": "CR-Product-714-5",
        "deleted": false,
        "adSizes": [
          {
            "id": 7,
            "name": "Leaderboard-728X90",
            "width": 728,
            "height": 90,
            "uri": "http://localhost:7070/common/adSize/7"
          }
        ],
        "adServerInventoryUnits": [
          {
            "id": 1513,
            "name": "Test ex13",
            "uri": "http://localhost:7070/inventory/adserverinventory/1513",
            "adserverConfId": 1,
            "iuType": 1,
            "externalId": "ext id13"
          }
        ]
      },
      "maxDailyImpressions": null,
      "url": "musictimes.com",
      "logoPath": "http://apps.pubmatic.com/AdGainMgmt/publisher/images/31445.png?cachebuster=0.45245132650718833",
      "userGeneratedContent": false,
      "creativeTypes": [
        "SWF",
        "JPG",
        "GIF"
      ],
      "viewStartDate": "2016-07-14",
      "viewEndDate": "2016-08-30",
      "runStartDate": "2016-07-14",
      "runEndDate": "2016-08-07",
      "notes": "Publisher Notes",
      "publisherEmail": "",
      "targeting": "(country = (2840)) & (browserLang = (504000))",
      "offerVisibilityMapping": [
        {
          "demandPartner": {
            "id": 737,
            "name": "Adazzle",
            "uri": "http://localhost:7070/common/advertisingEntity/737"
          },
          "buyers": [
            {
              "id": 0,
              "name": null,
              "uri": null,
              "dspBuyerId": null
            }
          ]
        }
      ]
    },
    "offerId": 51,
    "optlock": 0,
    "orderId": 182,
    "ownerId": 31445,
    "ownerTypeId": 1,
    "priceAmount": 5,
    "priceCurrency": "USD",
    "quantity": 1000000,
    "startDate": "2016-07-19",
    "status": null,
    "targeting": "(country = (2840)) & (browserLang = (504000))",
    "timezone": 0
  }

Response

Sample Response JSON

{
  "adServerLiId": null,
  "assocAdvertisers": null,
  "assocDemandPartners": null,
  "associateId": 737,
  "associateTypeId": 5,
  "costType": "CPM",
  "creationTime": "2016-07-14T16:46:02Z",
  "creativeRequired": true,
  "creatives": [],
  "endDate": "2016-07-23",
  "id": 185,
  "modificationTime": "2016-07-14T16:46:02Z",
  "name": "CR-Line Item - 714-5",
  "offer": null,
  "offerId": 51,
  "optlock": 0,
  "orderId": 182,
  "ownerId": 31445,
  "ownerTypeId": 1,
  "predecessorId": null,
  "priceAmount": 5,
  "priceCurrency": "USD",
  "quantity": 1000000,
  "startDate": "2016-07-19",
  "status": null,
  "targeting": "(country = (2840)) & (browserLang = (504000))",
  "timezone": 0
}

Response Code

           

TypeDescription
200OK

Error Codes

                       

Status

Error Message

Description

400

Bad Request

There is some validation failure; check the response body for error details.

401

Unauthorized

Authentication or Authorization failure. Check the response body for specific details.

403

Forbidden

You are not subscribed to this feature of the Platform.
 

Associating Creatives with a Line Item

Overview

This API allows Demand Partners to associate creatives with Line Item using a specifc ID.

Request

           
URIHTTP Method
$URI_PREFIX/aglineitems/licreativeassocsPUT

Request Headers

                               
Header Name
Type
Value
Required
Description
pubTokenString${access_token}Yes

Need to send the access token generating for authentication at the place of ${access_token}.

 

For more information about access tokens, refer to Getting Started with PubMatic APIs

resourceIdIntegerDemand Partner IDYesResource ID (Owner ID)
resourceTypeIdIntegerValue should equal Demand PartnerYesType of Resource (e.g., Publisher = 1, Demand Partner = 5)

Request Body Parameters

                     
Parameter Name
Type
Required
Description
lineitemidintegerYesID of the Line Item 
creativeidsintegerYesCreateive ID 

Sample Request URL

$URI_PREFIX/aglineitems/licreativeassocs

Sample Request JSON

    

{
  "lineItemCreativeAssociations": [
    {
      "lineItemId": 1,
      "creativeIds": [
        1,2,3
      ]
    },
    {
      "lineItemId": 2,
      "creativeIds": [
        4,6
      ]
    }
]
}

 

Response 

Sample Response JSON

    

no content

Response Code

           

TypeDescription
200OK

Response Header

             
Response Header Name
Type
Description
content-typenullno content

Error Codes

                       

Status

Error Message

Description

400

Bad Request

There is some validation failure; check the response body for error details.

401

Unauthorized

Authentication or Authorization failure. Check the response body for specific details.

403

Forbidden

You are not subscribed to this feature of the Platform.

 

 

Retrieving All Creatives for All Line Items

Overview

This API allows you to retrieve a list of all Creatives for all Line Items

Request

           

URIHTTP Method
$URI_PREFIX/aglineitems/creatives/GET

Request Headers

                               
Header Name
Type
Value
Required
Description
pubTokenString${access_token}Yes

Need to send the access token generating for authentication at the place of ${access_token}.

 

For more information about access tokens, refer to Getting Started with PubMatic APIs

resourceIdInteger YesResource ID (Owner ID)
resourceTypeIdInteger YesType of Resource (e.g., Publisher = 1, Demand Partner = 5)

Request Query Parameters

                           

Parameter Name

Type

Required

Description

filters

Array [String]

No

Filters list, filter syntax:[field operation value], valid operations: eq noteq like notlike. See Filter Parameter Details for more information.

pageNumber

Integer

No

The page number the response should begin (in the case of multiple pages). Default value is 1.

pageSize

Integer

No

Maximum number of records to be included in the response. Its default value is 100.

Request Body Parameters

                        
Body Parameter
Type
Required
Validations
Description
ownerIdIntegerYesOwner ID should be validOwner ID
ownerTypeIdIntegerYesOwner Valid Resource Type 

Owner Type (e.g., Publisher = 1; Demand Partner = 5)

Sample Request URL

GET$URI_PREFIX//aglineitems/creatives?{pageNumber}&{pageSize}

Response

Sample Response JSON

    

{
  "items": [
    {
      "advertiser": "Advert Company",
      "url": "http://ourdomain.com",
      "tag": "<script type='text/javascript'>var ACE_SHOST = 'https://secure.ace.advertising.com';var ACE_AR = { Site: '78080', CallType: 'IFRAME', Region: '1', Size: '728090', CsOnly: '1', exchmap: '0', rclk: 'http://google.com', Anonymous: '0' };</script><script type='text/javascript' src='https://secure.uac.advertising.com/wrapper/aceUAC.js'></script>",
      "width": 160,
      "height": 600,
      "creativeId": 11
    },
    {
      "advertiser": "American Book Company",
      "url": "http://pubmatic.com",
      "tag": "<script type='text/javascript'>var ACE_SHOST = 'https://secure.ace.advertising.com';var ACE_AR = { Site: '78080', CallType: 'IFRAME', Region: '1', Size: '728090', CsOnly: '1', exchmap: '0', rclk: 'http://google.com', Anonymous: '0' };</script><script type='text/javascript' src='https://secure.uac.advertising.com/wrapper/aceUAC.js'></script>",
      "width": 728,
      "height": 90,
      "creativeId": 15
    }
  ],
  "metaData": {
    "endIndex": 2,
    "startIndex": 1,
    "totalRecords": 2
  }
}

Response Code

           

TypeDescription
200OK

Response Header

             
Response Header Name
Type
Description
content-typeapplication/jsonMedia type that is to be returned in search/sort operation

Error Codes

                       

Status

Error Message

Description

 400

Bad Request

There is some validation failure; check the response body for error details.

 401

Unauthorized

Authentication or Authorization failure. Check the response body for specific details.

 403

Forbidden

You are not subscribed to this feature of the Platform.

 

 

Retrieving all Line Items associated with a Creative

Overview

This API allows you to retrieve a list of line items associated with a Creative.

Request

           

URIHTTP Method
$URI_PREFIX/aglineitems/creatives/{id}GET

Request Headers

                               
Header Name
Type
Value
Required
Description
pubTokenString${access_token}Yes

Need to send the access token generating for authentication at the place of ${access_token}.

For more information about the access token, please review the Before You Start section.

resourceIdInteger YesResource ID (Owner ID)
resourceTypeIdInteger YesType of Resource (e.g., Publisher = 1, Demand Partner = 5)

Request Query Parameters

                     

Parameter Name

Type

Required

Description

pageNumber

Integer

No

The page number the response should begin (in the case of multiple pages). Default value is 1.

pageSize

Integer

No

Maximum number of records to be included in the response. Its default value is 100.

Path Parameter

               

ParameterTypeRequiredDescription
idLongYesOrder for which details need to be extracted

Request Body Parameters

                        
Body Parameter
Type
Required
Validations
Description
ownerIdIntegerYesOwner ID should be validOwner ID
ownerTypeIdIntegerYesOwner Valid Resource Type 

Owner Type (e.g., Publisher = 1; Demand Partner = 5)

Sample Request URL

GET$URI_PREFIX/aglineitems/creatives/{id}?{pageNumber}&{pageSize}

Sample Request JSON

{
  "ownerId": 31445,
  "ownerTypeId": 1
}

Response

Sample Response JSON

    

[
  {
    "adServerLiId": null,
    "assocAdvertisers": null,
    "assocDemandPartners": null,
    "associateId": 737,
    "associateTypeId": 5,
    "costType": "CPM",
    "creationTime": "2016-03-24T21:50:41Z",
    "creativeRequired": false,
    "creatives": [
      {
        "id": 47,
        "optlock": 0,
        "creationTime": "2016-07-18T20:15:27Z",
        "modificationTime": "2016-07-18T20:15:27Z",
        "width": 0,
        "height": 0,
        "creativeId": 42
      }
    ],
    "endDate": "2018-01-01",
    "id": 38,
    "modificationTime": "2016-03-24T21:50:41Z",
    "name": "145885618",
    "offer": null,
    "offerId": 16,
    "optlock": 0,
    "orderId": 47,
    "ownerId": 31445,
    "ownerTypeId": 1,
    "predecessorId": null,
    "priceAmount": 6000,
    "priceCurrency": "USD",
    "quantity": 100000,
    "startDate": "2016-03-24",
    "status": null,
    "targeting": "",
    "timezone": 0
  },
  {
    "adServerLiId": null,
    "assocAdvertisers": null,
    "assocDemandPartners": null,
    "associateId": 737,
    "associateTypeId": 5,
    "costType": "CPM",
    "creationTime": "2016-03-25T16:24:56Z",
    "creativeRequired": false,
    "creatives": [
      {
        "id": 66,
        "optlock": 0,
        "creationTime": "2016-07-20T20:29:20Z",
        "modificationTime": "2016-07-20T20:29:20Z",
        "width": 0,
        "height": 0,
        "creativeId": 42
      }
    ],
    "endDate": "2016-03-31",
    "id": 43,
    "modificationTime": "2016-03-25T16:24:56Z",
    "name": "22222",
    "offer": null,
    "offerId": 17,
    "optlock": 0,
    "orderId": 52,
    "ownerId": 31445,
    "ownerTypeId": 1,
    "predecessorId": null,
    "priceAmount": 11.11,
    "priceCurrency": "USD",
    "quantity": 1111,
    "startDate": "2016-03-25",
    "status": null,
    "targeting": "(country = (2008,2010,2012,2016,2020,2024)) AND (region = (2660)) & (browser != (500011,500012,500013,500014,500105)) & (bandwidth = (1,2,3,4,5,6,7))",
    "timezone": 0
  },
  {
    "adServerLiId": null,
    "assocAdvertisers": null,
    "assocDemandPartners": null,
    "associateId": 31445,
    "associateTypeId": 1,
    "costType": "CPC",
    "creationTime": "2016-06-29T19:50:29Z",
    "creativeRequired": false,
    "creatives": [
      {
        "id": 40,
        "optlock": 0,
        "creationTime": "2016-07-05T21:00:30Z",
        "modificationTime": "2016-07-05T21:00:30Z",
        "width": 0,
        "height": 0,
        "creativeId": 42
      }
    ],
    "endDate": "2016-07-05",
    "id": 175,
    "modificationTime": "2016-06-29T19:50:29Z",
    "name": "new test line item 12345",
    "offer": null,
    "offerId": 18,
    "optlock": 0,
    "orderId": 161,
    "ownerId": 737,
    "ownerTypeId": 5,
    "predecessorId": null,
    "priceAmount": 6,
    "priceCurrency": "USD",
    "quantity": 50000,
    "startDate": "2016-06-29",
    "status": null,
    "targeting": "",
    "timezone": 0
  },
  {
    "adServerLiId": null,
    "assocAdvertisers": null,
    "assocDemandPartners": null,
    "associateId": 737,
    "associateTypeId": 5,
    "costType": "CPM",
    "creationTime": "2016-07-14T16:46:02Z",
    "creativeRequired": false,
    "creatives": [
      {
        "id": 48,
        "optlock": 0,
        "creationTime": "2016-07-18T20:54:24Z",
        "modificationTime": "2016-07-18T20:54:24Z",
        "width": 0,
        "height": 0,
        "creativeId": 42
      }
    ],
    "endDate": "2016-07-23",
    "id": 185,
    "modificationTime": "2016-07-14T16:46:02Z",
    "name": "CR-Line Item - 714-5",
    "offer": null,
    "offerId": 51,
    "optlock": 0,
    "orderId": 182,
    "ownerId": 31445,
    "ownerTypeId": 1,
    "predecessorId": null,
    "priceAmount": 5,
    "priceCurrency": "USD",
    "quantity": 1000000,
    "startDate": "2016-07-19",
    "status": null,
    "targeting": "(country = (2840)) & (browserLang = (504000))",
    "timezone": 0
  }
]

Response Code

           

TypeDescription
200OK

Response Header

             
Response Header Name
Type
Description
content-typeapplication/jsonMedia type that is to be returned in search/sort operation

Error Codes

                       

Status

Error Message

Description

 400

Bad Request

There is some validation failure; check the response body for error details.

 401

Unauthorized

Authentication or Authorization failure. Check the response body for specific details.

 403

Forbidden

You are not subscribed to this feature of the Platform.

Attachments

    Outcomes