> For the complete documentation index, see [llms.txt](https://milonics.gitbook.io/api-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://milonics.gitbook.io/api-documentation/insurpass-api-reference/parcel-guard-insurance/policy.md).

# Policy

## Initiate Parcel Guard Policy

## This method initiates the creation of a Parcel Guard Insurance Policy.

<mark style="color:green;">`POST`</mark> `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.

#### Headers

| Name                                            | Type   | Description                     |
| ----------------------------------------------- | ------ | ------------------------------- |
| Authorization<mark style="color:red;">\*</mark> | String | Bearer {$secret-key}/{$api-key} |
| Content-Type<mark style="color:red;">\*</mark>  | String | application/json                |

#### Request Body

| Name                                                            | Type                   | Description                                                                                                 |
| --------------------------------------------------------------- | ---------------------- | ----------------------------------------------------------------------------------------------------------- |
| email<mark style="color:red;">\*</mark>                         | Email                  | Principal Customer's email address - <emaill@domain.com>                                                    |
| first\_name<mark style="color:red;">\*</mark>                   | String                 | Principal Customer's first name - **Favour**                                                                |
| Surname<mark style="color:red;">\*</mark>                       | String                 | Principal Customer's surname (Last name) - **Ezedibia**                                                     |
| phone\_no<mark style="color:red;">\*</mark>                     | numeric\|digits:11     | Principal Customer's email address -- **<email@domain.com>**                                                |
| gender<mark style="color:red;">\*</mark>                        | String                 | Principal Customer's gender - female, male                                                                  |
| dob<mark style="color:red;">\*</mark>                           | String                 | Principal Customer's date of birth - yy-mm-dd  - 1999-09-12                                                 |
| poduct\_id<mark style="color:red;">\*</mark>                    | String                 | The unique number that identifies parcel guard insurance product you're purchasig - **3**                   |
| mode\_of\_shipment\_id<mark style="color:red;">\*</mark>        | integer                | The unique number that identifies which mode of shipment was used to ship the package - 2                   |
| quantity<mark style="color:red;">\*</mark>                      | integer                | The number of item (parcels) being shipped - 2                                                              |
| cost\_per\_unit<mark style="color:red;">\*</mark>               | numeric                | Price of each unit of parcel - 800                                                                          |
| total\_value<mark style="color:red;">\*</mark>                  | numeric                | Total value of the parcels combined - 20,000                                                                |
| goods\_package\_move\_from<mark style="color:red;">\*</mark>    | String                 | Location from where the package was shipped. - Lagos max:255                                                |
| goods\_package\_move\_to<mark style="color:red;">\*</mark>      | String                 | Location of where the package is going. - Lagos max:255                                                     |
| name\_of\_reciever<mark style="color:red;">\*</mark>            | String                 | Name of the person receiving parcel - Favour Adewale max:255                                                |
| address\_of\_reciever<mark style="color:red;">\*</mark>         | String                 | Address of the person receiving the package - Welfare quarters, makurdi                                     |
| reciever\_phone\_no<mark style="color:red;">\*</mark>           | numeric\|digits:11     | Phone number of the person receiving the package - 08098876543                                              |
| transit\_commencement\_date<mark style="color:red;">\*</mark>   | Date FORMAT YYYY-MM-DD | Date whe the package was sent out - 2022-09-09                                                              |
| expected\_arrival\_date<mark style="color:red;">\*</mark>       | Date FORMAT YYYY-MM-DD | Expected date when the parcel will arrive - 2022-10-9-09                                                    |
| duration\_of\_goods\_conveyed<mark style="color:red;">\*</mark> | String                 | The total nuber of days it will take from whn the parcel is shipped to when it arrives. - 15 Days - max:255 |
| premium\_rate<mark style="color:red;">\*</mark>                 | numeric                |                                                                                                             |
| description\_of\_goods                                          | String                 | A description that tells what the package is. - HD Television.                                              |
| description\_of\_packing                                        | String                 |                                                                                                             |
| driver\_name                                                    | String                 | Name of the driver delivering the parcel - Ahmad Obi. max:255                                               |
| driver\_phone\_no                                               | String                 | Phone number of the driver delivering the parcel - 09088876676. digit:11                                    |
| vehicle\_reg\_no                                                | String                 | The vehicle registration number - 94422342424                                                               |

{% tabs %}
{% tab title="200: OK " %}

```javascript
{
   "success":true,
   "response_message":"Parcel guard policy initiated successfully",
   "response_code":200,
   "data":{
      "token":"PGP163879699018533101"
   }
}
```

{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="PHP" %}
{% code overflow="wrap" lineNumbers="true" %}

```php
<?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;
```

{% endcode %}
{% endtab %}

{% tab title="NODE  JS" %}
{% code overflow="wrap" lineNumbers="true" %}

```javascript
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);
});
```

{% endcode %}
{% endtab %}

{% tab title="CURL" %}
{% code overflow="wrap" %}

```clike
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"
}'
```

{% endcode %}
{% endtab %}
{% endtabs %}

## Verify Parcel Guard Policy

## This endpoint verifies the token which was generated during initiation of the policy.

<mark style="color:blue;">`GET`</mark> `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

