AutoScheduler Linear Order Integration

Overview

This document specifies details you need to design your system for interacting with AutoScheduler’s order upload process via the FreeWheel Open API, including the required format for the uploaded file.

For Authentication procedures, see Getting Started with Authentication.

Environments

Basic Attributes Field

Each record represents a unit-based linear order line. You can post multiple lines through the same POST call.

FieldRequired?TypeDescription
NameoptionalstringIf not passed, this field is auto-generated and stored in FreeWheel’s system.
external_idrequiredstringOrder.line.id in your system. Each line has a unique external_id.
parent_external_idrequiredstringOrder.id in your system
advertiser_external_idrequiredintAdvertiser ID associated with order in your system
advertiser_nameoptionalstringName of the advertiser
start_daterequireddateFormat: %yyyy-%mm-%dd
end_daterequireddateFormat: %yyyy-%mm-%dd
durationrequiredintIn seconds (15,30,60)
budget.typerequiredstringOnly UNIT is allowed.
budget.total_unitrequiredintNumber of units requested
pricerequiredfloatPrice of each unit in dollars
priority_coderequiredintPriority of this line in your system.

FreeWheel recognizes and respects the line priority only through the code value. If there are multiple priority code systems, you need to consolidate them before sending to FreeWheel.
targeting.content.channel.include[].network_coderequiredarray of stringsNetwork code of the channel. This must match with the CorpNetworkCode column in the capacity file that you would upload for AutoScheduler usage.
targeting.geo.zone.include[].syscoderequiredarray of stringsNode is required, but it can be empty.
If the node is empty, by default AutoScheduler considers all eligible syscodes.
targeting.dayparts.days_of_weekrequiredarray of intNode is required but it can be empty.
If the node is empty, by default AutoScheduler considers all days, e.g.,
Mon – 1, Tues – 2, …, Sun - 7
targeting.dayparts.partsrequiredarray of from and to stringExample: HH:MM
from: “04:00”
to: “06:00”

Amazon S3 Integration

To integrate with Amazon Simple Storage Service (S3), you need to upload files to an Amazon Web Services (AWS) S3 bucket managed by FreeWheel, which requires an AWS access key.

There are two ways to handle the AWS key

1. Provide Your Amazon Resource Name (ARN) to FreeWheel (Recommended)

  • You provide FreeWheel with the ARN from your Amazon Web Services (AWS) account.
  • FreeWheel creates an AWS role that gives your AWS account permissions to upload and list files in your dedicated folder.

2. FreeWheel Provides an AWS Key

FreeWheel gives you an AWS access key that grants permissions to upload and list files in your dedicated folder.

📘

Note

In the second approach, the AWS account is owned by FreeWheel, and is subject to
FreeWheel's key rotation schedule. This scenario requires more communication between
you and FreeWheel than the first approach.

File Specifications

  • Must be a zipped, comma-delimited .csv file with a file size of no more than 500MB.
  • Each line in the file must represent one order line. 
  • File name must follow this convention: 
    • linear_orders_{date of orders}_{timestamp}.csv
  • String type fields must be enclosed within quotation marks. 
  • If the order line is for regional syscode, then syscode_inclusions must have a comma-separated list of local syscodes for that regional syscode. This means the number of units specified in that line can air in any of those syscodes.

CSV File Data Fields

📘

Note

contractid+tb _system_id+order_line must be unique within the CSV file. These three fields compose the external_id

FieldData TypeFormat
contractidInteger
tb_system_idInteger
order_start_dateStringYYYYMMDD: 20060102
order_end_dateStringYYYYMMDD: 20060102
advertiser_nameString
advertiser_codeString
order_lineInteger
spot_lengthInteger
prioritycodeInteger
broadcast_weekString20201
bookingdescString16:00-20:00 must split by "-"
orbitsCharN: false

Y: true
syscodeArray of Integer
gross_dollarsArray of Float32
buget_unitsArray of Integer
durationArray of Integer
networknameArray of String
networkcodeArray of String
marketnameArray of String