Get due payout stats
curl --request GET \
--url https://api.firstpromoter.com/api/v2/company/payouts/due_stats \
--header 'Account-ID: <account-id>' \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.firstpromoter.com/api/v2/company/payouts/due_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/due_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/due_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/due_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/due_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/due_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": {
"next": {
"promoters_count": 123,
"amounts": {},
"total_incl_tax": 123,
"due_date": "2023-12-25",
"period_end": "2023-12-25"
},
"overdue": {
"promoters_count": 123,
"amounts": {},
"total_incl_tax": 123,
"due_date": "2023-12-25",
"period_end": "2023-12-25"
},
"custom": {
"promoters_count": 123,
"amounts": {},
"total_incl_tax": 123
}
}
}{
"message": "<string>",
"code": "<string>"
}{
"message": "<string>",
"code": "<string>"
}Payouts
Get due payout stats
This endpoint returns statistics about due payouts.
HTTP Request
GET https://api.firstpromoter.com/api/v2/company/payouts/due_statsGET
/
payouts
/
due_stats
Get due payout stats
curl --request GET \
--url https://api.firstpromoter.com/api/v2/company/payouts/due_stats \
--header 'Account-ID: <account-id>' \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.firstpromoter.com/api/v2/company/payouts/due_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/due_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/due_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/due_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/due_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/due_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": {
"next": {
"promoters_count": 123,
"amounts": {},
"total_incl_tax": 123,
"due_date": "2023-12-25",
"period_end": "2023-12-25"
},
"overdue": {
"promoters_count": 123,
"amounts": {},
"total_incl_tax": 123,
"due_date": "2023-12-25",
"period_end": "2023-12-25"
},
"custom": {
"promoters_count": 123,
"amounts": {},
"total_incl_tax": 123
}
}
}{
"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
Search params. Searches by 'promoter.profile.first_name,promoter.profile.last_name,promoter.user.email`
Filter by status
Available options:
pending, completed, failed, processing, cancelled Campaign ids. Can be Integer or Array of Integers
⌘I