#### Headers

| Name                                            | Type   | Description                     |
| ----------------------------------------------- | ------ | ------------------------------- |
| Authorization<mark style="color:red;">\*</mark> | String | Bearer {$secret-key}/{$api-key} |
| Content-Type<mark style="color:red;">\*</mark>  | String | application/json                |

#### Request Body

| Name                                    | Type   | Description                                                                   |
| --------------------------------------- | ------ | ----------------------------------------------------------------------------- |
| token<mark style="color:red;">\*</mark> | String | Note that after 15 minutes, the token expires and you will need to reinitiate |

{% tabs %}
{% tab title="400: Bad Request " %}

```javascript
{
   "success":false,
   "response_message":"Token has expired",
   "response_code":400,
   "data":{
      "error":[
         "Token has expired"
      ]
   }
}
```

{% endtab %}

{% tab title="404: Not Found " %}

```javascript
{
   "success":false,
   "response_message":"Invalid Token",
   "response_code":400,
   "data":{
      "error":[
         "Invalid Token"
      ]
   }
}
```

{% endtab %}

{% tab title="200: OK " %}

```javascript
{
   "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"
           }
]

```

{% endtab %}
{% endtabs %}

{% hint style="info" %}
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.
{% endhint %}

{% tabs %}
{% tab title="PHP" %}
{% code overflow="wrap" lineNumbers="true" %}

```php
<?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;
```

{% endcode %}
{% endtab %}

{% tab title="NODE  JS" %}
{% code overflow="wrap" lineNumbers="true" %}

```javascript
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);
});
```

{% endcode %}
{% endtab %}

{% tab title="CURL" %}
{% code overflow="wrap" %}

```clike
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"
}'
```

{% endcode %}
{% endtab %}
{% endtabs %}

## List All Parcel Guard Policies

## This endpoint returns all the policies created by the merchant

<mark style="color:blue;">`GET`</mark> `https://sandbox.insurpass.com/api/merchant/merchant_parcel_guard_policies`

#### Headers

| Name                                            | Type   | Description                     |
| ----------------------------------------------- | ------ | ------------------------------- |
| Authorization<mark style="color:red;">\*</mark> | String | Bearer {$secret-key}/{$api-key} |
| Content-Type<mark style="color:red;">\*</mark>  | String | application/json                |

{% tabs %}
{% tab title="200: OK " %}

```javascript
{
   "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"
           },

```

{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="PHP" %}
{% code overflow="wrap" lineNumbers="true" %}

```php
<?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;
```

{% endcode %}
{% endtab %}

{% tab title="NODE  JS" %}
{% code overflow="wrap" lineNumbers="true" %}

```javascript
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);
});
```

{% endcode %}
{% endtab %}

{% tab title="CURL" %}
{% code overflow="wrap" %}

```clike
curl --location --request GET https://sandbox.insurpass.com/api/merchant/merchant_parcel_guard_policies' \
--header 'Authorization: Bearer {{SECRETKEY}}' \
--header 'Accept: application/json' \
--data-raw ''
```

{% endcode %}
{% endtab %}
{% endtabs %}

## Parcel Guard Policy Details

## This endpoint returns the merchant policy details.

<mark style="color:green;">`POST`</mark> `http://sandbox.insurpass.com/api/merchant/parcel_guard_policy_details`

**The developer needs to provide the policy number for the policy details to displ**

#### Headers

| Name                                            | Type   | Description                     |
| ----------------------------------------------- | ------ | ------------------------------- |
| Authorization<mark style="color:red;">\*</mark> | String | Bearer {$secret-key}/{$api-key} |
| Content-Type<mark style="color:red;">\*</mark>  | String | application/json                |

