API V2

Apr 07, 2017

The API entry point is https://api.affilae.staging1.kaizen-developments.com/2.0/ and is only accessible through the HTTPS protocol.

The data exchange format is in JSON.

Authentication

To connect to the API, you must generate an access key through your dashboard menu “My Account” > “API Key”.
Your user code will also be supplied to you at this point.

Should your user account not have administrator privileges or has restricted rights, these rights will be identical in the API.

Authentication takes place through the HTTP header Authorization: Basic user:password where the string user:password must be Base 64 encoded. The user is your user code and the password is your API key.

Advertiser API


/advertiser -> List available programs

GET https://api.affilae.staging1.kaizen-developments.com/2.0/advertiser

Response

JSON Collection

id string ID
title string Program name
slug string Program name URL slug
url string URL of advertiser’s site


/advertiser/{programId} -> Program details

GET https://api.affilae.staging1.kaizen-developments.com/2.0/advertiser/{programId}

Response

JSON Object

title string Progam name
slug string Program name URL slug
url string URL of advertiser’s site
teaser string Program summary
description string Detailed program description
terms string Terms of partnership
tags string|null Tags & Key words
mode first|last|share Conversion attribution mode
default_affiliate_weight int Default weight of an affiliate
advertiser_weight int Weight of advertiser’s site
minimum_amount int Minimum earnings before payment request
approve_affiliates 0|1 Manual approval of new affiliates
authorize_brand_name 0|1 Authorize SEO with advertiser’s brand name
authorize_text_link 0|1 Authorize text links
authorize_newsletter 0|1 Authorize newsletters
authorize_pop_up 0|1 Authorize pop-ups
authorize_pop_under 0|1 Authorize pop-unders
authorize_incentive_form 0|1 Authorize solicitations for CPL
authorize_buy_keywords 0|1 Authorize key-word purchasing (AdWords, etc…)
authorize_coregistration 0|1 Authorize co-registration
created_at timestamp Program creation date
id string Program ID
rules json collection
rules > title string Name of commission attribution rule
rules > id string ID of commission attribution rule


/advertiser/{programId}/conversions -> List of conversions

GET https://api.affilae.staging1.kaizen-developments.com/2.0/advertiser/{programId}/conversions?parameter=value

Request

Parameter Value Description
identifier string Filter by conversion identifier (ex: order number, etc…)
partnershipId string Filter by partnership
isPending 0|1 Filter by pending conversions
isLocked 0|1 Filter by locked conversions
isRefused 0|1 Filter by refused conversions
dateFrom timestamp Filter by conversion date
dateTo timestamp Filter by conversion date
skip int Ignore the first x results
limit int 0-100 Limit the number of results. Default: 20
orderBy desc|asc Order results by conversion date. Default: desc
count 0|1 Return the number of results. Default: 0

Response

JSON Collection

