Você está na página 1de 63

Ad Software

API Reference

May 2008

AdSoftware
14074 Trade Center Drive
Suite 252
Fishers, Indiana 46038
T 317.313.5200
info@adsoftware.com
www.adsoftware.com
Contents
Introduction ....................................................................................................................... 4 
Definitions.......................................................................................................................... 5 
API Support ....................................................................................................................... 6 
API Structure ..................................................................................................................... 7 
XML prototype ............................................................................................................ 8 
Tags Description ........................................................................................................ 8 
API Signatures................................................................................................................. 10 
Successful response ................................................................................................ 10 
Un-successful/Failed response ................................................................................ 10 
Contracts Module.......................................................................................................... 11 
Create Contract(s) .................................................................................................... 11 
Update Contract(s) ................................................................................................... 13 
Delete Contract(s) .................................................................................................... 15 
Duplicate Contract(s)................................................................................................ 15 
Add Contract Folder(s) ............................................................................................. 16 
Update Contract IO(s) .............................................................................................. 16 
Delete Contract IO(s) ............................................................................................... 16 
Add Campaign(s) ..................................................................................................... 18 
Update Campaign(s) ................................................................................................ 19 
Delete Campaign(s) ................................................................................................. 20 
Duplicate Campaign(s) ............................................................................................. 20 
Add Line Item(s) ....................................................................................................... 21 
Update Line Item(s) .................................................................................................. 23 
Delete Line Item(s) ................................................................................................... 25 
Duplicate Line Item(s) .............................................................................................. 26 
Add Contract Note(s)................................................................................................ 26 
Update Contract Note(s) .......................................................................................... 27 
Delete Contract Note(s)............................................................................................ 27 
Add Contract Document(s) ....................................................................................... 28 
Update Contract Document(s).................................................................................. 28 
Delete Contract Document(s) ................................................................................... 29 
Add Contact(s) ......................................................................................................... 30 
Update Contact(s) .................................................................................................... 32 
Delete Contact(s) ..................................................................................................... 34 
Add Contract Contact(s) ........................................................................................... 34 
Update Contract Contact(s)...................................................................................... 35 
Delete Contract Contact(s) ....................................................................................... 35 
Get Contract Billing Detail(s) .................................................................................... 36 
Document Library Module ............................................................................................ 37 
Create Folder(s) ....................................................................................................... 37 
Update Folder(s) ...................................................................................................... 38 
Get Folder Location .................................................................................................. 38 
Create Document(s) ................................................................................................. 39 
Update Document(s) ................................................................................................ 40 
Delete Document(s) ................................................................................................. 40 
Download Document(s) ............................................................................................ 41 
Download Documents From Folder ......................................................................... 41 
Get Document Location............................................................................................ 42 
Update Contract Folder(s) ........................................................................................ 42 
Delete Contract Folder(s) ......................................................................................... 43 

Page 2
Add Contract IO(s) ................................................................................................... 43 
Reporting Module ......................................................................................................... 45 
Create Report Folder(s) ........................................................................................... 45 
Update Report Folder(s)........................................................................................... 45 
Delete Report Folder(s) ............................................................................................ 46 
Download Report Document(s) ................................................................................ 46 
Administration Module .................................................................................................. 47 
Add User Group(s) ................................................................................................... 47 
Update User Group(s) .............................................................................................. 48 
Delete User Group(s) ............................................................................................... 49 
Add User(s) .............................................................................................................. 49 
Update User(s) ......................................................................................................... 51 
Delete User(s) .......................................................................................................... 53 
Duplicate User(s) ...................................................................................................... 53 
Error Codes ..................................................................................................................... 54 
Folder Module Messages ......................................................................................... 54 
Document Module Messages ................................................................................... 54 
Authorization Messages ........................................................................................... 55 
API Module validation Message ............................................................................... 57 
Contract Module Messages...................................................................................... 58 
Contract Campaign Module Messages .................................................................... 59 
Contract Line Item Module Messages...................................................................... 60 
Contract IO Module Messages ................................................................................. 60 
Contract Note Module Messages ............................................................................. 61 
Contract Document Module Messages .................................................................... 61 
Contact Module Messages ....................................................................................... 62 
Contract Contact Module Messages ........................................................................ 62 
User Group Module Messages................................................................................. 63 
User Module Messages............................................................................................ 63 
Notes ........................................................................................................................ 63 

Page 3
Introduction
Ad Software ADS delivers the next-generation of Ad Performance Management (APM) solutions
and represents the most comprehensive on-demand application available to the online advertising
community. The foundation of ADS is based on unmatched ad server integration and end-to-end
support of key operational and strategic processes such as proposal/contract and inventory
management, reporting and analysis, planning and forecast automation and open data exchange
based on the Ad Software API.

The Ad Software ADS suite is defined by separate unique solutions called Ad Management, Ad
Intelligence, Ad Planning and Ad Tracking. Each can be leveraged individually with the ADS Core
Services as fully featured enterprise-class solutions or combined to provide the most complete, fully
integrated application for online publishers, agencies, advertisers and networks.

Page 4
Definitions
Terms Definition

Add Add an item to Ad Software. All fields required in the UI that are available via
the API are required in your AdsXML.

Edit Change an item detail in AdSoftware. Only the data points you pass in your
AdXML are updated. Other data points are not modified. Primary key is
required for performing operation via the API in your AdsXML.

Duplicate Duplicate and item to Ad Software. Primary key required to duplicate the data
in the database via the API in your AdsXML.

Delete Delete an item from Ad software. Primary key or composite key is required to
perform delete operation via the API in your AdsXML.

List Returns a List of items in Ad Software. Only the most important details are
returned. Certain search criteria may be added to the request to narrow the
results returned.

Download Download an item from Ad Software. This will fetch document detail from the
database. Document detail will be base64 encoded. So please decode it
before generating the physical document.

Location Get the location of an item in Ad software. This function will return possible
storage path of the item based on item name supplied. Certain search criteria
may be added to the request to narrow the results returned.

Page 5
API Support
Category Add Edit Duplicate Delete List Download Location

Folders X X X

Documents X X X X X

Contracts X X X X

Contract Folders X X X

Contract IOs X X X

Contract Campaign X X X X

Contract Line Items X X X X

Contract Notes X X X

Contract Documents X X X

Contract Contacts X X X

Contract Billing X

Contacts X X X

Users X X X X

User Groups X X X

Report Folders X X X

Reports X

Page 6
API Structure
The following is a typical PHP code to consume the Contract Management API for creating a folder
using Web Service (PHP based client application to consume the Ad Software Contract
Management API library). This is a sample code for demonstration and will give an idea about how
exactly to call the web service in PHP in order to make use of the API developed.

<?php
$client = new SoapClient($API_PATH."adxapi/?wsdl",
array('exceptions' => 0,'trace' =>1));

/**
* Call the server functions...
* following is perform specified operation in the xml
**/

$RequestXML = <AdsXML>
<Request type='Contract'>
<Contract action = 'create'>
<Data>
<FolderId></FolderId>
<ContractName></ContractName>
<UserId></UserId>
<AdServerId></AdServerId>
<AccountId></AccountId>
<AdvertiserHold></AdvertiserHold>
<AgencyId></AgencyId>
<AgencyHold></AgencyHold>
<IndustrySegmentId></IndustrySegmentId>
<AdManagerId></AdManagerId>
<TeamId></TeamId>
<Version></Version>
<TypeId></TypeId>
<CategoryId></CategoryId>
<LeadSourceId></LeadSourceId>
<StageId></StageId>
<NextStepId></NextStepId>
<ClientPO></ClientPO>
<StartDate></StartDate>
<EndDate></EndDate>
<IONumber></IONumber>
<MediaId></MediaId>
<Status></Status>
<GrossAmount></GrossAmount>
<ContractDiscount></ContractDiscount>
<ContractDiscountPercent></ContractDiscountPercent>
<AgencyDiscount></AgencyDiscount>
<AgencyDiscountPercent></AgencyDiscountPercent>
<ProbabilityId></ProbabilityId>
<TermsId></TermsId>
<Notes></Notes>
</Data>
</Contract>
</Request>
</AdsXML>";

// Call the function to send xml request and receive xml response
$response = $client->DocXMLRequest("admin","admin",$RequestXML);
?>

The above is a simple 3 line code to create a folder through API calls. In the first step, we create
the web service client by making a SoapClient call. Then we form an input XML for creating a new
contract (all the tags are explained below). And lastly, we make a call to the web service by passing
username, password and the Input XMl. The web service will process the request and based on the

Page 7
result it will return an XML response back to the client (success or failure with respective error
codes).

The above process will remain same for consuming all the web services listed below. Just the
$RequestXML will vary according to the service call being made. Every valid and standard input
XML for each web service is listed below starting with describing the basic input XML request
structure.

Value of Sample $API_PATH will be www.yourdomainname.com

XML prototype
Here is an Input XML prototype for Contract Management API Call:

<AdsXML>
<Request type='Contract'>
<Contract action = 'create'>
<Data>


</Data>
</Contract>
</Request>
</AdsXML>

Tags Description
Node Attribute Description

AdsXml NA Required node to decide start of a valid xml. If this node edist in the
input xml then only xmal will be consider as a valid xmal and
operations defined in the xml will be performed

Request Type Defines the name of the module of Ad software on which operations
will be performed.

