This document describes the endpoints, methods, and data formats that you can use to interact with MIS Bulk and Single Policy Upload APIs for pushing data into MIS.

Getting Started

Check with us to obtain your credentials to use with the API.

Servers

Auth

API

Authentication

POST

EnvURL
Test<server-base-url>/auth/realms/ensuredit-sprint/protocol/openid-connect/token
Prod<server-base-url>/auth/realms/ensuredit/protocol/openid-connect/token

Generate an Auth token which needs to be passed as a Bearer token header for all the API interactions.

Request Body

The request body should be x-www-form-urlencoded with the following parameters:

KeyValue
client_id<client-id>
client_secret<client-secret>
username<user-name>
password<password>
grant_typepassword

Successful Response:

  • Status Code: 200 OK

{
“access_token”: “”,
“expires_in”: 3600,
“refresh_expires_in”: 864000,
“refresh_token”: “<refresh-token”,
“token_type”: “Bearer”,
“not-before-policy”: 0,
“session_state”: “e4a4fa5e-fd9a-432c-87ba-419f574400d4”,
“scope”: “email Groups profile phone”
}

curl –location ‘https://login-qa.ensuredit.com/auth/realms/ensuredit-sprint/protocol/openid-connect/token’ \
–header ‘Content-Type: application/x-www-form-urlencoded’ \
–data-urlencode ‘client_id=<client-id>’ \
–data-urlencode ‘client_secret=<client-secret>’ \
–data-urlencode ‘username=<user-name>’ \
–data-urlencode ‘password=<user-password>’ \
–data-urlencode ‘grant_type=password’

Endpoints

POST <api-base-url>/bulk-upload?product=<product-name>&data_type=POLICIES

This API is used to upload multiple policy data points at a time through a CSV file.

KeyValue
Content-Type<multipart/form-data>
AuthorizationBearer <access_token>
KeyValueAcceptable Values
product<product-name>COMMERCIAL_VEHICLE,
OTHER, FOUR_WHEELER
TRAVEL, LIFE,
TWO_WHEELER,
HEALTH
file<your file>A csv file

Replace with valid product name.

The request body must contain the file to be uploaded in a multipart form data format. The key for the file part should be file

Successful Response:

  • Status Code: 200 OK

{
“regNo”: “XXXXXX3300”,
“vehicleClass”: “XXXXX Car(LMV)”,
“chassis”: “XXXXXXXXX548819”,
“engine”: “XXXXXX73470”,
“vehicleManufacturerName”: “XXXXXX SUZUKI XXXX LTD”,
“model”: “X XXXXNO XXXXX “,
“vehicleColour”: “XXXXXXGE”,
“type”: “XXXXXX”,
“normsType”: “XXXXXX STAGE IV”,
“bodyType”: “XXXXXX”,
“ownerCount”: “X”,
“owner”: “XXXXXX PASHA”,
“ownerFatherName”: “XXXX VAZEER”,
“mobileNumber”: null,
“status”: “XXXXXX”,
“statusAsOn”: “XX-Nov-XXXX”,
“regAuthority”: “XXXXXX CENTRAL RTO, XXXXXXX”,
“regDate”: “XX-Oct-XXXX”,
“vehicleManufacturingMonthYear”: “X/XXXX”,
“rcExpiryDate”: “XX-Oct-XXXX”,
“vehicleTaxUpto”: “XX-Oct-XXXX”,
“vehicleInsuranceCompanyName”: “XXXXX Lombard General Insurance Co. Ltd.”,
“vehicleInsuranceUpto”: “XX-Nov-XXXX”,
“vehicleInsurancePolicyNumber”: “XXXX/XXXXXXXXX/XX/XXX”,
“rcFinancer”: “On Cash”,
“presentAddress”: “# XX/X XXXXX XXXXAN NEAR MICO , BG ROAD XXXXXXX POST,BANGALORE, -XXXXXX”,
“permanentAddress”: “# XX/X XXXXX XXXXAN NEAR MICO , BG ROAD XXXXXXX POST,BANGALORE, -XXXXXX”,
“vehicleCubicCapacity”: “XXXX.0”,
“grossVehicleWeight”: “XXXX”,
“unladenWeight”: “XXX”,
“vehicleCategory”: “XXX”,
“rcStandardCap”: “NA”,
“vehicleCylindersNo”: “X”,
“vehicleSeatCapacity”: “X”,
“vehicleSleeperCapacity”: “NA”,
“vehicleStandingCapacity”: “NA”,
“wheelbase”: “X”,
“vehicleNumber”: “XXXXXX3300”,
“puccNumber”: “NA”,
“puccUpto”: “NA”,
“blacklistStatus”: “NA”,
“blacklistDetails”: [
“NA”
],
“permitIssueDate”: null,
“permitNumber”: null,
“permitType”: null,
“permitValidFrom”: null,
“permitValidUpto”: null,
“nonUseStatus”: “N”,
“nonUseFrom”: null,
“nonUseTo”: null,
“nationalPermitNumber”: null,
“nationalPermitUpto”: null,
“nationalPermitIssuedBy”: null,
“isCommercial”: false,
“nocDetails”: “NA”,
“dbResult”: false,
“partialData”: false,
“mmvResponse”: null,
“financed”: false
}

