Partner API

REST endpoints exposed to CBrilliance only. Requests must include the X-Partner-Api-Key header. Only groups that have explicitly opted into CBrilliance investment are accessible — unenrolled group data is never shared.

Authentication

Include this header on every request:

X-Partner-Api-Key: <your-laskad-issued-key>

Keys are provisioned manually by Laskad ops. Missing or invalid keys return 401 Unauthorized.

Base URL

HTTPShttps://api.laskad.app/api/v1

This docs site proxies /api/v1/* transparently to the Laskad production backend. CBrilliance should call https://api.laskad.app/api/v1/... directly.


GET/api/v1/partner/groups

Returns all Laskad contribution groups that have opted into CBrilliance investment. Only groups with a non-null cbrillianceGroupId are included.

Parameters

NameInTypeRequiredDescription
X-Partner-Api-KeyheaderstringrequiredYour Laskad-issued partner API key

Response Fields

FieldTypeDescription
successbooleanAlways true for 2xx responses
countnumberTotal number of opted-in groups
data[]GroupSummary[]Array of group objects
data[].idstringLaskad internal group UUID
data[].jidstringWhatsApp JID (use this to call GET /groups/:jid)
data[].namestringGroup display name
data[].cbrillianceGroupIdstringCBrilliance-side group ID
data[].currentPotBalancestring (decimal)Current escrow balance in Naira
data[].memberCountnumberNumber of participants
data[].activeInvestmentInvestment | nullMost recent investment record, if any

Example Request

curl https://api.laskad.app/api/v1/partner/groups \
  -H "X-Partner-Api-Key: your-key"

Example Response

{
  "success": true,
  "count": 1,
  "data": [
    {
      "id": "group-uuid",
      "jid": "120363238495038290@g.us",
      "name": "Savings Circle 2025",
      "cbrillianceGroupId": "cbr_abc123",
      "currentPotBalance": "450000.00",
      "memberCount": 12,
      "createdAt": "2025-01-15T10:30:00Z",
      "activeInvestment": {
        "id": "inv-uuid",
        "amount": "100000.00",
        "status": "ACTIVE",
        "investedAt": "2025-06-01T09:00:00Z"
      }
    }
  ]
}
GET/api/v1/partner/groups/:jid

Returns full details for a specific group by its WhatsApp JID, including the complete member list and investment history. Returns 404 if the group has not opted into CBrilliance.

Parameters

NameInTypeRequiredDescription
jidpathstringrequiredWhatsApp group JID — URL-encode the @ sign as %40
X-Partner-Api-KeyheaderstringrequiredYour Laskad-issued partner API key

Response Fields

FieldTypeDescription
data.idstringLaskad group UUID
data.jidstringWhatsApp JID
data.namestringGroup display name
data.cbrillianceGroupIdstringCBrilliance group ID
data.currentPotBalancestringCurrent Naira escrow balance
data.memberCountnumberNumber of participants
data.members[]Member[]Full member list with phone numbers
data.members[].phonestringE.164 phone number
data.members[].isAdminbooleanWhether this member is a group admin
data.investmentHistory[]Investment[]All investment records, newest first
data.investmentHistory[].statusstringPENDING | ACTIVE | WITHDRAWING | WITHDRAWN | FAILED
data.investmentHistory[].lockedUntilISO dateInvestment lock-in expiry (default 30 days)

Example Request

# URL-encode @ as %40
curl "https://api.laskad.app/api/v1/partner/groups/120363238495038290%40g.us" \
  -H "X-Partner-Api-Key: your-key"

Example Response

{
  "success": true,
  "data": {
    "id": "group-uuid",
    "jid": "120363238495038290@g.us",
    "name": "Savings Circle 2025",
    "cbrillianceGroupId": "cbr_abc123",
    "currentPotBalance": "450000.00",
    "memberCount": 12,
    "members": [
      {
        "id": "p-1",
        "phone": "2348012345678",
        "isAdmin": true,
        "hasAccount": true,
        "joinedAt": "2025-01-15T10:30:00Z"
      }
    ],
    "investmentHistory": [
      {
        "id": "inv-uuid",
        "amount": "100000.00",
        "status": "ACTIVE",
        "reference": "LSK-INV-1717228800000",
        "investedAt": "2025-06-01T09:00:00Z",
        "lockedUntil": "2025-07-01T09:00:00Z"
      }
    ]
  }
}

Error Codes

StatusMeaning
401Missing or invalid X-Partner-Api-Key
404Group not found, or group has not opted into CBrilliance
500Laskad backend error — retry with exponential backoff
502Proxy error — Laskad backend unreachable, retry in 30s