# List customers

GET https://services.leadconnectorhq.com/affiliate-manager/{locationId}/affiliates/{affiliateId}/customers

Retrieve the list of customers for an affiliate.

## Authentication

Send `Authorization: Bearer <token>` using any one of:

- **Sub-Account token: OAuth access token or Private Integration Token.** Scopes: `affiliate-manager.readonly`
- **Sub-Account token: OAuth access token or Private Integration Token.** Scopes: `affiliate-manager.readonly`

## Parameters

### Header Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `Version` | string | Yes | API Version |

### Path Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `locationId` | string | Yes | Location Id |
| `affiliateId` | string | Yes | Affiliate Id |

### Query Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `query` | string | No | query |
| `status` | string | No | Customer Type |
| `campaignId` | string | No | Campaign Id |
| `skip` | integer | No | Number of customers to skip |
| `limit` | integer | No | Number of customers to return, maximum 100 |
| `commissionStatus` | string | No | Commission Status |

## OpenAPI Specification

```json
{
  "openapi": "3.0.0",
  "info": {
    "title": "HighLevel API",
    "version": "v3"
  },
  "servers": [
    {
      "url": "https://services.leadconnectorhq.com"
    }
  ],
  "paths": {
    "/affiliate-manager/{locationId}/affiliates/{affiliateId}/customers": {
      "get": {
        "summary": "List customers",
        "operationId": "listCustomers",
        "description": "Retrieve the list of customers for an affiliate.",
        "parameters": [
          {
            "name": "Version",
            "in": "header",
            "description": "API Version",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "v3"
              ]
            }
          },
          {
            "name": "locationId",
            "required": true,
            "in": "path",
            "description": "Location Id",
            "schema": {
              "example": "ve9EPM428h8vShlRW1KT",
              "type": "string"
            }
          },
          {
            "name": "affiliateId",
            "required": true,
            "in": "path",
            "description": "Affiliate Id",
            "schema": {
              "example": "ve9EPM428h8vShlRW1KT",
              "type": "string"
            }
          },
          {
            "name": "query",
            "required": false,
            "in": "query",
            "description": "query",
            "schema": {
              "example": "john",
              "type": "string"
            }
          },
          {
            "name": "status",
            "required": false,
            "in": "query",
            "description": "Customer Type",
            "schema": {
              "example": "lead,customer,dropped",
              "type": "string"
            }
          },
          {
            "name": "campaignId",
            "required": false,
            "in": "query",
            "description": "Campaign Id",
            "schema": {
              "example": "ve9EPM428h8vShlRW1KT",
              "type": "string"
            }
          },
          {
            "name": "skip",
            "required": false,
            "in": "query",
            "description": "Number of customers to skip",
            "schema": {
              "minimum": 0,
              "default": 0,
              "example": 0,
              "type": "integer"
            }
          },
          {
            "name": "limit",
            "required": false,
            "in": "query",
            "description": "Number of customers to return, maximum 100",
            "schema": {
              "minimum": 1,
              "maximum": 100,
              "default": 10,
              "example": 10,
              "type": "integer"
            }
          },
          {
            "name": "commissionStatus",
            "required": false,
            "in": "query",
            "description": "Commission Status",
            "schema": {
              "example": "pending,paid,denied,approved,cancelled",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListCustomersResponseDTO"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BadRequestDTO"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UnauthorizedDTO"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UnprocessableDTO"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": [
              "affiliate-manager.readonly"
            ]
          },
          {
            "Location-Access": [
              "affiliate-manager.readonly"
            ]
          }
        ]
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearer": {
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "name": "Authorization",
        "in": "header",
        "description": "Use the Access Token generated with user type as Sub-Account (OR) Private Integration Token of Sub-Account.",
        "type": "http"
      },
      "Location-Access": {
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "name": "Authorization",
        "in": "header",
        "description": "Use the Access Token generated with user type as Sub-Account (OR) Private Integration Token of Sub-Account.",
        "type": "http"
      },
      "Location-Access-Only": {
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "name": "Authorization",
        "in": "header",
        "description": "Use the Access Token generated with user type as Sub-Account.",
        "type": "http"
      },
      "Agency-Access": {
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "name": "Authorization",
        "in": "header",
        "description": "Use the Access Token generated with user type as Agency (OR) Private Integration Token of Agency.",
        "type": "http"
      },
      "Agency-Access-Only": {
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "name": "Authorization",
        "in": "header",
        "description": "Use the Access Token generated with user type as Agency.",
        "type": "http"
      }
    },
    "schemas": {
      "ListCustomersResponseDTO": {
        "type": "object",
        "properties": {
          "customers": {
            "description": "Customers associated with the affiliate",
            "example": [
              {
                "_id": "ve9EPM428h8vShlRW1KT",
                "locationId": "ve9EPM428h8vShlRW1KT",
                "affiliateId": "ve9EPM428h8vShlRW1KT",
                "campaignId": "ve9EPM428h8vShlRW1KT",
                "contactId": "ve9EPM428h8vShlRW1KT",
                "firstName": "John",
                "lastName": "Doe",
                "name": "John Doe",
                "email": "john.doe@example.com",
                "phone": "+15551234567",
                "type": "customer",
                "deleted": false,
                "isDisabled": false,
                "revenue": 100,
                "commissionAmount": 25,
                "planName": "Basic Plan",
                "currency": "USD",
                "locationCurrency": "USD",
                "createdAt": "2026-01-01T00:00:00.000Z",
                "updatedAt": "2026-01-01T00:00:00.000Z"
              }
            ],
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "_id": {
                  "type": "string",
                  "description": "Customer identifier",
                  "example": "ve9EPM428h8vShlRW1KT"
                },
                "locationId": {
                  "type": "string",
                  "description": "Location identifier",
                  "example": "ve9EPM428h8vShlRW1KT"
                },
                "affiliateId": {
                  "type": "string",
                  "description": "Affiliate identifier",
                  "example": "ve9EPM428h8vShlRW1KT"
                },
                "campaignId": {
                  "type": "string",
                  "description": "Campaign identifier",
                  "example": "ve9EPM428h8vShlRW1KT"
                },
                "contactId": {
                  "type": "string",
                  "description": "Contact identifier",
                  "example": "ve9EPM428h8vShlRW1KT"
                },
                "firstName": {
                  "type": "string",
                  "description": "Customer first name",
                  "example": "John"
                },
                "lastName": {
                  "type": "string",
                  "description": "Customer last name",
                  "example": "Doe"
                },
                "email": {
                  "type": "string",
                  "description": "Customer email address",
                  "example": "john.doe@example.com"
                },
                "phone": {
                  "type": "string",
                  "description": "Customer phone number",
                  "example": "+15551234567"
                },
                "type": {
                  "type": "string",
                  "description": "Customer type",
                  "enum": [
                    "lead",
                    "customer",
                    "dropped"
                  ],
                  "example": "customer"
                },
                "subscriptionId": {
                  "type": "string",
                  "description": "Subscription identifier",
                  "example": "sub_123"
                },
                "dueAt": {
                  "type": "string",
                  "description": "Customer due date",
                  "example": "2026-01-01T00:00:00.000Z",
                  "format": "date-time"
                },
                "deleted": {
                  "type": "boolean",
                  "description": "Whether the customer is deleted",
                  "example": false
                },
                "isDisabled": {
                  "type": "boolean",
                  "description": "Whether the customer is disabled",
                  "example": true
                },
                "createdAt": {
                  "type": "string",
                  "description": "Customer creation timestamp",
                  "example": "2026-01-01T00:00:00.000Z",
                  "format": "date-time"
                },
                "updatedAt": {
                  "type": "string",
                  "description": "Customer update timestamp",
                  "example": "2026-01-01T00:00:00.000Z",
                  "format": "date-time"
                },
                "campaign": {
                  "description": "Campaign the customer was attributed to",
                  "example": {
                    "_id": "ve9EPM428h8vShlRW1KT",
                    "name": "Summer Promo",
                    "currency": "USD",
                    "liveMode": true
                  },
                  "allOf": [
                    {
                      "type": "object",
                      "properties": {
                        "_id": {
                          "type": "string",
                          "description": "Campaign identifier",
                          "example": "ve9EPM428h8vShlRW1KT"
                        },
                        "name": {
                          "type": "string",
                          "description": "Campaign name",
                          "example": "Summer Promo"
                        },
                        "trackType": {
                          "type": "string",
                          "description": "What the campaign tracks",
                          "example": "funnels"
                        },
                        "currency": {
                          "type": "string",
                          "description": "Campaign currency",
                          "example": "USD"
                        },
                        "referralPermalink": {
                          "type": "string",
                          "description": "Referral permalink slug",
                          "example": "P0YvWFJd8JDbFjEm2B8v"
                        },
                        "referralRealLink": {
                          "type": "string",
                          "description": "Referral link with the affiliate id placeholder",
                          "example": "https://example.com/payment_page?am_id=<<affiliate_id>>"
                        },
                        "domain": {
                          "type": "string",
                          "description": "Campaign domain",
                          "example": "https://example.com"
                        },
                        "description": {
                          "type": "string",
                          "description": "Campaign description",
                          "example": "Summer promo campaign"
                        },
                        "payoutFrequency": {
                          "type": "string",
                          "description": "Payout frequency",
                          "example": "PAY_15"
                        },
                        "commissionType": {
                          "type": "string",
                          "description": "Commission type",
                          "example": "percentage"
                        },
                        "commission": {
                          "type": "number",
                          "description": "Commission percentage or value",
                          "example": 25
                        },
                        "commissionTier": {
                          "type": "number",
                          "description": "Number of commission tiers",
                          "example": 1
                        },
                        "leadCommissionTier": {
                          "type": "number",
                          "description": "Number of lead commission tiers",
                          "example": 1
                        },
                        "cookieLife": {
                          "type": "number",
                          "description": "Referral cookie lifetime in days",
                          "example": 365
                        },
                        "liveMode": {
                          "type": "boolean",
                          "description": "Whether the campaign is in live mode",
                          "example": true
                        },
                        "deleted": {
                          "type": "boolean",
                          "description": "Whether the campaign is deleted",
                          "example": false
                        },
                        "createdAt": {
                          "type": "string",
                          "description": "Campaign creation timestamp",
                          "example": "2026-01-01T00:00:00.000Z",
                          "format": "date-time"
                        },
                        "updatedAt": {
                          "type": "string",
                          "description": "Campaign update timestamp",
                          "example": "2026-01-01T00:00:00.000Z",
                          "format": "date-time"
                        }
                      },
                      "title": "CustomerCampaignResponseDTO"
                    }
                  ]
                },
                "name": {
                  "type": "string",
                  "description": "Customer first and last name joined",
                  "example": "John Doe"
                },
                "revenue": {
                  "type": "number",
                  "description": "Total revenue attributed to this customer",
                  "example": 100
                },
                "planName": {
                  "type": "string",
                  "description": "Comma-separated plan names the customer has commissions for",
                  "example": "Basic Plan, Pro Plan"
                },
                "commissionAmount": {
                  "type": "number",
                  "description": "Total first-tier commission earned on this customer",
                  "example": 25
                },
                "currency": {
                  "type": "string",
                  "description": "Currency of the commission amounts",
                  "example": "USD"
                },
                "locationCurrency": {
                  "type": "string",
                  "description": "Default currency of the location",
                  "example": "USD"
                }
              },
              "required": [
                "_id",
                "locationId",
                "affiliateId",
                "campaignId",
                "contactId",
                "deleted",
                "isDisabled"
              ],
              "title": "CustomerListItemResponseDTO"
            }
          },
          "meta": {
            "description": "Pagination metadata",
            "example": {
              "count": 1
            },
            "allOf": [
              {
                "type": "object",
                "properties": {
                  "count": {
                    "type": "number",
                    "description": "Total number of matching customers",
                    "example": 1
                  }
                },
                "required": [
                  "count"
                ],
                "title": "ListCustomersMetaDTO"
              }
            ]
          }
        },
        "required": [
          "customers",
          "meta"
        ],
        "title": "ListCustomersResponseDTO"
      },
      "BadRequestDTO": {
        "type": "object",
        "properties": {
          "statusCode": {
            "type": "number",
            "example": 400
          },
          "message": {
            "type": "string",
            "example": "Bad Request"
          }
        },
        "title": "BadRequestDTO"
      },
      "UnauthorizedDTO": {
        "type": "object",
        "properties": {
          "statusCode": {
            "type": "number",
            "example": 401
          },
          "message": {
            "type": "string",
            "example": "Invalid token: access token is invalid"
          },
          "error": {
            "type": "string",
            "example": "Unauthorized"
          }
        },
        "title": "UnauthorizedDTO"
      },
      "UnprocessableDTO": {
        "type": "object",
        "properties": {
          "statusCode": {
            "type": "number",
            "example": 422
          },
          "message": {
            "example": [
              "Unprocessable Entity"
            ],
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "error": {
            "type": "string",
            "example": "Unprocessable Entity"
          }
        },
        "title": "UnprocessableDTO"
      }
    }
  }
}
```

