Keke Policy
Last updated
Last updated
POST
https://sandbox.insurpass.com/api/merchant/initiate_keke_pass_policy
This method initiates the creation of a keke insurance policy, it returns a token which must then be verified before the policy can be created successfully.
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
{
"success":true,
"data":{
"token":"IDP163446435012295714"
},
"response_message":"Keke policy initiated successfully",
"response_code":""
}
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://sandbox.insurpass.com/api/merchant/initiate_keke_pass_policy',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS =>'{
"first_name": "James",
"last_name": "Robert",
"phone_number": "08045754345",
"email": "idukpaye@mailinator.com",
"gender": "male",
"address": "main street",
"relationship": "brother",
"amount_insured": 6000,
"identity": "str",
"nok_surname": "John",
"nok_othernames": "Doe",
"nok_relationship": "Brother",
"nok_gender": "Male",
"nok_phone_no": "09034543643",
"nok_email_address": "jdoe@insurpass.com",
"product_id":2,
"id_url":"https://gmail.com",
"id_number":"2424253642",
"id_type":"nin"
}
',
CURLOPT_HTTPHEADER => array(
'Authorization: Bearer {{SECRETKEY}}',
'Content-Type: application/json'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;initiate_keke_pass_policy
var axios = require('axios');
var data = JSON.stringify({
"first_name": "James",
"last_name": "Robert",
"phone_number": "08045754345",
"email": "idukpaye@mailinator.com",
"gender": "male",
"address": "main street",
"relationship": "brother",
"amount_insured": 6000,
"identity": "str",
"nok_surname": "John",
"nok_othernames": "Doe",
"nok_relationship": "Brother",
"nok_gender": "Male",
"nok_phone_no": "09034543643",
"nok_email_address": "jdoe@insurpass.com",
"product_id":2,
"id_url":"https://gmail.com",
"id_number":"2424253642",
"id_type":"nin"
}
);
var config = {
method: 'post',
url: 'https://sandbox.insurpass.com/api/merchant/initiate_keke_pass_policy',
headers: {
'Authorization': 'Bearer {{SECRETKEY}}',
'Content-Type': 'application/json'
},
data: data
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
curl --location --request POST https://sandbox.insurpass.com/api/merchant/initiate_keke_pass_policy' \
--header 'Authorization: Bearer {{SECRETKEY}}' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data-raw '{
"first_name": "James",
"last_name": "Robert",
"phone_number": "08045754345",
"email": "idukpaye@mailinator.com",
"gender": "male",
"address": "main street",
"relationship": "brother",
"amount_insured": 6000,
"identity": "str",
"nok_surname": "John",
"nok_othernames": "Doe",
"nok_relationship": "Brother",
"nok_gender": "Male",
"nok_phone_no": "09034543643",
"nok_email_address": "jdoe@insurpass.com",
"product_id":2,
"id_url":"https://gmail.com",
"id_number":"2424253642",
"id_type":"nin"
}'
POST
https://sandbox.insurpass.com/api/merchant/verify_keke_pass_policy
{
"success": true,
"response_message": "Keke pass policy was created successfully",
"response_code": "",
"data": {
"id": 58,
"variant_type": "Malaria Care Plan Plus",
"product_id": 2,
"amount_insured": 600,
"policy_number": "UIC/RE/INP/KPASS/20102022/94731",
"nok_surname": "John",
"nok_othernames": "Doe",
"nok_relationship": "Brother",
"nok_gender": "Male",
"nok_phone_no": "09034543643",
"nok_email": "jdoe@insurpass.com",
"start_date": "2022-10-20T12:42:40.735549Z",
"end_date": "2023-10-19T12:42:40.735567Z",
"status": 1,
"product_code": "KPASS",
"created_at": "2022-10-20T12:42:28.000000Z",
"updated_at": "2022-10-20T12:42:40.000000Z",
"product": {
"id": 2,
"name": "Malaria Care Plan Plus",
"details": "<p><strong>Malaria Care Plus Plan</strong></p><p>The Malaria Care Plus Plan provides customers with malaria test and treatment at over 1700 partner pharmacies nationwide, hospital expense reimbursement to treat any illness, and a life insurance benefit.</p><p><strong><br></strong></p><p><strong>Benefits </strong></p><p></p><ul><li>Quality malaria test and drugs.</li><li>The customer gets one treatment per month.</li><li>Zero waiting time at partner pharmacies.</li><li>4 days waiting period after payment.</li><li>Upon the demise of a customer, the Malaria Care Plus Plan pays the customer's beneficiary a life insurance benefit of #100,000.</li><li>If the customer falls ill and is admitted to a hospital for two or more nights, this plan pays the customer a hospital expense reimbursement of #20,000 </li></ul><p></p><p><strong>Futuristic Benefits</strong> </p><p></p><ul><li>Regular blood pressure checks </li><li>Diabetics screening </li><li>Chat with a health professional on your phone</li></ul><p></p><p><strong>Price </strong></p><p><span style=\"font-weight: var(--bs-body-font-weight); text-align: var(--bs-body-text-align);\">The Malaria Care Plus plan costs #600 per month per customer</span><br></p>",
"beneficiaries": true,
"max_beneficiaries": 3,
"provider_id": 1,
"logo_url": "logo.png",
"enable": true,
"created_at": "2022-04-06T14:01:52.000000Z",
"updated_at": "2022-04-09T09:25:57.000000Z",
"service_id": 1,
"product_class_id": 0
}
}
}
The Initiate token expires in 15 minutes, and if a user does not verify his/her subscription after 15 minutes of initiation, the details of the subscription will be deleted.
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://sandbox.insurpass.com/api/merchant/verify_keke_pass_policy',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS =>'{
"token": "IDP1664732927341151853"
}',
CURLOPT_HTTPHEADER => array(
'Authorization: Bearer {{SECRETKEY}}',
'Content-Type: application/json'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
var axios = require('axios');
var data = JSON.stringify({
"token": "IDP1664732927341151853"
});
var config = {
method: 'post',
url: 'https://sandbox.insurpass.com/api/merchant/verify_keke_pass_policy',
headers: {
'Authorization': 'Bearer {{SECRETKEY}}',
'Content-Type': 'application/json'
},
data: data
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
curl --location --request POST https://sandbox.insurpass.com/api/merchant/verify_keke_pass_policy' \
--header 'Authorization: Bearer {{SECRETKEY}}' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data-raw '{
"token": "IDP163446435012295714"
}'
GET
https://sandbox.insurpass.com/api/merchant/merchant_keke_pass_policies
{
"success":true,
"response_message":"Policies retrieved successfully",
"response_code":"",
"data":[
{
"email":"salami@gmail.com",
"first_name":"required|string",
"surname":"required|string",
"id":17,
"amount_insured":6000,
"variant_type":"confaam",
"policy_number":"INS1646729784609"
}
]
}
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://sandbox.insurpass.com/api/merchant/merchant_keke_pass_policies',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => array(
'Authorization: Bearer {{SECRETKEY}}'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
var axios = require('axios');
var data = '';
var config = {
method: 'get',
url: 'https://sandbox.insurpass.com/api/merchant/merchant_keke_pass_policies',
headers: {
'Authorization': 'Bearer {{SECRETKEY}}'
},
data: data
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
curl --location --request GET https://sandbox.insurpass.com/api/merchant/merchant_keke_pass_policies' \
--header 'Authorization: Bearer {{SECRETKEY}}' \
--header 'Accept: application/json' \
--data-raw ''
POST
https://sandbox.insurpass.com/api/merchant/keke_policy_details
{
"success":true,
"response_message":"Policy details retrieved successfully",
"response_code":"",
"data":{
"id":17,
"variant_type":"confaam",
"product_id":2,
"amount_insured":6000,
"policy_number":"INS1646729784609",
"nok_surname":"required|string",
"nok_othernames":"required|string",
"nok_relationship":"required|string",
"nok_gender":"required|string",
"nok_phone_no":"09034543643",
"nok_email":"sala@gmi.com",
"status":"activated",
"created_at":null,
"updated_at":null,
"product":{
"id":2,
"name":"confaam",
"details":"This is a depe",
"beneficiaries":false,
"max_beneficiaries":5,
"provider_id":1,
"logo_url":null,
"enable":true,
"created_at":"2022-02-24T10:01:42.000000Z",
"updated_at":"2022-02-24T09:14:21.000000Z",
"service_id":3
},
"user":{
"first_name":"required|string",
"middle_name":null,
"surname":"required|string",
"phone_no":"08045754345",
"email":"salami@gmail.com",
"address":null,
"gender":"male",
"date_of_birth":null,
"created_at":"2022-03-08T08:29:42.000000Z",
"updated_at":"2022-03-08T08:29:42.000000Z"
}
}
}
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://sandbox.insurpass.com/api/merchant/keke_policy_details',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS =>'{"policy_number":"UIC/RE/INP/SI/30092022/79187"}',
CURLOPT_HTTPHEADER => array(
'Authorization: Bearer {{SECRETKEY}}',
'Content-Type: application/json'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
var axios = require('axios');
var data = JSON.stringify({"policy_number":"UIC/RE/INP/SI/30092022/79187"});
var config = {
method: 'post',
url: 'https://sandbox.insurpass.com/api/merchant/keke_policy_details',
headers: {
'Authorization': 'Bearer {{SECRETKEY}}',
'Content-Type': 'application/json'
},
data: data
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
curl --location --request POST https://sandbox.insurpass.com/api/merchant/keke_policy_details' \
--header 'Authorization: Bearer {{SECRETKEY}}' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data-raw '{
"policy_number": "UIC/RE/INP/KPASS/20102022/94731"
}'
POST
https://sandbox.insurpass.com/api/merchant/keke_get_policy_quote
{
"success":true,
"data":{
"premium":3500
},
"response_message":"Quote retrieved successfully",
"response_code":""
}
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://sandbox.insurpass.com/api/merchant/keke_get_policy_quote',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS =>'{"product_id":"26"}',
CURLOPT_HTTPHEADER => array(
'Authorization: Bearer {{SECRETKEY}}',
'Content-Type: application/json'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
var axios = require('axios');
var data = JSON.stringify({"product_id":"26"});
var config = {
method: 'post',
url: 'https://sandbox.insurpass.com/api/merchant/keke_get_policy_quote',
headers: {
'Authorization': 'Bearer {{SECRETKEY}}',
'Content-Type': 'application/json'
},
data: data
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
curl --location --request POST https://sandbox.insurpass.com/api/merchant/keke_get_policy_quote' \
--header 'Authorization: Bearer {{SECRETKEY}}' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data-raw '{
"policy_number": "UIC/RE/INP/KPASS/20102022/94731"
}'
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|