Contract Action Defines which operation will be performed on module dala for
example: create, update, delete, download, list, location
(Type of
Request)

Data Main node of the Api. Tages inside the data node will be considered
as a input parameters for specified operation. If you want to perform
multiple create, update, delete, download, list, location then repeat
the data node.

The “type” attribute in the Request node can hold only one of two value: ”Contract”. Based on the
“type” value, the service api treats the call.

The Web Service API call is standard for all the Contract management functionality supported by
API. The API call handler function serves the call based on the input XML inside <Data> tag

Page 8
passed to the called function. Before any call is served, the input is validated for basic error
handling and then passed to the respective request handling methods to serve the request.

Based on the Input, the Server API will process the call and then will return the success or failed
response. The Successful or Failed response from the server will look like below:

Page 9
API Signatures
Successful response
This message will be returned whenever transaction is completed successfully that means data are
inserted/update or deleted properly in the database.

<AdsXML>
<Response>
<Message>name1 Message</ Message >
<Message>name2 Message </ Message >
</Response>
</AdsXML>

Un-successful/Failed response
This message will be returned whenever transaction Failed.

<AdsXML>
<Response>
<Exception errorCode = "err_code">document_name1 Error Message</Exception>
<Exception errorCode = "err_code">document_name1 Error Message</Exception>
</Response>
</AdsXML>

Page 10
Contracts Module
Create Contract(s)
This is the sample xml format to send input to the API for inserting contract in the database. For
inserting multiple records in the database please repeat data node in the input XML.

<AdsXML>
<Request type='Contract'>
<Contract action = 'add'>
<Data>
<FolderId></FolderId>
<ContractName></ContractName>
<UserId></UserId>
<AdServerId></AdServerId>
<AccountId></AccountId>
<AdvertiserHold></AdvertiserHold>
<AgencyId></AgencyId>
<AgencyHold></AgencyHold>
<IndustrySegmentId></IndustrySegmentId>
<AdManagerId></AdManagerId>
<TeamId></TeamId>
<Version></Version>
<TypeId></TypeId>
<CategoryId></CategoryId>
<LeadSourceId></LeadSourceId>
<StageId></StageId>
<NextStepId></NextStepId>
<ClientPO></ClientPO>
<StartDate></StartDate>
<EndDate></EndDate>
<IONumber></IONumber>
<MediaId></MediaId>
<Status></Status>
<GrossAmount></GrossAmount>
<ContractDiscount></ContractDiscount>
<ContractDiscountPercent></ContractDiscountPercent>
<AgencyDiscount></AgencyDiscount>
<AgencyDiscountPercent></AgencyDiscountPercent>
<ProbabilityId></ProbabilityId>
<TermsId></TermsId>
<Notes></Notes>
</Data>
</Contract>
</Request>
</AdsXML>

Field Description
Tag Description

FolderId Id of the folder. This is the foraign key stores the reference of the
folder

ContractName Name of the contract

UserId Id of the user. Who will act as a owner of the contract.

AdServerId Id of the Adsoft server(Foreign key for this table referencing


AdServers).

AccountId Id of the advertiser account (Foreign key for this table referencing
Advertiser).

AdvertiserHold Holds the Boolean value of advertiser hold.

Page 11
Tag Description

AgencyId Hold the Id of the agency (Foreign key for this table referencing
Agency).

AgencyHold Holds the Boolean value for agency hold.

IndustrySegmentId Holds the value of Id of the Industry segment(Foreign key for this
table referencing Industry segments)

AdManagerId Id of the Ad soft manager for this contract(Foreign key for this table
referencing users)

TeamId Id of the team (Foreign Key for this table referencing Teams)

Version Holds the version of the contract

TypeId Holds the id of the type of contract (Foreign key for this table
referencing contract types)

CategoryId Id of the category of contract (Foreign key for this table referencing
category)

LeadSourceId Id of the lead source (Foreign key for the contracts)

StageId Id of the stage

NextStepId Holds Id of the next step for contract

ClientPO Holds the value of client PO

StartDate Holds the start date of the contract

EndDate Holds the end date of the contract

IONumber Holds the value of IO number of the contract

MediaId Holds the value of Id of the media

Status Holds the status of the contract

GrossAmount Holds the value of gross amount of the contract

ContractDiscount Holds the value of discount on the contract

ContractDiscountPercent Holds the value of discount on the contract in the percentage format

AgencyDiscount Holds the value of discount on the contract given by agency

AgencyDiscountPercent Holds the value of discount on the contract given by agency in the
percentage format

ProbabilityId Id of the probability of the contract

TermsId Id of the tems of contract

Page 12
Tag Description

Notes Holds the value of Notes for contract

Update Contract(s)
This is the sample xml format to send input to the API for Updating contract detail in the database.
For updating multiple records in the database please repeat data node in the input XML.
<AdsXML>
<Request type='Contract'>
<Contract action = 'update'>
<Data>
<ContractId></ContractId>
<FolderId></FolderId>
<ContractName></ContractName>
<UserId></UserId>
<AdServerId></AdServerId>
<AccountId></AccountId>
<AdvertiserHold></AdvertiserHold>
<AgencyId></AgencyId>
<AgencyHold></AgencyHold>
<IndustrySegmentId></IndustrySegmentId>
<AdManagerId></AdManagerId>
<TeamId></TeamId>
<Version></Version>
<TypeId></TypeId>
<CategoryId></CategoryId>
<LeadSourceId></LeadSourceId>
<StageId></StageId>
<NextStepId></NextStepId>
<ClientPO></ClientPO>
<StartDate></StartDate>
<EndDate></EndDate>
<IONumber></IONumber>
<MediaId></MediaId>
<Status></Status>
<GrossAmount></GrossAmount>
<ContractDiscount></ContractDiscount>
<ContractDiscountPercent></ContractDiscountPercent>
<AgencyDiscount></AgencyDiscount>
<AgencyDiscountPercent></AgencyDiscountPercent>
<ProbabilityId></ProbabilityId>
<TermsId></TermsId>
<Notes></Notes>
</Data>
</Contract>
</Request>
</AdsXML>

Field Description
Tag Description

ContractId Id of the contract which you want to change

FolderId Id of the folder. This is the foraign key stores the reference of the
folder

ContractName Name of the contract

UserId Id of the user. Who will act as a owner of the contract.

AdServerId Id of the Adsoft server(Foreign key for this table referencing


AdServers).

AccountId Id of the advertiser account (Foreign key for this table referencing

Page 13
Tag Description
Advertiser).

AdvertiserHold Holds the Boolean value of advertiser hold.

AgencyId Hold the Id of the agency (Foreign key for this table referencing
Agency).

AgencyHold Holds the Boolean value for agency hold.

IndustrySegmentId Holds the value of Id of the Industry segment(Foreign key for this
table referencing Industry segments)

AdManagerId Id of the Ad soft manager for this contract(Foreign key for this table
referencing users)

TeamId Id of the team (Foreign Key for this table referencing Teams)

Version Holds the version of the contract

TypeId Holds the id of the type of contract (Foreign key for this table
referencing contract types)

CategoryId Id of the category of contract (Foreign key for this table referencing
category)

LeadSourceId Id of the lead source (Foreign key for the contracts)

StageId Id of the stage

NextStepId Holds Id of the next step for contract

ClientPO Holds the value of client PO

StartDate Holds the start date of the contract

EndDate Holds the end date of the contract

IONumber Holds the value of IO number of the contract

MediaId Holds the value of Id of the media

Status Holds the status of the contract

GrossAmount Holds the value of gross amount of the contract

ContractDiscount Holds the value of discount on the contract

ContractDiscountPercent Holds the value of discount on the contract in the percentage format

AgencyDiscount Holds the value of discount on the contract given by agency

AgencyDiscountPercent Holds the value of discount on the contract given by agency in the
percentage format

Page 14
Tag Description

ProbabilityId Id of the probability of the contract

TermsId Id of the tems of contract

Notes Holds the value of Notes for contract

Delete Contract(s)
This is the sample xml format to send input to the API for Deleting contract detail from the
database. To delete multiple records from the database please repeat data node in the input XML.

<AdsXML>
<Request type='Contract'>
<Contract action = 'delete'>
<Data>
<ContractId></ContractId>
</Data>
</Contract>
</Request>
</AdsXML>

Field Description
Tag Description

ContractId Id of the contract which you want to delete

Duplicate Contract(s)
This is the sample xml format to send input to the API for Duplicating contract detail in the
database. To duplicate multiple records in the database please repeat data node in the input XML.

<AdsXML>
<Request type='Contract'>
<Contract action = 'duplicate'>
<Data>
<ContractId></ContractId>
</Data>
</Contract>
</Request>
</AdsXML>

Field Description

Tag Description

ContractId Id of the contract which you want to duplicate

Page 15
Add Contract Folder(s)
This is the sample xml format to send input to the API for creating contract folder in the database.
To create multiple records in the database please repeat data node in the input XML.

<AdsXML>
<Request type='ContractFolder'>
<ContractFolder action = 'create'>
<Data>
<FolderName> </FolderName>
< Description ></Description>
</Data>
</ContractFolder>
</Request>
</AdsXML>

Field Description
Tag Description

FolderName Name of the folder

Description Description about folder

Update Contract IO(s)


This is the sample xml format to send input to the API for updating contract IO in the database. To
update multiple records in the database please repeat data node in the input XML.

