Affiliate Links
Get Affiliate Links
The "Get Affiliate Links" API enables users to retrieve a list of affiliate links associated with their account. Affiliate links are used for tracking referrals and commissions in affiliate marketing programs. This API provides access to crucial affiliate link details, aiding affiliates in monitoring their performance and earnings.
Endpoint:
api/customer/affiliate/links
Http Method:
GET
Before using the "Get Affiliate Link History" API, ensure that the system's configuration includes the enable_affiliate
setting, which should be enabled. This setting determines whether the affiliate functionality is active or not.
- Success Response:
You can check more details about Affiliate Link Resource.
{
"code": 200,
"message": "Success",
"data": {
"id": 1,
"url": "https://www.doc.supercommerce.io?referral=R5kvn5yBFGN70B4lEJR7",
"referral": "R5kvn5yBFGN70B4lEJR7",
"affiliate_id": 32,
"expiration_date": "2023-10-07 16:17:04",
"history_count": 0,
"created_at": "2023-09-07 16:17:04"
},
"meta": []
}
Check the following section to learn more about the Get Affiliate Links API Reference
Create Affiliate Link
The "Create Affiliate Link" API allows users to create a new affiliate link. Affiliate links are used for tracking referrals and commissions in affiliate marketing programs. This API provides access to crucial affiliate link details, aiding affiliates in monitoring their performance and earnings.
Endpoint:
api/customer/affiliate/links
Http Method:
POST
Ensure that the system's configuration includes the enable_affiliate
setting, which should be enabled. This setting determines whether the affiliate functionality is active or not.
- Request Body:
Key | Type | Description |
---|---|---|
url | string | The URL of the affiliate link. |
- Success Response:
You can check more details about Affiliate Link Resource.
{
"code": 200,
"message": "Success",
"data": {
"id": 1,
"url": "https://www.doc.supercommerce.io?referral=R5kvn5yBFGN70B4lEJR7",
"referral": "R5kvn5yBFGN70B4lEJR7",
"affiliate_id": 32,
"expiration_date": "2023-10-07 16:17:04",
"history_count": 0,
"created_at": "2023-09-07 16:17:04"
},
"meta": []
}
Check the following section to learn more about the Create Affiliate Links API Reference
Set Clicked Affiliate Link
The "Set Clicked Affiliate Link" API is a valuable tool for retrieving historical data about how affiliate links were used.
Endpoint:
api/customer/affiliate/links/history
Http Method:
GET
Success Response:
Key | Type | Description |
---|---|---|
id | Integer | The ID of the affiliate link history. |
user_ip | string | The IP address of the user who clicked the affiliate link. |
user_id | Integer | The ID of the user who clicked the affiliate link. |
link_id | Integer | The ID of the affiliate link. |
{
"code": 200,
"message": "Success",
"data": {
"user_ip": "156.215.23.28",
"user_id": 32,
"link_id": 1,
"updated_at": "2023-09-07T13:38:00.000000Z",
"created_at": "2023-09-07T13:38:00.000000Z",
"id": 1
},
"meta": []
}
Check the following section to learn more about the Set Clicked Affiliate Link API Reference