List promotions
curl --request GET \
--url https://api.1club.ai/v1/platform/promotions \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.1club.ai/v1/platform/promotions"
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/promotions', 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/promotions",
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/promotions"
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/promotions")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.1club.ai/v1/platform/promotions")
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{
"data": [
{
"promotionId": 123,
"name": "<string>",
"description": "<string>",
"type": "discount",
"discountFormat": "percent",
"value": 123,
"code": "<string>",
"autoApply": true,
"startsAt": "2023-11-07T05:31:56Z",
"endsAt": "2023-11-07T05:31:56Z",
"status": "scheduled",
"redemptionCount": 123,
"maxRedemptions": 123,
"maxRedemptionsPerContact": 123,
"visibility": "Public",
"validFor": {
"scopes": [
"classes"
],
"classTypes": [
123
],
"areaTypes": [
123
],
"instructorTypes": [
123
],
"clubIds": [
123
],
"planIds": [
123
],
"allPlans": true
},
"segmentFilter": {
"memberTypes": [
"contact"
],
"tags": [
"<string>"
],
"membershipPlanIds": [
123
],
"membershipPlanCategoryIds": [
123
],
"pipelineStageIds": [
123
],
"sourceIds": [
123
],
"progressionLevelIds": [
123
]
},
"conditions": {
"minPeople": 3,
"timeWindow": {
"startTime": "08:00",
"endTime": "16:00",
"weekdays": [
"monday"
],
"match": "start"
},
"bookingLength": {
"minMinutes": 123,
"maxMinutes": 123
},
"firstBookingOnly": true,
"firstPurchaseOnly": true
},
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
],
"total": 123,
"limit": 123,
"offset": 123
}{
"error": "<string>",
"code": "<string>",
"details": {}
}{
"error": "<string>",
"code": "<string>",
"details": {}
}{
"error": "<string>",
"code": "<string>",
"details": {}
}{
"error": "<string>",
"code": "<string>",
"details": {}
}Promotions
List promotions
The organization’s promotions, newest first: money off that a member reaches by typing its promo code or that applies itself at checkout (autoApply). A discount comes off what is bought, as a percentage or an amount (discountFormat); a voucher is an amount the member keeps as credit.
status places a promotion in its date range: scheduled before it starts, live while it runs, ended after it ends.
GET
/
v1
/
platform
/
promotions
List promotions
curl --request GET \
--url https://api.1club.ai/v1/platform/promotions \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.1club.ai/v1/platform/promotions"
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/promotions', 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/promotions",
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/promotions"
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/promotions")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.1club.ai/v1/platform/promotions")
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{
"data": [
{
"promotionId": 123,
"name": "<string>",
"description": "<string>",
"type": "discount",
"discountFormat": "percent",
"value": 123,
"code": "<string>",
"autoApply": true,
"startsAt": "2023-11-07T05:31:56Z",
"endsAt": "2023-11-07T05:31:56Z",
"status": "scheduled",
"redemptionCount": 123,
"maxRedemptions": 123,
"maxRedemptionsPerContact": 123,
"visibility": "Public",
"validFor": {
"scopes": [
"classes"
],
"classTypes": [
123
],
"areaTypes": [
123
],
"instructorTypes": [
123
],
"clubIds": [
123
],
"planIds": [
123
],
"allPlans": true
},
"segmentFilter": {
"memberTypes": [
"contact"
],
"tags": [
"<string>"
],
"membershipPlanIds": [
123
],
"membershipPlanCategoryIds": [
123
],
"pipelineStageIds": [
123
],
"sourceIds": [
123
],
"progressionLevelIds": [
123
]
},
"conditions": {
"minPeople": 3,
"timeWindow": {
"startTime": "08:00",
"endTime": "16:00",
"weekdays": [
"monday"
],
"match": "start"
},
"bookingLength": {
"minMinutes": 123,
"maxMinutes": 123
},
"firstBookingOnly": true,
"firstPurchaseOnly": true
},
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
],
"total": 123,
"limit": 123,
"offset": 123
}{
"error": "<string>",
"code": "<string>",
"details": {}
}{
"error": "<string>",
"code": "<string>",
"details": {}
}{
"error": "<string>",
"code": "<string>",
"details": {}
}{
"error": "<string>",
"code": "<string>",
"details": {}
}Authorizations
Query Parameters
Was this page helpful?