Motor Insurance

    API Endpoint

        https://test.bima.om/
                

Motor APIs & Flow

  • Create quotation: Get motor quotation by passing very basic vehicle details
  • Customize offer: Add or remove optional covers
  • Purchase: Confirm payment by providing payment, customer and additional driver details
  • Required Documents: Finally upload documents if its required

API TOKEN

Token is required to call any API from Bima portal, you can use below API to create new token which is valid for 24 hours.
/api/Auth/GetToken



    Result example :

    {
    "status": 200,
    "data": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJ
                CaW1hQXBwVXNlciIsImp0aSI6IkFQoItZSDWyzpIo9E"
    }

REQUEST PARAMETERS

Field Type Description
username String Bima API user Id/Email
password String User password

Create Quotation

To create vehicle insurance quotation, use this API by sending JSON object as showing below.
/api/Insurance/GetInsuranceOffers



Result example :

{
   "ofr_ReferenceNo": "75069F2D-369F-42C6-8775-B40938278562",
   "ofr_ContactNo": "96895542930",
   "ofr_LicenseNo": "66808212",
   "ofr_VehiclePlateCharCode": "R Y",
   "ofr_VehicleNo": "2731",
   "ofr_ServiceCode": "THIRD_PARTY",
   "ofr_EngineNo": "G4KJFA743984",
   "ofr_ChassisNo": "TMAJ381B1HJ168377",
   "ofr_VehicleRegTypeCode": "1",
   "ofr_NumberofPassengers": 5,
   "ofr_NoOfDoors": 4,
   "ofr_ClassificationCode": "Normal",
   "ofr_ClassificationTitle": "Normal",
   "ofr_EstimateTo": 3929,
   "ofr_EstimateFrom": 2539,
   "ofr_VehicleValue": 0,
   "ofr_MfgYear": 2016,
   "ofr_Weight": null,
   "ofr_VehicleTypeCode": "2",
   "ofr_VehicleMakeCode": "10",
   "ofr_VehicleModelCode": "201004",
   "ofr_VehicleSubModelCode": null,
   "ofr_VehicleType": "4 WHEEL DRIVE",
   "ofr_MakeName": "HYUNDAI",
   "ofr_ModelName": "TUCSON",
   "ofr_SubModelName": null,
   "LOV_VehicleMakeCode": null,
   "LOV_VehiclePlateCharCode": null,
   "lst_VehicleModel": null,
   "lst_VehicleSubModel": null,
   "lst_VehicleType": null,
   "ofr_GeoSpecifications": null,
   "ofr_LangCode": "en",
   "ofr_PolicyStatus": "Incomplete", 
   "ofr_ClientTrackId": null,
   "ofr_ClientCode": null,
   "ofr_CustomerFirstName": null,
   "ofr_CustomerLastName": null,
   "ofr_CustomerEmail": null,
   "ofr_IsRenewalRequest": true,
   "ofr_IsTransferRequest": false,
   "ofr_IsNewPlateRequest": false,
   "ofr_DriverAge": 0,
   "ofr_DeviceName": "android",
   "ProcessCode": null,
   "NoOfClaims": 0,
   "HighValueLimit": 25000,
   "IsHighValueVehicle": false, 
   "allertMessages": [],
   "RequiredAddionalInfo": false,
   "IsValidRequest": true,
   "IsValidRequestDesc": null,
   "RequestStatus": null,
   "RequestMessage": null,
   "StatusCode": "OK",
   "VehicleInsuraceData": {
      "ContactNo": "96895542930",
      "CivilID": "66808212",
      "VehicleTypeCode": "2",
      "VehicleMakeCode": "10",
      "VehicleModelCode": "201004",
      "VehicleRegTypeCode": "1",
      "VehicleRegType": "Private",
      "VehicleType": "4 WHEEL DRIVE",
      "MakeName": "HYUNDAI",
      "ModelName": "TUCSON",
      "GeoSpecifications": "GCCStandard",
      "ClassificationCode": "Normal",
      "ClassificationTitle": "Normal",
      "Color": "BLUE",
      "MfgYear": 2016,
      "VehicleAge": 8,
      "eInsure_status": "Up",
      "PolicyStatus": "Incomplete",
      "ChassisNo": "TMAJ381B1HJ168377",
      "NoOfAxles": "0",
      "EngineNo": "G4KJFA743984",
      "NoOfDoorsCount": 4,
      "NoOfPassengers": 5,
      "VehicleValue": 0,
      "NoOfClaims": 0,
      "DriverAge": 1,
      "LicenseAge": 13,
      "IsHighValueVehicle": false,
      "IsImported": false,
      "IsExpired": false,
      "IsEarlyRenewal": false,
      "ServiceID": 1,
      "ServiceName": "Third Party",
      "ServiceCode": "THIRD_PARTY",
      "ReferenceNo": "75069F2D-369F-42C6-8775-B40938278562",
      "VehiclePlateCharCode": "R Y",
      "VehicleNo": "2731",
      "EstimateTo": 3929,
      "EstimateFrom": 2539,
      "MessageOffers": null,
      "TotalOffers": 0,
      "MinOfferAmount": 0,
      "PolicyDateFrom": "2024-12-07T00:00:00",
      "PolicyDateTo": "2025-12-06T00:00:00",
      "strPolicyDateFrom": "07/12/2024",
      "strPolicyDateTo": "06/12/2025",
      "RegistrationIssueDate_Previous": "2023-12-08T00:00:00",
      "RegistrationEndDate_Previous": "2024-12-06T00:00:00",
      "strRegistrationIssueDate_Previous": "08/12/2023",
      "strRegistrationEndDate_Previous": "06/12/2024",
      "PolicyDateFrom_Previous": "2023-12-07T00:00:00",
      "PolicyDateTo_Previous": "2024-12-06T00:00:00",
      "strPolicyDateFrom_Previous": "07/12/2023",
      "strPolicyDateTo_Previous": "06/12/2024",
      "HighValueLimit": 25000,
      "RequestStatus": null,
      "RequestMessage": null,
      "insuranceOfferProviders": [
         {
            "ProviderID": 10016,
            "ProviderCode": "OQIC_INS",
            "ProviderName": "Oman Qatar Insurance",
            "ImageURLThumbnailProvider": "https://test.bima.om/AD818547/qic-logo_thumb.jpg",
            "StatusCode": "OK",
            "Message": null,
            "RequestStatus": null,
            "RequestMessage": null,
            "InstantPolicyTitle": "instant insurance",
            "Offers": [
               {
                  "ReferenceNo": "75069F2D-369F-42C6-8775-B40938278562",
                  "ReferenceNoPlanID": "3fc49843-1b6d-4342-81f4-a7127a1bed6f",
                  "OfferStartingAmount": 96,
                  "OfferStartingAmount_TAX": 6.66,
                  "OfferAmount": 103.7,
                  "OfferAmount_Previous": 103.7,
                  "OfferAmount_TotalEMI": 0,
                  "TotalInterestAmount": 0,
                  "EMIAmount": 0,
                  "OfferTitle": "Oman Only RO 103.7",
                  "OfferName": "Oman Only",
                  "TrackId": 24020027596633,
                  "PaymentLinkTitle": "Insurance Payment for R Y/2731",
                  "OtherDriverMinAge_Limit": 18,
                  "OtherDriverMaxAge_Limit": 100,
                  "InstallmentIsAllowed": false
               }
            ],
            "FeatureLabels": [
               {
                  "ReferenceNo": "75069F2D-369F-42C6-8775-B40938278562",
                  "ProviderID": 10016,
                  "FeatureID": 16,
                  "FeatureCode": "PAB",
                  "FeatureName": "Driver & Family",
                  "FeatureDescription": "Driver & Family",
                  "FeatureCategoryCode": "CHOICE",
                  "IsSelected_hardcoded": false,
                  "IsMandatory": true,
                  "IsSelected": true,
                  "FeatureValueType": null,
                  "OptionsCount": 0, 
                  "OrderNo": 0,
                  "FeatureSetItemOID": 0,
                  "OptionAmount": 0,
                  "OptionAmount_Calculated": 0,
                  "OptionAmount_Display": 0,
                  "LabelOptions": []
               },
               {
                  "ReferenceNo": "75069F2D-369F-42C6-8775-B40938278562",
                  "ProviderID": 10016,
                  "FeatureID": 28,
                  "FeatureCode": "CAR_REPLACEMENT",
                  "FeatureName": "Bima Car Replacement - RO 0.95",
                  "FeatureDescription": "Bima Car Replacement",
                  "FeatureCategoryCode": "CHOICE",
                  "IsSelected_hardcoded": false,
                  "IsMandatory": false,
                  "IsSelected": true,
                  "FeatureValueType": null,
                  "OptionsCount": 0, 
                  "OrderNo": 200,
                  "FeatureSetItemOID": 1062,
                  "OptionAmount": 0,
                  "OptionAmount_Calculated": 0,
                  "OptionAmount_Display": 0,
                  "LabelOptions": [
                     {
                        "ID": 1062,
                        "OptionAmount": 0.95,
                        "OptionValue": "0.95",
                        "IsSelected": true,
                        "OrderNo": 1,
                        "Title": "3 days",
                        "Code": "0",
                        "FeatureSetItemID": 821,
                        "ProviderID": 10016,
                        "FeatureCategoryCode": null
                     },
                     {
                        "ID": 1063,
                        "OptionAmount": 5,
                        "OptionValue": "5.00",
                        "IsSelected": false,
                        "OrderNo": 2,
                        "Title": "7 days",
                        "Code": "0",
                        "FeatureSetItemID": 821,
                        "ProviderID": 10016,
                        "FeatureCategoryCode": null
                     },
                     {
                        "ID": 1064,
                        "OptionAmount": 10,
                        "OptionValue": "10.00",
                        "IsSelected": false,
                        "OrderNo": 3,
                        "Title": "14 days",
                        "Code": "0",
                        "FeatureSetItemID": 821,
                        "ProviderID": 10016,
                        "FeatureCategoryCode": null
                     }
                  ]
               }
            ],
            "MessagesForCustomer": [],
            "IsValidRequest": true,
            "IsValidRequestDesc": null,
            "InstallmentIsAllowed": false
         }
      ],
      "RequiredAddionalInfo": false,
      "IsValidRequest": true,
      "IsRequiredAcknowledgement": false,
      "IsValidRequestDesc": null,
      "ImageURLs": "https://test.bima.om/img/b8037ba4e0d6.jpg,
                https://test.bima.om/img/491d72faa30e.jpg",
      "Thumbnail_Make": "",
      "allertMessages": [],
      "hasError": false,
      "ModelState_Errors": null
   }
}
                