<AdsXML>
<Request type='ContractIO'>
<ContractIO action = ‘update’>
<Data>
<ContractIOId></ContractIOId>
<ContractIOName></ContractIOName>
<Description></Description>
</Data>
</ContractIO>
</Request>
</AdsXML>

Field Description
Tag Description

ContractIOId Id of the Contract IO which you want to change

ContractIOName Name of the contract Id

Description Description about Contract IO

Delete Contract IO(s)


This is the sample xml format to send input to the API for deleting contract IO from the database.
To delete multiple records from the database please repeat data node in the input XML.

<AdsXML>
<Request type='ContractIO'>
<ContractIO action = ‘delete’>
<Data>
<ContractIOId></ContractIOId>
</Data>

Page 16
</ContractIO>
</Request>
</AdsXML>

Field Description
Tag Description

ContractIOId Id of the Contract IO which you want to delete

Page 17
Add Campaign(s)
This is the sample xml format to send input to the API for creating campaign(s) in the database. To
create multiple records in the database please repeat data node in the input XML.

<AdsXML>
<Request type=’Campaign'>
<Campaign action = ‘create’>
<Data>
<ContractId></ContractId>
<ContractIOId></ContractIOId>
<ContractCampaignName></ContractCampaignName>
<StartDate></StartDate>
<EndDate></EndDate>
<GrossValue></GrossValue>
<AgencyDiscountPercent></AgencyDiscountPercent>
<AgencyDiscount></AgencyDiscount>
<ContractDiscountPercent></ContractDiscountPercent>
<ContractDiscount></ContractDiscount>
<OtherDiscount></OtherDiscount>
<NetValue></NetValue>
<Status></Status>
</Data>
</Campaign>
</Request>
</AdsXML>

Field Description
Tag Description

ContractId Id of the contrct (Foreign Key)

ContractIOId Id of the Contract IO

ContractCampaignName Name of the contract campaign

StartDate Start date of the contract campaign

EndDate End date of the contract campaign

GrossValue Gross value of contract campaign

AgencyDiscountPercent Discount offered by agency for the contract campaign in percentage

AgencyDiscount Discount offered by agency for the contract campaign

ContractDiscountPercent Discount because of the contract policies in percentage

ContractDiscount Discount because of the contract policies

OtherDiscount Other Discount

NetValue Net value of the contract campaign

Status Status of the contract campaign

Page 18
Update Campaign(s)
This is the sample xml format to send input to the API for updating campaigns in the database. To
update multiple records in the database please repeat data node in the input XML.

<AdsXML>
<Request type=’Campaign’>
<Campaign action = ‘update’>
<Data>
<CampaignId></CampaignId>
<ContractId></ContractId>
<ContractIOId></ContractIOId>
<ContractCampaignName></ContractCampaignName>
<StartDate></StartDate>
<EndDate></EndDate>
<GrossValue></GrossValue>
<AgencyDiscountPercent></AgencyDiscountPercent>
<AgencyDiscount></AgencyDiscount>
<ContractDiscountPercent></ContractDiscountPercent>
<ContractDiscount></ContractDiscount>
<OtherDiscount></OtherDiscount>
<NetValue></NetValue>
<Status></Status>
</Data>
</Campaign>
</Request>
</AdsXML>

Field Description

Tag Description

CampaignId Id of the campaign, Primary key of the table.

