Retrieve the list of affiliates for a account.
GET https://services.leadconnectorhq.com/affiliate-manager/{locationId}/affiliates
Autorización
Bearer token generado desde el portal Leadway. Ver Autenticación.
Version
string
default:"2021-07-28"
required
Versión de la API.
Path parameters
locationId
string
default:"ve9EPM428h8vShlRW1KT"
required
Account Id
Query parameters
campaignId
string
default:"63d376de11be1d26d38f7369"
Maximum number of records to return. Maximum allowed value is 100.
fromDate
string
default:"2023-10-01"
toDate
string
default:"2023-10-01"
Respuestas
200 - Successful response
Affiliate list
_id
string
default:"63d147176c5bbc30e9e091a4"
required
Affiliate id
phone
string
default:"+1 888 888-8888"
Affiliate phone number
Whether the affiliate is deleted
locationId
string
default:"ve9EPM428h8vShlRW1KT"
required
Account id
Whether the affiliate is active
address
string
default:"123 Main St"
Affiliate address
avatar
string
default:"https://example.com/avatar.png"
Affiliate avatar URL
createdAt
string
default:"2024-06-16T00:00:00.000Z"
Created at timestamp
facebookUrl
string
default:"https://facebook.com/johndoe"
Facebook URL
instagramUrl
string
default:"https://instagram.com/johndoe"
Instagram URL
linkedInUrl
string
default:"https://linkedin.com/in/johndoe"
LinkedIn URL
youtubeUrl
string
default:"https://youtube.com/channel"
YouTube URL
websiteUrl
string
default:"https://example.com"
Website URL
contactId
string
default:"ve9EPM428h8vShlRW1KT"
Contact id associated with the affiliate
updatedAt
string
default:"2024-06-16T00:00:00.000Z"
Updated at timestamp
Last updated by audit info
email
string
default:"john.doe@example.com"
required
Affiliate email
{
"affiliates": [
{
"_id": "63d147176c5bbc30e9e091a4",
"firstName": "John",
"lastName": "Doe",
"phone": "+1 888 888-8888",
"deleted": false,
"locationId": "ve9EPM428h8vShlRW1KT",
"active": true,
"address": "123 Main St",
"avatar": "https://example.com/avatar.png",
"createdAt": "2024-06-16T00:00:00.000Z",
"createdBy": {},
"facebookUrl": "https://facebook.com/johndoe",
"instagramUrl": "https://instagram.com/johndoe",
"linkedInUrl": "https://linkedin.com/in/johndoe",
"twitterUrl": "https://twitter.com/johndoe",
"youtubeUrl": "https://youtube.com/channel",
"websiteUrl": "https://example.com",
"contactId": "ve9EPM428h8vShlRW1KT",
"campaignIds": [
"650173614761b33c46d33b19"
],
"vatId": "VAT123",
"updatedAt": "2024-06-16T00:00:00.000Z",
"w8Form": "string",
"w9Form": "string",
"lastUpdatedBy": {},
"email": "john.doe@example.com",
"revenue": 1250.5,
"customer": 15,
"lead": 5,
"droppedCustomer": 2,
"clickCount": 100,
"paid": 500,
"currency": "USD",
"owned": 750
}
// truncado: 2 lineas mas
}
422 - Unprocessable Entity
Ejemplo
curl -X GET 'https://services.leadconnectorhq.com/affiliate-manager/YOUR_locationId/affiliates' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
const response = await fetch('https://services.leadconnectorhq.com/affiliate-manager/YOUR_locationId/affiliates', {
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/affiliates',
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/affiliates');
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);