REQUEST PARAMETERS

Field Type Description
ofr_ContactNo String Customer contact number - 96895542930
ofr_LicenseNo Integer Driver license number - 99086408
ofr_ServiceCode String Insurance type - THIRD_PARTY/FULL_COMPREHENSIVE
ofr_VehiclePlateCharCode String Vehicle plate code - R Y
ofr_VehicleNo String Vehicle plate number - 2731
ofr_LangCode String Language code - en/ar
ofr_VehicleValue Integer (optional) Vehicle value in Riyal Omani
ofr_IsRenewalRequest Boolean Always true
ofr_IsTransferRequest Boolean If customer required want to transfer new insurance to new anther owner
ofr_IsNewPlateRequest Boolean If new vehicle or plate number not available (TBA/0)
ofr_ClientTrackId String (optional) External client track id


API response has status code (ERROR & OK). In case of error, check the request message (description for error code).

Note: In case system did not generated offers and required some additional input, the following steps must followed.

  • Capture the unique reference number received in API response and must added in JSON object for next request including required input.
  • Add additional information/input and send your request again to get offers.
  • Check additional input required sample showing below.

Optional input fields

Field Type Description
ofr_ReferenceNo String Unique reference number (ofr_ReferenceNo)
ofr_DriverAge Integer Driver age in years
ofr_VehicleRegTypeCode String Vehicle registration/usage type e.g: private/commercial
ofr_VehicleTypeCode String Vehicle body type code/id
ofr_VehicleMakeCode String Vehicle brand/make code/id
ofr_VehicleModelCode String Vehicle model code/id
ofr_NumberofPassengers String Passenger or seating capacity
ofr_NoOfDoors Integer Number of doors
ofr_MfgYear Integer Vehicle manufacturing year
ofr_GeoSpecifications String Vehicle geographical specifications (GCCStandard,Imported)
ofr_Weight Integer Vehicle weight in tons (e.g. 2)
ofr_EngineNo String Vehicle engine number
ofr_ChassisNo String Vehicle chassis number
ofr_ClassificationCode String Vehicle classifications (Normal,Sports)

