Retrieve the list of commissions for a account.
GET https://services.leadconnectorhq.com/affiliate-manager/{locationId}/commissions
Authorization
Path parameters
Query parameters
Responses
200 - Successful response
commissions (object[], required): Commission list
_id (string, required): Commission id Example: 6385d230f6d19db03eef6fb2
productId (string): Product id Example: 6385d230f6d19db03eef6fb2
productName (string): Product name Example: Basic Plan
qty (number): Quantity Example: 1
productCommission (number): Product commission amount Example: 25
commissionAmount (number): Commission amount Example: 25
amount (number): Base amount Example: 100
unitDiscount (number): Unit discount Example: 5
campaignName (string): Campaign name Example: Summer Promo
commission (number): Commission percentage or value Example: 25
commissionType (string): Commission type Example: percentage
transactionAt (string): Transaction time Example: 2024-06-16T00:00:00.000Z
transactionId (string): Transaction id Example: txn_123
affiliateId (string): Affiliate id Example: 6385d230f6d19db03eef6fb2
payoutId (string): Payout id Example: 6385d230f6d19db03eef6fb2
status (string): Commission status Example: pending
currency (string): Currency Example: USD
isTrial (boolean): Whether the item is a trial commission Example: False
customer (object): Customer details
createdAt (string): Created at Example: 2024-06-16T00:00:00.000Z
eventId (string): Event id Example: evt_123
campaign (object): Campaign details
affiliate (object): Affiliate details
dueAt (string): Due date Example: 2024-06-30T00:00:00.000Z
liveMode (boolean): Whether the commission is in live mode Example: True
tier (number): Commission tier Example: 1
meta (object): Pagination metadata
{
"commissions": [
{
"_id": "6385d230f6d19db03eef6fb2",
"productId": "6385d230f6d19db03eef6fb2",
"productName": "Basic Plan",
"qty": 1,
"productCommission": 25,
"commissionAmount": 25,
"amount": 100,
"unitDiscount": 5,
"campaignName": "Summer Promo",
"commission": 25,
"commissionType": "percentage",
"transactionAt": "2024-06-16T00:00:00.000Z",
"transactionId": "txn_123",
"affiliateId": "6385d230f6d19db03eef6fb2",
"payoutId": "6385d230f6d19db03eef6fb2",
"status": "pending",
"currency": "USD",
"isTrial": false,
"createdAt": "2024-06-16T00:00:00.000Z",
"eventId": "evt_123",
"dueAt": "2024-06-30T00:00:00.000Z",
"liveMode": true,
"tier": 1
}
]
}
400 - Bad Request
401 - Unauthorized
422 - Unprocessable Entity
Example
curl -X GET 'https://services.leadconnectorhq.com/affiliate-manager/YOUR_locationId/commissions' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
const response = await fetch('https://services.leadconnectorhq.com/affiliate-manager/YOUR_locationId/commissions', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/affiliate-manager/YOUR_locationId/commissions',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
<?php
$ch = curl_init('https://services.leadconnectorhq.com/affiliate-manager/YOUR_locationId/commissions');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);