Successful Response:

  • Status Code: 200 OK

{
“code”: 404,
“message”: “Vehicle not found”
}

curl –location ‘<api_base_url>/api/vehicle-lookup/info/KA01MSXXXX’ \
–header ‘Authorization: Bearer <auth-token> ‘

Single Policy Upload

POST POST <api-base-url>/single-upload?product=<product-name>

This API is used to upload a single policy data point at a time.

KeyValue
Content-Type<application/json>
AuthorizationBearer <access_token>
KeyValueAcceptable Values
product<product-name>PRODUCT

Replace with valid product name.

The request body is of json type.

For complete list of acceptable fields and description, please check this https://docs.google.com/spreadsheets/d/1McAL3wvzkmoL3pNwXf0rqq6Cyg68vxmu1oPrZ2UUXLU/edit?usp=sharing

Here is a sample request

{
“SUB_PRODUCTS”: “PA”,
“COMPANY_NAME”: “Digit”,
“POLICY_NUMBER”: “AXCEWS”,
“SOLD_AT”: “2024-04-30”,
“PLAN_NAME”: “aczczcz”,
“BUSINESS_TYPE”: “Renewal”,
“POLICY_START_DATE”: “2024-05-28”,
“POLICY_END_DATE”: “2025-05-02”, “
SUM_INSURED”: 11222,
“PROPOSER_DETAILS_PHONE_NUMBER”: “9820202922”,
“PROPOSER_DETAILS_EMAIL”: “ccscz@ca.com”,
“PAYING_AMOUNT”: 10000,
“PREMIUM_AMOUNT”: 2020
}

  • Status Code 200 OK

{
“code”: “200”, “
status”: “success”,
“data”: { “SUB_PRODUCTS”: “PA”,
“COMPANY_NAME”: “Digit”,
“POLICY_NUMBER”: “AXCEWS”,
“SOLD_AT”: “2024-04-30”,
“PLAN_NAME”: “aczczcz”,
“BUSINESS_TYPE”: “Renewal”,
“POLICY_START_DATE”: “2024-05-28”,
“POLICY_END_DATE”: “2025-05-02”,
“SUM_INSURED”: 11222.0,
“PROPOSER_DETAILS_PHONE_NUMBER”: “9820202922”,
“PROPOSER_DETAILS_EMAIL”: “ccscz@ca.com”,
“PAYING_AMOUNT”: 10000.0,
“PREMIUM_AMOUNT”: 2020.0,
“hash_key”: “5bd48cfbe776f5ecbcc2ee6720e7f3f4”,
“system_metadata”: { “upload_type”: “single_upload”, “timestamp”: “2024-06-03 04:43:46.264828”,
“source”: “OFFLINE”,
“data_type”: “POLICIES”,
“product”: “HEALTH”,
“organization_id”: “1310b652-391b-4141-8512-23ebc216cd6e”,
“created_by”: “8dd8b742-4a19-4f2a-8a0e-816753ec58ab”
}
}
}

  • Status Code XX_X00

{
“code”: “XX_X00”,
“status”:”FAIL”,
“error”: {} or “String message”
}


curl –location ‘<server-url>/single-upload?product=<product-name>’ \
–header ‘Authorization: Bearer <access-token>’ \
–header ‘Content-Type: application/json’ \
–data-raw ‘{ “SUB_PRODUCTS”: “PA”, “COMPANY_NAME”: “Digit”, “POLICY_NUMBER”: “AXCEWS”,
“SOLD_AT”: “2024-04-30”,
“PLAN_NAME”: “aczczcz”,
“BUSINESS_TYPE”: “Renewal”,
“POLICY_START_DATE”: “2024-05-28”,
“POLICY_END_DATE”: “2025-05-02”,
“SUM_INSURED”: 11222, “PROPOSER_DETAILS_PHONE_NUMBER”: “9820202922”,
“PROPOSER_DETAILS_EMAIL”: “ccscz@ca.com”,
“PAYING_AMOUNT”: 10000, “PREMIUM_AMOUNT”: 2020
}’