API Rest

Introduction

The API entry point is https://api.affilae.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.com/2.0/advertiser

Response

JSON Collection
idstringID
titlestringProgram name
slugstringProgram name URL slug
urlstringURL of advertiser's site
/advertiser/{programId} -> Program details
GET https://api.affilae.com/2.0/advertiser/{programId}

Response

JSON Object
titlestringProgam name
slugstringProgram name URL slug
urlstringURL of advertiser's site
teaserstringProgram summary
descriptionstringDetailed program description
termsstringTerms of partnership
tagsstring|nullTags & Key words
modefirst|last|shareConversion attribution mode
default_affiliate_weightintDefault weight of an affiliate
advertiser_weightintWeight of advertiser's site
minimum_amountintMinimum earnings before payment request
approve_affiliates0|1Manual approval of new affiliates
authorize_brand_name0|1Authorize SEO with advertiser's brand name
authorize_text_link0|1Authorize text links
authorize_newsletter0|1Authorize newsletters
authorize_pop_up0|1Authorize pop-ups
authorize_pop_under0|1Authorize pop-unders
authorize_incentive_form0|1Authorize solicitations for CPL
authorize_buy_keywords0|1Authorize key-word purchasing (AdWords, etc...)
authorize_coregistration0|1Authorize co-registration
created_attimestampProgram creation date
idstringProgram ID
rulesjson collection
rules > titlestringName of commission attribution rule
rules > idstringID of commission attribution rule
/advertiser/{programId}/conversions -> List of conversions
GET https://api.affilae.com/2.0/advertiser/{programId}/conversions?parameter=value

Request

Parameter Value Description
identifierstringFilter by conversion identifier (ex: order number, etc...)
partnershipIdstringFilter by partnership
isPending0|1Filter by pending conversions
isLocked0|1Filter by locked conversions
isRefused0|1Filter by refused conversions
dateFromtimestampFilter by conversion date
dateTotimestampFilter by conversion date
skipintIgnore the first x results
limitint 0-100Limit the number of results. Default: 20
orderBydesc|ascOrder results by conversion date. Default: desc
count0|1Return the number of results. Default: 0

Response

