Softcom API Documentation

Prerequisite

To interact with our API, please complete registration to get authentication credentials. You will need to do a post request to the the url below with the indicated request parameters.

Registration Endpoint

https://softcom.co.ke/extras/api/register

Method

POST

Headers

Accept application/json
Content-Type application/json

Body

            {
                "name": "your full name",
                "email": "your email",
                "password": "your password",
                "password_confirmation": "confirm password"
            }
            

Response

{ "Message": "Your account has been created successfully! Please wait for a confirmation email with further instructions." }

Our team will then verify your registration and contact you via email. There after you will be able to transact with our API as demonstrated below.


Login Endpoint

https://softcom.co.ke/extras/api/login

Method

POST

Headers

Accept application/json
Content-Type application/json

Body

            {
                "email": "your full name",
                "password": "your password"
            }
            

Response

{ "data": { "api_token": "Jzj6F1csrJUuLoGmSedsALVICNX3Q6vYTBgLsozipnA5bHI9RNCWrZTbJVmD" } }

You will now use the api_token generated for you in the previous step to perform the rest of the transactions.


Posting JamboPay Payments

Payment Endpoint

https://softcom.co.ke/extras/api/jpay

Method

POST

Headers

Authorization Bearer <auth_token>

Body

    {
        "facility_id":""
        "patient_number":"",
        "bill_number":"",
        "payer_name":"",
        "amount":"",
        "transaction_id":""
    }

Response

{ "Message": "Payment added successfully!" }

Querying the hospital bill

This will be the most dynamic of all. It will depend on the hospitals public domain.

Bill Query Endpoint

http://caresoft.softcom.co.ke:68/jpay/get/{id}

The id is obtained from patient registration number. eg if the Registration number is Madina-A-001210/17, The id is the unique numeric number 001210 or 1210

Method

GET

Response

{"Status":"Success","BillAmount":5800}