Get payout stats
curl --request GET \
--url https://api.firstpromoter.com/api/v2/company/payouts/stats \
--header 'Account-ID: <account-id>' \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.firstpromoter.com/api/v2/company/payouts/stats"
headers = {
"Account-ID": "<account-id>",
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'Account-ID': '<account-id>', Authorization: 'Bearer <token>'}
};
fetch('https://api.firstpromoter.com/api/v2/company/payouts/stats', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.firstpromoter.com/api/v2/company/payouts/stats",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Account-ID: <account-id>",
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.firstpromoter.com/api/v2/company/payouts/stats"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Account-ID", "<account-id>")
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.firstpromoter.com/api/v2/company/payouts/stats")
.header("Account-ID", "<account-id>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.firstpromoter.com/api/v2/company/payouts/stats")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Account-ID"] = '<account-id>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"meta": {
"net_payout_days": 123,
"payout_cycle": "<string>",
"min_payment": 123,
"min_paying_customers": 123,
"terms_description": "<string>",
"selected_payout_methods": [
"<string>"
],
"payout_method_options": {},
"managed_payouts": true
},
"data": {
"by_paid_period": [
{
"period_start": "2023-11-07T05:31:56Z",
"period_end": "2023-11-07T05:31:56Z",
"promoters_count": 123,
"amounts": {},
"total_incl_tax": 123
}
],
"by_status": {},
"by_payout_method": {}
}
}{
"message": "<string>",
"code": "<string>"
}{
"message": "<string>",
"code": "<string>"
}{
"message": "<string>",
"code": "<string>"
}Payouts
Get payout stats
This endpoint returns statistics about payouts.
HTTP Request
GET https://api.firstpromoter.com/api/v2/company/payouts/statsGET
/
payouts
/
stats
Get payout stats
curl --request GET \
--url https://api.firstpromoter.com/api/v2/company/payouts/stats \
--header 'Account-ID: <account-id>' \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.firstpromoter.com/api/v2/company/payouts/stats"
headers = {
"Account-ID": "<account-id>",
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'Account-ID': '<account-id>', Authorization: 'Bearer <token>'}
};
fetch('https://api.firstpromoter.com/api/v2/company/payouts/stats', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.firstpromoter.com/api/v2/company/payouts/stats",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Account-ID: <account-id>",
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.firstpromoter.com/api/v2/company/payouts/stats"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Account-ID", "<account-id>")
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.firstpromoter.com/api/v2/company/payouts/stats")
.header("Account-ID", "<account-id>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.firstpromoter.com/api/v2/company/payouts/stats")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Account-ID"] = '<account-id>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"meta": {
"net_payout_days": 123,
"payout_cycle": "<string>",
"min_payment": 123,
"min_paying_customers": 123,
"terms_description": "<string>",
"selected_payout_methods": [
"<string>"
],
"payout_method_options": {},
"managed_payouts": true
},
"data": {
"by_paid_period": [
{
"period_start": "2023-11-07T05:31:56Z",
"period_end": "2023-11-07T05:31:56Z",
"promoters_count": 123,
"amounts": {},
"total_incl_tax": 123
}
],
"by_status": {},
"by_payout_method": {}
}
}{
"message": "<string>",
"code": "<string>"
}{
"message": "<string>",
"code": "<string>"
}{
"message": "<string>",
"code": "<string>"
}Authorizations
Access token passed as a Bearer token in the Authorization header
Headers
Account identifier that specifies which account is making the request
Example:
"acc_123456"
Query Parameters
Shows the stats by payout period only for paid payouts
Shows the stats by status (pending, failed, processing, completed)
Shows the stats by payout method
Filter by status
Available options:
pending, completed, failed, processing, cancelled Campaign ids. Can be Integer or Array of Integers
⌘I