Adhese supports an internal XML format that allows API users to manage campaigns and bookings through a dedicated endpoint. This approach is recommended for managing campaigns over the API.
Adhese campaigns are called 'orders' in the API.
/ip/orders/upload/post.do
That endpoint takes an XML document as a body and sends back a response in XML as well. The XSD schema for the XML to post and the XML response can be downloaded here:
Below follows a description of the different elements of a campaign representation in XML.
<order> <orderid></orderid> // The campaign's external key. This required field must contain a unique value. (required, String) <id/> // The internal ID Adhese gives a campaign (Integer) <name/> // The name (String) <type>5</type> // Obsolete identifier or the campaign type (required, must be Integer '5') <company/> // Quote of the publisher (required, String) <advertiser> // Name and quote of the advertiser. (required) <name>Advertiser</name> // <id>ADV001</id> </advertiser> <agency> // Name and quote of the agency <name/> <id/> </agency> <agencygroup> // Name and quote of the intermediary <name/> <id/> </agencygroup> <buyer> // Name and quote of the invoice client <name/> <id/> </buyer> <publisher>// The name value will be used as public comment <name>Publisher Name</name> <id>1</id> </publisher> <salescontact> // Name and ID of the Sales user for this campaign <name>Sales Contact Name</name> <id>1</id> </salescontact> <reservation/> Indication of the type of the campaign. "-1": offer, "0": option, "1": campaign (String) <mdbid/> // Mdbid key. (String) <priority>0</priority> // Priority as configured in your Adhese account (required, Integer) <invoicetypeid>paying</invoicetypeid> // Priority level as labeled in your Adhese configuration (required, String) <email> // Wrapper for address (required) <address/> // Emailaddress (String) </email> <volume/> // The to-reach volume for this campaign (required, Integer) <language/> // Language of this campaign (String) <description/> // Description of this campaign (String) <orderProperties> // Collection of properties (optional) <orderProperty> <group/> Groupname (required, String) <item/> Item (required, String) </orderProperty> </orderProperties> <bookings> // Collection of properties (required) <booking STOP="N"> // A booking (optional) with STOP attribute <publication/> // Quote of the pubication to book (required, String) <externalkey/> // External key of this booking (required, String) <adType/> // Booking description (String) <format/> // Import code of the format being booked (required, String) <formatdimensions> // Dimensionss of the format being booked (required) <width/> // Format width (required, Integer) <height/> // Format height (required, Integer) </formatdimensions> <start/> // Start date and hour of this booking (format: yyyy-mm-dd hh:mm:ss, required, String) <end/> // Start date and hour of this booking (format: yyyy-mm-dd hh:mm:ss, required, String) <startTime/> // Daily start time of this booking (format: hh:mm:ss, required, String) <endTime/> // Daily end time of this booking (format: hh:mm:ss, required, String) <volumetype/> // Either 'impressions' or 'clicks' (required, String) <volume/> // The to-reach volume for this booking (Integer) <canRTBCompete/> // Indication if booking should compete with RTB (Boolean) <unitPrice/> // Unit price (Double) <pricingType/> // Pricing type, either 'CPM', 'CPC', 'CPP', 'CPL' or 'ADM' (String) <combination> // Element used to group exclusive/all together setting <exclusive/> // Use 'true' if booking should be exclusive, is otherwise false (conditional, String) <-- XOR --> <together> // Collection of togetherWith elements (conditional) <togetherWith/> // The key of the other booking that should copy this booking's properties (multiple possible, String) </together> </combiantion> <creativeid/> // Key for automated creative uploading (see Hotfolder docs) (required, String) <geo/> // Defines the geo city (String) (Deprecated) <targets> // Inventory targets on which to run, multiple values in target 1..5 will be combined to form one identifying code string (Required) <target1> // Target 1 (required) <param>I000</param> // code as filled out in Adhese Database for this location (required, String) </target1> <target2> // target 2 <param/> </target2> <target3> // target 3 <param/> </target3> <target4> // target 4 <param/> </target4> <target5> // target 5 <param/> </target5> </targets> <profiling> // Profile targeting, depending on the configured targets of your account <target> <key>ci</key> <values> <value>8890</value> // Example of zip codes <value>8800</value> </values> </target> <target> <key>ag</key> <min>30</min> // Example of an age range <max>40</max> </target> </profiling> <comment/> // Booking comment (required, String) <report> // Wrapper for report numbers (Deprecated) <impressions/> // (required, Integer) <clicks/> // (required, Integer) <contacts/> // (required, Integer) </report> </booking> </bookings> </order>
Capping
Capping can be defined by using "CAP1" as value for the <volumetype/> element.
The capping level is a globally defined setting. It is not possible to define the level of the cap in the XML. The default level is "traffic". This means every unique combination of a booking and a creative will be capped.
Other options are campaign, booking and creative. For more information about Capping, please refer to Capping.
All-together and exclusive
OrderUpload: Defining Exclusive and All Together bookings