Account Information


Endpoint

For getting and updating account information, the base url is:

https://bulk.cloudrebue.co.ke/api/v1

Check Account Balance

Method URI
GET account/balance

{info} Remember to always include the Request header. See how HERE

Sample Success Response

StatusCode 200

Content

{
   "status":true,
   "data":{
      "account_units":"6974",
      "date":"2021-12-03 11:10:44"
   }
}

Top Up

Method URI
POST account/top-up

Request Params

Param Type Description
units string(required) Units to top up a new account
account_id string(required) Account Id of sub account to be topped up
topup_reference string(optional) Top up Reference string generated by your system

Sample Request Body

{
    "units": 100,
    "account_id": 2,
    "topup_reference": SB93461,
}

Sample Success Response

StatusCode 200

Content

{
   "status":true,
   "message":"account top up successful",
   "data":{
      "topup_units":"10",
      "initial_units":"84",
      "updated_units":94,
      "topup_reference":"SB93461",
      "created_at":"2021-12-03 11:22:26"
   }
}

{info} Official SDKs can be obtained HERE. Also consider having a look at our responses format HERE In order to anticipate all the formats our responses are returned in, and hence a better handling of the same.

Sample Error Response

StatusCode 401

Reason Invalid or Missing Token

Content

{
    "status": false,
    "message": "Unauthenticated."
}

{danger} The Generated Auth Token Gives a person full access to your account. Don't share it under any circumstance️