Comprehensive Motor Policy

Initiate Comprehensive Motor Policy

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

POST https://sandbox.insurpass.com/api/merchant/comprehensive_motor_initiate_policy

Headers

Name
Type
Description

Authorization*

String

Bearer {$secret-key}/{$api-key}

Content-Type*

String

application/json

Request Body

Name
Type
Description

first_name*

string

Principal Customer's first name - Favour

last_name*

string

Principal Customer's surname (Last name) - Ezedibia

phone_number*

numeric

Principal Customer's phone number - 08102223475 (digits:11)

email*

email

Principal Customer's email address -- email@domain.com

gender*

string

Principal Customer's gender - female, male

product_id*

string

The unique number that identifies comprehensive motor insurance product you're purchasig - 3

speedometer_img*

string

engine_img*

string

interior_img*

string

front_view_img*

string

rear_view_img*

string

left_side_view_img*

string

right_side_view_img*

string

vehicle_license_img*

string

proof_of_ownership_img*

string

frequency_type*

string

yearly

sum_insured*

numeric

The maximum amount that the insurance company can pay to the Principal customern in the event of an accident- 200,000

insurance_cover*

string

The type of comprensive insuranc being purchased: bronze

tracker_value*

numeric

The monetary value of the car tracker - 200,000

diagnostic_cost*

numeric

The estimated amount it would cost to run a diagnostic test on the car - 200,000

duration*

numeric

vehicle_type*

string

Truck

start_date*

format:Y-m-d

registration_no*

string

The vehicle registration number - 94422342424

vehicle_make*

numeric

Toyota

vehicle_model*

numeric

Corona

year_make*

format:Y

The year the vehicle manufactured - 2022

vehicle_color*

string

Blue<?php

engine_no*

string

52WVC10338

chasis_no*

string

002352AD

contact_person_name*

string

Salami Ibrahim

contact_person_address*

string

38, Atimi Busari

contact_person_phone_no*

numeric

digits:11 - 09088876543

inspection_date*

format:Y-m-d

2022-03-12

{
   "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":""
}

$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;

Verify Comprehensive Motor Policy

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

POST https://sandbox.insurpass.com/api/merchant/comprehensive_motor_verify_policy

Headers

Name
Type
Description

Authorization*

String

Bearer {$secret-key}/{$api-key}

Content-Type*

String

application/json

Request Body

Name
Type
Description

token*

String

"token":"IDP163438169412711526" Note that after 15 minutes, the token expires and you will need to reinitiate

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

The Initiate token expires in 15 minutes, and if a user does not verify his/her subscription after 15 minutes of initiation, the details of the subscription will be deleted.

<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://sandbox.insurpass.com/api/merchant/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;

List All Comprehensive Motor Policies

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

GET https://sandbox.insurpass.com/api/merchant/get_comprehensive_motor_policies

Headers

Name
Type
Description

Authorization*

String

Bearer {$secret-key}/{$api-key}

Content-Type*

String

application/json

{
   "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":""
}
<?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;

Comprehensive Motor Policy Details

This endpoint returns an object containing a single Comprehensive Motor Policy

POST https://sandbox.insurpass.com/api/merchant/get_comprehensive_motor_policy_details

Headers

Name
Type
Description

Authorization*

String

Bearer {$secret-key}/{$api-key}

Content-Type*

String

application/json

Request Body

Name
Type
Description

Policy_number*

String

The unique number that identifies the purchased insurance policy - IN98570819

{
   "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":""
}
<?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;

Comprehensive Motor Policy Quote

The endpoint return a quote for a Comprehensive Motor Policy policy.

POST https://sandbox.insurpass.com/api/merchant/get_comprehensive_motor_policy_quote

Headers

Name
Type
Description

Authorization*

String

Bearer {$secret-key}/{$api-key}

Content-Type

String

Authorization

Request Body

Name
Type
Description

product_id*

numeric

The unique number that identifies credit life insurance product you're purchasig - 3

vehicle_value*

numeric

The worth of the vehicle - 200,000

{
   "success":true,
   "data":{
      "premium":3500,
      "amount_insured":20000,
   },
   "response_message":"Comprehensive motor quote retrieved successfully",
   "response_code":""
}
<?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;

Last updated