ContractId Id of the contrct (Foreign Key

ContractIOId Id of the Contract IO

ContractCampaignName Name of the contract campaign

StartDate Start date of the contract campaign

EndDate End date of the contract campaign

GrossValue Gross value of contract campaign

AgencyDiscountPercent Discount offered by agency for the contract campaign in percentage

AgencyDiscount Discount offered by agency for the contract campaign

ContractDiscountPercent Discount because of the contract policies in percentage

ContractDiscount Discount because of the contract policies

OtherDiscount Other Discount

NetValue Net value of the contract campaign

Status Status of the contract campaign

Page 19
Delete Campaign(s)
This is the sample xml format to send input to the API for deleting campaigns from the database.
To delete multiple records from the database please repeat data node in the input XML.

<AdsXML>
<Request type='Campaign'>
<Campaign action = ‘delete’>
<Data>
<CampaignId></CampaignId>
</Data>
</Campaign>
</Request>
</AdsXML>

Field Description
Tag Description

CampaignId Id of the campaign which you want to delete, Primary key of the table.

Duplicate Campaign(s)
This is the sample xml format to send input to the API for duplicating campaigns in the database.
To duplicate multiple records from the database please repeat data node in the input XML.

<AdsXML>
<Request type='Campaign'>
<Campaign action = ‘duplicate’>
<Data>
<CampaignId></CampaignId>
</Data>
</Campaign>
</Request>
</AdsXML>

Field Description
Tag Description

CampaignId Id of the campaign which you want to duplicate, Primary key of the table.

Page 20
Add Line Item(s)
This is the sample xml format to send input to the API for creating line item(s) in the database. To
create multiple records in the database please repeat data node in the input XML.

<AdsXML>
<Request type=’LineItem'>
<LineItem action = ‘create’>
<Data>
<ContractId></ContractId>
<ContractLineItemName></ContractLineItemName>
<ContractCampaignId></ContractCampaignId>
<ContractIOId></ContractIOId>
<BuyTypeId></BuyTypeId>
<ProductId></ProductId>
<StartDate></StartDate>
<EndDate></EndDate>
<ModelId></ModelId>
<Quantity></Quantity>
<Clicks></Clicks>
<GrossUnit></GrossUnit>
<GrossValue ></GrossValue>
<AgencyDiscountPercent></AgencyDiscountPercent>
<AgencyDiscount></AgencyDiscount>
<ContractDiscountPercent></ContractDiscountPercent>
<ContractDiscount></ContractDiscount>
<OtherDiscount></OtherDiscount>
<NetValue></NetValue>
<Status></Status>
<AdServerId></AdServerId>
<LineItemBillOnId></LineItemBillOnId>
<LineItemTypeId></LineItemTypeId>
<LineItemAdTypeId></LineItemAdTypeId>
<Tags></Tags> /** Add comma separated tags **/
<Keywords></Keywords> /** Add Comma separated traffic keyword ids**/
<ExcludedPageIds></ExcludedPageIds> > /** Add Comma separated traffic
page ids**/
<PageIds></PageIds>/** Add Comma separated traffic page ids**/
<PageGroupIds></PageGroupIds> /**Add Comma separated traffic page group
ids**/
<SiteIds></SiteIds> /**Add Comma separated traffic site ids**/
<SectionIds></SectionIds> /**Add Comma separated traffic section ids**/
</Data>
</Campaign>
</Request>
</AdsXML>

Note: <Keywords>, <ExcludedPageIds>, <PageIds>, <PageGroupIds>, <SiteIds> and


<SectionIds> contain comma separated ids of the respective items. And <Tags> will contain
comma separated tag names.

Field Description

Tag Description

ContractId Id of the contract

ContractLineItemName Name of the contract line item

ContractCampaignId Id of the contract campaign

ContractIOId Id of the contract IOs

BuyTypeId Id of the buy type (Foreign key of the table referencing buy type)

ProductId Holds the value of id of the product

Page 21
Tag Description

StartDate Holds the value of start date of the line item

EndDate Holds the value of end date of the line item

ModelId Holds the id of cost model. (Foreign key for the table, holds the
reference of cost models)

Quantity Quanties of the line item

Clicks Holds the value of line item clicks

GrossUnit Holds the value of gross units

GrossValue Holds the value of gross value

AgencyDiscountPercent Holds the value of discount offered by agency in percentage for a line
item

AgencyDiscount Holds the value of discount offered by agency for a line item

ContractDiscountPercent Holds the value of discount offered because of the contract of a line
item in percentage

ContractDiscount Holds the value of discount offered because of the contract of a line
item

OtherDiscount Holds the value of other discounts

NetValue Holds the value of net amount of the line item

Status Holds the value of status of the line item

AdServerId Holds the value of Id of the adserver( Foregin key for this table
referencing adservers)

LineItemBillOnId Holds the id of bill on for the line item

LineItemTypeId Holds the value of type id of line item

LineItemAdTypeId Holds the value of type id of ad software for line item

Tags Holds the value of tags for line items, add comma separated
tags(string) for the line item

Keywords Holds the value of keywords for line item, add comma separated
keyword ids(Integer) for the line item

ExcludedPageIds Holds the value of excluded page ids for line item, add comma
separated traffic page ids(Integer) for the line item

PageIds Holds the value of page ids for line item, add comma separated traffic
page ids(Integer) for the line item

Page 22
Tag Description

PageGroupIds Holds the value of page group ids for line item, add comma separated
traffic page group ids (Integer) for the line item

SiteIds Holds the value of site ids for line item, add comma separated traffic
site ids (Integer) for the line item

SectionIds Holds the value of section ids for line item, add comma separated
traffic section ids(integer) for line item

Update Line Item(s)


This is the sample xml format to send input to the API for updating line items in the database. To
update multiple records in the database please repeat data node in the input XML.

<AdsXML>
<Request type=’LineItem’>
<LineItem action = ‘update’>
<Data>
<LineItemId></LineItemId>
<ContractId></ContractId>
<ContractLineItemName></ContractLineItemName>
<ContractCampaignId></ContractCampaignId>
<ContractIOId></ContractIOId>
<BuyTypeId></BuyTypeId>
<ProductId></ProductId>
<StartDate></StartDate>
<EndDate></EndDate>
<ModelId></ModelId>
<Quantity></Quantity>
<Clicks></Clicks>
<GrossUnit></GrossUnit>
<GrossValue></GrossValue>
<AgencyDiscountPercent></AgencyDiscountPercent>
<AgencyDiscount></AgencyDiscount>
<ContractDiscountPercent></ContractDiscountPercent>
<ContractDiscount></ContractDiscount>
<OtherDiscount></OtherDiscount>
<NetValue></NetValue>
<Created></Created>
<Modified></Modified>
<CreatedBy></CreatedBy>
<Status></Status>
<AdServerId></AdServerId>
<LineItemBillOnId></LineItemBillOnId>
<LineItemTypeId></LineItemTypeId>
<LineItemAdTypeId></LineItemAdTypeId>
<Tags></Tags> /** Add comma separated tags **/
<Keywords></Keywords> /** Add Comma separated traffic keyword ids**/
<ExcludedPageIds></ExcludedPageIds> > /** Add Comma separated traffic
page ids**/
<PageIds></PageIds>/** Add Comma separated traffic page ids**/
<PageGroupIds></PageGroupIds> /**Add Comma separated traffic page group
ids**/
<SiteIds></SiteIds> /**Add Comma separated traffic site ids**/
<SectionIds></SectionIds> /**Add Comma separated traffic section ids**/
</Data>
</LineItem>
</Request>
</AdsXML>

Note: <Keywords>, <ExcludedPageIds>, <PageIds>, <PageGroupIds>, <SiteIds> and


<SectionIds> contain comma separated ids of the respective items. And <Tags> will contain
comma separated tage names.

Page 23
Field Description
Tag Description

LineItemId Id of the line item which you want to change(Primary key for the table)

ContractId Id of the contract

ContractLineItemName Name of the contract line item

ContractCampaignId Id of the contract campaign

ContractIOId Id of the contract IOs

BuyTypeId Id of the buy type (Foreign key of the table referencing buy type)

ProductId Holds the value of id of the product

StartDate Holds the value of start date of the line item

EndDate Holds the value of end date of the line item

ModelId Holds the id of cost model. (Foreign key for the table, holds the
reference of cost models)

Quantity Quantities of the line item

Clicks Holds the value of line item clicks

GrossUnit Holds the value of gross units

GrossValue Holds the value of gross value

AgencyDiscountPercent Holds the value of discount offered by agency in percentage for a line
item

AgencyDiscount Holds the value of discount offered by agency for a line item

ContractDiscountPercent Holds the value of discount offered because of the contract of a line
item in percentage

ContractDiscount Holds the value of discount offered because of the contract of a line
item

OtherDiscount Holds the value of other discounts

NetValue Holds the value of net amount of the line item

Status Holds the value of status of the line item

AdServerId Holds the value of Id of the adserver( Foreign key for this table
referencing adservers)

LineItemBillOnId Holds the id of bill on for the line item

LineItemTypeId Holds the value of type id of line item

Page 24
Tag Description

LineItemAdTypeId Holds the value of type id of ad software for line item

Tags Holds the value of tags for line items, add comma separated
tags(string) for the line item

Keywords Holds the value of keywords for line item, add comma separated
keyword ids(Integer) for the line item

ExcludedPageIds Holds the value of excluded page ids for line item, add comma
separated traffic page ids(Integer) for the line item

PageIds Holds the value of page ids for line item, add comma separated traffic
page ids(Integer) for the line item

PageGroupIds Holds the value of page group ids for line item, add comma separated
traffic page group ids (Integer) for the line item

SiteIds Holds the value of site ids for line item, add comma separated traffic
site ids (Integer) for the line item

SectionIds Holds the value of section ids for line item, add comma separated
traffic section ids(integer) for line item

Delete Line Item(s)


This is the sample xml format to send input to the API for deleting line items from the database. To
delete multiple records from the database please repeat data node in the input XML.

<AdsXML>
<Request type='LineItem'>
<LineItem action = ‘delete’>
<Data>
<LineItemId></LineItemId>
</Data>
</LineItem>
</Request>
</AdsXML>

Field Description
Tag Description

LineItemId Id of the line item which you want to delete (Primary key for the table)

Page 25
Duplicate Line Item(s)
This is the sample xml format to send input to the API for duplicating line items in the database. To
duplicate multiple records from the database please repeat data node in the input XML.

<AdsXML>
<Request type='LineItem'>
<LineItem action = ‘duplicate’>
<Data>
<LineItemId></LineItemId>
</Data>
</LineItem>
</Request>
</AdsXML>

Field Description
Tag Description

LineItemId Id of the line item which you want to duplicate (Primary key for the table)

Add Contract Note(s)


This is the sample xml format to send input to the API for adding contract notes in the database. To
add multiple records from the database please repeat data node in the input XML.

<AdsXML>
<Request type='ContractNotes'>
<ContractNotes action = 'create'>
<Data>
<ContractId>43</ContractId>
<NoteName>Test Note</NoteName>
<NoteTypeId>1</NoteTypeId>
<Description>This is my first note for testing</Description>
</Data>
</ContractNotes>
</Request>
</AdsXML>

Field Description
Tag Description

ContractId Holds the value of Id of the contract ( Foreign key for this table, referencing
contracts)

NoteName Holds the value of Name of the note

Description Holsd the value of note detail

Page 26
Update Contract Note(s)
This is the sample xml format to send input to the API for updating contract notes in the database.
To update multiple records from the database please repeat data node in the input XML.

<AdsXML>
<Request type='ContractNotes'>
<ContractNotes action = 'update'>
<Data>
<NoteId>1</NoteId>
<NoteName>Test Note</NoteName>
<NoteTypeId>1</NoteTypeId>
<Description>This is my first note for testing</Description>
</Data>
</ContractNotes>
</Request>
</AdsXML>

Field Description

Tag Description

NoteId Holds the value of Id of the note which you want to change (Primary key of
the table)

ContractId Holds the value of Id of the contract ( Foreign key for this table, referencing
contracts)

NoteName Holds the value of Name of the note

Description Holsd the value of note detail

Delete Contract Note(s)


This is the sample xml format to send input to the API for deleting contract notes from the
database. To delete multiple records from the database please repeat data node in the input XML.

<AdsXML>
<Request type='ContractNotes'>
<ContractNotes action = 'delete'>
<Data>
<NoteId>1</NoteId>
</Data>
</ContractNotes>
</Request>
</AdsXML>

Field Description

Tag Description

NoteId Holds the value of Id of the note which you want to delete (Primary key of the
table)

Page 27
Add Contract Document(s)
This is the sample xml format to send input to the API for adding contract documents in the
database. To add multiple records from the database please repeat data node in the input XML.

<AdsXML>
<Request type='ContractDocument'>
<ContractDocument action = 'create'>
<Data>
<ContractId>43</ContractId>
<DocumentName>New Document</DocumentName>
<Description>test</Description>
<FileName>test.doc</FileName>
<FileBlob>Sample Data</FilePath>
<ContractArea>Contacts</ContractArea>
<ItemId>12</ItemId>
</Data>
</ContractDocument>
</Request>
</AdsXML>

Field Description

Tag Description

ContractId Holds the value of id of the contract (Foreign key for this table referencing
contracts)

DocumentName Holds the value of name of the document

Description Holds the value of description of the document

FileName Holds the value of name of the file to be saved

FileBlob Holds the value of content of document

ContractArea Holds the value of the contract area for which we want to upload the
document. Options are Flights, Contacts, Billing Period, Tasks, Attachments,
Creatives.

ItemId Holds the module id of selected contract area

Update Contract Document(s)


This is the sample xml format to send input to the API for updating contract documents in the
database. To update multiple records from the database please repeat data node in the input XML.

<AdsXML>
<Request type='ContractDocument'>
<ContractDocument action = 'update'>
<Data>
<ContractId>43</ContractId>
<DocumentId>3</DocumentId>
<DocumentName>Testghgh</DocumentName>
<Description>test</Description>
<FileName>test.doc</FileName>
<FileBlob>Sample Data</FileBlob>
<ContractArea>Contacts</ContractArea>
<ItemId>12</ItemId>
</Data>
</ContractDocument>
</Request>
</AdsXML>

Page 28
Field Description
Tag Description

DocumentId Holds the value of id of the document (Foreign key for this table referencing
documents)

ContractId Holds the value of id of the contract (Foreign key for this table referencing
contracts)

DocumentName Holds the value of name of the document

Description Holds the value of description of the document

FileName Holds the value of name of the file to be saved

FileBlob Holds the value of content of document

ContractArea Holds the value of the contract area for which we want to upload the
document. Options are Flights, Contacts, Billing Period, Tasks, Attachments,
Creatives.

ItemId Holds the module id of selected contract area

Delete Contract Document(s)


This is the sample xml format to send input to the API for deleting contract documents in the
database. To delete multiple records from the database please repeat data node in the input XML.

<AdsXML>
<Request type='ContractDocument'>
<ContractDocument action = 'delete'>
<Data>
<ContractId>43</ContractId>
<DocumentId>3</DocumentId>
</Data>
</ContractDocument>
</Request>
</AdsXML>

Field Description
Tag Description

DocumentId Holds the value of id of the document (Foreign key for this table referencing
documents)

ContractId Holds the value of id of the contract (Foreign key for this table referencing
contracts)

Page 29
Add Contact(s)
This is the sample xml format to send input to the API for adding contacts in the database. To add
multiple records from the database please repeat data node in the input XML.

<AdsXML>
<Request type='Contact'>
<Contact action = 'create'>
<Data>
<ReportsTo></ReportsTo>
<ContactTypeId>1</ContactTypeId>
<OrganizationId>1</OrganizationId>
<ContactFirstName>Hemita</ContactFirstName>
<ContactLastName>Thakkar</ContactLastName>
<ContactTitle>PHP</ContactTitle>
<Email>hemita@gmail.com</Email>
<Phone></Phone>
<Fax></Fax>
<Mobile></Mobile>
<Address1></Address1>
<Address2></Address2>
<City></City>
<StateId></StateId>
<ZipCode></ZipCode>
<CountryId></CountryId>
<BillingContact></BillingContact>
<BillingEmail></BillingEmail>
<BillingPhone></BillingPhone>
<BillingFax></BillingFax>
<BillingAddress1></BillingAddress1>
<BillingAddress2></BillingAddress2>
<BillingCity></BillingCity>
<BillingStateId></BillingStateId>
<BillingZipCode></BillingZipCode>
<BillingCountryId></BillingCountryId>
<Notes></Notes>
</Data>
</Contact>
</Request>
</AdsXML>

Field Description
Tag Description

ReportsTo Holds the value of reporting person id (Foreign key will be ContactId – self
referencing)

ContactTypeId Holds the value of id of the contact type(Foreign key for this table referencing
contact types)

OrganizationId Holds the value of id of the organization(Foreign key for this table referencing
organizations)

ContactFirstName Holds the value of the first name of the contact.

ContactLastName Holds the value of the last name of the contact

ContactTitle Holds the value of the title of the contact

Email Holds the value of email address of contact

Phone Holds the value of phone number of contact

Fax Holds the value of the fax number of the contact

Page 30
Tag Description

Mobile Holds the value of the mobile number of the contact

Address1 Holds the value of the first address line of the contact

Address2 Holds the value of the second address line of the contact

City Holds the value of the name of the city of contact

StateId Holds the value of id of the state of contact

ZipCode Holds the value of zip code of the contact

CountryId Holds the value of id of the country of contact

BillingContact Holds the value of name of the contact for billing

BillingEmail Holds the value of email address of contact for billing

BillingPhone Holds the value of phone number of contact for billing

BillingFax Holds the value of the fax number of the contact for billing

BillingAddress1 Holds the value of the first address line of the contact for billing address

BillingAddress2 Holds the value of the second address line of the contact for billing address

BillingCity Holds the value of the name of the city of contact for billing address

BillingStateId Holds the value of id of the state of contact for billing address

BillingZipCode Holds the value of zip code of the contact for billing address

BillingCountryId Holds the value of id of the country of contact for billing address

Notes Holds the value of notes

Page 31
Update Contact(s)
This is the sample xml format to send input to the API for updating contacts in the database. To
update multiple records from the database please repeat data node in the input XML.

<AdsXML>
<Request type='Contact'>
<Contact action = 'update'>
<Data>
<ContactId>1</ContactId>
<ReportsTo></ReportsTo>
<ContactTypeId>1</ContactTypeId>
<OrganizationId>1</OrganizationId>
<ContactFirstName>Hemita1</ContactFirstName>
<ContactLastName>Thakkar</ContactLastName>
<ContactTitle>PHP</ContactTitle>
<Email>hemita@gmail.com</Email>
<Phone></Phone>
<Fax></Fax>
<Mobile></Mobile>
<Address1></Address1>
<Address2></Address2>
<City></City>
<StateId></StateId>
<ZipCode></ZipCode>
<CountryId></CountryId>
<BillingContact></BillingContact>
<BillingEmail></BillingEmail>
<BillingPhone></BillingPhone>
<BillingFax></BillingFax>
<BillingAddress1></BillingAddress1>
<BillingAddress2></BillingAddress2>
<BillingCity></BillingCity>
<BillingStateId></BillingStateId>
<BillingZipCode></BillingZipCode>
<BillingCountryId></BillingCountryId>
<Notes>My test for add contact</Notes>
</Data>
</Contact>
</Request>
</AdsXML>

Field Description

Tag Description

ContactId Holds the value of id of the contact which you want to change (Primary key
for this table)

ReportsTo Holds the value of reporting person id (Foreign key will be ContactId – self
referencing)

ContactTypeId Holds the value of id of the contact type(Foreign key for this table referencing
contact types)

OrganizationId Holds the value of id of the organization(Foreign key for this table referencing
organizations)

ContactFirstName Holds the value of the first name of the contact.

ContactLastName Holds the value of the last name of the contact

ContactTitle Holds the value of the title of the contact

Email Holds the value of email address of contact

Page 32
Tag Description

Phone Holds the value of phone number of contact

Fax Holds the value of the fax number of the contact

Mobile Holds the value of the mobile number of the contact

Address1 Holds the value of the first address line of the contact

Address2 Holds the value of the second address line of the contact

City Holds the value of the name of the city of contact

StateId Holds the value of id of the state of contact

ZipCode Holds the value of zip code of the contact

CountryId Holds the value of id of the country of contact

BillingContact Holds the value of name of the contact for billing

BillingEmail Holds the value of email address of contact for billing

BillingPhone Holds the value of phone number of contact for billing

BillingFax Holds the value of the fax number of the contact for billing

BillingAddress1 Holds the value of the first address line of the contact for billing address

BillingAddress2 Holds the value of the second address line of the contact for billing address

BillingCity Holds the value of the name of the city of contact for billing address

BillingStateId Holds the value of id of the state of contact for billing address

BillingZipCode Holds the value of zip code of the contact for billing address

BillingCountryId Holds the value of id of the country of contact for billing address

Notes Holds the value of notes

Page 33
Delete Contact(s)
This is the sample xml format to send input to the API for deleting contacts in the database. To
delete multiple records from the database please repeat data node in the input XML.

<AdsXML>
<Request type='Contact'>
<Contact action = 'delete'>
<Data>
<ContactId>1</ContactId>
</Data>
</Contact>
</Request>
</AdsXML>

Field Description
Tag Description

ContactId Holds the value of id of the contact which you want to delete (Primary key for
this table)

Add Contract Contact(s)


This is the sample xml format to send input to the API for adding contract contacts in the database.
To add multiple records from the database please repeat data node in the input XML.

<AdsXML>
<Request type='ContractContact'>
<ContractContact action = 'create'>
<Data>
<ContractId>43</ContractId>
<ContactId>3</ContactId>
<Commission>34.50</Commission>
<PrimaryAE>1</PrimaryAE>
<GetCommission>1</GetCommission>
</Data>
</ContractContact>
</Request>
</AdsXML>

Field Description
Tag Description

ContractId Holds the value of id of the contract (Foreign key for this table erferencing
contracts)

ContactId Holds the value of id of the contact (Foreign key for this table erferencing
contacts)

Commission Holds the value of commition of contact on contract

PrimaryAE Boolean flag to hold the value of primary AE.

GetCommission Boolean flag to hold the value of wheter the user will get commission or not.

Page 34
Update Contract Contact(s)
This is the sample xml format to send input to the API for updating contract contacts in the
database. To update multiple records from the database please repeat data node in the input XML.

<AdsXML>
<Request type='ContractContact'>
<ContractContact action = 'update'>
<Data>
<ContractContactId>2</ContractContactId>
<Commission>50</Commission>
<PrimaryAE>1</PrimaryAE>
<GetCommission>1</GetCommission>
</Data>
</ContractContact>
</Request>
</AdsXML>

Field Description
Tag Description

ContractContactId Holds the value of id of Contract Contact which you want to change (Primary
key of the table)

Commission Holds the value of commition of contact on contract

PrimaryAE Boolean flag to hold the value of primary AE.

GetCommission Boolean flag to hold the value of wheter the user will get commission or not.

Delete Contract Contact(s)


This is the sample xml format to send input to the API for deleting contract contacts in the
database. To delete multiple records from the database please repeat data node in the input XML.

<AdsXML>
<Request type='ContractContact'>
<ContractContact action = 'delete'>
<Data>
<ContractContactId>2</ContractContactId>
</Data>
</ContractContact>
</Request>
</AdsXML>

Field Description

Tag Description

ContractContactId Holds the value of id of Contract Contact which you want to delete (Primary
key of the table)

Page 35
Get Contract Billing Detail(s)
This is the sample xml format to send input to the API for generating contract billing report. To get
contract billing detail for multiple contract from the database please repeat data node in the input
XML.

<AdsXML>
<Request type='ContractBilling'>
<ContractBilling action = 'get'>
<Data>
<ContractId>3</ContractId>
</Data>
</ContractBilling>
</Request>
</AdsXML>

Field Description
Tag Description

ContractId Hold the value of id of the contract (Foreign key for this table referencing
contracts)

Page 36
Document Library Module
Create Folder(s)
This is the sample xml format to send input to the API for inserting folders in the database. For
inserting multiple records in the database please repeat data node in the input XML.

<AdsXML>
<Request type='Folder'>
<Folder action = 'create'>
<Data>
<ParentId>3</ParentId>
<FolderName>hemita</FolderName>
<Description></Description>
</Data>

<Data>
<ParentId>3</ParentId>
<FolderName>V2Soln</FolderName>
<Description></Description>
</Data>
</Folder>
</Request>
</AdsXML>

Field Description
Tag Description

Parentid Id of the parent folder. Id of the folder inside which you want to create new
folder. If you don’t pass the parent id then folder will be created under root
folder.

FolderName Name of the folder

Description Description of the folder

Page 37
Update Folder(s)
This is the sample xml format to send input to the API for updating folder detail in the database. For
updating multiple records in the database please repeat data node in the input XML.

<AdsXML>
<Request type='Folder'>
<Folder action = 'update'>
<Data>
<FolderId>13</FolderId>
<FolderName>V2Solution</FolderName>
<Description></Description>
</Data>
</Folder>
</Request>
</AdsXML>

Field Description

Tag Description

FolderId Id of the folder for which you want to change the detail (Primary key of the
table)

FolderName Name of the folder

Description Description of the folder

Get Folder Location


This is the sample xml to send input to the API for getting location of the folder based on folder
name and creation or updation date

<AdsXML>
<Request type='Folder'>
<Folder action = 'location'>
<Data>
<FolderName></FolderName>
<Date></Date>
</Data>
</Folder>
</Request>
</AdsXML>

Field Description

Tag Description

FolderName Name of the folder

Date Creation of updation date of the folder

Page 38
Create Document(s)
This is the sample xml format to send input to the API for inserting document in the database. For
inserting multiple records in the database please repeat data node in the input XML.

<AdsXML>
<Request type='Document'>
<Document action = 'create'>
<Data>
<DocumentName>Testfffff</DocumentName>
<Description>test</Description>
<FileName>test.doc</FileName>
<FileBlob>Sample document contents</FileBlob>
<FolderId></FolderId>
</Data>
<Data>
<DocumentName>Test2</DocumentName>
<Description></Description>
<FileName></FileName>
<FileBlob></FileBlob>
<FolderId></FolderId>
</Data>
</Document>
</Request>
</AdsXML>

Field Description

Tag Description

DocumentName Name of the document

Description Short description regarding the document

FileName Name of the file which you want to upload

FileBlob Holds the content of document

FolderId Id of the folder under which you want to store the document.

Page 39
Update Document(s)
This is the sample xml format to send input to the API for updating document in the database. For
updating multiple records in the database please repeat data node in the input XML.

<AdsXML>
<Request type='Document'>
<Document action = 'update'>
<Data>
<DocumentId>9</DocumentId>
<DocumentName>Test3489</DocumentName>
<FileName>test.doc</FileName>
<FilePath>sample data</FilePath>
<Description>Test</Description>
</Data>
</Document>
</Request>
</AdsXML>

Field Description

Tag Description

DocumentName Name of the document

Description Short description regarding the document

FileName Name of the file which you want to upload

FileBlob Holds the content of document

DocumentId Id of the document. Primary key for documents.

Delete Document(s)
This is the sample xml format to send input to the API for deleting document from the database. For
deleting multiple records from the database please repeat data node in the input XML.

<AdsXML>
<Request type='Document'>
<Document action = 'delete'>
<Data>
<DocumentId>9</DocumentId>
</Data>
</Document>
</Request>
</AdsXML>

Field Description

Tag Description

DocumentId Id of the document. Primary key for documents.

Page 40
Download Document(s)
This is the sample xml format to send input to the API for downloading document from the
database. For downloading multiple records from the database please repeat data node in the input
XML.

<AdsXML>
<Request type='Document'>
<Document action = 'download'>
<Data>
<DocumentId>9</DocumentId>
</Data>
</Document>
</Request>
</AdsXML>

Field Description
Tag Description

DocumentId Id of the document. Primary key for documents.

Download Documents From Folder


This is the sample xml format to send input to the APi for downloading all the documents from the
folder.

<AdsXML>
<Request type='Document'>
<Document action = 'download_from_folder'>
<Data>
<FolderId>2</FolderId>
</Data>
</Document>
</Request>
</AdsXML>

Field Description

Tag Description

FolderId Id of the folder. From which you want to download all the douments

Page 41
Get Document Location
This is the sample xml to send input to the API for getting location of the document based on
document name and creation or updating date

<AdsXML>
<Request type='Document'>
<Document action = 'location'>
<Data>
<DocumentName></DocumentName>
<Date></Date>
</Data>
</Document>
</Request>
</AdsXML>

Field Description
Tag Description

DocumentName Name of the document

Date Creation and updation date of the document.

Update Contract Folder(s)


This is the sample xml format to send input to the API for updating contract Folder in the database.
To update multiple records in the database please repeat data node in the input XML.

<AdsXML>
<Request type='ContractFolder'>
<ContractFolder action = 'update'>
<Data>
<FolderId></FolderId>
<FolderName></FolderName>
<Description></Description>
</Data>
</ContractFolder>
</Request>
</AdsXML>

Field Description
Tag Description

FolderId Id of the folder

FolderName Name of the folder

Description Description about folder

Page 42
Delete Contract Folder(s)
This is the sample xml format to send input to the API for deleting contract Folder from the
database. To delete multiple records from the database please repeat data node in the input XML.

<AdsXML>
<Request type='ContractIO'>
<ContractIO action = ‘update’>
<Data>
<FolderId></FolderId>
</Data>
</ContractIO>
</Request>
</AdsXML>

Field Description
Tag Description

FolderId Id of the folder which you want to delete

Add Contract IO(s)


This is the sample xml format to send input to the API for creating contract IO in the database. To
create multiple records in the database please repeat data node in the input XML.

<AdsXML>
<Request type='ContractIO'>
<ContractIO action = ‘create’>
<Data>
<ContractId></ContractId>
<ContractIOName></ContractIOName>
<Description></Description>
</Data>
</ContractIO>
</Request>
</AdsXML>

Field Description
Tag Description

ContractId Id of the Contract

ContractIOName Name of the contract Id

Description Description about Contract IO

Page 43
Page 44
Reporting Module
Create Report Folder(s)
This is the sample xml format to send input to the API for adding report folder in the database. To
add multiple records from the database please repeat data node in the input XML.

<AdsXML>
<Request type='ReportFolder'>
<ReportFolder action = 'create'>
<Data>
<FolderName>hemita1</FolderName>
<Description></Description>
<ParentId>2</ParentId>
</Data>
</ReportFolder>
</Request>
</AdsXML>

Field Description
Tag Description

Parentid Id of the parent folder. Id of the folder inside which you want to create new
folder. If you don’t pass the parent id then folder will be created under root
folder.

FolderName Name of the folder

Description Description of the folder

Update Report Folder(s)


This is the sample xml format to send input to the API for updating report folder in the database. To
update multiple records from the database please repeat data node in the input XML.

<AdsXML>
<Request type='ReportFolder'>
<ReportFolder action = ‘update’>
<Data>
<FolderId>1</FolderId>
<FolderName>hemita1</FolderName>
<Description></Description>
</Data>
</ReportFolder>
</Request>
</AdsXML>

Field Description
Tag Description

FolderId Id of the folder which you want to change. (Primary key of the table)

FolderName Name of the folder

Description Description of the folder

Page 45
Delete Report Folder(s)
This is the sample xml format to send input to the API for deleting document folder from the
database. To delete multiple records from the database please repeat data node in the input XML.

<AdsXML>
<Request type='ReportFolder'>
<ReportFolder action = 'delete'>
<Data>
<FolderId>227</FolderId>
</Data>
</ReportFolder>
</Request>
</AdsXML>

Field Description
Tag Description

FolderId Id of the folder which you want to delete. (Primary key of the table)

Download Report Document(s)


This is the sample xml format to send input to the API for downloading report document from the
database. To download multiple records from the database please repeat data node in the input
XML.

<AdsXML>
<Request type='Reports'>
<Reports action = 'download'>
<Data>
<ReportId>1</ReportId>
</Data>
</Reports>
</Request>
</AdsXML>

Field Description

Tag Description

RepoerId Id of the report which you want to download

Page 46
Administration Module
Add User Group(s)
This is the sample xml format to send input to the API for adding user groups in the database. To
add multiple records from the database please repeat data node in the input XML.

<AdsXML>
<Request type='UserGroup'>
<UserGroup action = 'create'>
<Data>
<UserGroupName>Test Group 15</UserGroupName>
<UserGroupType>C</UserGroupType>
<Description>Description Description Description</Description>
<Status>Y</Status>
<Members>
<MemberId>1</MemberId>
<MemberId>2</MemberId>
<MemberId>3</MemberId>
</Members>
</Data>
<Data>
<UserGroupName>Test Group 16</UserGroupName>
<UserGroupType>S</UserGroupType>
<Description>Description 2 Description 2 Description 2</Description>
<Status>N</Status>
<Members>
<MemberId>4</MemberId>
<MemberId>5</MemberId>
<MemberId>6</MemberId>
</Members>
</Data>
</UserGroup>
</Request>
</AdsXML>

Field Description

Tag Description

UserGroupName Holds the value of name of the user group

UserGroupType Holds the value of the user type

Description Holds the detail of the suer group

Status Holds the status of the user status

Members Tag to group mamber ids

MemberId Holds the id of the members of the group (Foreign key for this table
referencing users)

Page 47
Update User Group(s)
This is the sample xml format to send input to the API for updating user groups in the database. To
update multiple records from the database please repeat data node in the input XML.

<AdsXML>
<Request type='UserGroup'>
<UserGroup action = 'update'>
<Data>
<UserGroupId>3</UserGroupId>
<UserGroupName>Test Group 1-3</UserGroupName>
<UserGroupType>C</UserGroupType>
<Description>Description Description Description</Description>
<Status>Y</Status>
<Members>
<MemberId>111</MemberId>
<MemberId>222</MemberId>
<MemberId>333</MemberId>
</Members>
</Data>
<Data>
<UserGroupId>4</UserGroupId>
<UserGroupName>Test Group 1-4</UserGroupName>
<UserGroupType>S</UserGroupType>
<Description>Description 2 Description 2 Description 2</Description>
<Status>N</Status>
<Members>
<MemberId>444</MemberId>
<MemberId>555</MemberId>
<MemberId>666</MemberId>
</Members>
</Data>
</UserGroup>
</Request>
</AdsXML>

Field Description

Tag Description

UserGroupId Holds the value of id of the user group which you want to change (Primary
key for this table)

UserGroupName Holds the value of name of the user group

UserGroupType Holds the value of the user type

Description Holds the detail of the suer group

Status Holds the status of the user status

Members Tag to group mamber ids

MemberId Holds the id of the members of the group (Foreign key for this table
referencing users)

Page 48
Delete User Group(s)
This is the sample xml format to send input to the API for deleting user groups in the database. To
delete multiple records from the database please repeat data node in the input XML.

<AdsXML>
<Request type='UserGroup'>
<UserGroup action = 'delete'>
<Data>
<UserGroupId>17</UserGroupId>
</Data>
<Data>
<UserGroupId>18</UserGroupId>
</Data>
</UserGroup>
</Request>
</AdsXML>

Field Description

Tag Description

UserGroupId Holds the value of id of the user group which you want to delete (Primary key
for this table)

Add User(s)
This is the sample xml format to send input to the API for adding users in the database. To add
multiple records from the database please repeat data node in the input XML.

<AdsXML>
<Request type='Users'>
<Users action = 'create'>
<Data>
<FirstName>Hemita</FirstName>
<LastName>Thakkar</LastName>
<LoginUserName>Hemita</LoginUserName>
<LoginPassword>test</LoginPassword>
<Title>erouit</Title>
<Email>test@test.com</Email>
<OrganizationId>1</OrganizationId>
<GroupId>1</GroupId>
<Phone>14957347</Phone>
<Fax>4095609586</Fax>
<Mobile>685068906</Mobile>
<Address1>jsghklf</Address1>
<Address2>fkldgjk</Address2>
<City>fjkgh</City>
<StateId>1</StateId>
<ZipCode>12345</ZipCode>
<CountryId></CountryId>
<Notes></Notes>
<TimeZone></TimeZone>
<TimeZoneIndex></TimeZoneIndex>
<Status></Status>
<UserRole></UserRole>
<TotalStorageId></TotalStorageId>
<UsedStorage></UsedStorage>
<EmailFormatId></EmailFormatId>
<FaildAttempts></FaildAttempts>
<LoginDate></LoginDate>
<LastFaildAttempts></LastFaildAttempts>
<LastLogin></LastLogin>
<PasswordPolicyId></PasswordPolicyId>
<SessionPolicyId></SessionPolicyId>
</Data>
</Users>
</Request>
</AdsXML>

Page 49
Field Description
Tag Description

FirstName Holds the value of first name of the user

LastName Holds the value fo last name of the user

LoginUserName Holds the value of user name

LoginPassword Holds the value of password of the user

Title Holds the value of title of the user

Email Holds the value of email address of the user

OrganizationId Holds the value of id of organization (Foreign key for this table referencing
organizations)

GroupId Holds the value of id of group of the user (Foreign key for this table
referencing user groups)

Phone Holds the value of phone number of the user

Fax Holds the value of fax number of the user

Mobile Holds the value of mobile number of the user

Address1 Holds the value of first address line of the user.

Address2 Holds the value of second address line of theuser

City Holds the value of name of the city of user

StateId Holds the value of id of the state of user

ZipCode Holds the value of the zip code of the user

CountryId Holds the value of the id of country of the user

Notes Holds the value of notes

TimeZone Holds the value of the id of time zone

TimeZoneIndex Holds the value of the id of time zone index.

Status Holds the value of the status of user

UserRole Holds the value of the role of the user

TotalStorageId Holds the value of the id of the total storage

UsedStorage Holds the value of the used storage by user

EmailFormatId Holds the id of email format

FaildAttempts Holds thevalue of faild attampts for login. Maximum value is 5

Page 50
Tag Description

LoginDate Holds the value of login date of the user

LastFaildAttempts Holds thevalue of last faild attampt for login by user.

LastLogin Holds the value of last login date of the user

PasswordPolicyId Holds the value of id of password policy

SessionPolicyId Holds the value of id of session policy

Update User(s)
This is the sample xml format to send input to the API for updating users in the database. To
update multiple records from the database please repeat data node in the input XML.

<AdsXML>
<Request type='Users'>
<Users action = 'update'>
<Data>
<UserId>1</UserId>
<FirstName>Hemita</FirstName>
<LastName>Thakkar</LastName>
<Title>SPA</Title>
<Email>hemita@test.com</Email>
<OrganizationId>1</OrganizationId>
<GroupId>1</GroupId>
<Phone>14957347</Phone>
<Fax>4095609586</Fax>
<Mobile>685068906</Mobile>
<Address1>jsghklf</Address1>
<Address2>fkldgjk</Address2>
<City>fjkgh</City>
<StateId>1</StateId>
<ZipCode>12345</ZipCode>
<CountryId>1</CountryId>
<Notes>Test</Notes>
<TimeZone>1</TimeZone>
<TimeZoneIndex>1</TimeZoneIndex>
<Status>1</Status>
<UserRole>U</UserRole>
<TotalStorageId>1233</TotalStorageId>
<UsedStorage>23</UsedStorage>
<EmailFormatId>Text</EmailFormatId>
<FaildAttempts></FaildAttempts>
<LoginDate></LoginDate>
<LastFaildAttempts></LastFaildAttempts>
<LastLogin></LastLogin>
<PasswordPolicyId></PasswordPolicyId>
<SessionPolicyId></SessionPolicyId>
</Data>
</Users>
</Request>
</AdsXML>

Field Description

Tag Description

UserId Holds the value of id of the user , which you want to change (Primary key of
the table)

FirstName Holds the value of first name of the user

LastName Holds the value fo last name of the user

Page 51
Tag Description

Title Holds the value of title of the user

Email Holds the value of email address of the user

OrganizationId Holds the value of id of organization (Foreign key for this table referencing
organizations)

GroupId Holds the value of id of group of the user (Foreign key for this table
referencing user groups)

Phone Holds the value of phone number of the user

Fax Holds the value of fax number of the user

Mobile Holds the value of mobile number of the user

Address1 Holds the value of first address line of the user.

Address2 Holds the value of second address line of theuser

City Holds the value of name of the city of user

StateId Holds the value of id of the state of user

ZipCode Holds the value of the zip code of the user

CountryId Holds the value of the id of country of the user

Notes Holds the value of notes

TimeZone Holds the value of the id of time zone

TimeZoneIndex Holds the value of the id of time zone index.

Status Holds the value of the status of user

UserRole Holds the value of the role of the user

TotalStorageId Holds the value of the id of the total storage

UsedStorage Holds the value of the used storage by user

EmailFormatId Holds the id of email format

FaildAttempts Holds the value of failed attempts for login. Maximum value is 5

LoginDate Holds the value of login date of the user

LastFaildAttempts Holds the value of last failed attempt for login by user.

LastLogin Holds the value of last login date of the user

PasswordPolicyId Holds the value of id of password policy

Page 52
Tag Description

SessionPolicyId Holds the value of id of session policy

Delete User(s)
This is the sample xml format to send input to the API for deleting users from the database. To
delete multiple records from the database please repeat data node in the input XML.

<AdsXML>
<Request type='Users'>
<Users action = 'delete'>
<Data>
<UserId>1</UserId>
</Data>
</Users>
</Request>
</AdsXML>

Field Description
Tag Description

UserId Holds the value of id of the user , which you want to delete (Primary key of
the table)

Duplicate User(s)
This is the sample xml format to send input to the API for duplicating users detail in the database.
To duplicate multiple records in the database please repeat data node in the input XML.

<AdsXML>
<Request type='Users'>
<Users action = 'duplicate'>
<Data>
<UserId>1</UserId>
</Data>
</Users>
</Request>
</AdsXML>

Field Description
Tag Description

UserId Holds the value of id of the user , which you want to duplicate (Primary key of
the table)

Page 53
Error Codes
Following are the error codes integrated with ADX API.

Folder Module Messages


Error Code Message

200 Folder Saved Successfully

201 is invalid Folder Name

202 - Created By Some Other User

203 Folder Already Exists

204 Folder does not exist

Document Module Messages


Error Code Message

300 Document Saved Successfully

301 is invalid Document Name

302 - Document does not exist

303 - Created By Some Other User

304 File Size Exceeded!

305 Invalid Document Type!

306 Document Already Exists

307 Document does not exist in the folder

308 Document Name length exceeded the maximum possible length

Page 54
Authorization Messages
Error Code Message

401 You are not authorized to view folder location. Please register with the site
first.

402 You are not authorized to create folder. Please register with the site first.

403 You are not authorized to update folder. Please register with the site first.

411 You are not authorized to view document location. Please register with the site
first.

412 You are not authorized to create document. Please register with the site first.

413 You are not authorized to update document. Please register with the site first.

414 You are not authorized to download document. Please register with the site
first.

415 You are not authorized to download document. Please register with the site
first.

416 You are not authorized to create contract. Please register with the site first.

417 You are not authorized to update contract. Please register with the site first.

418 You are not authorized to delete contract. Please register with the site first.

419 You are not authorized to duplicate contract. Please register with the site first.

420 You are not authorized to create contract campaign. Please register with the
site first.

421 You are not authorized to update contract campaign. Please register with the
site first.

422 You are not authorized to delete contract campaign. Please register with the
site first.

423 You are not authorized to duplicate contract campaign. Please register with
the site first.

424 You are not authorized to create contract line item. Please register with the
site first.

425 You are not authorized to update contract line item. Please register with the
site first.

426 You are not authorized to delete contract line item. Please register with the site
first.

Page 55
Error Code Message

427 You are not authorized to duplicate contract line item. Please register with the
site first.

428 You are not authorized to create a contract. Please register with the site first.

429 You are not authorized to update a contract. Please register with the site first.

430 You are not authorized to delete a contract. Please register with the site first.

431 You are not authorized to create contract notes. Please register with the site
first.

432 You are not authorized to update contract notes. Please register with the site
first.

433 You are not authorized to delete contract notes. Please register with the site
first.

434 You are not authorized to create contract documents. Please register with the
site first.

435 You are not authorized to update contract documents. Please register with the
site first.

436 You are not authorized to delete contract documents. Please register with the
site first.

437 You are not authorized to create contacts. Please register with the site first.

438 You are not authorized to update contacts. Please register with the site first.

439 You are not authorized to delete contacts. Please register with the site first.

440 You are not authorized to create contract contacts. Please register with the
site first.

441 You are not authorized to update contract contacts. Please register with the
site first.

442 You are not authorized to delete contract contacts. Please register with the site
first.

443 You are not authorized to View contract Billing detail. Please register with the
site first.

444 You are not authorized to create user group. Please register with the site first.

445 You are not authorized to update user group. Please register with the site first.

446 You are not authorized to delete user group. Please register with the site first.

Page 56
Error Code Message

447 You are not authorized to create user. Please register with the site first.

448 You are not authorized to update user. Please register with the site first.

449 You are not authorized to delete user. Please register with the site first.

450 You are not authorized to duplicate user. Please register with the site first.

451 You are not authorized to delete report folders. Please register with the site
first.

452 You are not authorized to download reports. Please register with the site first.

API Module validation Message


Error Code Message

501 Invalid operation for documents

502 Invalid operation for folders

503 Invalid module type

504 Invalid request XML format

505 Invalid operation for contract folders

506 Invalid operation for contracts

507 Invalid operation for contract campaigns

508 Invalid operation for contract line items

509 Invalid operation for contract Ios

510 Invalid operation for contract notes

511 Invalid operation for contract documents

512 Invalid operation for contacts.

513 Invalid operation for contract contacts

514 Invalid operation for contract billings

515 Invalid operation for user groups

516 Invalid operation for users

517 Invalid operation for reports

518 Invalid operation for report folders

519 Invalid operation for data source files

Page 57
Contract Module Messages
Error Code Message

600 Contract Detail Saved Successfully

603 Folder Id does not exist

604 User Id does not exist

605 Ad Server Id does not exist

606 Account Id does not exist

607 Agency Id does not exist

608 Industry Segment Id does not exist

609 Ad ManagerId Id does not exist

610 Team Id does not exist

611 Type Id does not exist

612 Category Id does not exist

613 Lead Source Id does not exist

614 Stage Id does not exist

615 Next Step Id does not exist

616 Media Id does not exist

617 Probability Id does not exist

618 Terms Id does not exist

619 Project Id does not exist

620 is invalid Contract Name

621 Contract Name length exceeded the maximum possible length

622 Invalid value for AgencyHold. Please specify either 0 or 1.

623 Invalid value for AdvertiserHold. Please specify either 0 or 1.

624 Version length exceeded the maximum possible length

625 ClientPO length exceeded the maximum possible length

626 StartDate is an invalid date format

627 EndDate is an invalid date format

628 IONumber length exceeded the maximum possible length

Page 58
Error Code Message

629 Status length exceeded the maximum possible length

630 GrossAmount is an Invalid float value

631 ContractDiscount is an Invalid float value

632 ContractDiscountPercent length exceeded the maximum possible length

633 AgencyDiscount is an Invalid float value

634 AgencyDiscountPercent length exceeded the maximum possible length

635 OtherDiscount is an Invalid float value

651 Invalid Contract Id

Contract Campaign Module Messages


Error Code Message

700 Contract Campaign Details Saved Successfully

701 Contract Id does not exist

702 Contract IO Id does not exist

703 Contract Campaign Name length exceeded the maximum possible length

704 Account Id does not exist

705 Agency Id does not exist

706 Gross Value is an Invalid float value

707 Agency Discount Percent length exceeded the maximum possible length

708 Agency Discount is an Invalid float value

709 Contract Discount Percent length exceeded the maximum possible length

710 Contract Discount is an Invalid float value

711 Other Discount is an Invalid float value

712 Net Value is an Invalid float value

713 Status length exceeded the maximum possible length

751 Invalid Campaign Id

Page 59
Contract Line Item Module Messages
Error Code Message

800 Contract Line Item Details Saved Successfully

801 Contract Id does not exist

802 Invalid Contract Line Item Name

803 Contract Campaign Id does not exist

804 Contract IO Id does not exist

805 Contract Line Item Buy Type Id does not exist

806 Contract Traffic Product Id does not exist

807 Contract Line Item Start Date is not valid

808 Contract Line Item End Date is not valid

809 Contract Line Item Model Id does not exist

810 Value of Quentity is not valid

811 Value of Clicks is not valid

812 Value of Gross Unit is not valid

813 Value of Gross Value is not valid

814 Value of Agency Discount Percentage is not valid

815 Value of Agency Discount is not valid

816 Value of Contract Discount Percentage is not valid

817 Value of Contract Discount is not valid

818 Value of Other Discount is not valid

820 Value of Status is not valid

821 Ad Server Id does not exist

822 Contract Line Item BillOn Id does not exist

823 Contract Line Item Type Id does not exist

824 Contract Line Item Ad Server Type Id does not exist

851 Invalid Line Item Id

Contract IO Module Messages


Error Code Message

Page 60
Error Code Message

900 Contract IO details saved successfully

901 Contract Id does not exist

902 Contract IO Name length exceeded the maximum possible length

903 is invalid Contract IO Name

Contract Note Module Messages


Error Code Message

1000 Contract Note details saved successfully

1001 Contract Id does not exist

1002 Contract note Name length exceeded the maximum possible length

1003 Note Type Id does not exist

1051 Invalid Note Id

Contract Document Module Messages


Error Code Message

1100 Contract Document details saved successfully

1101 Contract Id does not exist

1102 Folder Id does not exist

1103 Invalid Document Name

1104 Contract Document Name length exceeded the maximum possible length

1105 Invalid Contract Area

1106 Traffic Campaign Id does not exist

1107 Contact Id does not exist

1108 Billing Stracture Id does not exist

1109 Task Id does not exist

1110 Attachment Id does not exist

1111 Creative Id does not exist

1151 Invalid Document Id

Page 61
Contact Module Messages
Error Code Message

1200 Contact details saved successfully

1201 Reporting To Id does not exist

1202 Contact Type Id does not exist

1203 Advertiser Id does not exist

1204 Agency Id does not exist

1205 Industry Segment Id does not exist

1206 First Name is not valid

1207 First Name length exceeded the maximum possible length

1208 Last Name is not valid

1209 Last Name length exceeded the maximum possible length

1210 Title is not valid

1211 Title length exceeded the maximum possible length

1212 Email length exceeded the maximum possible length

1251 Invalid Contact Id

Contract Contact Module Messages


Error Code Message

1300 Contract Contact details saved successfully

1301 Contract Id does not exist

1302 Contact Id does not exist

1303 Value of Commission is not valid

1304 Value of PrimaryAE is not valid

1305 Value of Get Commission is not valid

1351 Invalid Contract Contact Id

Page 62
User Group Module Messages
Error Code Message

1400 User Group details saved successfully

1401 User Group Name already exists

1402 is invalid User Group Name

1403 User Group Name exceeded the maximum possible length

1404 User Group Type exceeded the maximum possible length

1405 User Group does not exist

User Module Messages


Error Code Message

1500 User details saved successfully

1501 Invalid User name

1502 User name length exceeded the maximum possible length

1503 Organization Id does not exist

1504 Invalid Password

1505 Password length exceeded the maximum possible length

1506 Invalid First Name

1507 First Name length exceeded the maximum possible length

1508 Invalid Last Name

1509 Last Name length exceeded the maximum possible length

1510 Email length exceeded the maximum possible length

1551 User Id already exist

Notes
1. The package shared contains the “samples” folder(path: “adxapi/ws/samples”). In that
folder, we have created sample test scripts for all the web service listed above. Please
have a look at them.

2. Add multiple Data nodes for adding multiple rows in the table

3. Add multiple Request nodes to perform multiple operations on the database

4. Repeat action attribute if you want to perform multiple operations on the same table.

Page 63

Você também pode gostar