Skip to main content
GET
/
api
/
v1
/
agents
/
{id}
/
balance
curl -X GET "https://olive-gateway-a6ba.onrender.com/api/v1/agents/agent_abc123/balance" \
  -H "Authorization: Bearer olive_live_xxx"
{
  "success": true,
  "agent_id": "agent_abc123",
  "business_name": "ABC Money Services",
  "balance": 150000000,
  "balance_formatted": "1,500,000.00 SLE",
  "currency": "SLE",
  "last_transaction_at": "2025-01-15T10:30:00Z"
}

Request

Authorization
string
required
Bearer olive_live_xxx or Bearer eyJ... (JWT)

Path Parameters

id
string
required
Agent UUID (e.g., agent_abc123)

Response

agent_id
string
Agent UUID
balance
integer
Float balance in cents
balance_formatted
string
Formatted balance (e.g., 1,500,000.00 SLE)
currency
string
Currency code (SLE)

Examples

curl -X GET "https://olive-gateway-a6ba.onrender.com/api/v1/agents/agent_abc123/balance" \
  -H "Authorization: Bearer olive_live_xxx"
{
  "success": true,
  "agent_id": "agent_abc123",
  "business_name": "ABC Money Services",
  "balance": 150000000,
  "balance_formatted": "1,500,000.00 SLE",
  "currency": "SLE",
  "last_transaction_at": "2025-01-15T10:30:00Z"
}

Use Cases

Before Cash-In

Verify sufficient float before processing

Daily Reconciliation

Check end-of-day float position

Errors

StatusCodeDescription
401UNAUTHORIZEDInvalid API key
403FORBIDDENNot authorized to view balance
404NOT_FOUNDAgent not found
500INTERNAL_ERRORServer error