Wificall Developers Docs

Introduction

This document describes how developers can request for and use the Wificall API. With Wificall, you can quickly make and receive voice calls in your application. Highlighted below are the docs, code samples, helper libraries, and developer tools you need.

Phone call

This allows you make phone calls based on the supplied criteria

Resource URL
https://api.tizeti.com/developers/v1/dev_call
Resources Information

HTTP Method: POST

Authentication Headers


    Type:application/json 
    Authorization:Bearer {Token}

Parameters
Name Required Description Default Value Example
Called Required The initiator of the call 090********
Calling Required The receiver of the call 080********
Callerid Required The unique identifier of the call 081********
Token Required Get your token from the login API
Example Request
    
        {"called":"081xxxxxxxx","calling":"080xxxxxxxx","callerid":"012xxxxxxx","username":"123xxxxxxx"}
    
    
Here's a response from that request
    
        {
            "status": true,
            "message": "Success - Fast Callback request has been placed",
            "result": 520
        }
    
    
Login

This method logs in users based on supplied criteria

Resource URL
http://api.tizeti.com/developers/v1/wificall/signin
Resources Information

HTTP Method: POST

Authentication Headers

    
        Type:application/json 
        Authorization:Bearer {Token}
    
    
Parameters
Name Required Description Default Value Example
Email Yes The email address of the user johndoe@xxxx.com
Password Yes The password of the user *******
Example Request

        {	
            "email":"johndoe@xxxx.com",
            "password":"********",
            
            }
            

Here's a response from that request

        {
            "_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6Ijg4ZjE3NmExLTM2MTctNGY0Mi04NTc2LWI0MGU5MzI1N2QzYCIsImlhdCI6MTU1Mzg3MDQ0NH0.TxnyZ4S_8Eri5YWchsmxX48WHYiGp-uWE8jpjJmVRZY",
            "sip": {
                "username": "123xxxxxxx",
                "cardid": "1xx",
                "password": "*********"
            },
            "status": "success",
            "userDetails": {
                "id": "88f176a1-xxxx-xxxx-xxxx",
                "firstName": "john",
                "lastName": "doe",
                "email": "johndoe@xxxx.com",
                "user_balance": "0"
            }
        }
        

Payment

This method gets logged on user based on supplied criteria.

Resources URL
https://api.tizeti.com/developers/v1/initialize
Resources Information

HTTP Method: POST

Authentication Headers

        
            Type:application/json 
            Authorization:Bearer {Token}
        
        
Parameters
Name Required Description Default Value Example
amount Required The receiver of the call YES 10,000
email Required The initiator of the call YES jwill@gmail.com
cardid Required The unique identifier of the call YES 231
Example Request
    
        {	
            "amount": "4000",
            "email": “johndoe@xxxx.com",
            “cardid”: “1xx”
        }
                                                        
    
Here's a response from that request
    
        {
            "status": true,
            "message": "Authorization URL created",
            "data": {
                "authorization_url": "https://checkout.paystack.com/kjuwhypslcqt4yi",
                "access_code": "kjuwhypslcqt4yi",
                "reference": "Wc811475bf4"
            }
        }                                                    
    
    
Call history

This allows you get recent calls based on supplied criteria.

Resources URL
https://api.tizeti.com/developers/v1/wificall/recentCalls
Resources Information

HTTP Method: GET

Authentication Headers

        
            Type:application/json 
            Authorization:Bearer {Token}
        
        