JSON Collection {##}
identifierstringConversion identifier (ex: order number, etc...)
amountfloatTotal amount of the conversion
currencystringCurrency of the conversion
customer_idstringConversion client ID
paymentcheque|bankwire|online|other|nullClient's method of payment
modefirst|last|share|manualCommission attribution mode
is_pending0|1Is the conversion pending confirmation
locked_attimestamp|nullDate when the conversion will be locked
refused_attimestamp|nullDate when the conversion was refused
custom_varstring|nullCustom variable
created_attimestampDate of the conversion
idstringID of the conversion
/advertiser/{programId}/conversions/{conversionId} -> Conversion details
GET https://api.affilae.com/2.0/advertiser/{programId}/conversions/{conversionId}

Response

JSON Object
identifierstringConversion identifier (ex: order number, etc...)
amountfloatTotal amount of the conversion
commission_paidfloatTotal amount of the commission paid
paymentcheque|bankwire|online|other|nullClient's method of payment
modefirst|last|share|manualCommission attribution mode
shared_betweenintNumber of affiliates having contributed to the conversion
is_first0|1Did the advertiser initiate the conversion process
cookietimestamp|nullDate of the first visit, if the advertiser initiated the conversion
advertiser_weightint|nullWeight of the advertiser if mode=share
advertiser_percentint|nullPercentage of the commission deducted by the advertiser if is_first=1
from_revenue_sharing0|1Is the conversion recurring
is_pending0|1Is the conversion pending
locked_attimestamp|nullDate when the conversion status will be locked
refused_attimestamp|nullDate at which the conversion was refused
refuse_reasonstringReason for refusing the conversion
custom_varstring|nullCustom variable
created_attimestampDate of the conversion
idstringID of the conversion
rulejson object
rule > titlestringName of the commission attribution rule
rule > idstringID of the commission attribution rule
commissionsjson collection
commissions > idstringID of the commission.
commissions > percent0|floatPercentage of total commissions. Is set to 0 when an external channel of acquisition deducts a fixed commission.
commissions > commissionfloatAmount of a commission
commissions > cookietimestampDate of tracking click
commissions > custom_varstring|nullCustom variables included in the tracking code (#aev)
commissions > referrerstring|nullReferring URL of the affiliate click
commissions > partnershipjson object|voidPartnership
commissions > partnership > idstringID of the affiliate partnership
commissions > partnership > tracking_idintTracking ID
commissions > partnership > affiliateProfilejson objectAffiliate profile
commissions > partnership > affiliateProfile > titlestringName of affiliate profile
commissions > partnership > affiliateProfile > idstringID of affiliate profile
commissions > paymentRequestjson object|voidPayment request associated with this commission if it belongs to an affiliate
commissions > paymentRequest > idstring|nullID of the payment request
/advertiser/{programId}/conversions/{conversionID}/accept -> Accept a conversion
GET https://api.affilae.com/2.0/advertiser/{programId}/conversions/{conversionID}/accept

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

Response

JSON Object
statusdone|aborted|failedStatut of conversion
messagestringMessage
/advertiser/{programId}/conversions/{conversionID}/refuse -> Refuse a conversion
POST https://api.affilae.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_reasonstringReason for conversion refusal

Response

JSON Object
statusdone|aborted|failedStatus of conversion
messagestringMessage
/advertiser/{programId}/conversions/add -> Add a conversion
POST https://api.affilae.com/2.0/advertiser/{programId}/conversions/add

Request

JSON Object in the Body
identifierstringUnique identifier for the conversion
partnership_idstringPartnership ID
amountfloat|0Total amount Excl. Tax of the conversion
commissionfloatTotal amount Excl. Tax of the commission
rule_idstringID of the affected commission attribution rule
custom_varstring|nullOptional custom var

Response

JSON Object
statusdone|aborted|failedStatus of conversion
messagestringMessage
codeintStatus code
/advertiser/{programId}/partnerships -> List of partnerships
GET https://api.affilae.com/2.0/advertiser/{programId}/partnerships?parameter=value

Request

Parameter Value Description
partnershipIdstringFilter by partnership
trackingIdintFilter by affiliate tracking ID
skipintIgnore the first x results
limitint 0-100Limit the number of results. Default: 20
orderBydesc|ascOrder results by subscription date. Default: desc
count0|1Return the number of results. Default: 0

Response

JSON Collection
idstringPartnership ID
tracking_idintAffiliate tracking ID
status0|1|9Affiliate status. 0: Pending approval, 1: Accepted, 9:Refused
url_paramstring|nullCustomized URL tracking parameters
url_sharp_paramstring|nullCustomized URL tracking anchors
weightint [0-12]Affiliate weight in split commission sharing mode
cpcfloat|nullCustomized CPC cost
created_attimestampConversion date
affiliateProfilejson objectAffiliate profile
affiliateProfile > idstringAffiliate profile ID
affiliateProfile > titlestringAffiliate profile name
/advertiser/{programId}/clicks -> List the clicks
GET https://api.affilae.com/2.0/advertiser/{programId}/clicks?parameter=value

Request

Parameter Value Description
partnershipIdstringFilter by partnership
ipstringFilter by IP address
skipintSkip the first x results
limitint 0-100Limit number of results. Default: 20
orderBydesc|ascFilter by creation date. Default: desc
count0|1Return the number of results. Defaut: 0

Response

Collection JSON
cookie_idstringID of the click, written in the cookie too
partnership_idstringAffiliate partnership ID
ad_idstring|nullID of the clicked ad element
cpcfloat|nullCPC of the click
currencystringCurrency of the CPC
custom_varstring|nullCustom variable
referrerstring|nullReferrer of the click
landing_pagestringLanding page of the click
ipstringIP address
created_attimestampDate
/advertiser/{programId}/ads/add-tweet -> Add a tweet
POST https://api.affilae.com/2.0/advertiser/{programId}/ads/add-tweet

Request

JSON object in the body
Parameter Value Description
titlestringTitle of the ad element
urlurlLanding-page URL
contentstringTweet content, must contain the word AFFILIATE_LINK
tagsstringOptional: tags separated by commas

Response

JSON object
statusdone|aborted|failedProcessing status
messagestringMessage
codeintStatus code

Publisher API

/publisher -> List affiliate profiles
GET https://api.affilae.com/2.0/publisher

Response

Collection JSON
idstringID
titlestringProfile name
slugstringProfile name URL slug
urlstringURL of profile's site
/publisher/{profileId} -> Profile details
GET https://api.affilae.com/2.0/publisher/{profileId}

Response

Objet JSON
idstringProfile ID
titlestringProfile name
slugstringProfile name URL slug
urlstringURL of profile's site
teaserstringProfile teaser
descriptionstringProfile description
tagsstring|nullKeywords
pages_viewsint|nullPages viewed / month
unique_visitorsint|nullUnique visitors / month
notification_messagebooleanReceive notifications for new messages
notification_conversionbooleanReceive notifications for new conversions
created_attimestampProfile creation date
/publisher/{profileId}/partnerships -> List of partnerships
GET https://api.affilae.com/2.0/publisher/{profileId}/partnerships?parameter=value

Request

Parameter Value Description
partnershipIdstringFilter by partnership
trackingIdintFilter by affiliate tracking ID
skipintIgnore the first x results
limitint 0-100Limit the number of results. Default: 20
orderBydesc|ascOrder results by partnership date. Default: desc
count0|1Return the number of results. Default: 0

Response

Collection JSON
idstringPartnership ID
tracking_idintAffiliate tracking ID
status0|1|9Partnership status. 0: pending, 1: accepted, 9:refused
url_paramstring|nullCustom URL tracking parameters
url_sharp_paramstring|nullCustom URL tracking anchor parameters
weightint [0-12]Affiliate profile weight in a split payout
cpcfloat|nullCPC custom rate
created_attimestampPartnership creation date
programjson objectProgram
program > idstringProgram ID
program > titlestringProgram name
/publisher/{profileId}/commissions -> List commissions
GET https://api.affilae.com/2.0/publisher/{profileId}/commissions?parameter=value

Request

Parameter Value Description
identifierstringFilter by conversion ID (order id...)
partnershipIdstringFilter by partnership
isPending0|1Filter by pending commissions
isLocked0|1Filtrer by locked commissions
isRefused0|1Filtrer by refused commissions
dateFromtimestampFiltrer by commissions date
dateTotimestampFiltrer by commissions date
skipintIgnore the first x results
limitint 0-100Limit the number of results. Default: 20
orderBydesc|ascOrder results by partnership date. Default: desc
count0|1Return the number of results. Default: 0

Response

Collection JSON
idstringCommission ID
identifierstringConversion ID (order ID...)
commissionfloatCommission's amount
amountfloatConversion's amount (CPA only)
percentfloatPercentage of global commission's amount in a split payout
currencystringCommission's currency
is_pendingbooleanThe commission is pending or not
locked_attimestamp|nullDate when the commission will be locked at
refused_attimestamp|nullDate when the commission has been refused
refuse_reasonstring|nullReason why the commission has been refused
cookietimestamp|nullTracking started at
referrerstring|nullURL of clic referrer
landing_pagestring|nullURL of clic landing page
custom_varstring|nullCustom variable passed in the tracking
created_attimestampDate of the conversion
partnershipjson objectPartnership
partnership > idstringPartnership ID
paymentRequestjson objectPayment request (if exists)
paymentRequest > idstringPayment request ID

Tagged: API