Get what an external program earns the club for a month
curl --request GET \
--url https://api.1club.ai/v1/platform/external-programs/{id}/earnings \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.1club.ai/v1/platform/external-programs/{id}/earnings"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.1club.ai/v1/platform/external-programs/{id}/earnings', 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.1club.ai/v1/platform/external-programs/{id}/earnings",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"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.1club.ai/v1/platform/external-programs/{id}/earnings"
req, _ := http.NewRequest("GET", url, nil)
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.1club.ai/v1/platform/external-programs/{id}/earnings")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.1club.ai/v1/platform/external-programs/{id}/earnings")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"externalProgramId": 123,
"month": "2026-10",
"currency": "<string>",
"hasRates": true,
"clubs": [
{
"clubId": 123,
"clubName": "<string>",
"status": "open",
"monthEnded": true,
"visits": 123,
"amount": 123,
"lines": [
{
"fromVisit": 123,
"toVisit": 123,
"rate": 123,
"visits": 123,
"amount": 123
}
],
"closed": {
"visits": 123,
"amount": 123,
"closedAt": "2023-11-07T05:31:56Z",
"transactionId": 123,
"paymentStatus": "<string>"
}
}
],
"unplacedVisits": 123,
"revenueAccount": {
"id": 123,
"code": "<string>",
"name": "<string>"
}
}{
"error": "<string>",
"code": "<string>",
"details": {}
}{
"error": "<string>",
"code": "<string>",
"details": {}
}{
"error": "<string>",
"code": "<string>",
"details": {}
}{
"error": "<string>",
"code": "<string>",
"details": {}
}{
"error": "<string>",
"code": "<string>",
"details": {}
}External Programs
Get what an external program earns the club for a month
What the club earns from the program for one calendar month of visits made on it, per club: the visits counted on each club’s clock, priced at the program’s visitRates as marginal brackets (visits 1-100 at 3.00 and from 101 at 3.50 earn 405 for 130 visits). This is the money the club bills the program for, apart from what the program covers for members. A month closed in the admin reads as it was closed and names the charge to the program it recorded; closed.visits differing from visits means visits changed since.
GET
/
v1
/
platform
/
external-programs
/
{id}
/
earnings
Get what an external program earns the club for a month
curl --request GET \
--url https://api.1club.ai/v1/platform/external-programs/{id}/earnings \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.1club.ai/v1/platform/external-programs/{id}/earnings"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.1club.ai/v1/platform/external-programs/{id}/earnings', 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.1club.ai/v1/platform/external-programs/{id}/earnings",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"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.1club.ai/v1/platform/external-programs/{id}/earnings"
req, _ := http.NewRequest("GET", url, nil)
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.1club.ai/v1/platform/external-programs/{id}/earnings")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.1club.ai/v1/platform/external-programs/{id}/earnings")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"externalProgramId": 123,
"month": "2026-10",
"currency": "<string>",
"hasRates": true,
"clubs": [
{
"clubId": 123,
"clubName": "<string>",
"status": "open",
"monthEnded": true,
"visits": 123,
"amount": 123,
"lines": [
{
"fromVisit": 123,
"toVisit": 123,
"rate": 123,
"visits": 123,
"amount": 123
}
],
"closed": {
"visits": 123,
"amount": 123,
"closedAt": "2023-11-07T05:31:56Z",
"transactionId": 123,
"paymentStatus": "<string>"
}
}
],
"unplacedVisits": 123,
"revenueAccount": {
"id": 123,
"code": "<string>",
"name": "<string>"
}
}{
"error": "<string>",
"code": "<string>",
"details": {}
}{
"error": "<string>",
"code": "<string>",
"details": {}
}{
"error": "<string>",
"code": "<string>",
"details": {}
}{
"error": "<string>",
"code": "<string>",
"details": {}
}{
"error": "<string>",
"code": "<string>",
"details": {}
}Authorizations
Query Parameters
Response
The month's earnings, per club
What the club earns from an external program for one month of visits, per club. Apart from what the program covers for members.
Was this page helpful?