{##}

identifier string Conversion identifier (ex: order number, etc…)
amount float Total amount of the conversion
currency string Currency of the conversion
customer_id string Conversion client ID
payment cheque|bankwire|online|other|null Client’s method of payment
mode first|last|share|manual Commission attribution mode
is_pending 0|1 Is the conversion pending confirmation
locked_at timestamp|null Date when the conversion will be locked
refused_at timestamp|null Date when the conversion was refused
custom_var string|null Custom variable
created_at timestamp Date of the conversion
id string ID of the conversion


/advertiser/{programId}/conversions/{conversionId} -> Conversion details

GET https://api.affilae.staging1.kaizen-developments.com/2.0/advertiser/{programId}/conversions/{conversionId}

Response

JSON Object

identifier string Conversion identifier (ex: order number, etc…)
amount float Total amount of the conversion
commission_paid float Total amount of the commission paid
payment cheque|bankwire|online|other|null Client’s method of payment
mode first|last|share|manual Commission attribution mode
shared_between int Number of affiliates having contributed to the conversion
is_first 0|1 Did the advertiser initiate the conversion process
cookie timestamp|null Date of the first visit, if the advertiser initiated the conversion
advertiser_weight int|null Weight of the advertiser if mode=share
advertiser_percent int|null Percentage of the commission deducted by the advertiser if is_first=1
from_revenue_sharing 0|1 Is the conversion recurring
is_pending 0|1 Is the conversion pending
locked_at timestamp|null Date when the conversion status will be locked
refused_at timestamp|null Date at which the conversion was refused
refuse_reason string Reason for refusing the conversion
custom_var string|null Custom variable
created_at timestamp Date of the conversion
id string ID of the conversion
rule json object
rule > title string Name of the commission attribution rule
rule > id string ID of the commission attribution rule
commissions json collection
commissions > id string ID of the commission.
commissions > percent 0|float Percentage of total commissions. Is set to 0 when an external channel of acquisition deducts a fixed commission.
commissions > commission float Amount of a commission
commissions > cookie timestamp Date of tracking click
commissions > custom_var string|null Custom variables included in the tracking code (#aev)
commissions > referrer string|null Referring URL of the affiliate click
commissions > partnership json object|void Partnership
commissions > partnership > id string ID of the affiliate partnership
commissions > partnership > tracking_id int Tracking ID
commissions > partnership > affiliateProfile json object Affiliate profile
commissions > partnership > affiliateProfile > title string Name of affiliate profile
commissions > partnership > affiliateProfile > id string ID of affiliate profile
commissions > paymentRequest json object|void Payment request associated with this commission if it belongs to an affiliate
commissions > paymentRequest > id string|null ID of the payment request

/advertiser/{programId}/conversions/{conversionID}/accept -> Accept a conversion

GET https://api.affilae.staging1.kaizen-developments.com/2.0/advertiser/{programId}/conversions/{conversionID}/accept

This conversion must be of status pending approval, not locked or refused.

Response

JSON Object

status done|aborted|failed Statut of conversion
message string Message


/advertiser/{programId}/conversions/{conversionID}/refuse -> Refuse a conversion

POST https://api.affilae.staging1.kaizen-developments.com/2.0/advertiser/{programId}/conversions/{conversionID}/refuse

The conversion must either be pending, or non-locked and accepted.

Request

JSON Object in the Body

refuse_reason string Reason for conversion refusal

Response

JSON Object

status done|aborted|failed Status of conversion
message string Message

/advertiser/{programId}/conversions/add -> Add a conversion

POST https://api.affilae.staging1.kaizen-developments.com/2.0/advertiser/{programId}/conversions/add

Request

JSON Object in the Body

identifier string Unique identifier for the conversion
partnership_id string Partnership ID
amount float|0 Total amount Excl. Tax of the conversion
commission float Total amount Excl. Tax of the commission
rule_id string ID of the affected commission attribution rule
custom_var string|null Optional custom var

Response

JSON Object

status done|aborted|failed Status of conversion
message string Message
code int Status code


/advertiser/{programId}/partnerships -> List of partnerships

GET https://api.affilae.staging1.kaizen-developments.com/2.0/advertiser/{programId}/partnerships?parameter=value

Request

Parameter Value Description
partnershipId string Filter by partnership
trackingId int Filter by affiliate tracking ID
skip int Ignore the first x results
limit int 0-100 Limit the number of results. Default: 20
orderBy desc|asc Order results by subscription date. Default: desc
count 0|1 Return the number of results. Default: 0

Response

JSON Collection

id string Partnership ID
tracking_id int Affiliate tracking ID
status 0|1|9 Affiliate status. 0: Pending approval, 1: Accepted, 9:Refused
url_param string|null Customized URL tracking parameters
url_sharp_param string|null Customized URL tracking anchors
weight int [0-12] Affiliate weight in split commission sharing mode
cpc float|null Customized CPC cost
created_at timestamp Conversion date
affiliateProfile json object Affiliate profile
affiliateProfile > id string Affiliate profile ID
affiliateProfile > title string Affiliate profile name


/advertiser/{programId}/clicks -> List the clicks

GET https://api.affilae.staging1.kaizen-developments.com/2.0/advertiser/{programId}/clicks?parameter=value

Request

Parameter Value Description
partnershipId string Filter by partnership
ip string Filter by IP address
skip int Skip the first x results
limit int 0-100 Limit number of results. Default: 20
orderBy desc|asc Filter by creation date. Default: desc
count 0|1 Return the number of results. Defaut: 0

Response

Collection JSON

cookie_id string ID of the click, written in the cookie too
partnership_id string Affiliate partnership ID
ad_id string|null ID of the clicked ad element
cpc float|null CPC of the click
currency string Currency of the CPC
custom_var string|null Custom variable
referrer string|null Referrer of the click
landing_page string Landing page of the click
ip string IP address
created_at timestamp Date


/advertiser/{programId}/ads/add-tweet -> Add a tweet

POST https://api.affilae.staging1.kaizen-developments.com/2.0/advertiser/{programId}/ads/add-tweet

Request

JSON object in the body

Parameter Value Description
title string Title of the ad element
url url Landing-page URL
content string Tweet content, must contain the word AFFILIATE_LINK
tags string Optional: tags separated by commas

Response

JSON object

status done|aborted|failed Processing status
message string Message
code int Status code

Publisher API


/publisher -> List affiliate profiles

GET https://api.affilae.staging1.kaizen-developments.com/2.0/publisher

Response

Collection JSON

id string ID
title string Profile name
slug string Profile name URL slug
url string URL of profile’s site


/publisher/{profileId} -> Profile details

GET https://api.affilae.staging1.kaizen-developments.com/2.0/publisher/{profileId}

Response

Objet JSON

id string Profile ID
title string Profile name
slug string Profile name URL slug
url string URL of profile’s site
teaser string Profile teaser
description string Profile description
tags string|null Keywords
pages_views int|null Pages viewed / month
unique_visitors int|null Unique visitors / month
notification_message boolean Receive notifications for new messages
notification_conversion boolean Receive notifications for new conversions
created_at timestamp Profile creation date


/publisher/{profileId}/partnerships -> List of partnerships

GET https://api.affilae.staging1.kaizen-developments.com/2.0/publisher/{profileId}/partnerships?parameter=value

Request

Parameter Value Description
partnershipId string Filter by partnership
trackingId int Filter by affiliate tracking ID
skip int Ignore the first x results
limit int 0-100 Limit the number of results. Default: 20
orderBy desc|asc Order results by partnership date. Default: desc
count 0|1 Return the number of results. Default: 0

Response

Collection JSON

id string Partnership ID
tracking_id int Affiliate tracking ID
status 0|1|9 Partnership status. 0: pending, 1: accepted, 9:refused
url_param string|null Custom URL tracking parameters
url_sharp_param string|null Custom URL tracking anchor parameters
weight int [0-12] Affiliate profile weight in a split payout
cpc float|null CPC custom rate
created_at timestamp Partnership creation date
program json object Program
program > id string Program ID
program > title string Program name


/publisher/{profileId}/commissions -> List commissions

GET https://api.affilae.staging1.kaizen-developments.com/2.0/publisher/{profileId}/commissions?parameter=value

Request

Parameter Value Description
identifier string Filter by conversion ID (order id…)
partnershipId string Filter by partnership
isPending 0|1 Filter by pending commissions
excludeNull 0|1 Exclude commission at 0
isLocked 0|1 Filtrer by locked commissions
isRefused 0|1 Filtrer by refused commissions
dateFrom timestamp Filtrer by commissions date
dateTo timestamp Filtrer by commissions date
skip int Ignore the first x results
limit int 0-100 Limit the number of results. Default: 20
orderBy desc|asc Order results by partnership date. Default: desc
count 0|1 Return the number of results. Default: 0

Response

Collection JSON

id string Commission ID
identifier string Conversion ID (order ID…)
commission float Commission’s amount
amount float Conversion’s amount (CPA only)
percent float Percentage of global commission’s amount in a split payout
currency string Commission’s currency
is_pending boolean The commission is pending or not
locked_at timestamp|null Date when the commission will be locked at
refused_at timestamp|null Date when the commission has been refused
refuse_reason string|null Reason why the commission has been refused
cookie timestamp|null Tracking started at
referrer string|null URL of clic referrer
landing_page string|null URL of clic landing page
custom_var string|null Custom variable passed in the tracking
created_at timestamp Date of the conversion
partnership json object Partnership
partnership > id string Partnership ID
paymentRequest json object Payment request (if exists)
paymentRequest > id string Payment request ID

More articles