# Comprehensive Motor Policy

## Initiate Comprehensive Motor Policy

## This endpoint initiates the creation of a Comprehensive Motor insurance policy.

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

#### 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                                                                                                                                                                                                                                       |
| ------------------------------------------------------------ | ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| first\_name<mark style="color:red;">\*</mark>                | string       | Principal Customer's first name - **Favour**                                                                                                                                                                                                      |
| last\_name<mark style="color:red;">\*</mark>                 | string       | Principal Customer's surname (Last name) - **Ezedibia**                                                                                                                                                                                           |
| phone\_number<mark style="color:red;">\*</mark>              | numeric      | Principal Customer's phone number - 08102223475 (**digits:11)**                                                                                                                                                                                   |
| email<mark style="color:red;">\*</mark>                      | email        | Principal Customer's email address -- **<email@domain.com>**                                                                                                                                                                                      |
| gender<mark style="color:red;">\*</mark>                     | string       | Principal Customer's gender - female, male                                                                                                                                                                                                        |
| product\_id<mark style="color:red;">\*</mark>                | string       | The unique number that identifies comprehensive motor insurance product you're purchasig - **3**                                                                                                                                                  |
| speedometer\_img<mark style="color:red;">\*</mark>           | string       | image url displaying the speed of the vehicle - [https://images.pexels.com/photos/10840765/pexels-photo-10840765.jpeg](https://www.shutterstock.com/image-vector/realistic-speedometer-isolated-on-transparent-background-1384666046)             |
| engine\_img<mark style="color:red;">\*</mark>                | string       | image url displaying the engine of the vehicle - [https://images.pexels.com/photos/10840765/pexels-photo-10840765.jpeg](https://www.shutterstock.com/image-vector/realistic-speedometer-isolated-on-transparent-background-1384666046)            |
| interior\_img<mark style="color:red;">\*</mark>              | string       | image url displaying the interior (inside) of the vehicle - [https://images.pexels.com/photos/10840765/pexels-photo-10840765.jpeg](https://www.shutterstock.com/image-vector/realistic-speedometer-isolated-on-transparent-background-1384666046) |
| front\_view\_img<mark style="color:red;">\*</mark>           | string       | image url displaying the front view of the vehicle - [https://images.pexels.com/photos/10840765/pexels-photo-10840765.jpeg](https://www.shutterstock.com/image-vector/realistic-speedometer-isolated-on-transparent-background-1384666046)        |
| rear\_view\_img<mark style="color:red;">\*</mark>            | string       | image url displaying the rear (back) view of the vehicle - [https://images.pexels.com/photos/10840765/pexels-photo-10840765.jpeg](https://www.shutterstock.com/image-vector/realistic-speedometer-isolated-on-transparent-background-1384666046)  |
| left\_side\_view\_img<mark style="color:red;">\*</mark>      | string       | image url displaying the left side view of the vehicle - [https://images.pexels.com/photos/10840765/pexels-photo-10840765.jpeg](https://www.shutterstock.com/image-vector/realistic-speedometer-isolated-on-transparent-background-1384666046)    |
| right\_side\_view\_img<mark style="color:red;">\*</mark>     | string       | image url displaying the right side view of the vehicle - [https://images.pexels.com/photos/10840765/pexels-photo-10840765.jpeg](https://www.shutterstock.com/image-vector/realistic-speedometer-isolated-on-transparent-background-1384666046)   |
| vehicle\_license\_img<mark style="color:red;">\*</mark>      | string       | image url of the vehicle's license - [https://images.pexels.com/photos/10840765/pexels-photo-10840765.jpeg](https://www.shutterstock.com/image-vector/realistic-speedometer-isolated-on-transparent-background-1384666046)                        |
| proof\_of\_ownership\_img<mark style="color:red;">\*</mark>  | string       | image url of the vehicle's proof of ownership doment - [https://images.pexels.com/photos/10840765/pexels-photo-10840765.jpeg](https://www.shutterstock.com/image-vector/realistic-speedometer-isolated-on-transparent-background-1384666046)      |
| frequency\_type<mark style="color:red;">\*</mark>            | string       | yearly                                                                                                                                                                                                                                            |
| sum\_insured<mark style="color:red;">\*</mark>               | numeric      | The maximum amount that the insurance company can pay to the Principal customern in the event of an accident- 200,000                                                                                                                             |
| insurance\_cover<mark style="color:red;">\*</mark>           | string       | The type of comprensive insuranc being purchased: *bronze*                                                                                                                                                                                        |
| tracker\_value<mark style="color:red;">\*</mark>             | numeric      | The monetary value of the car tracker - 200,000                                                                                                                                                                                                   |
| diagnostic\_cost<mark style="color:red;">\*</mark>           | numeric      | The estimated amount it would cost to run a diagnostic test on the car - 200,000                                                                                                                                                                  |
| duration<mark style="color:red;">\*</mark>                   | numeric      |                                                                                                                                                                                                                                                   |
| vehicle\_type<mark style="color:red;">\*</mark>              | string       | Truck                                                                                                                                                                                                                                             |
| start\_date<mark style="color:red;">\*</mark>                | format:Y-m-d |                                                                                                                                                                                                                                                   |
| registration\_no<mark style="color:red;">\*</mark>           | string       | The vehicle registration number - 94422342424                                                                                                                                                                                                     |
| vehicle\_make<mark style="color:red;">\*</mark>              | numeric      | Toyota                                                                                                                                                                                                                                            |
| vehicle\_model<mark style="color:red;">\*</mark>             | numeric      | Corona                                                                                                                                                                                                                                            |
| year\_make<mark style="color:red;">\*</mark>                 | format:Y     | The year the vehicle manufactured - 2022                                                                                                                                                                                                          |
| vehicle\_color<mark style="color:red;">\*</mark>             | string       | Blue\<?php                                                                                                                                                                                                                                        |
| engine\_no<mark style="color:red;">\*</mark>                 | string       | 52WVC10338                                                                                                                                                                                                                                        |
| chasis\_no<mark style="color:red;">\*</mark>                 | string       | 002352AD                                                                                                                                                                                                                                          |
| contact\_person\_name<mark style="color:red;">\*</mark>      | string       | Salami Ibrahim                                                                                                                                                                                                                                    |
| contact\_person\_address<mark style="color:red;">\*</mark>   | string       | 38, Atimi Busari                                                                                                                                                                                                                                  |
| contact\_person\_phone\_no<mark style="color:red;">\*</mark> | numeric      | **digits:11 - 09088876543**                                                                                                                                                                                                                       |
| inspection\_date<mark style="color:red;">\*</mark>           | format:Y-m-d | 2022-03-12                                                                                                                                                                                                                                        |

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

```javascript
{
   "success":true,
   "data":{
      "slug":"pfinadknfosieklaldnad",
      "product_id":4,
      "merchant_user_id":1,
      "frequency_type":"monthly",
      "vehicle_value":4000,
      "insurance_cover":"bronze",
      "duration":6,
      "vehicle_type":"truck",
      "start_date":"2022-03-03",
      "end_date":"2022-03-03",
      "registration_no":"94422342424",
      "vehicle_make":"Toyota",
      "vehicle_model":"Hilux",
      "year_make":"2022",
      "vehicle_color":"red",
      "chasis_no":"002352AD",
      "engine_no":"5635366335",
      "speedometer_img":"https://image.com",
      "engine_img":"https://image.com",
      "interior_img":"https://image.com",
      "front_view_img":"https://image.com",
      "rear_view_img":"https://image.com",
      "left_side_view_img":"https://image.com",
      "right_side_view_img":"https://image.com",
      "vehicle_license_img":"https://image.com",
      "policy_number":"TG52622977",
      "proof_of_ownership_img":"https://image.com",
      "contact_person_name":"Salami Kolawole",
      "contact_person_address":"38, Atimi Busari",
      "contact_person_phone_no":"08034565423",
      "inspection_date":"2022-03-12"
   }"response_message":"Comprehensive  policy purchased successfully",
   "response_code":""
}
```

{% endtab %}
{% endtabs %}

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

```php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://sandbox.insurpass.com/api/merchant/comprehensive_motor_initiate_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": "Harry",
  "last_name": "Potter",
  "phone_number": "08045754345",
  "email": "salami@gmail.com",
  "gender": "male",
  "address": "no 5, fairy lane off hogwort roads",
  "relationship": "required|string",
  "variant_type": "confaam",
  "amount_insured": 500000,
  "identity": "required|string",
  "nok_surname": "Granger",
  "nok_othernames": "Hermione",
  "nok_relationship": "required|string",
  "nok_gender": "required|string",
  "nok_phone_no": "09034543643",
  "nok_email_address": "sala@gmi.com",
  "product_id":5,
  "id_url":"https://gmail.com",
  "id_number":"2424253642",
  "id_type":"nin",
  "speedometer_img": "required|string",
  "engine_img": "required|string",
  "interior_img": "required|string",
  "front_view_img": "required|string",
  "rear_view_img": "required|string",
  "left_side_view_img": "required|string",
  "right_side_view_img": "required|string",
  "vehicle_license_img": "required|string",
  "proof_of_ownership_img": "required|string",
  "frequency_type": "required|string",
  "sum_insured": 4000,
  "insurance_cover": "required|string",
  "tracker_value": "required|numeric",
  "diagnostic_cost": 4000,
  "duration": 3,
  "vehicle_type": "required|string",
  "registration_no": "required|string",
  "vehicle_make": "Mercedes",
  "vehicle_model": "required|numeric",
  "year_make": "2022",
  "vehicle_color": "required|string",
  "engine_no": "required|string",
  "chasis_no": "required|string",
  "contact_person_name": "required|string",
  "contact_person_address": "28 Atimi Busari",
  "contact_person_phone_no": "08075656765",
  "inspection_date": "2022-03-23"
}
',
  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": "Harry",
  "last_name": "Potter",
  "phone_number": "08045754345",
  "email": "salami@gmail.com",
  "gender": "male",
  "address": "no 5, fairy lane off hogwort roads",
  "relationship": "required|string",
  "variant_type": "confaam",
  "amount_insured": 500000,
  "identity": "required|string",
  "nok_surname": "Grengar",
  "nok_othernames": "Hermione",
  "nok_relationship": "required|string",
  "nok_gender": "required|string",
  "nok_phone_no": "09034543643",
  "nok_email_address": "sala@gmi.com",
  "product_id":5,
  "id_url":"https://gmail.com",
  "id_number":"2424253642",
  "id_type":"nin",
  "speedometer_img": "required|string",
  "engine_img": "required|string",
  "interior_img": "required|string",
  "front_view_img": "required|string",
  "rear_view_img": "required|string",
  "left_side_view_img": "required|string",
  "right_side_view_img": "required|string",
  "vehicle_license_img": "required|string",
  "proof_of_ownership_img": "required|string",
  "frequency_type": "required|string",
  "sum_insured": 4000,
  "insurance_cover": "required|string",
  "tracker_value": "required|numeric",
  "diagnostic_cost": 4000,
  "duration": 3,
  "vehicle_type": "required|string",
  "registration_no": "required|string",
  "vehicle_make": "Mercedes",
  "vehicle_model": "required|numeric",
  "year_make": "2022",
  "vehicle_color": "required|string",
  "engine_no": "required|string",
  "chasis_no": "required|string",
  "contact_person_name": "required|string",
  "contact_person_address": "28 Atimi Busari",
  "contact_person_phone_no": "08075656765",
  "inspection_date": "2022-03-23"
}
);

var config = {
  method: 'post',
  url: 'https://sandbox.insurpass.com/api/merchant/comprehensive_motor_initiate_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/comprehensive_motor_initiate_policy' \
--header 'Authorization: Bearer {{SECRETKEY}}' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data-raw '{
  "first_name": "Harry",
  "last_name": "Potter",
  "phone_number": "08045754345",
  "email": "salami@gmail.com",
  "gender": "male",
  "address": "no 5, fairy lane off hogwort roads",
  "relationship": "required|string",
  "variant_type": "confaam",
  "amount_insured": 500000,
  "identity": "required|string",
  "nok_surname": "Grengar",
  "nok_othernames": "Hermione",
  "nok_relationship": "required|string",
  "nok_gender": "required|string",
  "nok_phone_no": "09034543643",
  "nok_email_address": "sala@gmi.com",
  "product_id":5,
  "id_url":"https://gmail.com",
  "id_number":"2424253642",
  "id_type":"nin",
  "speedometer_img": "required|string",
  "engine_img": "required|string",
  "interior_img": "required|string",
  "front_view_img": "required|string",
  "rear_view_img": "required|string",
  "left_side_view_img": "required|string",
  "right_side_view_img": "required|string",
  "vehicle_license_img": "required|string",
  "proof_of_ownership_img": "required|string",
  "frequency_type": "required|string",
  "sum_insured": 4000,
  "insurance_cover": "required|string",
  "tracker_value": "required|numeric",
  "diagnostic_cost": 4000,
  "duration": 3,
  "vehicle_type": "required|string",
  "registration_no": "required|string",
  "vehicle_make": "Mercedes",
  "vehicle_model": "required|numeric",
  "year_make": "2022",
  "vehicle_color": "required|string",
  "engine_no": "required|string",
  "chasis_no": "required|string",
  "contact_person_name": "required|string",
  "contact_person_address": "28 Atimi Busari",
  "contact_person_phone_no": "08075656765",
  "inspection_date": "2022-03-23"
}'
```

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

## **Verify** Comprehensive Motor **Policy**

## This endpoints sends a token that verifies the creation of a Comprehensive Motor insurance policy.

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

#### 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 | **"token":"IDP163438169412711526"**  Note that after 15 minutes, the token expires and you will need to reinitiate |

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

```javascript
{
    "success": true,
    "response_message": "Comprehensive fee policy was created successfully",
    "response_code": "",
    "data": {
        "id": 7,
        "user_id": 377,
        "product_id": 5,
        "merchant_id": 1,
        "frequency_type": "yearly",
        "vehicle_value": 4000,
        "insurance_cover": "required|string",
        "duration": "3",
        "vehicle_type": "required|string",
        "start_date": "2022-10-20T22:07:44.478010Z",
        "end_date": "2023-10-19T22:07:44.478022Z",
        "registration_no": "required|string",
        "vehicle_make": "Mercedes",
        "vehicle_model": "required|numeric",
        "year_make": "2022",
        "vehicle_color": "required|string",
        "chasis_no": "required|string",
        "policy_number": "UIC/RE/INP/MOT/20102022/33306",
        "engine_no": "required|string",
        "speedometer_img": "required|string",
        "engine_img": "required|string",
        "interior_img": "required|string",
        "front_view_img": "required|string",
        "rear_view_img": "required|string",
        "left_side_view_img": "required|string",
        "right_side_view_img": "required|string",
        "vehicle_license_img": "required|string",
        "proof_of_ownership_img": "required|string",
        "contact_person_name": "required|string",
        "contact_person_address": "28 Atimi Busari",
        "contact_person_phone_no": "08075656765",
        "inspection_date": "2022-03-23",
        "status": true,
        "created_at": "2022-10-20T22:07:31.000000Z",
        "updated_at": "2022-10-20T22:07:44.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/comprehensive_motor_verify_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;
```

{% endcode %}
{% endtab %}

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

```javascript
var axios = require('axios');
var data = JSON.stringify({
    "token": "IDP1664732927341151853"
});

var config = {
  method: 'post',
  url: 'https://sandbox.insurpass.com/api/merchant/comprehensive_motor_verify_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/comprehensive_motor_verify_policy' \
--header 'Authorization: Bearer {{SECRETKEY}}' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data-raw '{
  "token": "IDP163438169412711526"
}'
```

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

## List All Comprehensive Motor Policies

## This endpoint returns a list of all the Comprehensive Motor insurance Policies

<mark style="color:blue;">`GET`</mark> `https://sandbox.insurpass.com/api/merchant/get_comprehensive_motor_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,
   "data":[
      {
         "slug":"VDNrm7k80yiowdWESbPu3Bo9d8DRlBD3",
         "frequency_type":"monthly",
         "duration":6,
         "vehicle_type":"truck",
         "start_date":"2022-03-03",
         "end_date":"2022-03-03",
         "vehicle_value":4000,
         "insurance_cover":"bronze",
         "status":"activated",
         "policy_number":"TG52622977"
      }
   ],
   "response_message":"Comprehensive policies retrieved successfully",
   "response_code":""
}
```

{% 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_comprehensive_motor_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;
```

{% endcode %}
{% endtab %}

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

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

var config = {
  method: 'get',
  url: 'https://sandbox.insurpass.com/api/merchant/get_comprehensive_motor_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/get_comprehensive_motor_policies' \
--header 'Authorization: Bearer {{SECRETKEY}}' \
--header 'Accept: application/json' \
--data-raw ''
```

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

## Comprehensive Motor Policy Details

## This endpoint returns an object containing a single Comprehensive Motor Policy&#x20;

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

#### 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<mark style="color:red;">\*</mark> | String | The unique number that identifies the purchased  insurance policy - **IN98570819** |

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

```javascript
{
   "success":true,
   "data":{
      "slug":"pfinadknfosieklaldnad",
      "product_id":4,
      "merchant_user_id":1,
      "frequency_type":"monthly",
      "vehicle_value":4000,
      "insurance_cover":"bronze",
      "duration":6,
      "vehicle_type":"truck",
      "start_date":"2022-03-03",
      "end_date":"2022-03-03",
      "registration_no":"94422342424",
      "vehicle_make":"Toyota",
      "vehicle_model":"Hilux",
      "year_make":"2022",
      "vehicle_color":"red",
      "chasis_no":"002352AD",
      "engine_no":"5635366335",
      "speedometer_img":"https://image.com",
      "engine_img":"https://image.com",
      "interior_img":"https://image.com",
      "front_view_img":"https://image.com",
      "rear_view_img":"https://image.com",
      "left_side_view_img":"https://image.com",
      "right_side_view_img":"https://image.com",
      "vehicle_license_img":"https://image.com",
      "policy_number":"TG52622977",
      "proof_of_ownership_img":"https://image.com",
      "contact_person_name":"Salami Kolawole",
      "contact_person_address":"38, Atimi Busari",
      "contact_person_phone_no":"08034565423",
      "inspection_date":"2022-03-12"
   },
   "response_message":"Comprehensive policy detail retrieved successfully",
   "response_code":""
}
```

{% 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_comprehensive_motor_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 =>'{"policyNumber":"UIC/RE/INP/MOT/06102022/89168"}',
  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({
  "policyNumber":"UIC/RE/INP/MOT/06102022/89168"
});

var config = {
  method: 'post',
  url: 'https://sandbox.insurpass.com/api/merchant/get_comprehensive_motor_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/get_comprehensive_motor_policy_details' \
--header 'Authorization: Bearer {{SECRETKEY}}' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data-raw '{
  "policyNumber":"UIC/RE/INP/MOT/06102022/89168"
}'
```

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

## Comprehensive Motor Policy Quote

## &#x20;The endpoint return a quote for a Comprehensive Motor Policy policy.

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

#### Headers

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

#### Request Body

| Name                                             | Type    | Description                                                                              |
| ------------------------------------------------ | ------- | ---------------------------------------------------------------------------------------- |
| product\_id<mark style="color:red;">\*</mark>    | numeric | The unique number that identifies credit life insurance product you're purchasig - **3** |
| vehicle\_value<mark style="color:red;">\*</mark> | numeric | The worth of the vehicle - 200,000                                                       |

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

```javascript
{
   "success":true,
   "data":{
      "premium":3500,
      "amount_insured":20000,
   },
   "response_message":"Comprehensive motor quote retrieved successfully",
   "response_code":""
}
```

{% 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_comprehensive_motor_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 =>'{
  "vehicle_value":3000,"product_id":"5"
}',
  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({
  "vehicle_value":3000,"product_id":"5"
});

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

{% endcode %}
{% endtab %}

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

```clike
curl --location --request POST https://sandbox.insurpass.com/api/merchant/get_comprehensive_motor_policy_quote' \
--header 'Authorization: Bearer {{SECRETKEY}}' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data-raw '{
  "vehicle_value":3000,"product_id":"5"
}'
```

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


---

# Agent Instructions: 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/motor-insurance/comprehensive-motor-insurance/comprehensive-motor-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.
