Create and Manage Direct Line Items

Greta
Greta
  • Updated

Create Direct Line Items With API

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 the 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"}]

Create Media for Ad Server Campaigns With API

Media in your Adform account is the publishers on whose ad spaces you plan to run your ads and to whom you send your tags. You need to add media to your account to use it in your campaigns and reports.

To define where you want to run your ads, first you need to create the media and then assign it to your direct line items.

With Media API, you can create, retrieve, update, and delete media. You can also search the list of created media for a specific one to use with your Ad Server campaigns.

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 media for your campaigns, Adform Ad Server user account must have this permission assigned by the business account admin:

  • Manage Media

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.media: Grants access to Media API.

  • https://api.adform.com/scope/buyer.direct.lineitem.adsizes.readonly: Grants access to Direct Line Item Ad Sizes 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 media with API, you must use the following ID in your requests:

ID

Used For

Retrieve From

mediaUuid

Specify the media when defining contact details and ad sizes for the media

Media API

Note

Additional IDs might be used, but the listed one is required to pass a request.

Workflow

Tip

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

To create a media with API, use these endpoints:

  1. POST endpoint in Media section of Media API: To create a new media.

  2. (Optional) POST endpoints in Contact and Section sections of Media API: To define media contact details and organize created medias into media sections.

  3. (Optional) GET endpoint in Direct Line Item Ad Sizes API: To retrieve a list of common ad sizes used in ad serving campaigns.

  4. (Optional) POST endpoint in Creative section of Media API: To define the ad types and sizes allowed by the media.

Endpoints

Was this article helpful?

/
How can we make it better?

Thank you for your feedback!