Get Vehicle Value

To get vehicle value, use this API by sending JSON object as showing below.
/api/Insurance/GetVehicleValue


    Get Vehicle Value Payload


    {
    "plate_code": "RY",
    "plate_number": "2731",
    "national_id_no": "99086408",
    "lang_code": "en"
    }


    Get Vehicle Value Response


    {
    "status_code": "200",
    "status_message": "Get vehicle value successfully.",
    "data": {
    "vehivle_value": 1547.85,
    "min_estimate_value": 0.0,
    "max_estimate_value": 0.0
    },
    "COUNTDOWN_ENABLED_TRAVEL_OFFER_PAGE": false,
    "CountDown_StartTime_offerPage": "0001-01-01T00:00:00",
    "CountDown_EndTime_offerPage": "0001-01-01T00:00:00",
    "messages": []
    }

UPDATE OFFER

Quotation contains multiple provider and offers, each offer contain optional and included covers. Included covers are mandatory and can not be changed, but optional covers can be added or removed and have further multiple options and user can change option as per requirements.

Note: When FeatureCategoryCode=CHOICE and LabelOptions has more than one options. Allow user to choose option.


Result example :

    {
    "ProviderID": 10016,
    "ProviderCode": "OQIC_INS",
    "ProviderName": "Oman Qatar Insurance",
    "ImageURLThumbnailProvider": "https://test.bima.om/AD818547/qic-logo_thumb.jpg",
    "StatusCode": "OK",
    "Message": null,
    "RequestStatus": null,
    "RequestMessage": null,
    "InstantPolicyTitle": "instant insurance",
        "Offers": [
                    {
                    "ReferenceNo": "75069F2D-369F-42C6-8775-B40938278562",
                    "ReferenceNoPlanID": "3fc49843-1b6d-4342-81f4-a7127a1bed6f",
                    "OfferStartingAmount": 96,
                    "OfferStartingAmount_TAX": 6.66,
                    "OfferAmount": 103.7,
                    "OfferAmount_Previous": 103.7,
                    "OfferAmount_TotalEMI": 0,
                    "TotalInterestAmount": 0,
                    "EMIAmount": 0,
                    "OfferTitle": "Oman Only RO 103.7",
                    "OfferName": "Oman Only",
                    "TrackId": 24020027596633,
                    "PaymentLinkTitle": "Insurance Payment for R Y/2731",
                    "OtherDriverMinAge_Limit": 18,
                    "OtherDriverMaxAge_Limit": 100,
                    "InstallmentIsAllowed": false
                    }
                ],
                "FeatureLabels": [
                {
                "ReferenceNo": "75069F2D-369F-42C6-8775-B40938278562",
                "ProviderID": 10016,
                "FeatureID": 16,
                "FeatureCode": "PAB",
                "FeatureName": "Driver & Family",
                "FeatureDescription": "Driver & Family",
                "FeatureCategoryCode": "CHOICE",
                "IsSelected_hardcoded": false,
                "IsMandatory": true,
                "IsSelected": true,
                "FeatureValueType": null,
                "OptionsCount": 0,
                "OrderNo": 0,
                "FeatureSetItemOID": 0,
                "OptionAmount": 0,
                "OptionAmount_Calculated": 0,
                "OptionAmount_Display": 0,
                "LabelOptions": []
                },
                {
                "ReferenceNo": "75069F2D-369F-42C6-8775-B40938278562",
                "ProviderID": 10016,
                "FeatureID": 28,
                "FeatureCode": "CAR_REPLACEMENT",
                "FeatureName": "Bima Car Replacement - RO 0.95",
                "FeatureDescription": "Bima Car Replacement",
                "FeatureCategoryCode": "CHOICE",
                "IsSelected_hardcoded": false,
                "IsMandatory": false,
                "IsSelected": true,
                "FeatureValueType": null,
                "OptionsCount": 0,
                "OrderNo": 200,
                "FeatureSetItemOID": 1062,
                "OptionAmount": 0,
                "OptionAmount_Calculated": 0,
                "OptionAmount_Display": 0,
                "LabelOptions": [
                    {
                        "ID": 1062,
                        "OptionAmount": 0.95,
                        "OptionValue": "0.95",
                        "IsSelected": true,
                        "OrderNo": 1,
                        "Title": "3 days",
                        "Code": "0",
                        "FeatureSetItemID": 821,
                        "ProviderID": 10016,
                        "FeatureCategoryCode": null
                    },
                    {
                        "ID": 1063,
                        "OptionAmount": 5,
                        "OptionValue": "5.00",
                        "IsSelected": false,
                        "OrderNo": 2,
                        "Title": "7 days",
                        "Code": "0",
                        "FeatureSetItemID": 821,
                        "ProviderID": 10016,
                        "FeatureCategoryCode": null
                    },
                    {
                        "ID": 1064,
                        "OptionAmount": 10,
                        "OptionValue": "10.00",
                        "IsSelected": false,
                        "OrderNo": 3,
                        "Title": "14 days",
                        "Code": "0",
                        "FeatureSetItemID": 821,
                        "ProviderID": 10016,
                        "FeatureCategoryCode": null
                    }
                ]
            }
        ],
    "MessagesForCustomer": [],
    "IsValidRequest": true,
    "IsValidRequestDesc": null,
    "InstallmentIsAllowed": false
    }


