Get all payouts grouped by promoters
curl --request GET \
--url https://api.firstpromoter.com/api/v2/company/payouts/group_by_promoters \
--header 'Account-ID: <account-id>' \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.firstpromoter.com/api/v2/company/payouts/group_by_promoters"
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/group_by_promoters', 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/group_by_promoters",
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/group_by_promoters"
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/group_by_promoters")
.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/group_by_promoters")
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{
"data": [
{
"promoter": {
"id": 123,
"email": "<string>",
"name": "<string>",
"invoice_details_status": "<string>",
"fraud_suspicions": [
"<string>"
],
"profile": {
"invoice_details_validation_errors": {}
}
},
"payout_method": {
"id": 123,
"method": "<string>",
"date_added": "2023-11-07T05:31:56Z",
"is_disabled": true,
"meta": {},
"is_selected": true,
"details": {},
"managed_payouts": true
},
"payouts": [
{
"id": 123,
"amount": 123,
"payments_batch_id": 123,
"tax_rate": 123,
"unit": "<string>",
"period_start": "2023-11-07T05:31:56Z",
"period_end": "2023-11-07T05:31:56Z",
"paid_at": "2023-11-07T05:31:56Z",
"processing_started_at": "2023-11-07T05:31:56Z",
"failed_at": "2023-11-07T05:31:56Z",
"error": "<string>",
"total_incl_tax": 123,
"created_at": "2023-11-07T05:31:56Z",
"payout_method": {
"id": 123,
"method": "<string>",
"date_added": "2023-11-07T05:31:56Z",
"is_disabled": true,
"meta": {},
"is_selected": true,
"details": {},
"managed_payouts": true
},
"promoter": {
"id": 123,
"email": "<string>",
"name": "<string>"
},
"campaign": {
"id": 123,
"name": "<string>",
"color": "<string>"
}
}
],
"is_amount_payable": true,
"payout_ids": [
123
],
"amount": 123,
"total_incl_tax": 123
}
],
"meta": {
"total": 123,
"promoters_count": 123,
"total_incl_tax": 123,
"due_date": "2023-12-25",
"period_end": "2023-12-25"
}
}{
"message": "<string>",
"code": "<string>"
}{
"message": "<string>",
"code": "<string>"
}Payouts
Get all payouts grouped by promoters
This endpoint returns all payouts but grouped by promoters.
HTTP Request
GET https://api.firstpromoter.com/api/v2/company/payouts/group_by_promotersGET
/
payouts
/
group_by_promoters
Get all payouts grouped by promoters
curl --request GET \
--url https://api.firstpromoter.com/api/v2/company/payouts/group_by_promoters \
--header 'Account-ID: <account-id>' \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.firstpromoter.com/api/v2/company/payouts/group_by_promoters"
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/group_by_promoters', 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/group_by_promoters",
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/group_by_promoters"
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/group_by_promoters")
.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/group_by_promoters")
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{
"data": [
{
"promoter": {
"id": 123,
"email": "<string>",
"name": "<string>",
"invoice_details_status": "<string>",
"fraud_suspicions": [
"<string>"
],
"profile": {
"invoice_details_validation_errors": {}
}
},
"payout_method": {
"id": 123,
"method": "<string>",
"date_added": "2023-11-07T05:31:56Z",
"is_disabled": true,
"meta": {},
"is_selected": true,
"details": {},
"managed_payouts": true
},
"payouts": [
{
"id": 123,
"amount": 123,
"payments_batch_id": 123,
"tax_rate": 123,
"unit": "<string>",
"period_start": "2023-11-07T05:31:56Z",
"period_end": "2023-11-07T05:31:56Z",
"paid_at": "2023-11-07T05:31:56Z",
"processing_started_at": "2023-11-07T05:31:56Z",
"failed_at": "2023-11-07T05:31:56Z",
"error": "<string>",
"total_incl_tax": 123,
"created_at": "2023-11-07T05:31:56Z",
"payout_method": {
"id": 123,
"method": "<string>",
"date_added": "2023-11-07T05:31:56Z",
"is_disabled": true,
"meta": {},
"is_selected": true,
"details": {},
"managed_payouts": true
},
"promoter": {
"id": 123,
"email": "<string>",
"name": "<string>"
},
"campaign": {
"id": 123,
"name": "<string>",
"color": "<string>"
}
}
],
"is_amount_payable": true,
"payout_ids": [
123
],
"amount": 123,
"total_incl_tax": 123
}
],
"meta": {
"total": 123,
"promoters_count": 123,
"total_incl_tax": 123,
"due_date": "2023-12-25",
"period_end": "2023-12-25"
}
}{
"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
Set it true to include the payout_method_details
Filters payouts by the minimum payment amount possible
Filters payouts by invoiceable
Available options:
true, false, not_set ⌘I