Skip to main content
Skip table of contents

lead alliance API Reference

The public API procedures use the internal procedures, that should not be used directly as they can be changed without an explicit notification in the newer versions of the connector. Internal procedures can be recognized by the internal_ prefix in their name. Public API procedures do not have such prefixes in their names.

AdMedia

Advertising media
Parameter
<program_id> (optional): Progam ID
<preview> (optional): Preview only, don't write into table
<target_table> (optional): Table name to save the data to
<label> (optional): Multi-tenancy label

Attribute

Type

Description

program_id

integer

Four-digit program ID

id

string

Unique ID for the later identification of an order or a customer (e.g. order number)

admedia_alt

string

Description for banner (html: alt)

admedia_description

string

Description for banner (as information for affiliates)

admedia_height

integer

Height of banner in pixel

admedia_htlp

string

Optional target URL for the PostView landing page (high traffic landing page)

admedia_html5_fallback

string

Optional image URL, delivered as fallback for Javascript advertisements (no-script part)

admedia_id

integer

Ad media ID (automatically generated by the system)

admedia_private

integer

Is private: 0 - public ad medium, visible to all affiliates, 1 - private ad medium (visible to selected affiliates only)

admedia_status

string

Admedia status: 1 - indicates active, 0 - indicates inactive (tracking is still working, however ad media is not shown in ad media list), 2 - indicates deleted (tracking is not working anymore)

admedia_target

string

Redirecting link to landing page

admedia_text

string

Description of ad medium

admedia_type

integer

Type of ad media: 1 - indicates a banner, 2 - indicates a text link, 3 - indicated a microsite, 4 - indicates a HTML5 banner, 5 - indicated an email template

admedia_url

string

Indicated the URL where the ad medium location is (e.g. banner storage)

admedia_width

integer

Width of banner in pixel

adspace_id

integer

Id of affiliate's ad space, who is allowed to see/use the ad medium (if an ad medium is marked as "private")

category_hierarchy

string

Hierarchy of categories

category_id

integer

ID for category (it is possible to structure ad media in several categories, e.g. category "logo", category "standard ad media", category "spring campaign", category "mobile", category "tv")

category_name

string

Name of category

SQL
CREATE VIEW leadalliance_examples.example_AdMedia AS 
	SELECT * 
	FROM (
		CALL leadalliance.AdMedia (
			program_id => NULL
		)
) AS x;;

LeadSalesStatistics

Lead/Sales Statistics
Parameter
<date_start> (required): Start date
<date_end> (optional): End date
<admedia_id> (optional): Admedia ID
<adspace_id> (optional): Affiliate's 6 digit ad space ID
<adspace_sub_id> (optional): Publisher Sub-ID
<data_structure> (optional): Grouping per program: grouped_by_program (default) or ungrouped (no program_id as key)
<orderid> (optional): CSV list of order ids
<program_id> (optional): Progam ID
<segment_id> (optional): Description: Group of commission category (Commission Group ID)
<status> (optional): Status indicates whether an order is cancelled (0), pending (1) or confirmed (2)
<turnover> (optional): Type of turnover: all or bonus or default
<preview> (optional): Preview only, don't write into table
<target_table> (optional): Table name to save the data to
<label> (optional): Multi-tenancy label

Attribute

Type

Description

program_id

integer

Four-digit program ID

date_of_editing

date

Date of editing

transaction_id

string

Transaction id

additional_information

string

admedia_id

integer

Ad media ID (automatically generated by the system)

adspace

string

Ad space

adspace_id

integer

Id of affiliate's ad space, who is allowed to see/use the ad medium (if an ad medium is marked as "private")

adspace_sub_id

string

Publisher Sub-ID

affiliate

string

Affiliate

affiliate_group

string

Affiliate group

affiliate_id

integer

Affiliate id

category_identifier

string

Commission category: (e.g. sale or registration or sim_card or dsl_50)

category_name

string

Name of category

channel

string

Information for differentiation of any channel, up to any 100 characters

commission

bigdecimal

Commission

commission_model

string

Commission model describes the type of a certain commission (e.g. standard CPO model, premium CPO model, CPC model, etc.)

commission_type

string

Commission type

currency

string

Currency of the original value of goods; if it is not used, EUR is set by default

currency_conversion

string

Currency conversion

date_of_admedia_contact

timestamp

Date of admedia contact

date_of_auto_confirmation

date

Date of auto confirmation

date_of_origin

timestamp

Date of origin

network_commission

bigdecimal

Network commission can only be set or changed by the network admin

network_percent

bigdecimal

Network percent

order_id

string

Unique ID for the later identification of an order or a customer (e.g. order number)

payed_out

bigdecimal

Payed out

postview

integer

If PostView-Tracking is used

program

string

Program name

status

integer

Status: 0 or 1 or 2 (default: 1)

status_comment

string

Status comment

status_name

string

Status name

sub_order_id

integer

Sub-Order ID / basket item ID (mandatory for basket tracking)

value

bigdecimal

Turnover / e.g. shopping card value

value_original

bigdecimal

Value original

