- This line was added.
- This line was removed.
- Formatting was changed.
|Table of Contents|
The Unified Ad Server Line (UAS) Item API creates, updates, and retrieves line items. The field
createdBy, and many more described below, is available in the response.
|Before using PubMatic APIs, first generate the API Token. For more information, see Getting Started with PubMatic APIs.|
|For more information about "UAS Line Item Management Services," see Line Item Management Services (UAS).|
|For more information about "Holding Inventory" in a line item, see Holding Inventory on a Line Item (UAS).|
|For more information about "Wrapper Line Item and Working", see OpenWrap Integration.|
|Method Path||HTTP Method||Description||Link to Definition|
|This API method creates one line item per request. This will be in transition.||Create a Line Item|
|Retrieve the details of a specific line item for the requested order id.||Retrieve the Details of a Line Item|
Retrieve a list of line items associated with your account.
You can also apply supported dimensions, filters, and sorting options to retrieve a list of line items with a specific set of details.
|Retrieve a List of Line Items|
This API method updates a single line item. This method performs a full update. If the request does not contain a value for an attribute, it will either be set to NULL/default value or if the parameter is required, it will fail and the line item will not be updated.
|Update a Line Item|
This API method performs a patch of a line item (for example, to change only the status of a line item).
|Update (Patch) a Line Item|
This API method deletes (archives) a line item.
|Delete a Line Item|
This API method returns the line items targeted against the specified ad unit.
|Getting the Line Items Targeted to an adUnit|
Request Headers and Response Body Parameters
The following tables list all request headers and response body parameters used by the supported operations listed above.
|Content-Type||String||application/json||Yes||Media type for request.|
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
Request Body Parameters
Account of the publisher for which this line item will be created.
|Account of the Publisher|
Name can be a maximum of 255 characters consisting of letters, numbers, dashes, hyphens, regional symbols and periods.
Name should be unique in context of an account.
|A name you assign to a line item upon creation.|
|Integer||Yes||Should be valid and non-negative identifier for order presented by the Unified Ad Server.||Identifier for the Order that will be mapped to the line item.|
|String||No||Insertion order number should not be more than 255 characters.||Insertion order details.|
Date and Time within Order start and end date and time. Date and Time must be in yyyy-MM-dd'T'HH:mm:ss format. (For example, 2016-06-01T00:00:00)
Start date and time is the time at which a line item is expected to begin delivering. You can also pass "now" rather than passing an specific date if you want to start the line item ASAP. The API sets the dates based on the following conditions:
End date and time at which the line item is expected to complete.
End date and time should be greater than Start date and time.
End date should be less than or equal to Order end date and time.
Date and Time must be in yyyy-MM-dd'T'HH:mm:ss format
If user wants to create a line item which will run indefinitely, please do not pass this parameter.
|Line item end date and time.|
Should be valid and exist in the system.
Type of line item. You can retrieve the line item types using the Line Item Type API. Based on line item type, you have to select a valid goalType and goalPricing.
|Integer||Yes||The type of line item determines the assigned priority. See table to the right.|
Specifies the priority of a line item, relative to competing line items, when inventory is over-committed.
Status should be valid and exist in the system.
The default is "Draft" for a newly created line item if it does not have a creative. When the creative gets linked to a line item, its status will be set to "Active."
Status of the line item. You can retrieve the list of statuses using the Status API. The following statuses are supported for line items:
The system sets the line item to Active when user mapped the creatives to line item. This is only valid for guaranteed line items such as Standard, Sponsorship and House.
For Programmatic line items like Open Exchange and PMP, the status of line item set to Active once created as user can not map the creative to them.
Statuses "In Review", "Failed" and "Rejected" are very specific and applicable to PMP type of line items and the user can set it through the API. You can use "In Review", "Failed," and "Rejected" status to filter and search for line items having these statuses.
|Integer||No||This parameter is not consumed by API and is set by system internally.|
The selected targeting criteria is set against the target id. You have to use this identifier to set the various targeting for the given line item.
|Integer||Yes||It should be valid and non negative.|
Describes how the line item is priced. To retrieve the list of supported pricing models by the Unified Ad Server, use the Goal Pricing API.
|Integer||Yes||Should be valid and non negative; should be greater than zero.|
Goal defines the total aim (either impressions or clicks) of the campaign. For guaranteed line items like sponsorship or standard, the ad server will try to achieve the goal (based on available inventory). For programmatic line items ( Open Exchange and PMP ), a goal is not required.
Example: A CPC pricing model's chosen goal is a whole number, indicating number of clicks. If Sponsorship is chosen then goal is a whole number indicating percentage of inventory (1 - 100).
|Integer||Yes||Should be valid and exist in the system.|
Goals set for line item either in impressions or clicks.
To retrieve the list of Goal Types supported by the Unified Ad Server, use the Goal Type API.
|Integer||Yes||Should be valid and exist in the system.|
Goal Unit. This can be either an Absolute Number or in the form of a Percentage for the goal.
To retrieve the list of Goal Units supported by the Unified Ad Server, used the Goal Unit API.
|Integer||No||Should be valid and exist in the system.|
For the Guaranteed Line Items, this determines how the ad server paces impressions for the line items, which can be one of the following:
Should be in the range of 1-40%
It should be applicable only for pace of type 3, which is Front Loaded. For other types, frontLoadPercent is NULL.
|Front loading defines how much to over pace line items at the beginning of their flight. For a given type of 3, you can assign a maximum load of 40%.|
|Array of Line Item Frequency Cap Objects||No||Optional||Frequency Cap defines how many times a specific end user sees an advertising message during a specific time period. A line item level frequency cap applies to all Creatives belonging to that line item.|
|Array of Line Item Schedule Objects||No||Optional|
|Double -up to 2 decimal places||Yes||Must be greater than or equal to 0 and less than or equal to 999999999.00||Represents the average rate (ecpm) of the selected line item.|
Should be valid and exist in the system.
Default value is "Evenly".
Creative Rotation is applicable for the creatives linked to the line item. You cannot change the Creative Rotation if the line item is in delivering mode. You need to either Pause or Deactivate it to change the Creative Rotation.
You can retrieve the list of creative rotation types using Creative Rotation API.
|Array of LineItem Creative Objects||No||Optional|
|List of Label Objects||No||If passed, labels should be valid and exist in the system.|
You can create/edit/retrieve a list of Label details using the Label Exclusion API.
You can use the field "excluded" along with "id" if you want to remove the inherited label from Advertiser or Order; for example, "excluded."
Pass an empty array to remove associated labels; that is,
Not expected in the request
Provides the information about unit in which rate value should be treated. While creating the line item (POST method) API internally determines the Account / Network level currency and sets the same currency for the line item. For PMP Type of line item the currency will be always Dollar ( $) irrespective of the account level currency.
Default is false
Default is false. Can be true / false.
Read Only param.
If passed in the request, will be ignored by API.
Health will help adOps/publisher understand, how
Currently, health will be calculated/shown for only Standard lineItems having pacing model as eve /front loaded with status in Active, InActive, Delivering, Completed, or Paused. Health object structure will be as follows:
For lineItem with type other than Standard and Standard lineItems not having above mentioned status / pacing model, health object returned by API will be as follows :
Currently, API does not support sorting or filtering on health parameter.
|targeting||Map||No.||Values = valid target entity for the given key containing a list of targets.|
Key set: "geo","os", "connectionType", "deviceType", "device", "deviceCapability", "browser", "browserLanguage", "inventory", "ipRange", "deviceScreenResolution", "hyperLocal", "hyperLocalDataSource", "zip", "customKey", "audiences"
Configuring geo targets sample example :
To remove all targetings set at lineitem level, pass targeting object as follows in the request :
Passing null value for targeting is not allowed and API will throw an error as it is ambiguous.
Status Transition Matrix
|From||To||Who does it?||Condition|
|Draft||Active||System||As soon as line item has at least one Creative.|
|Active||Delivering||System||As soon as the line item starts Delivering.|
|Archived||Not allowed||User||Note: It is no longer permitted to change "Archived" to "Inactive."|