Policy
post
https://sandbox.insurpass.com
/api/merchant/initiate_parcel_guard_policy
This method initiates the creation of a Parcel Guard Insurance Policy.
PHP
NODE JS
CURL
1
<?php
2
3
$curl = curl_init();
4
5
curl_setopt_array($curl, array(
6
CURLOPT_URL => 'https://sandbox.insurpass.com/api/merchant/initiate_parcel_guard_policy',
7
CURLOPT_RETURNTRANSFER => true,
8
CURLOPT_ENCODING => '',
9
CURLOPT_MAXREDIRS => 10,
10
CURLOPT_TIMEOUT => 0,
11
CURLOPT_FOLLOWLOCATION => true,
12
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
13
CURLOPT_CUSTOMREQUEST => 'POST',
14
CURLOPT_POSTFIELDS =>'{
15
"first_name":"Stan",
16
"surname":"Lee",
17
"phone_no": "08183893000",
18
"email": "[email protected]",
19
"gender":"Male",
20
"product_id": 20,
21
"premium_rate": "500.00",
22
"mode_of_shipment_id":2,
23
"quantity":10,
24
"cost_per_unit": "800.00",
25
"total_value": "20000.00",
26
"goods_package_move_from": "Lekki",
27
"goods_package_move_to": "Iyana paja",
28
"name_of_reciever":"Peter",
29
"address_of_reciever": "Tony",
30
"reciever_phone_no": "08173703992",
31
"transit_commencement_date":"2022-03-11",
32
"expected_arrival_date": "2022-03-11",
33
"duration_of_goods_conveyed":"1"
34
}',
35
CURLOPT_HTTPHEADER => array(
36
'Authorization: Bearer {{SECRETKEY}}',
37
'Content-Type: application/json'
38
),
39
));
40
41
$response = curl_exec($curl);
42
43
curl_close($curl);
44
echo $response;
1
var axios = require('axios');
2
var data = JSON.stringify({
3
"first_name":"Stan",
4
"surname":"Lee",
5
"phone_no": "08183893000",
6
"email": "[email protected]",
7
"gender":"Male",
8
"product_id": 20,
9
"premium_rate": "500.00",
10
"mode_of_shipment_id":2,
11
"quantity":10,
12
"cost_per_unit": "800.00",
13
"total_value": "20000.00",
14
"goods_package_move_from": "Lekki",
15
"goods_package_move_to": "Iyana paja",
16
"name_of_reciever":"Peter",
17
"address_of_reciever": "Tony",
18
"reciever_phone_no": "08173703992",
19
"transit_commencement_date":"2022-03-11",
20
"expected_arrival_date": "2022-03-11",
21
"duration_of_goods_conveyed":"1"
22
});
23
24
var config = {
25
method: 'post',
26
url: 'https://sandbox.insurpass.com/api/merchant/initiate_parcel_guard_policy',
27
headers: {
28
'Authorization': 'Bearer {{SECRETKEY}}',
29
'Content-Type': 'application/json'
30
},
31
data: data
32
};
33
34
axios(config)
35
.then(function (response) {
36
console.log(JSON.stringify(response.data));
37
})
38
.catch(function (error) {
39
console.log(error);
40
});
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 protected]",
"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.com
api/merchant/verify_parcel_guard_policy
This endpoint verifies the token which was generated during initiation of the policy.
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
NODE JS
CURL
1
<?php
2
3
$curl = curl_init();
4
5
curl_setopt_array($curl, array(
6
CURLOPT_URL => 'https://sandbox.insurpass.com/api/merchant/verify_school_fee_policy',
7
CURLOPT_RETURNTRANSFER => true,
8
CURLOPT_ENCODING => '',
9
CURLOPT_MAXREDIRS => 10,
10
CURLOPT_TIMEOUT => 0,
11
CURLOPT_FOLLOWLOCATION => true,
12
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
13
CURLOPT_CUSTOMREQUEST => 'POST',
14
CURLOPT_POSTFIELDS =>'{
15
"token": "PGP1665743289341855391"
16
}',
17
CURLOPT_HTTPHEADER => array(
18
'Authorization: Bearer {{SECRETKEY}}',
19
'Content-Type: application/json'
20
),
21
));
22
23
$response = curl_exec($curl);
24
25
curl_close($curl);
26
echo $response;
1
var axios = require('axios');
2
var data = JSON.stringify({
3
"token": "PGP1665743289341855391"
4
});
5
6
var config = {
7
method: 'post',
8
url: 'https://sandbox.insurpass.com/api/merchant/verify_parcel_guard_policy',
9
headers: {
10
'Authorization': 'Bearer {{SECRETKEY}}',
11
'Content-Type': 'application/json'
12
},
13
data: data
14
};
15
16
axios(config)
17
.then(function (response) {
18
console.log(JSON.stringify(response.data));
19
})
20
.catch(function (error) {
21
console.log(error);
22
});
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
This endpoint returns all the policies created by the merchant
PHP
NODE JS
CURL
1
<?php
2
3
$curl = curl_init();
4
5
curl_setopt_array($curl, array(
6
CURLOPT_URL => 'https://sandbox.insurpass.com/api/merchant/merchant_parcel_guard_policies',
7
CURLOPT_RETURNTRANSFER => true,
8
CURLOPT_ENCODING => '',
9
CURLOPT_MAXREDIRS => 10,
10
CURLOPT_TIMEOUT => 0,
11
CURLOPT_FOLLOWLOCATION => true,
12
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
13
CURLOPT_CUSTOMREQUEST => 'GET',
14
CURLOPT_HTTPHEADER => array(
15
'Authorization: Bearer {{SECRETKEY}}',
16
'Content-Type: application/json'
17
),
18
));
19
20
$response = curl_exec($curl);
21
22
curl_close($curl);
23
echo $response;
1
var axios = require('axios');
2
var data = ''
3
4
var config = {
5
method: 'post',
6
url: 'https://sandbox.insurpass.com/api/merchant/merchant_parcel_guard_policies',
7
headers: {
8
'Authorization': 'Bearer {{SECRETKEY}}',
9
'Content-Type': 'application/json'
10
},
11
data: data
12
};
13
14
axios(config)
15
.then(function (response) {
16
console.log(JSON.stringify(response.data));
17
})
18
.catch(function (error) {
19
console.log(error);
20
});
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
This endpoint returns the merchant policy details.
PHP
NODE JS
CURL
1
<?php
2
3
$curl = curl_init();
4
5
curl_setopt_array($curl, array(
6
CURLOPT_URL => 'https://sandbox.insurpass.com/api/merchant/parcel_guard_policy_details',
7
CURLOPT_RETURNTRANSFER => true,
8
CURLOPT_ENCODING => '',
9
CURLOPT_MAXREDIRS => 10,
10
CURLOPT_TIMEOUT => 0,
11
CURLOPT_FOLLOWLOCATION => true,
12
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
13
CURLOPT_CUSTOMREQUEST => 'POST',
14
CURLOPT_POSTFIELDS =>'{"policy_number":"UIC/RE/INP/PGD/13062022/74177"}',
15
CURLOPT_HTTPHEADER => array(
16
'Authorization: Bearer {{SECRETKEY}}',
17
'Content-Type: application/json'
18
),
19
));
20
21
$response = curl_exec($curl);
22
23
curl_close($curl);
24
echo $response;
1
var axios = require('axios');
2
var data = JSON.stringify({"policy_number":"UIC/RE/INP/SI/30092022/79187"});
3
4
var config = {
5
method: 'post',
6
url: 'https://sandbox.insurpass.com/api/merchant/parcel_guard_policy_details',
7
headers: {
8
'Authorization': 'Bearer {{SECRETKEY}}',
9
'Content-Type': 'application/json'
10
},
11
data: data
12
};
13
14
axios(config)
15
.then(function (response) {
16
console.log(JSON.stringify(response.data));
17
})
18
.catch(function (error) {
19
console.log(error);
20
});
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"}'
PHP
NODE JS
CURL
1
<?php
2
3
$curl = curl_init();
4
5
curl_setopt_array($curl, array(
6
CURLOPT_URL => 'https://sandbox.insurpass.com/api/merchant/get_parcel_guard_premium_rate',
7
CURLOPT_RETURNTRANSFER => true,
8
CURLOPT_ENCODING => '',
9
CURLOPT_MAXREDIRS => 10,
10
CURLOPT_TIMEOUT => 0,
11
CURLOPT_FOLLOWLOCATION => true,
12
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
13
CURLOPT_CUSTOMREQUEST => 'POST',
14
CURLOPT_POSTFIELDS =>'{
15
"value_of_consignment": 15000
16
}',
17
CURLOPT_HTTPHEADER => array(
18
'Authorization: Bearer {{SECRETKEY}}',
19
'Content-Type: application/json'
20
),
21
));
22
23
$response = curl_exec($curl);
24
25
curl_close($curl);
26
echo $response;
1
var axios = require('axios');
2
var data = JSON.stringify({
3
"value_of_consignment": 15000
4
});
5
6
var config = {
7
method: 'post',
8
url: 'https://sandbox.insurpass.com/api/merchant/get_parcel_guard_premium_rate',
9
headers: {
10
'Authorization': 'Bearer {{SECRETKEY}}',
11
'Content-Type': 'application/json'
12
},
13
data: data
14
};
15
16
axios(config)
17
.then(function (response) {
18
console.log(JSON.stringify(response.data));
19
})
20
.catch(function (error) {
21
console.log(error);
22
});
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
This endpoint returns an object containing a merchant's number of policies and claims
PHP
NODE JS
CURL
1
<?php
2
3
$curl = curl_init();
4
5
curl_setopt_array($curl, array(
6
CURLOPT_URL => 'https://sandbox.insurpass.com/api/merchant/get_parcel_guard_report',
7
CURLOPT_RETURNTRANSFER => true,
8
CURLOPT_ENCODING => '',
9
CURLOPT_MAXREDIRS => 10,
10
CURLOPT_TIMEOUT => 0,
11
CURLOPT_FOLLOWLOCATION => true,
12
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
13
CURLOPT_CUSTOMREQUEST => 'GET',
14
CURLOPT_HTTPHEADER => array(
15
'Authorization: Bearer {{SECRETKEY}}',
16
'Content-Type: application/json'
17
),
18
));
19
20
$response = curl_exec($curl);
21
22
curl_close($curl);
23
echo $response;
1
var axios = require('axios');
2
var data = '';
3
4
var config = {
5
method: 'post',
6
url: 'https://sandbox.insurpass.com/api/merchant/get_parcel_guard_report',
7
headers: {
8
'Authorization': 'Bearer {{SECRETKEY}}',
9
'Content-Type': 'application/json'
10
},
11
data: data
12
};
13
14
axios(config)
15
.then(function (response) {
16
console.log(JSON.stringify(response.data));
17
})
18
.catch(function (error) {
19
console.log(error);
20
});
curl --location --request GET https://sandbox.insurpass.com/api/merchant/get_parcel_guard_report' \
--header 'Authorization: Bearer {{SECRETKEY}}' \
--header 'Accept: application/json' \
--data-raw ''
get
http://sandbox.insurpass.com
/api/merchant/get_parcel_guard_mode_of_shipment
This endpoint returns a mode of Shipment for a parcel guard policy.
PHP
NODE JS
CURL
1
<?php
2
3
$curl = curl_init();
4
5
curl_setopt_array($curl, array(
6
CURLOPT_URL => 'https://sandbox.insurpass.com/api/merchant/get_parcel_guard_mode_of_shipment',
7
CURLOPT_RETURNTRANSFER => true,
8
CURLOPT_ENCODING => '',
9
CURLOPT_MAXREDIRS => 10,
10
CURLOPT_TIMEOUT => 0,
11
CURLOPT_FOLLOWLOCATION => true,
12
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
13
CURLOPT_CUSTOMREQUEST => 'POST',
14
CURLOPT_HTTPHEADER => array(
15
'Authorization: Bearer {{SECRETKEY}}',
16
'Content-Type: application/json'
17
),
18
));
19
20
$response = curl_exec($curl);
21
22
curl_close($curl);
23
echo $response;
1
var axios = require('axios');
2
var data ='';
3
4
var config = {
5
method: 'post',
6
url: 'https://sandbox.insurpass.com/api/merchant/get_parcel_guard_mode_of_shipment',
7
headers: {
8
'Authorization': 'Bearer {{SECRETKEY}}',
9
'Content-Type': 'application/json'
10
},
11
data: data
12
};
13
14
axios(config)
15
.then(function (response) {
16
console.log(JSON.stringify(response.data));
17
})
18
.catch(function (error) {
19
console.log(error);
20
});
curl --location --request GET https://sandbox.insurpass.com/api/merchant/get_parcel_guard_mode_of_shipment' \
--header 'Authorization: Bearer {{SECRETKEY}}' \
--header 'Accept: application/json' \
--data-raw ''
Last modified 10mo ago