Third Party Motor Policy

Initiate Third Party Motor Policy

This endpoint initiates the creation of a Third Party Motor insurance policy.

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

This endpoint is used to purchase the third party insurance plan

Headers

Request Body

{
   "success":true,
   "response_message":"Third Party Motor Policy verified successfully",
   "response_code":"",
   "data":{
      "product_id":4,
      "merchant_id":1,
      "frequency_type":"yearly",
      "vehicle_value":"35000",
      "vehicle_type":"truck",
      "start_date":"2022-03-16T00:00:00.000000Z",
      "end_date":"2023-03-16T00:00:00.000000Z",
      "registration_no":"4242342424",
      "vehicle_make":"toyota",
      "vehicle_model":"Camry",
      "year_make":"2002",
      "vehicle_color":"green",
      "chasis_no":"4424542242",
      "engine_no":"564647442424",
      "class_of_insurance":"",
      "certificate_no":"908675689",
      "vehicle_front_side_image":"image_url",
      "vehicle_back_side_image":"image_url",
      "vehicle_left_side_image":"image_url",
      "vehicle_right_side_image":"image_url",
      "policy_number":"UIC/HGJ/7685/GHF",
      "created_at":"2022-03-16T08:40:57.000000Z",
      "updated_at":"2022-03-16T15:50:54.000000Z"
   }
}
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://sandbox.insurpass.com/api/merchant/third_party_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": "Tervor",
    "last_name": "Belmont",
    "phone_number": "08045754345",
    "email": "salami@gmail.com",
    "gender": "male",
    "variant_type": "confaam",
    "amount_insured": 6000,
    "identity": "required|string",
    "product_id": "2",
    "vehicle_type": "lorry",
    "registration_no": "68656456AS",
    "vehicle_make": "toyota",
    "vehicle_model": "hilux",
    "year_make": "2007",
    "vehicle_color": "orange",
    "engine_no": "564535354786",
    "chasis_no": "8767574657",
    "engine_img": "https://image.jpg",
    "interior_img": "https://image.jpg",
    "class_of_insurance": "https://image.jpg",
    "certificate_no": "https://image.jpg",
    "vehicle_value": "80000",
    "vehicle_front_side_image": "https://image.jpg",
    "vehicle_back_side_image": "https://image.jpg",
    "vehicle_left_side_image": "https://image.jpg",
    "vehicle_right_side_image": "https://image.jpg"
}',
  CURLOPT_HTTPHEADER => array(
    'Authorization: Bearer {{SECRETKEY}}',
    'Content-Type: application/json'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

Verify Third Party Motor Policy

This endpoints sends a token that verifies the creation of a Verify Third Party Motor insurance policy.

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

Headers

Request Body

{
    "success": true,
    "response_message": "Third Party Motor Policy verified successfully",
    "response_code": "",
    "data": {
        "product_id": 2,
        "merchant_id": 1,
        "frequency_type": "yearly",
        "vehicle_value": "80000",
        "insurance_cover": null,
        "duration": null,
        "vehicle_type": "lorry",
        "start_date": "2022-10-20T00:00:00.000000Z",
        "end_date": "2023-10-19T00:00:00.000000Z",
        "registration_no": "toyota",
        "vehicle_make": "https://image.jpg",
        "vehicle_model": "hilux",
        "year_make": "2007",
        "vehicle_color": "orange",
        "chasis_no": "8767574657",
        "engine_no": "564535354786",
        "policy_number": "UIC/RE/INP/MTP/20102022/50173",
        "class_of_insurance": "https://image.jpg",
        "certificate_no": "https://image.jpg",
        "engine_img": "https://image.jpg",
        "interior_img": "https://image.jpg",
        "vehicle_front_side_image": "https://image.jpg",
        "vehicle_back_side_image": "https://image.jpg",
        "vehicle_left_side_image": "https://image.jpg",
        "vehicle_right_side_image": "https://image.jpg",
        "status": true,
        "product_code": "TPP",
        "created_at": "2022-10-20T22:31:25.000000Z",
        "updated_at": "2022-10-20T22:32:32.000000Z"
    }
}jso

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

<?php

$curl = curl_init();

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

$response = curl_exec($curl);

curl_close($curl);
echo $response;

List All Third Party Motor Policies

This endpoint returns a list of all the Third Party Motor insurance products

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

Headers

{
   "success":true,
   "response_message":"Third Party Policies retrieved successfully",
   "response_code":"",
   "data":[
      {
         "frequency_type":"yearly",
         "vehicle_type":"required|string",
         "start_date":"2022-03-16T00:00:00.000000Z",
         "end_date":"2023-03-16T00:00:00.000000Z",
         "vehicle_value":"35000",
         "policy_number":"UIC/RE/INP/MTP/16032022/32398"
      }
   ]
}
<?php

$curl = curl_init();

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

Third Party Motor Policy Details

This endpoint returns an object containing a single Third Party Motor Policy

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

Headers

Request Body

{
    "success": true,
    "response_message": "Third Party policy details successfully",
    "response_code": "",
    "data": {
        "id": 10,
        "user_id": 377,
        "product_id": 2,
        "merchant_id": 1,
        "frequency_type": "yearly",
        "vehicle_value": "80000",
        "insurance_cover": null,
        "duration": null,
        "vehicle_type": "lorry",
        "start_date": "2022-10-20T00:00:00.000000Z",
        "end_date": "2023-10-19T00:00:00.000000Z",
        "registration_no": "toyota",
        "vehicle_make": "https://image.jpg",
        "vehicle_model": "hilux",
        "year_make": "2007",
        "vehicle_color": "orange",
        "chasis_no": "8767574657",
        "engine_no": "564535354786",
        "policy_number": "UIC/RE/INP/MTP/20102022/50173",
        "class_of_insurance": "https://image.jpg",
        "certificate_no": "https://image.jpg",
        "engine_img": "https://image.jpg",
        "interior_img": "https://image.jpg",
        "vehicle_front_side_image": "https://image.jpg",
        "vehicle_back_side_image": "https://image.jpg",
        "vehicle_left_side_image": "https://image.jpg",
        "vehicle_right_side_image": "https://image.jpg",
        "status": true,
        "product_code": "TPP",
        "created_at": "2022-10-20T22:31:25.000000Z",
        "updated_at": "2022-10-20T22:32:32.000000Z",
        "product": {
            "id": 2,
            "name": "Malaria Care Plan Plus",
            "details": "<p><strong>Malaria Care Plus Plan</strong></p><p>The Malaria Care Plus Plan provides customers with malaria test and treatment at over 1700 partner pharmacies nationwide, hospital expense reimbursement to treat any illness, and a life insurance benefit.</p><p><strong><br></strong></p><p><strong>Benefits&nbsp;</strong></p><p></p><ul><li>Quality malaria test and drugs.</li><li>The customer gets one treatment per month.</li><li>Zero waiting time at partner pharmacies.</li><li>4 days waiting period after payment.</li><li>Upon the demise of a customer, the Malaria Care Plus Plan pays the customer's beneficiary a life insurance benefit of #100,000.</li><li>If the customer falls ill and is admitted to a hospital for two or more nights, this plan pays the customer a hospital expense reimbursement of #20,000&nbsp;</li></ul><p></p><p><strong>Futuristic Benefits</strong>&nbsp;</p><p></p><ul><li>Regular blood pressure checks&nbsp;</li><li>Diabetics screening&nbsp;</li><li>Chat with a health professional on your phone</li></ul><p></p><p><strong>Price&nbsp;</strong></p><p><span style=\"font-weight: var(--bs-body-font-weight); text-align: var(--bs-body-text-align);\">The Malaria Care Plus plan costs #600 per month per customer</span><br></p>",
            "beneficiaries": true,
            "max_beneficiaries": 3,
            "provider_id": 1,
            "logo_url": "logo.png",
            "enable": true,
            "created_at": "2022-04-06T14:01:52.000000Z",
            "updated_at": "2022-04-09T09:25:57.000000Z",
            "service_id": 1,
            "product_class_id": 0,
            "service": {
                "id": 1,
                "name": "Micro Health ",
                "description": "Micro Health",
                "status": "inactive",
                "created_at": "2022-04-06T14:01:52.000000Z",
                "updated_at": null,
                "code": "micro-health",
                "provider_id": 1,
                "logo_path": "logo.png",
                "short_description": "School Fees Protection Plan"
            }
        },
        "transactions": [
            {
                "id": 971,
                "user_id": 377,
                "amount": "600.00",
                "product_id": 2,
                "status": "successful",
                "type": "credit",
                "subscriptions_id": 10,
                "merchant_user_id": 1,
                "created_at": "2022-10-20T22:31:25.000000Z",
                "updated_at": "2022-10-20T22:32:31.000000Z",
                "merchant_commission": "12.00",
                "total_commission": "0.00",
                "message": "Payment for third party subscriptions | required|string required|string",
                "platform": "Bimacred",
                "channel": "API",
                "currency": null,
                "subscription_type": "App\\Models\\ThirdPartyMotor",
                "transaction_ref": "TPMI1666305085377207224",
                "transaction_date": null,
                "admin_id": 1,
                "provider_id": 1,
                "insurpass_commission": 0,
                "provider_amount": 588,
                "settlement_status": null
            }
        ],
        "user": {
            "first_name": "required|string",
            "middle_name": null,
            "surname": "required|string",
            "phone_no": "08045754345",
            "email": "salami@gmail.com",
            "address": null,
            "gender": "male",
            "date_of_birth": null,
            "password": null,
            "policy_no": null,
            "have_beneficiaries": false,
            "enable": true,
            "next_of_kin_full_name": null,
            "merchant_user_id": null,
            "user_type": "user",
            "created_at": "2022-09-14T10:48:24.000000Z",
            "updated_at": "2022-09-14T10:48:24.000000Z",
            "principal_policy_no": null,
            "nin_number": "2424253642",
            "id_url": "https://gmail.com",
            "profile_url": null,
            "company_id": null,
            "verify_phone": 0,
            "verify_email": 0,
            "town": null,
            "state_of_residence": null,
            "transaction_pin": null,
            "occupation": null,
            "id_type": null
        }
    }
}
<?php

$curl = curl_init();

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

$response = curl_exec($curl);

curl_close($curl);
echo $response;

Third Party Motor Policy Quote

The endpoint return a quote for a Third Party Motor Policy.

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

Headers

Request Body

{
   "success":true,
   "data":{
      "premium":3500
   },
   "response_message":"Third party motor quote retrieved successfully",
   "response_code":""
}
<?php

$curl = curl_init();

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

$response = curl_exec($curl);

curl_close($curl);
echo $response;

Last updated