REQUEST PARAMETERS

Field Type Description
ofr_ReferenceNo String Quotation unique reference number (ofr_ReferenceNo)
ProviderID Integer Offer provider id
FeatureCode String Requested cover/feature code
OptionID String Selected option id of cover
IsSelected Boolean Requested cover is added or removed (true/false)
LangCode String Language code en/ar
ReferenceNoPlanIDs String[] Reference number plan IDs (ReferenceNoPlanID) of all offers from a provider

PURCHASE

In order to proceed for payment, its required to check offer validity variable (IsValidRequest) in offer response, offer can not be confirmed when IsValidRequest=false. /api/Insurance/ConfirmRequest

Note: Its required to take additional drivers input and vehicle owner name before payment, these information are required to confirm request in Bima system. Also its important to validate additional driver age and regarding min and max limit is defined in each offer.


    Result example :

    {
    "ofr_ReferenceNo": "75069F2D-369F-42C6-8775-B40938278562",
    "PID": 0,
    "Payment_TrackId": 24020027596633,
    "Payment_TransId": "230221379710",
    "Payment_Id": "728010",
    "PaymentStatus": "APPROVED",
    "WayOfPayment": "Online",
    "PaymentGateway": "EXTERNAL-",
    "LangCode": "en",
    "RequestStatus": "Success",
    "RequestMessage": "Our dear customer\r\n\r\nThe insurance request was received in Bima, the insurance policy is usually issued within 15 minutes. 
                If there are required documents, you will be contacted via WhatsApp.\r\n\r\nThank you for choosing Bima.",
    "Amount": 103.7,
    "FeeAmount": 0.0,
    "customer": {
                    "FirstName": "Ahmed",
                    "LastName": "Al Ajmi",
                    "Email": null
                },
            "additional_drivers": {
            "NotRequired": "no",
                                "data": [
                                            {
                                            "FirstName": "Ahmed ",
                                            "LastName": "Al Ajmi",
                                            "DriverAge": 45
                                            },
                                            {
                                            "FirstName": "Mohammad ",
                                            "LastName": "Al Jabbar",
                                            "DriverAge": 33
                                            }
                                          ]
                                 }
    }


