Knowledgebase : API Documentation > SMS API
Add Funds
Posted by Administrator on 25 January 2018 01:53 am

This HTTP API is used to top clients account. The API assumes that you have done external payment validation. You account should also have reseller rights to make the API call.

Authorization

The methods below need reseller's authentication token set in header of the call. You have to add Authorization field with value IBBSO ibAuthCookie (e.i. Authorization = IBSSO ibAuthCookie).

You can get your auth token by calling login method:

POST https://sms.enet.co.ke/1/customerProfile/login

Header Parameters

NameValuesDescription
Accept application/json Only application/json
username reseller username  
password reseller password  

Request Parameters

NameDescriptionParameter Type
username Reseller Username alphanumeric
password Reseller Password mixed characters

Return Parameters

NameValuesDescription
verified true/false true if login successfull, else false
ibAuthCookie d40097a0-921b-4f6f-b9bf-42573974e1c7 authentication token which needs to be in header of all other method calls on this page

Examples

POST /1/customerProfile/login HTTP/1.1
Host: sms.enet.co.ke
Accept: application/json

Success Response

{
  "login": {
    "verified": true,
    "ibAuthCookie": "d40072a0-921b-4f6f-b9bf-42223974e1c7"
  }
}

Error Reponse

{
  "requestError": {
    "clientCorrelator": null,
    "serviceException": {
      "messageId": "LOGIN_ERROR",
      "text": "Login error",
      "variables": null,
      "additionalDescription": null
    },
    "variables": null
  }
}

Add Funds

POST https://sms.enet.co.ke/1/customerProfile/payments/funds

Header Parameters

NameValuesDescription
Accept application/json Only application/json
Authorization (required) IBSSO <ibAuthCookie>  

Request Parameters

NameDescriptionParameter Type
accountKey client's account whose balance will be updated. Mandatory alphanumeric
ammount value to be added. Mandatory ammount can be negative numberic
currencycode currency code (ISO 4217) Optional: in case currency is not entered, balance will be
updated in client's currency
string
description transaction description. Mandatory string

Return Parameters

NameValuesDescription
verified true/false true if login successfull, else false
ibAuthCookie d40097a0-921b-4f6f-b9bf-42573974e1c7 authentication token which needs to be in header of all other method calls on this page

Examples

POST /1/customerProfile/payments/funds HTTP/1.1
Host: sms.enet.co.ke
Accept: application/json

Success Response

{
  "transactionId": 653498
}

Error Response

{
  "requestError": {
    "clientCorrelator": null,
    "serviceException": {
      "messageId": "UNAUTHORIZED",
      "text": "Unauthorized",
      "variables": null,
      "additionalDescription": null
    },
    "variables": null
  }
}