Complete documentation for integrating with our services
https://gramlsocial.com/api/v1/
All API requests require an API key. Include it in the request headers:
X-API-Key: your_api_key_here
Get Your API Key
/healthCheck if the API is operational (no authentication required).
Example:curl https://gramlsocial.com/api/v1/health
Response:
{
"status": "success",
"data": {
"healthy": true,
"time": "2026-05-02 08:37:14"
}
}
/productsRetrieve all available products with real-time stock levels.
Parameters:limit - Number of products (default: 50, max: 100)curl -H "X-API-Key: YOUR_API_KEY" \
"https://gramlsocial.com/api/v1/products?limit=10"
Response:
{
"status": "success",
"data": [
{
"id": 1468,
"name": "X(TWITTER) CREATED AROUND 1 MONTH",
"price": 500,
"stock": 185,
"price_formatted": "₦500.00"
}
]
}
/my/balanceView your wallet balance in Nigerian Naira (₦).
Example:curl -H "X-API-Key: YOUR_API_KEY" \
https://gramlsocial.com/api/v1/my/balance
Response:
{
"status": "success",
"data": {
"balance": 8500.50,
"currency": "NGN",
"balance_formatted": "₦8,500.50",
"username": "Rxpress12"
}
}
/purchasePurchase a product using your wallet balance. Account details delivered instantly.
Request Body:{
"product_id": 1468,
"quantity": 1
}
Example:
curl -X POST \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"product_id":1468,"quantity":1}' \
https://gramlsocial.com/api/v1/purchase
Response (Success):
{
"status": "success",
"message": "Purchase successful",
"data": {
"order_id": 42920,
"transaction_id": "API-69F5B7BAA10B6-1777711034",
"product": {
"id": 1468,
"name": "X(TWITTER) CREATED AROUND 1 MONTH",
"price": 500
},
"quantity": 1,
"total": 500,
"total_formatted": "₦500.00",
"balance_remaining": 8500.50,
"balance_formatted": "₦8,500.50",
"accounts": ["username:password@email.com:password"]
}
}
/my/ordersRetrieve your purchase history.
Parameters:limit - Number of orders (default: 20)curl -H "X-API-Key: YOUR_API_KEY" \
"https://gramlsocial.com/api/v1/my/orders?limit=10"
<?php
class GramlSocialAPI {
private $apiKey;
private $baseUrl = 'https://gramlsocial.com/api/v1/';
public function __construct($apiKey) {
$this->apiKey = $apiKey;
}
private function request($endpoint, $method = 'GET', $data = null) {
$ch = curl_init($this->baseUrl . $endpoint);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'X-API-Key: ' . $this->apiKey,
'Content-Type: application/json'
]);
if ($method == 'POST' && $data) {
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));
}
return json_decode(curl_exec($ch), true);
}
public function getBalance() {
return $this->request('my/balance');
}
public function getProducts($limit = 50) {
return $this->request("products?limit=$limit");
}
public function purchase($productId, $quantity = 1) {
return $this->request('purchase', 'POST', [
'product_id' => $productId,
'quantity' => $quantity
]);
}
public function getOrders($limit = 20) {
return $this->request("my/orders?limit=$limit");
}
}
// Usage
$api = new GramlSocialAPI('YOUR_API_KEY');
$balance = $api->getBalance();
echo $balance['data']['balance_formatted'];
?>
import requests
class GramlSocialAPI:
def __init__(self, api_key):
self.api_key = api_key
self.base_url = "https://gramlsocial.com/api/v1/"
self.headers = {"X-API-Key": api_key}
def get_balance(self):
response = requests.get(f"{self.base_url}my/balance", headers=self.headers)
return response.json()
def get_products(self, limit=50):
response = requests.get(f"{self.base_url}products?limit={limit}", headers=self.headers)
return response.json()
def purchase(self, product_id, quantity=1):
data = {"product_id": product_id, "quantity": quantity}
response = requests.post(f"{self.base_url}purchase", headers=self.headers, json=data)
return response.json()
def get_orders(self, limit=20):
response = requests.get(f"{self.base_url}my/orders?limit={limit}", headers=self.headers)
return response.json()
# Usage
api = GramlSocialAPI("YOUR_API_KEY")
balance = api.get_balance()
print(balance['data']['balance_formatted'])
200 - Success400 - Bad Request (invalid parameters)401 - Unauthorized (invalid API key)404 - Not Found500 - Internal Server Error