Skip to main content
Skip table of contents

Awin Advertiser API

The public API procedures may call the internal procedures which should not be used directly as they can be changed without any explicit notification in the newer versions of the connector. Internal procedures can be recognized by the prefix internal_ in their names. Public API procedures do not have such prefix in their names.

Accounts

List of accounts you have access to


Parameter
<target_table> (optional): The table to save the data to
<label> (optional): Multitenancy label

Attribute

Type

Description

userId

string

User ID

accountId

integer

ID of the account, as known from the frontend URLs

accountName

string

Programme name for an advertiser and company name for a publisher

accountType

string

Can be either publisher or advertiser

userRole

string

The role your user account has for the account

Example

SQL
CREATE VIEW awin_examples.example_Accounts AS 
SELECT * FROM (
	CALL awin.Accounts ()
) x;;

AdvertiserTransactionsList

List of your individual transactions (for advertisers)
Parameter
<accountId> (optional): Account ID
<accountId_table> (optional): Table name with account id data
<initial_date> (required): Earliest datetime to retrieve data
<end_date> (optional): Latest datetime to retrieve data
<ids> (optional): List of transaction Ids
<daysToRedownload> (optional): Number of days for redownload
<dateType> (optional): Default: transaction
<timezone> (optional): Europe/Paris, Europe/London, Europe/Dublin, Canada/Central, Canada/Eastern, Canada/Mountain, Canada/Pacific, US/Central, US/Eastern, US/Mountain, US/Pacific, UTC
<publisherId> (optional): Optional, available for advertisers
<advertiserId> (optional): Optional, available for publishers
<status> (optional): approved, declined, deleted
<target_table> (optional): The table to save the data to
<preview> (optional): Preview only, don't write into table
<label> (optional): Multi-tenancy label

Attribute

Type

Description

id

long

Transaction Id

url

string

URL

advertiserId

long

Advertiser Id

publisherId

long

Publisher Id

siteName

string

Site Name

commissionStatus

string

Commission Status

commissionAmount

bigdecimal

Commission Amount

commissionAmountCurrency

string

Commission Amount Currency

saleAmount

bigdecimal

Sale Amount

saleAmountCurrency

string

Sale Amount Currency

clickDate

string

Click Date

transactionDate

timestamp

Transaction Date

validationDate

string

Validation Date

type

string

Type

declineReason

string

Decline Reason

voucherCodeUsed

boolean

Voucher Code Used

voucherCode

string

Voucher Code

lapseTime

bigdecimal

Lapse Time

amendReason

string

Reason To Amend

oldSaleAmount

string

Old Sale Amount

oldCommissionAmount

string

Old Commission Amount

clickDevice

string

Click Device

transactionDevice

string

Transaction Device

publisherUrl

string

Publisher Url

advertiserCountry

string

Advertiser Country

orderRef

string

Order Ref

customParameters

clob

Custom Parameters

paidToPublisher

boolean

Paid To Publisher

paymentId

long

Payment Id

transactionQueryId

long

Transaction Query Id

originalSaleAmount

string

Original Sale Amount

Example

SQL
Create View awin_examples.example_AdvertiserTransactionsList
As 
	Select * From awin.AdvertiserTransactionsList (
		initial_date => CurDate(),
		preview => true
);;

AdvertiserTransactionsById

List of your individual transactions, specified by id (for advertisers)


Parameter
<accountId> (required): ID of the account, as known from the frontend URLs
<ids> (required): Comma-separated list of transaction IDs to return
<timezone> (optional): Europe/Paris, Europe/London, Europe/Dublin, Canada/Central, Canada/Eastern, Canada/Mountain, Canada/Pacific, US/Central, US/Eastern, US/Mountain, US/Pacific, UTC
<target_table> (optional): The table to save the data to
<label> (optional): Multitenancy label

Attribute

Type

Description

id

long

Id

url

string

url

advertiserId

integer

advertiser Id

publisherId

integer

publisher Id

siteName

string

site name

commissionStatus

string

commission status

commissionAmount

bigdecimal

commission amount

commissionAmountCurrency

string

commission amount currency

saleAmount

bigdecimal

sale amount

saleAmountCurrency

string

sale amount currency

clickRef

string

click ref

clickDate

string

click date

transactionDate

timestamp

transaction date

validationDate

string

validation date

type

string

type

declineReason

string

decline reason

voucherCodeUsed

boolean

voucher code used

voucherCode

string

voucher code

lapseTime

bigdecimal

lapse time

amendReason

string

amend reason

oldSaleAmount

string

old sale amount

oldCommissionAmount

string

old commission amount

clickDevice

string

click device

transactionDevice

string

transaction device

publisherUrl

string

publisher Url

advertiserCountry

string

advertiser country

orderRef

string

order ref

customParameters

clob

custom parameters

transactionPartsCommissionGroupId

integer

transaction parts commission group Id

transactionPartsAmount

bigdecimal

transaction parts amount

paidToPublisher

boolean

paid to publisher

paymentId

integer

payment Id

transactionQueryId

integer

transaction query Id

originalSaleAmount

string

original sale amount

Example

