Shop Insurance Policy
Initiate Shop Insurance Policy
This method initiates the creation of a Shop Insurance Policy.
POST
https://sandbox.insurpass.com/api/merchant/initiate_shop_insure_policies
Headers
Authorization*
String
Bearer {$secret-key}/{$api-key}
Content-Type*
String
application/json
Request Body
number_of_staff*
numeric
Number of workers in the shop - 10
product_id*
String
The unique number that identifies comprehensive motor insurance product you're purchasig - 3
email*
Principal Customer's email address -- email@domain.com
first_name*
string
Principal Customer's first name - Favour
avg_value_shop
string
Value of the shop - 500,000
phone_number*
numeric|digits:11
Principal Customer's phone number - 08102223475
occupation*
String
Principal Customer's occupation - Product Manager
gender*
String
Principal Customer's gender - female, male
type_of_goods_sold*
String
Type of goods sold in the shop - Jewelry
shop_address*
string
Address where the shop is located. - 7 Oshola street, Agege, Lagos
wall_construction_material*
string
The material used to build the wall of the shop - Ceramic
last_name*
string
Principal Customer's surname - Ezedibia
shop_duration*
numeric
How long the shop has been in existence - 5
roof_construction_materiall*
string
The material used to build the roof of the shop - Zinc
{
"success":true,
"data":{
"token":"SHIP1666260336382297565"
},
"response_message":"Shop Insure Policy initiated successfully",
"response_code":""
}
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://sandbox.insurpass.com/api/merchant/initiate_shop_insure_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 => 'POST',
CURLOPT_POSTFIELDS =>'{
"first_name":"JK",
"last_name":"Rollins",
"email":"jkrollins@gmail.com",
"gender":"Female",
"occupation":"Medcine",
"product_id":3,
"type_of_goods_sold":"Big",
"shop_duration":"4",
"number_of_staff":5,
"wall_construction_material":"Brick",
"roof_construction_material":"Sheet",
"shop_address":"12 Jk Rollins street",
"phone_number":"08088464988"
}',
CURLOPT_HTTPHEADER => array(
'Authorization: Bearer {{SECRETKEY}}',
'Content-Type: application/json'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
Verify Shop Insurance Policy
This endpoints sends a token that verifies the creation of a Shop policy.
POST
https://sandbox.insurpass.com/api/merchant/verify_shop_insure_policies
Headers
Authorization*
String
Bearer {$secret-key}/{$api-key}
Content-Type*
String
application/json
Request Body
token*
String
Note that after 15 minutes, the token expires and you will need to reinitiate
{
"success":true,
"response_message":"Shop Insure Policy verifed successfully",
"response_code":"",
"data":{
"product_id":3,
"policy_number":"UIC/RE/INP/SI/20102022/53687",
"type_of_goods_sold":null,
"shop_duration":3,
"number_of_staff":4,
"wall_construction_material":"BLOCK",
"roof_construction_material":"zINC",
"avg_value_shop":null,
"shop_address":"oJO",
"status":true,
"start_date":"2022-03-31T00:00:00.000000Z",
"end_date":"2022-03-31T00:00:00.000000Z",
"deleted_at":null,
"created_at":"2022-03-31T12:10:02.000000Z",
"updated_at":"2022-03-31T12:10:05.000000Z"
}
}
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://sandbox.insurpass.com/api/merchant/verify_shop_insure_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 => 'POST',
CURLOPT_POSTFIELDS =>'{"token":"SHIP1664573060382449756"}',
CURLOPT_HTTPHEADER => array(
'Authorization: Bearer {{SECRETKEY}}',
'Content-Type: application/json'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
List All Shop Insurance Policies
This endpoint returns a list of all the shop insurance products
GET
https://sandbox.insurpass.com/api/merchant/get_merchant_shop_insure_policies
Headers
Authorization*
String
Bearer {$secret-key}/{$api-key}
Content-Type*
String
application/json
{
"success":true,
"response_message":"Shop Insure Policy get successful",
"response_code":[
],
"data":[
{
"id":1,
"user_id":26,
"product_id":3,
"merchant_id":1,
"policy_number":"AJDHKH/DJAADAD",
"type_of_goods_sold":null,
"shop_duration":3,
"number_of_staff":4,
"wall_construction_material":"BLOCK",
"roof_construction_material":"zINC",
"avg_value_shop":null,
"shop_address":"oJO",
"status":true,
"start_date":"2022-03-31T00:00:00.000000Z",
"end_date":"2022-03-31T00:00:00.000000Z",
"deleted_at":null,
"created_at":"2022-03-31T12:10:02.000000Z",
"updated_at":"2022-03-31T12:10:05.000000Z",
"user":{
"first_name":"Sakani",
"middle_name":null,
"surname":"Oluwakemi",
"phone_no":"09076567875",
"email":"email@gmail.com",
"address":null,
"gender":"male",
"date_of_birth":null
},
"transactions":[
{
"id":30,
"user_id":26,
"amount":"5000.00",
"product_id":3,
"status":"pending",
"type":"credit",
"subscriptions_id":8,
"merchant_user_id":null,
"coverdor_commission":"0.00",
"merchant_commission":"0.00",
"transaction_ref":"SCH16475985146319137",
"total_commission":"0.00",
"message":null,
"platform":null,
"channel":"API",
"currency":null,
"subscription_type":"App\\Models\\SchoolFeePolicy",
"transaction_date":null,
"created_at":"2022-03-18T10:15:14.000000Z",
"updated_at":"2022-03-18T10:15:14.000000Z"
},
{
"id":31,
"user_id":26,
"amount":"5000.00",
"product_id":3,
"status":"pending",
"type":"credit",
"subscriptions_id":9,
"merchant_user_id":null,
"coverdor_commission":"0.00",
"merchant_commission":"0.00",
"transaction_ref":"SCH16476121439711639",
"total_commission":"0.00",
"message":null,
"platform":null,
"channel":"API",
"currency":null,
"subscription_type":"App\\Models\\SchoolFeePolicy",
"transaction_date":null,
"created_at":"2022-03-18T14:02:23.000000Z",
"updated_at":"2022-03-18T14:02:23.000000Z"
},
{
"id":32,
"user_id":26,
"amount":"5000.00",
"product_id":3,
"status":"pending",
"type":"credit",
"subscriptions_id":10,
"merchant_user_id":null,
"coverdor_commission":"0.00",
"merchant_commission":"0.00",
"transaction_ref":"SCH16476122069317166",
"total_commission":"0.00",
"message":null,
"platform":null,
"channel":"API",
"currency":null,
"subscription_type":"App\\Models\\SchoolFeePolicy",
"transaction_date":null,
"created_at":"2022-03-18T14:03:26.000000Z",
"updated_at":"2022-03-18T14:03:26.000000Z"
}
],
"product":{
"id":3,
"name":"School fee bronze",
"details":"sgsfgsfgsf",
"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":1
}
}
]
}
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://sandbox.insurpass.com/api/merchant/get_merchant_shop_insure_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;
Shop Insurance Policy Details
This endpoint returns an object containing a single Shop Insurance Policy
POST
https://sandbox.insurpass.com/api/merchant/get_shop_insure_policy_details
Headers
Authorization*
String
Bearer {$secret-key}/{$api-key}
Content-Type*
String
application/json
Request Body
policy_number*
String
The unique number that identifies the purchased insurance policy - IN98570819
{
"success":true,
"response_message":"Policy details retrieved successfully",
"response_code":"",
"data":{
"id":1,
"user_id":26,
"product_id":3,
"merchant_id":1,
"policy_number":"AJDHKH/DJAADAD",
"type_of_goods_sold":null,
"shop_duration":3,
"number_of_staff":4,
"wall_construction_material":"BLOCK",
"roof_construction_material":"zINC",
"avg_value_shop":null,
"shop_address":"oJO",
"status":true,
"start_date":"2022-03-31T00:00:00.000000Z",
"end_date":"2022-03-31T00:00:00.000000Z",
"deleted_at":null,
"created_at":"2022-03-31T12:10:02.000000Z",
"updated_at":"2022-03-31T12:10:05.000000Z",
"user":{
"first_name":"Sakani",
"middle_name":null,
"surname":"Oluwakemi",
"phone_no":"09076567875",
"email":"email@gmail.com",
"address":null,
"gender":"male",
"date_of_birth":null,
"password":null,
"policy_no":null,
"have_beneficiaries":false,
"enable":true,
"next_of_kin_full_name":null,
"merchant_user_id":null,
"user_type":"user",
"created_at":"2022-02-24T11:35:24.000000Z",
"updated_at":"2022-02-24T11:35:24.000000Z",
"principal_policy_no":null,
"nin_number":null,
"id_url":null,
"id_type":null,
"profile_url":null,
"company_id":null,
"verify_phone":0,
"verify_email":0,
"town":null,
"state_of_residence":null,
"transaction_pin":null,
"occupation":null
},
"product":{
"id":3,
"name":"School fee bronze",
"details":"sgsfgsfgsf",
"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":1
}
}
}
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://sandbox.insurpass.com/api/merchant/get_shop_insure_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;
Retrieve Shop Insurance Report
This endpoint returns an object containing a merchant's number of policies and claims
GET
https://sandbox.insurpass.com/api/merchant/shop_insure_policy_report
This endpoint returns an object containing a merchant's number of policies and claims for the shop insurance product.
Headers
Authorization*
String
Bearer {$secret-key}/{$api-key}
Content-Type*
String
application/json
{
"success":true,
"response_message":"Shop Insure policy report get successful",
"response_code":"",
"data":{
"no_of_policy":34,
"no_of_claim":0
}
}
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://sandbox.insurpass.com/api/merchant/shop_insure_policy_report',
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;
Last updated
Was this helpful?