REQUEST PARAMETERS

Field Type Description
ofr_ReferenceNo String Quotation unique reference number (ofr_ReferenceNo)
Payment_TrackId Integer Payment tracking id from selected offer
Payment_TransId String Collector/External payment gateway transaction id
Payment_Id String Collector/External payment id
PaymentStatus String APPROVED
WayOfPayment String Online
PaymentGateway String Will be provided from Bima
LangCode String Language code en/ar (default English)
Amount Double Selected offer amount
FeeAmount Double Payment gateway fee if any

REQUEST PARAMETERS (ADDITIONAL DRIVERS)

Field Type Description
NotRequired String yes/no (if user don't required additional drivers then pass value as no )
FirstName String Additional driver first name
LastName String Additional driver last name
DriverAge int Additional driver age in years (e.g. 85)

REQUEST PARAMETERS (VEHICLE OWNER)

Field Type Description
FirstName String Vehicle owner first name
LastName String Vehicle owner last name
Email String Requester email (Optional)

UPLOAD DOCUMENTS

Its required to upload documents for some requests based on vehicle status and selected insurance provider. After payment confirmation you can get list of required documents for purchased policy.
/api/Insurance/GetDocumentTypes_RequiredForPolicy?refID=75069F2D-369F-42C6-8775-B40938278562&langCode=en


    Result example :

    {
    "HeaderImageURL": "http://test.bima.om/img/uplaodMotor.jpg",
    "UploadMessage": "Upload License front side, License back side, Mulkia back side, Mulkia front side",
    "statusCode": "OK",
    "statusMessage": null,
    "requestID": 4463478,
    "data": [
                {
                "DPTID": 19,
                "ProviderID": 10016,
                "ServiceID": 1,
                "DocTypeID": 20,
                "OrderNo": 18.000,
                "DocTypeCode": "LicenseFront",
                "ServiceCode": null,
                "DocType": "License front side",
                "DocTypeDescription": "",
                "IsMandatory": true,
                "DocumentsData": null
                },
                {
                "DPTID": 20,
                "ProviderID": 10016,
                "ServiceID": 1,
                "DocTypeID": 21,
                "OrderNo": 19.000,
                "DocTypeCode": "LicenseBack",
                "ServiceCode": null,
                "DocType": "License back side",
                "DocTypeDescription": "",
                "IsMandatory": true,
                "DocumentsData": null
                }
           ],
    "data_uploaded": [],
    "FileSizeLimit_Video": 50,
    "FileSizeLimit_Other": 2
    }

REQUEST PARAMETERS

Field Type Description
refID String Quotation unique reference number (ofr_ReferenceNo)
LangCode String Language code en/ar

Use below API to upload document,
/api/Document/Upload


    Result example :


    {
    "status": 200,
    "data": 10218
    }

REQUEST PARAMETERS

Field Type Description
RefID String Quotation unique reference number (ofr_ReferenceNo)
EntityCode String Use fixed code (Insurance) for motor
FileContentType String Standard file content type e.g. application/image
FileName String Short document name
FileExtension String File extension name e.g. .pdf, .jpg
FileSize Integer File size in KB
DocTypeCode String Document type code available in previous API
FileData Bytes[] Document contents in Bytes

OTHER APIs


List of APIs required to load predefined data options for user additional input

  1. Vehicle plate codes /api/Insurance/GetVehiclePlateChars/?langCode=en
  2. Vehicle registration/usage types /api/Insurance/GetRegistrationTypes/?langCode=en
  3. Vehicle make/brand name /api/Insurance/GetMakeListActive/?langCode=en
  4. Vehicle model name /api/Insurance/GetModelListActiveByMakeAndTypeCode/?MakeCode=1&langCode=en&VehicleTypeCode=1
  5. Vehicle body types /api/Insurance/GetVehicleTypesActive?langCode=en&modelCode=400102
  6. Passengers/Seating capacity /api/Insurance/GetNumberofPassengers/?langCode=en
  7. Number of Doors /api/Insurance/GetNoOfDoors/?langCode=en
  8. Manufacturing year /api/Insurance/GetMfgYears/?ServiceCode=THIRD_PARTY&langCode=en