Getting Started
Check with us to obtain your credentials to use with the API.
Servers
Auth
Env | BASE URL |
---|---|
Prod | https://login.ensuredit.com |
Test | https://login-qa.ensuredit.com |
API
Env | BASE URL |
---|---|
Prod | https://api-prod.ensuredit.com/mis/v1 |
Test | https://api-predev.ensuredit.com/mis/v1 |
Authentication
POST
Env | URL |
---|---|
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:
Key | Value |
---|---|
client_id | <client-id> |
client_secret | <client-secret> |
username | <user-name> |
password | <password> |
grant_type | password |
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
This API is used to upload multiple policy data points at a time through a CSV file.
Key | Value |
---|---|
Content-Type | <multipart/form-data> |
Authorization | Bearer <access_token> |
Key | Value | Acceptable 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> ‘
This API is used to upload a single policy data point at a time.
Key | Value |
---|---|
Content-Type | <application/json> |
Authorization | Bearer <access_token> |
Key | Value | Acceptable 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
- Status Code 200 OK
- Status Code XX_X00