#### Request Body

| Name           | Type   | Description                                                                                       |
| -------------- | ------ | ------------------------------------------------------------------------------------------------- |
| Policy\_number | String | The unique number that identifies the purchased  insurance policy - UIC/RE/INP/PGD/13062022/74177 |

{% tabs %}
{% tab title="200: OK " %}

```javascript
{
   "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"
           }
       }
   }
}

```

{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="PHP" %}
{% code overflow="wrap" lineNumbers="true" %}

```php
<?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;
```

{% endcode %}
{% endtab %}

{% tab title="NODE JS" %}
{% code overflow="wrap" lineNumbers="true" %}

```javascript
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);
});
```

{% endcode %}
{% endtab %}

{% tab title="CURL" %}
{% code overflow="wrap" %}

```clike
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"}'
```

{% endcode %}
{% endtab %}
{% endtabs %}

## Parcel Guard Premium Rate

## This endpoint returns a premium rate for a parcel guard policy.

<mark style="color:green;">`POST`</mark> `https://sandbox.insurpass.com/api/merchant/get_parcel_guard_premium_rate`

#### Headers

| Name                                            | Type   | Description                     |
| ----------------------------------------------- | ------ | ------------------------------- |
| Authorization<mark style="color:red;">\*</mark> | String | Bearer {$secret-key}/{$api-key} |
| Content-Type<mark style="color:red;">\*</mark>  | String | application/json                |

#### Request Body

| Name                                                     | Type    | Description                                  |
| -------------------------------------------------------- | ------- | -------------------------------------------- |
| value\_of\_consignment<mark style="color:red;">\*</mark> | numeric | Total value of the parcels combined - 20,000 |

{% tabs %}
{% tab title="200: OK " %}

```javascript
{
   "success":true,
   "response_message":"Parcel quard premium rate get successful",
   "response_code":"",
   "data":{
      "premium_rate":"4500.00", 
       "amount_insured":20000,
   }
}
```

{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="PHP" %}
{% code overflow="wrap" lineNumbers="true" %}

```php
<?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;
```

{% endcode %}
{% endtab %}

{% tab title="NODE  JS" %}
{% code overflow="wrap" lineNumbers="true" %}

```javascript
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);
});
```

{% endcode %}
{% endtab %}

{% tab title="CURL" %}
{% code overflow="wrap" %}

```clike
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
}'
```

{% endcode %}
{% endtab %}
{% endtabs %}

## Parcel Guard Report

## This endpoint returns an object containing a merchant's number of policies and claims

<mark style="color:blue;">`GET`</mark> `https://sandbox.insurpass.com/api/merchant/get_parcel_guard_report`

#### Headers

| Name                                            | Type   | Description                     |
| ----------------------------------------------- | ------ | ------------------------------- |
| Authorization<mark style="color:red;">\*</mark> | String | Bearer {$secret-key}/{$api-key} |
| Content-Type<mark style="color:red;">\*</mark>  | String | application/json                |

{% tabs %}
{% tab title="200: OK " %}

```javascript
{
   "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",
               "system_commission":"400.00",
               "amount_insured":"1000000.00",
               "commission_type":"fixed",
               "min_price":"900001.00",
               "max_price":"1000000.00"
            },
            {
               "id":36,
               "product_id":20,
               "no_of_users":1,
               "provider_price":"0.00",
               "coverdor_commission":"400.00",
               "total_price":"4950.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":"1100000.00",
               "commission_type":"fixed",
               "min_price":"1000001.00",
               "max_price":"1100000.00"
            },
            {
               "id":37,
               "product_id":20,
               "no_of_users":1,
               "provider_price":"0.00",
               "coverdor_commission":"400.00",
               "total_price":"5400.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":"1200000.00",
               "commission_type":"fixed",
               "min_price":"1100001.00",
               "max_price":"1200000.00"
            },
            {
               "id":38,
               "product_id":20,
               "no_of_users":1,
               "provider_price":"0.00",
               "coverdor_commission":"400.00",
               "total_price":"5850.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":"1300000.00",
               "commission_type":"fixed",
               "min_price":"1200001.00",
               "max_price":"1300000.00"
            },
            {
               "id":39,
               "product_id":20,
               "no_of_users":1,
               "provider_price":"0.00",
               "coverdor_commission":"400.00",
               "total_price":"6300.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":"1400000.00",
               "commission_type":"fixed",
               "min_price":"1300001.00",
               "max_price":"1400000.00"
            },
            {
               "id":40,
               "product_id":20,
               "no_of_users":1,
               "provider_price":"0.00",
               "coverdor_commission":"400.00",
               "total_price":"6750.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":"1400000.00",
               "commission_type":"fixed",
               "min_price":"1400001.00",
               "max_price":"1500000.00"
            }
         ]
      }
   ]
}
```

