GroupService Beta API v2 — Secure Bearer token authentication for integrating our services.
Send Code — POST your email to ?action=send_verify to receive a 6-digit verification code by email
Register — POST your email + verification code to ?action=register to receive your API key (keep this secret!)
Get Token — POST your API key to ?action=token to receive a Bearer token (JWT, expires in 1 hour)
Access Premium — Use Authorization: Bearer <token> header to access protected endpoints
Transaction History — Use the same Bearer token to fetch your authorised purchase transaction history
Returns the full public product catalogue. No authentication required.
GET /beta/api/?action=products
curl https://www.groupservice.co.za/beta/api/?action=products
import requests
response = requests.get("https://www.groupservice.co.za/beta/api/?action=products")
products = response.json()
print(products)
fetch("https://www.groupservice.co.za/beta/api/?action=products")
.then(res => res.json())
.then(data => console.log(data.products));
{
"status": "success",
"message": "Public product list",
"products": [
{
"Product": "Advisory & Strategy",
"Description": "Roadmaps, planning and more.",
"Cost": "R0.00"
}
]
}
Step 1 of registration. Sends a 6-digit OTP to the supplied email address. The code expires in 10 minutes. Max 3 requests per 15 minutes per address.
POST /beta/api/?action=send_verify
Content-Type: application/json
{
"email": "you@example.com"
}
curl -X POST https://www.groupservice.co.za/beta/api/?action=send_verify \
-H "Content-Type: application/json" \
-d '{"email": "you@example.com"}'
{
"status": "sent",
"message": "A 6-digit verification code has been sent to you@example.com. Enter it below to complete registration.",
"expires_in": 600
}
Step 2 of registration. Submit your email and the verification code you received to create your account and receive an API key.
POST /beta/api/?action=register
Content-Type: application/json
{
"email": "you@example.com",
"verify_code": "482917"
}
curl -X POST https://www.groupservice.co.za/beta/api/?action=register \
-H "Content-Type: application/json" \
-d '{"email": "you@example.com", "verify_code": "482917"}'
import requests
BASE_URL = "https://www.groupservice.co.za/beta/api/"
# Step 1: Request verification code (sent to your email)
requests.post(f"{BASE_URL}?action=send_verify", json={"email": "you@example.com"})
# Step 2: Register with the code from your email
code = input("Enter the 6-digit code from your email: ")
response = requests.post(
f"{BASE_URL}?action=register",
json={"email": "you@example.com", "verify_code": code}
)
data = response.json()
print("Your API Key:", data["api_key"])
# Store this key securely - you'll need it to get access tokens
// Step 1: send the verification code
await fetch("https://www.groupservice.co.za/beta/api/?action=send_verify", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ email: "you@example.com" })
});
// Step 2: register with the code received by email
fetch("https://www.groupservice.co.za/beta/api/?action=register", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ email: "you@example.com", verify_code: "482917" })
})
.then(res => res.json())
.then(data => {
console.log("API Key:", data.api_key);
});
{
"status": "registered",
"message": "Registration successful. Use your api_key with the token endpoint...",
"email": "you@example.com",
"api_key": "gs_a1b2c3d4e5f6...",
"next_step": "POST /?action=token with your api_key to get an access token"
}
Exchange your API key for a JWT Bearer token. Tokens expire after 1 hour.
POST /beta/api/?action=token
Content-Type: application/json
{
"api_key": "gs_your_api_key_here"
}
curl -X POST https://www.groupservice.co.za/beta/api/?action=token \
-H "Content-Type: application/json" \
-d '{"api_key": "gs_a1b2c3d4e5f6..."}'
import requests
api_key = "gs_a1b2c3d4e5f6..." # Your stored API key
response = requests.post(
"https://www.groupservice.co.za/beta/api/?action=token",
json={"api_key": api_key}
)
token_data = response.json()
access_token = token_data["access_token"]
print("Bearer Token:", access_token)
print("Expires in:", token_data["expires_in"], "seconds")
const apiKey = "gs_a1b2c3d4e5f6..."; // Your stored API key
fetch("https://www.groupservice.co.za/beta/api/?action=token", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ api_key: apiKey })
})
.then(res => res.json())
.then(data => {
console.log("Access Token:", data.access_token);
console.log("Expires at:", data.expires_at);
// Use this token in Authorization header for premium endpoints
});
{
"status": "success",
"message": "Token generated successfully. Use it in the Authorization header...",
"access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"token_type": "Bearer",
"expires_in": 3600,
"expires_at": "2024-01-15T15:30:00+00:00"
}
Access the premium product and service catalogue. Requires a valid Bearer token from the token endpoint.
Authorization: Bearer <your_access_token>
curl https://www.groupservice.co.za/beta/api/?action=premium \
-H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
import requests
access_token = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
response = requests.get(
"https://www.groupservice.co.za/beta/api/?action=premium",
headers={"Authorization": f"Bearer {access_token}"}
)
premium = response.json()
print(premium["premium_content"])
const accessToken = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...";
fetch("https://www.groupservice.co.za/beta/api/?action=premium", {
headers: { "Authorization": `Bearer ${accessToken}` }
})
.then(res => res.json())
.then(data => console.log(data.premium_content));
import requests
BASE_URL = "https://www.groupservice.co.za/beta/api/"
# Step 1: Register (one-time)
reg_response = requests.post(f"{BASE_URL}?action=register", json={"email": "you@example.com"})
api_key = reg_response.json()["api_key"]
# Step 2: Get access token
token_response = requests.post(f"{BASE_URL}?action=token", json={"api_key": api_key})
access_token = token_response.json()["access_token"]
# Step 3: Access premium content
premium_response = requests.get(
f"{BASE_URL}?action=premium",
headers={"Authorization": f"Bearer {access_token}"}
)
print(premium_response.json()["premium_content"])
{
"status": "success",
"message": "Premium content for you@example.com",
"authenticated_as": "you@example.com",
"premium_content": [
{
"Product": "Advanced Threat Intelligence",
"Description": "Real-time threat feeds...",
"Price": "R2500.00",
"Tier": "Enterprise",
"Availability": "Available"
}
]
}
{
"error": "Authentication required.",
"message": "Provide a valid Bearer token in the Authorization header...",
"example": "Authorization: Bearer <your_access_token>"
}
{
"error": "Invalid or expired token.",
"message": "Your token is invalid or has expired. Use the token endpoint with your api_key to obtain a new one."
}
Retrieve the full purchase transaction history. Authorised registered users only. Returns customer names, national IDs, card numbers, products purchased, and payment status.
Authorization: Bearer <your_access_token>
curl https://www.groupservice.co.za/beta/api/?action=transactions \
-H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
import requests
access_token = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
response = requests.get(
"https://www.groupservice.co.za/beta/api/?action=transactions",
headers={"Authorization": f"Bearer {access_token}"}
)
data = response.json()
for txn in data["transactions"]:
print(txn["TransactionID"], txn["CustomerName"], txn["Amount"])
const accessToken = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...";
fetch("https://www.groupservice.co.za/beta/api/?action=transactions", {
headers: { "Authorization": `Bearer ${accessToken}` }
})
.then(res => res.json())
.then(data => console.log(data.transactions));
{
"status": "success",
"message": "Transaction history for you@example.com",
"authenticated_as": "you@example.com",
"record_count": 10,
"transactions": [
{
"TransactionID": "TXN-20260101-001",
"Date": "2026-01-01",
"CustomerName": "John Peters Cartoon",
"NationalID": "2001014800086",
"Product": "Advanced Threat Intelligence",
"Amount": "2500.00",
"CardNumber": "4111111111111111",
"CardType": "Visa",
"Status": "Completed"
}
]
}
| 200 | Success / Token generated |
| 201 | Registration successful |
| 400 | Bad request (missing email or API key) |
| 401 | Invalid API key or expired/invalid Bearer token |
| 402 | 402 Payment Required to access the requested resource |
| 405 | Wrong HTTP method |
| 409 | Email already registered (returns existing key) |
Test the API directly from your browser.
Click a button above to make a request...