Create Affiliate Referral Contract
Affiliate API Endpoint:
https://explodely.com/api/v1/aff
Parameters:
To create an affiliate referral contract (second tier affiliate contract), you need to send below parameters as POST to the affiliate API endpoint.
username - Your Explodely account username
apikey - Your Explodely account API key
apiaction - This should always be set as "createaffcontract"
contract_name - Contract name (for your records)
partner_username - Explodely affiliate ID of the partner
product - Either Explodely product ID for which contract needs to be made or "allproducts"
commission - Up to 80, the percentage of your share the partner will get
start_date - Start date in format dd-mmm-yyyy (01-jan-2024), optional (default: starts right away)
end_date - End date in format dd-mmm-yyyy (31-jan-2024), optional (default: active unless terminated)
max_earnings - value of contract sales after which the contract will expire, optional
max_sales - number of contract sales after which the contract will expire, optional
comments - Comments visible inside Explodely seller contracts section, optional
activate - Activate contract immediately if set as yes, optional (default no)
mutual_termination - If set as yes, the contract terminates after both partner approval, optional (default yes)
Responses:
The API endpoint returns a JSON object.
{"error":"invalidapikey"}
- This is returned when the API key and username is not authenticated.
{"error":"invalid_partnerusername"}
- This is returned when the provided partner_username is not a valid Explodely affiliate account.
{"error":"partner_contract_exists"}
- This is returned when an active contract with partner username already exists.
{"error":"
duplicate_contract"}
- This is returned when the contract is already there.
{"error":"
contract_exists"}
- This is returned when the contract for all products already exists.
{"error":"
commission_limit_exceeded"}
- This is returned when the percentage of your share for all contracts exceeds 80%
{"error":"
failed"}
- This is returned when the contract creation has failed.
{"
contract_created":"ok", "contractid ":"12345"}
- This is returned when the contract has been created where 12345 would be replaced with contract ID of the actual contract which you can use later in other API requests.
Last updated