API

Overview
The Maian Affiliate API has two main functions, to send referrals and to log commissions. The operations for each are shown below, so please read this information carefully. The API should work on most PHP websites/ecommerce platforms. A reasonably good understanding of PHP is required.

To help, on the product manage screen there is a code view page to show you the basic code you need to use.
Requirements
1 Firstly, make sure you have set up an access key in your settings. This is used to validate api calls.

2 Although it is not required, it is highly recommended your affiliate system and API calls are over SSL for security.

3 PHP compiled with CURL & JSON support on any sites where you add the API code.
How Do I Use API?
All data must be sent as an HTTP POST in JSON format to your store index.php file.

The response received from the API is also sent in JSON format. No other formats are available.

It is good practice to send the 'application/json' content type header with your requests. More info in the sections below.
Referrals API
To send referrals to your Maian Affiliate installation.

Information
Commissions API
To send commissions to your Maian Affiliate installation.

Information
Data API
Get data from your affiliate system such as customer commission totals and referrals

Information
Supported Ecommerce Platforms
Some ecommerce systems have built in support for Maian Affiliate. More details here.
G.D.P.R Compliancy
The Maian Affiliate system relies on cookies. These cookies are set only when using the API code and are set on the product websites that transmit data to your Maian Affiliate setup. The cookie contains only the affiliate referral code.

If you have a site in the E.U or a site that has E.U customers, you should inform them of this cookie and what you intend to do with it. Failing to do so will not comply with the G.D.P.R law. Maian Media accepts no responsibilities for companies that choose not to comply with this law!