Policy
Last updated
Last updated
POST
https://sandbox.insurpass.com/api/merchant/initiate_parcel_guard_policy
Successful initiation of policy generates a token which would be used to verify a transaction.
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
{
"success":true,
"response_message":"Parcel guard policy initiated successfully",
"response_code":200,
"data":{
"token":"PGP163879699018533101"
}
}
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://sandbox.insurpass.com/api/merchant/initiate_parcel_guard_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":"Stan",
"surname":"Lee",
"phone_no": "08183893000",
"email": "email@gmail.com",
"gender":"Male",
"product_id": 20,
"premium_rate": "500.00",
"mode_of_shipment_id":2,
"quantity":10,
"cost_per_unit": "800.00",
"total_value": "20000.00",
"goods_package_move_from": "Lekki",
"goods_package_move_to": "Iyana paja",
"name_of_reciever":"Peter",
"address_of_reciever": "Tony",
"reciever_phone_no": "08173703992",
"transit_commencement_date":"2022-03-11",
"expected_arrival_date": "2022-03-11",
"duration_of_goods_conveyed":"1"
}',
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({
"first_name":"Stan",
"surname":"Lee",
"phone_no": "08183893000",
"email": "email@gmail.com",
"gender":"Male",
"product_id": 20,
"premium_rate": "500.00",
"mode_of_shipment_id":2,
"quantity":10,
"cost_per_unit": "800.00",
"total_value": "20000.00",
"goods_package_move_from": "Lekki",
"goods_package_move_to": "Iyana paja",
"name_of_reciever":"Peter",
"address_of_reciever": "Tony",
"reciever_phone_no": "08173703992",
"transit_commencement_date":"2022-03-11",
"expected_arrival_date": "2022-03-11",
"duration_of_goods_conveyed":"1"
});
var config = {
method: 'post',
url: 'https://sandbox.insurpass.com/api/merchant/initiate_parcel_guard_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_parcel_guard_policy' \
--header 'Authorization: Bearer {{SECRETKEY}}' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data-raw '{
"first_name":"Stan",
"surname":"Lee",
"phone_no": "08183893000",
"email": "email@gmail.com",
"gender":"Male",
"product_id": 20,
"premium_rate": "500.00",
"mode_of_shipment_id":2,
"quantity":10,
"cost_per_unit": "800.00",
"total_value": "20000.00",
"goods_package_move_from": "Lekki",
"goods_package_move_to": "Iyana paja",
"name_of_reciever":"Peter",
"address_of_reciever": "Tony",
"reciever_phone_no": "08173703992",
"transit_commencement_date":"2022-03-11",
"expected_arrival_date": "2022-03-11",
"duration_of_goods_conveyed":"1"
}'
GET
https://sandbox.insurpass.comapi/merchant/verify_parcel_guard_policy
Note that the token expires after a certain duration. Kindly find below the sample responses and payload
{
"success":false,
"response_message":"Token has expired",
"response_code":400,
"data":{
"error":[
"Token has expired"
]
}
}
{
"success":false,
"response_message":"Invalid Token",
"response_code":400,
"data":{
"error":[
"Invalid Token"
]
}
}
{
"success": true,
"response_message": "parcel guard Policy verified successfully",
"response_code": 200,
"data": [
{
"id": 1,
"user_id": 1,
"product_id": 1,
"merchant_id": 1,
"mode_of_shipment_id": 1,
"policy_number": "1234567",
"description_of_goods": null,
"description_of_packing": null,
"quantity": 2,
"cost_per_unit": "800.00",
"total_value": "1600.00",
"goods_package_move_from": "Lagos",
"goods_package_move_to": "Makurdi",
"name_of_reciever": "Theo",
"address_of_reciever": "Welfare quarters, makurdi",
"reciever_phone_no": "9833737277",
"transit_commencement_date": "2021-09-11T00:00:00.000000Z",
"expected_arrival_date": "2021-10-12T00:00:00.000000Z",
"duration_of_goods_conveyed": "10days",
"driver_name": null,
"driver_phone_no": null,
"vehicle_reg_no": null,
"start_date": 2021-12-06,
"end_date": 2021-12-31
"status": "pending",
"deleted_at": null,
"created_at": "2021-11-30T11:23:55.000000Z",
"updated_at": "2021-11-30T11:23:55.000000Z"
}
]
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_school_fee_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": "PGP1665743289341855391"
}',
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": "PGP1665743289341855391"
});
var config = {
method: 'post',
url: 'https://sandbox.insurpass.com/api/merchant/verify_parcel_guard_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.comapi/merchant/verify_parcel_guard_policy' \
--header 'Authorization: Bearer {{SECRETKEY}}' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data-raw '{
"token": "PGP1665743289341855391"
}'
GET
https://sandbox.insurpass.com/api/merchant/merchant_parcel_guard_policies
{
"success": true,
"response_message": "Merchant policies retrieved successfully",
"response_code": 200,
"data": {
"current_page": 1,
"data": [
{
"id": 1,
"user_id": 1,
"product_id": 1,
"merchant_id": 1,
"mode_of_shipment_id": 1,
"policy_number": "1234567",
"description_of_goods": null,
"description_of_packing": null,
"quantity": 2,
"cost_per_unit": "800.00",
"total_value": "1600.00",
"goods_package_move_from": "Lagos",
"goods_package_move_to": "Makurdi",
"name_of_reciever": "Theo",
"address_of_reciever": "Welfare quarters, makurdi",
"reciever_phone_no": "9833737277",
"transit_commencement_date": "2021-09-11T00:00:00.000000Z",
"expected_arrival_date": "2021-10-12T00:00:00.000000Z",
"duration_of_goods_conveyed": "10days",
"driver_name": null,
"driver_phone_no": null,
"vehicle_reg_no": null,
"start_date": null,
"end_date": null,
"status": "pending",
"deleted_at": null,
"created_at": "2021-11-30T11:23:55.000000Z",
"updated_at": "2021-11-30T11:23:55.000000Z"
},
{
"id": 2,
"user_id": 1,
"product_id": 1,
"merchant_id": 1,
"mode_of_shipment_id": 1,
"policy_number": "1234567",
"description_of_goods": null,
"description_of_packing": null,
"quantity": 2,
"cost_per_unit": "800.00",
"total_value": "1600.00",
"goods_package_move_from": "Lagos",
"goods_package_move_to": "Makurdi",
"name_of_reciever": "Theo",
"address_of_reciever": "Welfare quarters, makurdi",
"reciever_phone_no": "9833737277",
"transit_commencement_date": "2021-09-11T00:00:00.000000Z",
"expected_arrival_date": "2021-10-12T00:00:00.000000Z",
"duration_of_goods_conveyed": "10days",
"driver_name": null,
"driver_phone_no": null,
"vehicle_reg_no": null,
"start_date": null,
"end_date": null,
"status": "pending",
"deleted_at": null,
"created_at": "2021-11-30T11:24:55.000000Z",
"updated_at": "2021-11-30T11:24:55.000000Z"
},
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://sandbox.insurpass.com/api/merchant/merchant_parcel_guard_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}}',
'Content-Type: application/json'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
var axios = require('axios');
var data = ''
var config = {
method: 'post',
url: 'https://sandbox.insurpass.com/api/merchant/merchant_parcel_guard_policies',
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 GET https://sandbox.insurpass.com/api/merchant/merchant_parcel_guard_policies' \
--header 'Authorization: Bearer {{SECRETKEY}}' \
--header 'Accept: application/json' \
--data-raw ''
POST
http://sandbox.insurpass.com/api/merchant/parcel_guard_policy_details
The developer needs to provide the policy number for the policy details to displ
{
"success": true,
"response_message": "Policy details retrieved successfully",
"response_code": 200,
"data": {
"id": 23,
"user_id": 18,
"product_id": 1,
"merchant_id": 1,
"mode_of_shipment_id": 1,
"policy_number": "IN85794741",
"description_of_goods": null,
"description_of_packing": null,
"quantity": 2,
"cost_per_unit": "800.00",
"total_value": "1600.00",
"goods_package_move_from": "Lagos",
"goods_package_move_to": "Makurdi",
"name_of_reciever": "Theo",
"address_of_reciever": "Welfare quarters, makurdi",
"reciever_phone_no": "9833737277",
"transit_commencement_date": "2021-09-11T00:00:00.000000Z",
"expected_arrival_date": "2021-10-12T00:00:00.000000Z",
"duration_of_goods_conveyed": "10days",
"driver_name": null,
"driver_phone_no": null,
"vehicle_reg_no": null,
"start_date": null,
"end_date": null,
"status": "pending",
"deleted_at": null,
"created_at": "2021-12-01T08:54:09.000000Z",
"updated_at": "2021-12-01T08:54:09.000000Z",
"product": {
"id": 1,
"name": "Malaria Care Plan",
"details": "some details",
"beneficiaries": true,
"max_beneficiaries": 3,
"provider_id": 1,
"logo_url": "logo.png",
"enable": true,
"created_at": "2021-11-23T17:20:38.000000Z",
"updated_at": "2021-11-23T17:20:38.000000Z",
"service_id": 1,
"product_class_id": 1,
"service": {
"id": 1,
"name": "parcel-guard",
"description": "A description of parcel guard insurance",
"code": "1233",
"status": "active",
"created_at": "2021-11-23T17:00:55.000000Z",
"updated_at": "2021-11-23T17:00:55.000000Z",
"provider_id": 1,
"logo_path": "dd",
"short_description": "dd"
}
}
}
}
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://sandbox.insurpass.com/api/merchant/parcel_guard_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/PGD/13062022/74177"}',
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/parcel_guard_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/parcel_guard_policy_details' \
--header 'Authorization: Bearer {{SECRETKEY}}' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data-raw '{"policy_number":"UIC/RE/INP/PGD/20102022/45901"}'
POST
https://sandbox.insurpass.com/api/merchant/get_parcel_guard_premium_rate
{
"success":true,
"response_message":"Parcel quard premium rate get successful",
"response_code":"",
"data":{
"premium_rate":"4500.00",
"amount_insured":20000,
}
}
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://sandbox.insurpass.com/api/merchant/get_parcel_guard_premium_rate',
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 =>'{
"value_of_consignment": 15000
}',
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({
"value_of_consignment": 15000
});
var config = {
method: 'post',
url: 'https://sandbox.insurpass.com/api/merchant/get_parcel_guard_premium_rate',
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/get_parcel_guard_premium_rate' \
--header 'Authorization: Bearer {{SECRETKEY}}' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data-raw '{
"value_of_consignment": 15000
}'
GET
https://sandbox.insurpass.com/api/merchant/get_parcel_guard_report
{
"success":true,
"response_message":"Parcel quard product get successful",
"response_code":"",
"data":[
{
"id":20,
"name":"PARCEL GUARD COVER",
"details":"PARCEL GUARD COVER",
"beneficiaries":true,
"max_beneficiaries":1,
"provider_id":2,
"logo_url":"logo.png",
"enable":true,
"created_at":"2022-02-17T14:06:52.000000Z",
"updated_at":"2022-02-17T14:06:52.000000Z",
"service_id":5,
"product_class_id":0,
"price_config":[
{
"id":26,
"product_id":20,
"no_of_users":1,
"provider_price":"0.00",
"coverdor_commission":"400.00",
"total_price":"500.00",
"product_code":"parcel_quard",
"product_short_code":"PARCEL_QUARD",
"created_at":"2022-02-17T14:06:52.000000Z",
"updated_at":"2022-02-17T14:06:52.000000Z",
"system_commission":"400.00",
"amount_insured":"100000.00",
"commission_type":"fixed",
"min_price":"10000.00",
"max_price":"100000.00"
},
{
"id":27,
"product_id":20,
"no_of_users":1,
"provider_price":"0.00",
"coverdor_commission":"400.00",
"total_price":"1000.00",
"product_code":"parcel_quard",
"product_short_code":"PARCEL_QUARD",
"created_at":"2022-02-17T14:06:52.000000Z",
"updated_at":"2022-02-17T14:06:52.000000Z",
"system_commission":"400.00",
"amount_insured":"200000.00",
"commission_type":"fixed",
"min_price":"100001.00",
"max_price":"200000.00"
},
{
"id":28,
"product_id":20,
"no_of_users":1,
"provider_price":"0.00",
"coverdor_commission":"400.00",
"total_price":"1500.00",
"product_code":"parcel_quard",
"product_short_code":"PARCEL_QUARD",
"created_at":"2022-02-17T14:06:52.000000Z",
"updated_at":"2022-02-17T14:06:52.000000Z",
"system_commission":"400.00",
"amount_insured":"300000.00",
"commission_type":"fixed",
"min_price":"200001.00",
"max_price":"300000.00"
},
{
"id":29,
"product_id":20,
"no_of_users":1,
"provider_price":"0.00",
"coverdor_commission":"400.00",
"total_price":"2000.00",
"product_code":"parcel_quard",
"product_short_code":"PARCEL_QUARD",
"created_at":"2022-02-17T14:06:52.000000Z",
"updated_at":"2022-02-17T14:06:52.000000Z",
"system_commission":"400.00",
"amount_insured":"400000.00",
"commission_type":"fixed",
"min_price":"300001.00",
"max_price":"400000.00"
},
{
"id":30,
"product_id":20,
"no_of_users":1,
"provider_price":"0.00",
"coverdor_commission":"400.00",
"total_price":"2500.00",
"product_code":"parcel_quard",
"product_short_code":"PARCEL_QUARD",
"created_at":"2022-02-17T14:06:52.000000Z",
"updated_at":"2022-02-17T14:06:52.000000Z",
"system_commission":"400.00",
"amount_insured":"500000.00",
"commission_type":"fixed",
"min_price":"400001.00",
"max_price":"500000.00"
},
{
"id":31,
"product_id":20,
"no_of_users":1,
"provider_price":"0.00",
"coverdor_commission":"400.00",
"total_price":"3000.00",
"product_code":"parcel_quard",
"product_short_code":"PARCEL_QUARD",
"created_at":"2022-02-17T14:06:52.000000Z",
"updated_at":"2022-02-17T14:06:52.000000Z",
"system_commission":"400.00",
"amount_insured":"600000.00",
"commission_type":"fixed",
"min_price":"500001.00",
"max_price":"600000.00"
},
{
"id":32,
"product_id":20,
"no_of_users":1,
"provider_price":"0.00",
"coverdor_commission":"400.00",
"total_price":"3500.00",
"product_code":"parcel_quard",
"product_short_code":"PARCEL_QUARD",
"created_at":"2022-02-17T14:06:52.000000Z",
"updated_at":"2022-02-17T14:06:52.000000Z",
"system_commission":"400.00",
"amount_insured":"700000.00",
"commission_type":"fixed",
"min_price":"600001.00",
"max_price":"700000.00"
},
{
"id":33,
"product_id":20,
"no_of_users":1,
"provider_price":"0.00",
"coverdor_commission":"400.00",
"total_price":"4000.00",
"product_code":"parcel_quard",
"product_short_code":"PARCEL_QUARD",
"created_at":"2022-02-17T14:06:52.000000Z",
"updated_at":"2022-02-17T14:06:52.000000Z",
"system_commission":"400.00",
"amount_insured":"800000.00",
"commission_type":"fixed",
"min_price":"700001.00",
"max_price":"800000.00"
},
{
"id":34,
"product_id":20,
"no_of_users":1,
"provider_price":"0.00",
"coverdor_commission":"400.00",
"total_price":"4500.00",
"product_code":"parcel_quard",
"product_short_code":"PARCEL_QUARD",
"created_at":"2022-02-17T14:06:52.000000Z",
"updated_at":"2022-02-17T14:06:52.000000Z",
"system_commission":"400.00",
"amount_insured":"900000.00",
"commission_type":"fixed",
"min_price":"800001.00",
"max_price":"900000.00"
},
{
"id":35,
"product_id":20,
"no_of_users":1,
"provider_price":"0.00",
"coverdor_commission":"400.00",
"total_price":"4800.00",
"product_code":"parcel_quard",
"product_short_code":"PARCEL_QUARD",
"created_at":"2022-02-17T14:06:52.000000Z",
"updated_at":"2022-02-17T14:06:52.000000Z",