SQL
CREATE VIEW awin_examples.example_AdvertiserTransactionsById AS 
SELECT * FROM (
	CALL awin.AdvertiserTransactionsById(
	    accountId => 7506,
	    ids => '305103025,304562092,305256886'
	)
) x

AdvertiserReportsAggregatedByPublisher

The publisher performance report aggregates transactions, clicks and impressions for all publishers an advertiser works with


Parameter
<accountId> (required): ID of the account, as known from the frontend URLs
<startDate> (required): Start date
<endDate> (required): End date
<timezone> (required): America/Sao_Paulo, Australia/Sydney, Europe/Berlin, Europe/Dublin, Europe/Helsinki, Europe/London, Europe/Paris, Canada/Central, Canada/Eastern, Canada/Mountain, Canada/Pacific, US/Central, US/Eastern, US/Mountain, US/Pacific, UTC
<target_table> (optional): The table to save the data to
<label> (optional): Multitenancy label

Attribute

Type

Description

advertiserId

bigdecimal

advertiser Id

advertiserName

string

advertiser name

publisherId

bigdecimal

publisher Id

publisherName

string

publisher name

region

string

ISO2 code

currency

string

ISO code

impressions

bigdecimal

Number of impressions

clicks

bigdecimal

Number of clicks

pendingNo

bigdecimal

Number of pending transactions

pendingValue

bigdecimal

Value of the pending transactions

pendingComm

bigdecimal

Commissions of the pending transactions

confirmedNo

bigdecimal

Number of confirmed transactions

confirmedValue

bigdecimal

Value of confirmed transactions

confirmedComm

bigdecimal

Commission of the confirmed transactions

bonusNo

bigdecimal

Number of bonus transactions

bonusValue

bigdecimal

Value of the bonus transactions

bonusComm

bigdecimal

Commission of the bonus transactions

totalNo

bigdecimal

Total number of transactions

totalValue

bigdecimal

Value of all transactions

totalComm

bigdecimal

Commission of all transactions

declinedNo

bigdecimal

Number of declined transactions

declinedValue

bigdecimal

Value of declined transactions

declinedComm

bigdecimal

Commission of declined transactions

Example

SQL
CREATE VIEW awin_examples.example_AdvertiserReportsAggregatedByPublisher AS 
SELECT * FROM (
	CALL awin.AdvertiserReportsAggregatedByPublisher(
	    accountId => 7506,
	    startDate => '2017-08-10',
	    endDate => '2017-08-20',
	    timezone => 'US/Central'
	)
) x

AdvertiserReportsAggregatedByCreative

The creative performance report aggregates transactions, clicks and impressions for the creatives an advertiser uses


Parameter
<accountId> (required): ID of the account
<startDate> (required): Start date
<endDate> (required): End date
<dateType> (optional): transaction, validation
<region> (required): AT, AU, BE, BR, CA, CH, DE, DK, ES, FI, FR, GB, IE, IT, NL, NO, PL, SE, US
<timezone> (required): America/Sao_Paulo, Australia/Sydney, Europe/Berlin, Europe/Dublin, Europe/Helsinki, Europe/London, Europe/Paris, Canada/Central, Canada/Eastern, Canada/Mountain, Canada/Pacific, US/Central, US/Eastern, US/Mountain, US/Pacific, UTC
<target_table> (optional): The table to save the data to
<label> (optional): Multitenancy label

Attribute

Type

Description

advertiserId

bigdecimal

advertiser Id

advertiserName

string

advertiser name

publisherId

bigdecimal

publisher Id

publisherName

string

publisher name

region

string

ISO2 code

currency

string

ISO code

impressions

bigdecimal

Number of impressions

clicks

bigdecimal

Number of clicks

creativeId

bigdecimal

Id of the creative

creativeName

string

Name of the creative

tagName

string

Tag name of the creative, used by the advertiser to group creatives

pendingNo

bigdecimal

Number of pending transactions

pendingValue

bigdecimal

Value of the pending transactions

pendingComm

bigdecimal

Commissions of the pending transactions

confirmedNo

bigdecimal

Number of confirmed transactions

confirmedValue

bigdecimal

Value of confirmed transactions

confirmedComm

bigdecimal

Commission of the confirmed transactions

bonusNo

bigdecimal

Number of bonus transactions

bonusValue

bigdecimal

Value of the bonus transactions

bonusComm

bigdecimal

Commission of the bonus transactions

totalNo

bigdecimal

Total number of transactions

totalValue

bigdecimal

Value of all transactions

totalComm

bigdecimal

Commission of all transactions

declinedNo

bigdecimal

Number of declined transactions

declinedValue

bigdecimal

Value of declined transactions

declinedComm

bigdecimal

Commission of declined transactions

Example

SQL
CREATE VIEW awin_examples.example_AdvertiserReportsAggregatedByCreative AS 
SELECT * FROM (
	CALL awin.AdvertiserReportsAggregatedByCreative(
	    accountId => 7506,
	    startDate => '2017-08-01',
	    endDate => '2017-08-20',
	    dateType => 'validation',
	    region => 'GB',
	    timezone => 'US/Central'
	)
) x
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.