## Code Examples

**cURL**

```bash
curl -L -X GET 'https://services.leadconnectorhq.com/affiliate-manager/<locationId>/affiliates/<affiliateId>/customers' \
  -H 'Authorization: Bearer <TOKEN>' \
  -H 'Version: v3'
```

**Node.js**

```javascript
const options = {
  method: 'GET',
  headers: {
    Authorization: 'Bearer <TOKEN>',
    Version: 'v3'
  }
};

try {
  const response = await fetch('https://services.leadconnectorhq.com/affiliate-manager/<locationId>/affiliates/<affiliateId>/customers', options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

**Python**

```python
import requests

url = "https://services.leadconnectorhq.com/affiliate-manager/{locationId}/affiliates/{affiliateId}/customers"

headers = {
    "Authorization": "Bearer <TOKEN>",
    "Version": "v3"
}

response = requests.get(url, headers=headers)
print(response.json())
```

**PHP**

```php
<?php
$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => 'https://services.leadconnectorhq.com/affiliate-manager/<locationId>/affiliates/<affiliateId>/customers',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_HTTPHEADER => [
    'Authorization: Bearer <TOKEN>',
    'Version: v3',
  ],
]);

$response = curl_exec($curl);
curl_close($curl);
echo $response;
```

**Java**

```java
HttpResponse<String> response = Unirest
  .get("https://services.leadconnectorhq.com/affiliate-manager/<locationId>/affiliates/<affiliateId>/customers")
  .header("Authorization", "Bearer <TOKEN>")
  .header("Version", "v3")
  .asString();
```

**Go**

```go
package main

import (
  "fmt"
  "net/http"
  "io"
)

func main() {
  url := "https://services.leadconnectorhq.com/affiliate-manager/<locationId>/affiliates/<affiliateId>/customers"
  req, _ := http.NewRequest("GET", url, nil)
  req.Header.Add("Authorization", "Bearer <TOKEN>")
  req.Header.Add("Version", "v3")

  res, _ := http.DefaultClient.Do(req)
  defer res.Body.Close()
  body, _ := io.ReadAll(res.Body)
  fmt.Println(string(body))
}
```

**Ruby**

```ruby
require 'uri'
require 'net/http'

url = URI("https://services.leadconnectorhq.com/affiliate-manager/<locationId>/affiliates/<affiliateId>/customers")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = "Bearer <TOKEN>"
request["Version"] = "v3"

response = http.request(request)
puts response.read_body
```

**PowerShell**

```powershell
$headers = @{
  "Authorization" = "Bearer <TOKEN>"
  "Version" = "v3"
}

$response = Invoke-RestMethod -Uri 'https://services.leadconnectorhq.com/affiliate-manager/<locationId>/affiliates/<affiliateId>/customers' -Method 'GET' -Headers $headers
$response | ConvertTo-Json
```
