Create Direct Line Items With API

Vaida
Vaida
  • Updated

A line item is an element of a campaign, grouped under an order. It has all the ad delivery details an advertiser needs to show their ad in a defined environment. With direct line items, you can serve your campaigns on a pre-agreed inventory.

Tip

For more information about direct line item settings, see Create Direct Line Items.

After you've created a campaign, an order, and a media, you need to create a line item to define your ad delivery settings, such as schedule and buying type.

With Line Items section of Direct Line Items Management API, you can create and update direct line items, and create or delete line item labels. You can also retrieve a specific direct line item by its ID, or all line items under an order.

Authentication

To authenticate and use Adform APIs, your user account must have the necessary permissions and your OAuth client must have the required scopes assigned to it.

To create a direct line item, Adform Ad Server user account must have these permissions assigned by the business account admin:

  • Manage Direct Line Items

  • Manage Campaigns & Orders

Depending on your objectives and workflow, you'll need some or all of the following scopes assigned to your OAuth client by Adform Support (technical@adform.com):

  • https://api.adform.com/scope/buyer.direct.lineitems: Grants access to Direct Line Items Management API.

  • https://api.adform.com/scope/buyer.media: Grants access to Media API.

Tip

If you don't have an OAuth client yet, follow the procedure in Get Authentication Credentials for Adform APIs to register one.

Prerequisites

To create a direct line item with API, you must use the following IDs in your requests:

ID

Used For

Retrieve From

orderId

Specify the order to which the line item belongs

Orders v2 API

mediaUuid

Specify the media assigned to your direct line item

Media API

Note

Additional IDs might be used, but the listed ones are required to pass a request.

Workflow

After you've created an order and media, you can continue with creating a direct line item.

Tip

To learn how to use Adform APIs, read Guide to Using Adform APIs.

To create a direct line item with API, use these endpoints:

  1. GET endpoint in Media API: To retrieve a list of media for direct line item creation.

  2. POST endpoint in Direct Line Items API: To create a direct line item.

After you've created a direct line item, you can continue with creating ads.

Endpoints

[{"api":"Direct Line Items Management","titles":"PublicLineItems"},

{"api":"Media","titles":"Media"}]

Was this article helpful?

/
How we can make it better?

Thank you for your feedback!