Agency API V3

Introduction

An agency is the entity that manages an advertiser's ad campaign. Not all ad sales go through an agency; an agency is an optional part of the Campaign Organization for a sale.

Payment for advertising originates from the advertiser, but may be paid to the publisher through an agency managing a campaign.

This API manages agencies in your network. Version 3 of the Agency API allows you to list, view, create, and edit agencies and their related attributes in MRM.

You can use this API to:

  • Return a list of agencies when you are de-duplicating, consolidating, or reconciling a list of agencies
  • View a list of agencies when you want to see specific information about an agency, such as contact information or financial information
  • Create an agency when you want to add a new agency
  • Edit agencies when you want to make changes to an agency's information
  • Configure agencies by creating and/or editing agencies
  • Set Parent Agency and Brand relationships

Related Documentation

Refer to the following documentation for more information about FreeWheel products and APIs:

Before You Begin

Set up your Agency/Advertiser relationships before you create a campaign. Likewise, set up your campaign API before you define your brands for a campaign.

How to Create a New Agency

You can find instructions for creating and approving a new agency here.

Resources

URI(s)

The Agency API v3 identifies two Uniform Resource Identifiers (URIs):

Type of URIURI
Productionhttps://api.freewheel.tv/services/v3/agencies.xml?[parameter1]=[query1]&...
Staginghttps://api.stg.freewheel.tv/services/v3/agencies.xml?[parameter1]=[query1]&...
Instancehttps://api.freewheel.tv/services/v3/agencies/[FW_ID].xml?[parameter1]=[query1]&...

Agencies API Attributes

Attributes represent and describe data associated with an object, in this case the Agencies object. Attributes are organized in sets. The attribute set determines the fields available during data entry, and the values that appear to the client. Use Agencies API Attributes in conjunction with Agencies API methods to accomplish your ad tech objectives.

Basic Attributes

Basic attributes describe fundamental properties of an agency. These attributes identify the following for an agency:

  • name
  • ID
  • billing term
  • contacts
  • user assignments
  • address
  • industry
  • status
Function/NodeDescriptionData Type(s)Creatable?Updateable?Included in basic GET?Comments
idResource IDFW_IDNoNoYesAssigned automatically during POST
nameThe name of the agencyStringRequiredYesYes
external_idExternal ID for the agencyStringYesYesYes
billing_termBilling term for the agency in MRMStringYesYesYes
metadataMetadata for the agency in MRMStringYesYesNo
contactsAgency contactsContactsYesYesNo
assignmentsAgency user assignmentsAssignmentsYesYesNo
addressAgency addressAddressYesYesNo
statusAgency status
  • ACTIVE
  • INACTIVE
NoNoYesThese values must be provided in ALL CAPITAL letters.

This sample code block shows you how to set up a generic POST statement using all the attribute sets to create a new agency.

Each of the individual attribute set definitions are listed below this sample code.

<agency>
  <name>my agency</name>
  <external_id>xxxx</external_id>
  <metadata>xxxxx</metadata>
  <billing_term>xxx</billing_term>
  <address>
    <address_1>Address Line 1</address_1>
    <address_2>Address Line 2</address_2>
    <country_id>165</country_id>
    <state_id>2291</state_id>
    <city>New York</city>
    <postal_code>12345</postal_code>
  </address>
  <contacts>
    <contact>
      <contact_type>PRIMARY</contact_type>
      <first_name>First</first_name>
      <last_name>Last</last_name>
      <title>Sales</title>
      <address_1>Address Line 1</address_1>
      <address_2>Address Line 2</address_2>
      <country_id>165</country_id>
      <state_id>2291</state_id>
      <city>New York</city>
      <postal_code>12345</postal_code>
      <email_address_1>[email protected]</email_address_1>
      <email_address_2>[email protected]</email_address_2>
      <email_address_3>[email protected]</email_address_3>
      <work_phone>12345678</work_phone>
      <home_phone>12345678</home_phone>
      <fax_phone>12345678</fax_phone>
      <other_phone>12345678</other_phone>
      <im_type>Skype</im_type>
      <im_id>skype_id</im_id>
      <url>test_url</url>
    </contact>
    <contact>
      <contact_type>BILLING</contact_type>
      <first_name>First</first_name>
      <last_name>Last</last_name>
      <title>Accountant</title>
      <address_1>Address Line 1</address_1>
      <address_2>Address Line 2</address_2>
      <country_id>165</country_id>
      <state_id>2291</state_id>
      <city>New York</city>
      <postal_code>12345</postal_code>
      <email_address_1>[email protected]</email_address_1>
      <email_address_2>[email protected]</email_address_2>
      <email_address_3>[email protected]</email_address_3>
      <work_phone>12345678</work_phone>
      <home_phone>12345678</home_phone>
      <fax_phone>12345678</fax_phone>
      <other_phone>12345678</other_phone>
      <im_type>Skype</im_type>
      <im_id>skype_id</im_id>
      <url>test_url</url>
    </contact>
  </contacts>
</agency>

Contacts Attributes

This attribute set identifies various contacts for the agency, including ID, type of contact, name, title, address, email address, phone, and website.

The following attributes are included in basic GET requests.

Function/NodeDescriptionData Type(s)Creatable?Updateable?Comments
contact_idIDNoNo
contact_type
  • PRIMARY
  • BILLING
  • ADDITIONAL
YesYesDefaults to ADDITIONAL
first_nameStringYesYes
titleStringYesYes
address_1StringYesYes
address_2StringYesYes
cityStringYesYes
state_idState ID from Geography DataIntegerYesYes
postal_codeStringYesYes
country_idCountry ID from Geography DataIntegerYesYes
email_address_1StringYesYes
email_address_2StringYesYes
work_phoneStringYesYes
home_phoneStringYesYes
fax_phoneStringYesYes
other_phoneStringYesYes
im_typeStringYesYes
urlStringYesYes

Assignments Attributes

This attribute set defines the assigned users or assigned groups for this agency in combination with the following related attribute sets:

  • Assigned User
  • Assigned User Group

Assigned User Attributes - Child Attributes of Assignments Attributes

This attribute set defines a user ID, name, and relates to the primary user role for an agency.

The following attributes are included in basic GET requests.

Function/NodeDescriptionData Type(s)Creatable?Updateable?
user_idValid user idIntegerYesYes
user_full_nameUser full nameStringNoNo

Address Attributes

This attribute set defines the agency's address. This attribute set is unrelated to the contacts' address fields.

The following attributes are included in basic GET requests.

Function/NodeDescriptionData Type(s)Creatable?Updateable?
address_1StringYesYes
address_2StringYesYes
cityStringYesYes
state_idState ID from Geography DataIntegerYesYes
postal_codeStringYesYes
country_idCountry ID from Geography DataIntegerYesYes