Get Tracking Link Revenue Stats
Get revenue statistics associated with a tracking link.
Retrieve revenue statistics for a specific tracking link, optionally filtered by a date range.
https://v1.apifansly.com/api/fansly
GET
/{account_id}/tracking-links/revenue-stats
Get Started
All requests to the Fansly API require an API Key. See the Authentication page for details.
curl -X GET "https://v1.apifansly.com/api/fansly/{account_id}/tracking-links/revenue-stats?trackingLinkId=id" \
-H "x-api-key: YOUR_API_KEY"fetch("https://v1.apifansly.com/api/fansly/{account_id}/tracking-links/revenue-stats?trackingLinkId=id", {
method: "GET",
headers: {
"x-api-key": "YOUR_API_KEY"
}
})
.then(response => response.json())
.then(data => console.log(data));import requests
url = "https://v1.apifansly.com/api/fansly/{account_id}/tracking-links/revenue-stats?trackingLinkId=id"
headers = {
"x-api-key": "YOUR_API_KEY"
}
response = requests.get(url, headers=headers)
print(response.json())import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://v1.apifansly.com/api/fansly/{account_id}/tracking-links/revenue-stats?trackingLinkId=id"))
.header("x-api-key", "YOUR_API_KEY")
.GET()
.build();
client.sendAsync(request, HttpResponse.BodyHandlers.ofString())
.thenApply(HttpResponse::body)
.thenAccept(System.out::println)
.join();using System.Net.Http;
using System.Threading.Tasks;
var client = new HttpClient();
client.DefaultRequestHeaders.Add("x-api-key", "YOUR_API_KEY");
var response = await client.GetAsync("https://v1.apifansly.com/api/fansly/{account_id}/tracking-links/revenue-stats?trackingLinkId=id");
var responseString = await response.Content.ReadAsStringAsync();
Console.WriteLine(responseString);package main
import (
"fmt"
"io/ioutil"
"net/http"
)
func main() {
url := "https://v1.apifansly.com/api/fansly/{account_id}/tracking-links/revenue-stats?trackingLinkId=id"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Set("x-api-key", "YOUR_API_KEY")
client := &http.Client{}
resp, _ := client.Do(req)
defer resp.Body.Close()
body, _ := ioutil.ReadAll(resp.Body)
fmt.Println(string(body))
}Path Parameters
account_id*
stringThe unique identifier for the connected account, retrieved from your Dashboard.
Query Parameters
trackingLinkId*
stringThe unique identifier of the tracking link.
before ?
numberFilters results to include data before this Unix timestamp (ms).
after ?
numberFilters results to include data after this Unix timestamp (ms).