GET
/
referrals
curl --request GET \
  --url https://v2.firstpromoter.com/api/v2/affiliate/referrals \
  --header 'ACCOUNT-ID: <api-key>' \
  --header 'Account-ID: <account-id>' \
  --header 'Authorization: Bearer <token>'
[
  {
    "id": 123,
    "uid": "<string>",
    "state": "subscribed",
    "metadata": {},
    "created_at": "2023-11-07T05:31:56Z",
    "customer_since": "2023-11-07T05:31:56Z",
    "email": "[email protected]",
    "promoter_campaign": {
      "id": 123,
      "campaign_id": 123,
      "created_at": "2023-11-07T05:31:56Z",
      "campaign": {
        "id": 123,
        "name": "<string>",
        "color": "<string>"
      }
    }
  }
]

Authorizations

Authorization
string
header
required

Access token passed as a Bearer token in the Authorization header

ACCOUNT-ID
string
header
required

Account ID required with bearer token

Headers

Account-ID
string
required

Account identifier that specifies which account is making the request

Example:

"acc_123456"

Query Parameters

q
string

Search params. Searches by email, uid, username, website

filters[type]
enum<string>

Type (lead or customer)

Available options:
lead,
customer
filters[state]
enum<string>

State

Available options:
subscribed,
signup,
active,
cancelled,
refunded,
denied,
pending,
moved
filters[created_at][from]
string

created_at start date

filters[created_at][to]
string

created_at end date

filters[customer_since][from]
string

customer_since start date

filters[customer_since][to]
string

customer_since end date

filters[campaign_id]

Campaign ids. Can be Integer or Array of Integers

sorting[state]
enum<string>

The sort by state direction

Available options:
asc,
desc
sorting[email]
enum<string>

The sort by email direction

Available options:
asc,
desc

Response

200
application/json

Successful response

The response is of type object[].