Example Response
    
        {
            "status": true,
            "message": "GetCallsHistory SUCCESS",
            "result": [
                {
                    "id": "182787",
                    "sessionid": "PJSIP/3207004584-00001ccf",
                    "uniqueid": "1553598478.46803",
                    "card_id": "241",
                    "nasipaddress": "",
                    "starttime": "2019-03-26 11:08:07",
                    "stoptime": "2019-03-26 11:08:18",
                    "sessiontime": "11",
                    "calledstation": "23410353304091",
                    "sessionbill": "-0",
                    "id_tariffgroup": "1",
                    "id_tariffplan": "2",
                    "id_ratecard": "2",
                    "id_trunk": "4",
                    "sipiax": "0",
                    "src": “John Doe”,
                    "id_did": null,
                    "buycost": "0.00000",
                    "id_card_package_offer": null,
                    "real_sessiontime": "11",
                    "dnid": "unknown",
                    "terminatecauseid": "1",
                    "destination": "Nigeria WIFICALLNG",
                    "prefix": "2341"
                },
                {
                    "id": "182779",
                    "sessionid": "PJSIP/3207004584-00001cc4",
                    "uniqueid": "1553598437.46782",
                    "card_id": "241",
                    "nasipaddress": "",
                    "starttime": "2019-03-26 11:07:23",
                    "stoptime": "2019-03-26 11:07:27",
                    "sessiontime": "4",
                    "calledstation": "23410353304091",
                    "sessionbill": "-0",
                    "id_tariffgroup": "1",
                    "id_tariffplan": "2",
                    "id_ratecard": "2",
                    "id_trunk": "4",
                    "sipiax": "0",
                    "src": “John Doe”,
                    "id_did": null,
                    "buycost": "0.00000",
                    "id_card_package_offer": null,
                    "real_sessiontime": "4",
                    "dnid": "unknown",
                    "terminatecauseid": "1",
                    "destination": "Nigeria WIFICALLNG",
                    "prefix": "2341"
                }
        }
        
    
    
Filter Call history

This allows you get recent calls based on supplied criteria.

Resources URL
api.tizeti.com/developers/v1/wificall/recentCalls/:pageNumber?from=2019-02-27&to=2019-07-30
Resources Information

HTTP Method: GET

Authentication Headers


    Type:application/json 
    Authorization:Bearer {Token}

Example Response

{
    "status": true,
    "message": "GetCallsHistory SUCCESS",
    "result": [
        {
            "id": "182787",
            "sessionid": "PJSIP/3207004584-00001ccf",
            "uniqueid": "1553598478.46803",
            "card_id": "241",
            "nasipaddress": "",
            "starttime": "2019-03-26 11:08:07",
            "stoptime": "2019-03-26 11:08:18",
            "sessiontime": "11",
            "calledstation": "23410353304091",
            "sessionbill": "-0",
            "id_tariffgroup": "1",
            "id_tariffplan": "2",
            "id_ratecard": "2",
            "id_trunk": "4",
            "sipiax": "0",
            "src": “John Doe”,
            "id_did": null,
            "buycost": "0.00000",
            "id_card_package_offer": null,
            "real_sessiontime": "11",
            "dnid": "unknown",
            "terminatecauseid": "1",
            "destination": "Nigeria WIFICALLNG",
            "prefix": "2341"
        },
        {
            "id": "182779",
            "sessionid": "PJSIP/3207004584-00001cc4",
            "uniqueid": "1553598437.46782",
            "card_id": "241",
            "nasipaddress": "",
            "starttime": "2019-03-26 11:07:23",
            "stoptime": "2019-03-26 11:07:27",
            "sessiontime": "4",
            "calledstation": "23410353304091",
            "sessionbill": "-0",
            "id_tariffgroup": "1",
            "id_tariffplan": "2",
            "id_ratecard": "2",
            "id_trunk": "4",
            "sipiax": "0",
            "src": “John Doe”,
            "id_did": null,
            "buycost": "0.00000",
            "id_card_package_offer": null,
            "real_sessiontime": "4",
            "dnid": "unknown",
            "terminatecauseid": "1",
            "destination": "Nigeria WIFICALLNG",
            "prefix": "2341"
        }
    ],
    "limit": 20,
    "no_of_records": "30"
}


Get Details of Users in Section

This method gets logged on user based on supplied criteria.

Resources URL
https://api.tizeti.com/developers/v1/wificall/activeUserDetails
Resources Information

HTTP Method: GET

Authentication Headers

        
            Type:application/json 
            Authorization:Bearer {Token}
        
        
Parameters
Name Required Description Default Value Example
Called YES The receiver of the call 090********
Calling YES The initiator of the call 080********
Callerid YES The unique identifier of the call 081********
Username YES The username of the call 090********
Example Response
    
        {
            "id": "88f176a1-xxxx-xxxx-xxxx",
            "firstName": "John",
            "lastName": "Doe",
            "email": "johndoe@gmail.com",
            "user_balance": "0",
            "plan_id": "1",
            "admin_status": false,
            "address": "here at now",
            "phoneNumber": "081xxxxxxxx",
            "twitter": "@nkeen",
            "instagram": "@keen",
            "state_of_origin": "Anambra",
            "lga": "Anao",
            "verification_status": null,
            "utility_bill": null,
            "id_verification": "https://wificallrecord.s3.amazonaws.com/document_uploads/88251449507339680310.jpeg",
            "profile_picture": "https://wificallrecord.s3.amazonaws.com/document_uploads/83426985778534660822.jpeg",
            "user_sip": {
                "username": "123xxxxxxx",
                "cardid": "2xx",
                "password": "62zjs6q670",
                "workgroup": "JohnDoe",
                "referral_code": "6858551"
            },
            "plan": {
                "name": "Business unlimited plan"
            }
        }
        
                                                        
    
Plan list

This method gets subscription plan list based on supplied criteria.

Resources URL
https://api.tizeti.com/developers/v1/wificall/planlist
Resources Information

HTTP Method: GET

Authentication Headers

    
        Type:application/json 
        Authorization:Bearer {Token}
    
    
OTP

This is a ONE TIME PASSWORD API for phone number verification. The endpoint makes an automated call to the phone number in the request body and plays back to OTP code set in the request body.

Resources URL
api.tizeti.com/developers/v1/wificall/otp
Resources Information

HTTP Method: POST

Authentication Headers

    
        Type:application/json 
        Authorization:Bearer {Token}
    
    
Parameters
Name Value Required Description
phoneNumber 081******** YES The number awaiting verification
code 1111 YES OTP to be sent
Example Request

        {	
            "phoneNumber":"johndoe@xxxx.com",
            "code":"********",
            
            }
            

Here's a response from that request

    {
        "status": true,
        "message": "Success - Fast Callback request has been placed",
        "result": ****
    }
        

OTP Verification

This API validates the OTP password being passed by the user to know if the user filled in the right OTP pin or not. The call_id params is the result response from the OTP API

Resources URL
api.tizeti.com/developers/v1/wificall/verifyLoginCode?call_id=1234
Resources Information

HTTP Method: POST

Authentication Headers

    
        Type:application/json 
        Authorization:Bearer {Token}
    
    
Parameters
Name Value Required Description
code 1234 YES OTP to be played back to the user, it's a four digit number
Example Response
    
{
    "status": true,
    "message": "Callback request found",
    "result": [
        {
            "status": "SENT",
            "uniqueid": "yx7jq-99928acrx***********",
            "callback_time": "2019-11-04 11:38:31",
            "data": "****"
        }
    ]
}
                                                        
    
Response Codes
Parameters
Code Description Resolution
200 Request Successful
403 you missed a body parameter please fill all fields
422 Request not Successful please check your account status, request failed