voucher_code

string

voucher code if voucher tracking is active

SQL
CREATE VIEW leadalliance_examples.example_LeadSalesStatistics AS 
	SELECT * 
	FROM (
		CALL leadalliance.LeadSalesStatistics (
			date_start => TIMESTAMPADD (SQL_TSI_MONTH , -3, CURDATE ()),
			date_end => CURDATE (),
			program_id => NULL,
			orderid => NULL,
			show_by => NULL,
			segment_id => NULL,
			admedia_id => NULL,
			adspace_id => NULL,
			adspace_sub_id => NULL,
			status => NULL,
			turnover => NULL,
			data_structure => NULL
		)
) AS x;;

Partnership

Accepted program partnerships
Parameter
<program_id> (optional): Progam ID
<preview> (optional): Preview only, don't write into table
<target_table> (optional): Table name to save the data to
<label> (optional): Multi-tenancy label

Attribute

Type

Description

program_id

integer

Four-digit program ID

id

integer

Id

adspace_id

integer

Id of affiliate's ad space, who is allowed to see/use the ad medium (if an ad medium is marked as "private")

adspace_url

string

Ad space url

partner_id

integer

Id of partner

partner_name

string

Name of partner

status

string

Status

SQL
CREATE VIEW leadalliance_examples.example_Partnership AS 
	SELECT * 
	FROM (
		CALL leadalliance.Partnership (
			program_id => NULL
		)
) AS x;;

StatisticsByAdSpace

Statistics by ad space
Parameter
<date_start> (required): Start date
<date_end> (optional): End date
<program_id> (optional): Progam ID
<preview> (optional): Preview only, don't write into table
<target_table> (optional): Table name to save the data to
<label> (optional): Multi-tenancy label

Attribute

Type

Description

program_id

integer

Four-digit program ID

adspace_id

integer

Id of affiliate's ad space, who is allowed to see/use the ad medium (if an ad medium is marked as "private")

adspace_name

string

partner_id

integer

Id of partner

partner_name

string

Name of partner

partner_company

string

click_commission

bigdecimal

Click commission

click_quantity

integer

Click quantity

click_quantity_gross

integer

Click quantity gross

id

string

Unique ID for the later identification of an order or a customer (e.g. order number)

lead_commission_canceled

bigdecimal

Lead commission canceled

lead_commission_confirmed

bigdecimal

Lead commission confirmed

lead_commission_open

bigdecimal

Lead commission open

lead_quantity_canceled

integer

Lead quantity canceled

lead_quantity_confirmed

integer

Lead quantity confirmed

lead_quantity_open

integer

Lead quantity open

lead_value_canceled

bigdecimal

Lead value canceled

lead_value_confirmed

bigdecimal

Lead value confirmed

lead_value_open

bigdecimal

Lead value open

lead_value_total

bigdecimal

PLead value total

view_commission

bigdecimal

View commission

view_quantity

integer

View quantity

SQL
CREATE VIEW leadalliance_examples.example_StatisticsByAdSpace AS 
	SELECT * 
	FROM (
		CALL leadalliance.StatisticsByAdSpace (
			date_start => TIMESTAMPADD (SQL_TSI_MONTH , -3, CURDATE ()),
			date_end => CURDATE (),
			program_id => NULL
		)
) AS x;;

StatisticsByDay

Statistics by day
Parameter
<date_start> (required): Start date
<date_end> (optional): End date
<admedia> (optional): Ad media ID
<adspace> (optional): Ad space ID
<period> (optional): Period: day/week/month
<program_id> (optional): Progam ID
<preview> (optional): Preview only, don't write into table
<target_table> (optional): Table name to save the data to
<label> (optional): Multi-tenancy label

Attribute

Type

Description

program_id

integer

Four-digit program ID

date

string

Date label

click_commission

bigdecimal

Click commission

click_quantity

integer

Click quantity

click_quantity_gross

integer

Click quantity gross

lead_commission_canceled

bigdecimal

Lead commission canceled

lead_commission_confirmed

bigdecimal

Lead commission confirmed

lead_commission_open

bigdecimal

Lead commission open

lead_quantity_canceled

integer

Lead quantity canceled

lead_quantity_confirmed

integer

Lead quantity confirmed

lead_quantity_open

integer

Lead quantity open

lead_value_canceled

bigdecimal

Lead value canceled

lead_value_confirmed

bigdecimal

Lead value confirmed

lead_value_open

bigdecimal

Lead value open

lead_value_total

bigdecimal

PLead value total

view_commission

bigdecimal

View commission

view_quantity

integer

View quantity

SQL
CREATE VIEW leadalliance_examples.example_StatisticsByDay AS 
	SELECT * 
	FROM (
		CALL leadalliance.StatisticsByDay (
			date_start => TIMESTAMPADD (SQL_TSI_MONTH , -3, CURDATE ()),
			date_end => CURDATE (),
			period => NULL,
			adspace => NULL,
			admedia => NULL,
			program_id => NULL
		)
) AS x;;
JavaScript errors detected

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

If this problem persists, please contact our support.