{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="PHP" %}
{% code overflow="wrap" lineNumbers="true" %}

```php
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://sandbox.insurpass.com/api/merchant/get_parcel_guard_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}}',
    'Content-Type: application/json'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
```

{% endcode %}
{% endtab %}

{% tab title="NODE  JS" %}
{% code overflow="wrap" lineNumbers="true" %}

```javascript
var axios = require('axios');
var data = '';

var config = {
  method: 'post',
  url: 'https://sandbox.insurpass.com/api/merchant/get_parcel_guard_report',
  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);
});
```

{% endcode %}
{% endtab %}

{% tab title="CURL" %}
{% code overflow="wrap" %}

```clike
curl --location --request GET https://sandbox.insurpass.com/api/merchant/get_parcel_guard_report' \
--header 'Authorization: Bearer {{SECRETKEY}}' \
--header 'Accept: application/json' \
--data-raw ''
```

{% endcode %}
{% endtab %}
{% endtabs %}

## Parcel Guard mode of Shipment

## This endpoint returns a mode of Shipment for a parcel guard policy.

<mark style="color:blue;">`GET`</mark> `http://sandbox.insurpass.com/api/merchant/get_parcel_guard_mode_of_shipment`

#### Headers

| Name                                            | Type   | Description                     |
| ----------------------------------------------- | ------ | ------------------------------- |
| Authorization<mark style="color:red;">\*</mark> | String | Bearer {$secret-key}/{$api-key} |
| Content-Type<mark style="color:red;">\*</mark>  | String | application/json                |

{% tabs %}
{% tab title="200: OK " %}

```javascript
{
   "success":true,
   "response_message":"mode of shipments get successful",
   "response_code":[
      
   ],
   "data":[
      {
         "id":1,
         "name":"By a register couriers company",
         "description":"By a register couriers company",
         "status":true,
         "created_at":"2022-02-17T14:06:52.000000Z",
         "updated_at":"2022-02-17T14:06:52.000000Z"
      },
      {
         "id":2,
         "name":"By a register transport company",
         "description":"By a register transport company",
         "status":true,
         "created_at":"2022-02-17T14:06:52.000000Z",
         "updated_at":"2022-02-17T14:06:52.000000Z"
      },
      {
         "id":3,
         "name":"By an airline ",
         "description":"By an airline",
         "status":true,
         "created_at":"2022-02-17T14:06:52.000000Z",
         "updated_at":"2022-02-17T14:06:52.000000Z"
      },
      {
         "id":4,
         "name":"By a private commercial driver",
         "description":"By a private commercial driver",
         "status":true,
         "created_at":"2022-02-17T14:06:52.000000Z",
         "updated_at":"2022-02-17T14:06:52.000000Z"
      },
      {
         "id":5,
         "name":"By an insured own vehicle",
         "description":"By an insured own vehicle",
         "status":true,
         "created_at":"2022-02-17T14:06:52.000000Z",
         "updated_at":"2022-02-17T14:06:52.000000Z"
      }
   ]
}
```

{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="PHP" %}
{% code overflow="wrap" lineNumbers="true" %}

```php
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://sandbox.insurpass.com/api/merchant/get_parcel_guard_mode_of_shipment',
  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_HTTPHEADER => array(
    'Authorization: Bearer {{SECRETKEY}}',
    'Content-Type: application/json'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
```

{% endcode %}
{% endtab %}

{% tab title="NODE  JS" %}
{% code overflow="wrap" lineNumbers="true" %}

```javascript
var axios = require('axios');
var data ='';

var config = {
  method: 'post',
  url: 'https://sandbox.insurpass.com/api/merchant/get_parcel_guard_mode_of_shipment',
  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);
});
```

{% endcode %}
{% endtab %}

{% tab title="CURL" %}
{% code overflow="wrap" %}

```clike
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 ''
```

{% endcode %}
{% endtab %}
{% endtabs %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://milonics.gitbook.io/api-documentation/insurpass-api-reference/parcel-guard-insurance/policy.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
