Travel Insurance
API Endpoint
https://test.bima.om/
Bima insurance provide APIs for travel insurance, you can use below APIs/Process to generate offers.
Travel APIs & Flow
- Create quotation: Get travel quotation by passing very basic details
- Customize offer: Add or remove optional covers
- Update Travelers: Update travelers details
- Purchase: Confirm payment by providing payment details
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/Token
Token Payload :
{
"username": "appuser_abc",
"password": "password"
}
Token Response :
{
"status_code": "200",
"status_message": "Token Created Successfully",
"data": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJCaW1hQXBwVXNlciIsImp0aSI6IkFQSVVzZXJfX0lkZW50aWZpZXIiLCJyb2xlIjoiQVBJVXNlciIsImNsaWVudENvZGUiOiJCSU1BQVBQIiwicGF5bWVudEdhdGV3YXkiOiJFeHRlcm5hbF9CSU1BIiwiaHR0cDovL3NjaGVtYXMueG1sc29hcC5vcmcvd3MvMjAwNS8wNS9pZGVudGl0eS9jbGFpbXMvbmFtZSI6IkJpbWFBcHBVc2VyIiwiZXhwIjoxNzA5MDIzMzczLCJpc3MiOiJodHRwOi8vbG9jYWxob3N0IiwiYXVkIjoiaHR0cDovL2xvY2FsaG9zdCJ9.tHEkAai1Qi129QOm70aPmYQKw2WmgVfdtDPCUfGINTk",
"messages": []
}
REQUEST PARAMETERS
| Field | Type | Limit | Required | Description |
|---|---|---|---|---|
| username | String | 5-20 Cheracters | Yes | Bima API user Id/Email |
| password | String | 10-20 Cheracters | Yes | User password |
Create Quotation
To create travel insurance quotation, use this API by sending JSON object as showing below.
/api/Insurance/CreateQuotation
{
"request_type": "TRAVEL",
"voucher_code": "",
"lang_code": "en",
"customer": {
"contact_no": 96895542930,
"title": "mr",
"first_name": "",
"last_name": "",
"nationality_country_code": "AE",
"residence_country_code": "AE"
},
"request_data": [
{
"code": "travel_details",
"value": [
{
"code": "country_code_from",
"value": "AE"
},
{
"code": "country_code_to",
"value": "OM"
},
{
"code": "departure_date",
"value": "25/5/2024"
},
{
"code": "return_date",
"value": "05/6/2024"
}
]
},
{
"code": "travelers_details",
"value": [
{
"code": "traveler1",
"value": [
{
"code": "first_name",
"value": ""
},
{
"code": "last_name",
"value": ""
},
{
"code": "date_of_birth",
"value": "05/05/1994"
},
{
"code": "nationality_country_code",
"value": "AE"
},
{
"code": "relationship",
"value": "Self"
},
{
"code": "gender",
"value": "male"
},
{
"code": "passport_no",
"value": "P786EGS"
},
{
"code": "title_code",
"value": "Mr"
}
]
},
{
"code": "traveler2",
"value": [
{
"code": "first_name",
"value": ""
},
{
"code": "last_name",
"value": ""
},
{
"code": "date_of_birth",
"value": "05/05/1991"
},
{
"code": "nationality_country_code",
"value": "AE"
},
{
"code": "relationship",
"value": "Father"
},
{
"code": "gender",
"value": "male"
},
{
"code": "passport_no",
"value": "P786EGF"
},
{
"code": "title_code",
"value": "Mr"
}
]
}
]
}
]
}
{
"status_code": "200",
"status_message": "Offers find successfully",
"data": {
"quotation_id": "25BC56C5-EFCE-4308-8DAB-03A3C3C4D93F",
"quotation_no": "25BC56C5-EFCE-4308-8DAB-03A3C3C4D93F",
"details": {
"items": [
{
"code": "travel_details",
"title": "Travel Details",
"items": [
{
"code": "country_code_from",
"value": "AE"
},
{
"code": "country_code_to",
"value": "OM"
},
{
"code": "country_name_from",
"value": "United Arab Emirates"
},
{
"code": "country_name_to",
"value": "Oman"
},
{
"code": "traveling_way",
"value": "Inbound"
},
{
"code": "total_travelers_quantity",
"value": 0
},
{
"code": "departure_date",
"value": "25/05/2024"
},
{
"code": "return_date",
"value": "05/06/2024"
},
{
"code": "trip_type_code",
"value": ""
},
{
"code": "insured_no_of_days",
"value": 0
},
{
"code": "customer_type_code",
"value": ""
},
{
"code": "residence_country_name",
"value": "United Arab Emirates"
},
{
"code": "residence_country_code",
"value": "AE"
},
{
"code": "travel_region_code",
"value": ""
}
]
},
{
"code": "travelers_details",
"title": "Travelers Detail",
"items": [
{
"code": "traveler1",
"value": [
{
"code": "id",
"value": "291019"
},
{
"code": "first_name",
"value": ""
},
{
"code": "last_name",
"value": ""
},
{
"code": "date_of_birth",
"value": "05/05/1994"
},
{
"code": "passport_no",
"value": "P786EGS"
},
{
"code": "residence_country_code",
"value": ""
},
{
"code": "nationality_country_code",
"value": "AE"
},
{
"code": "nationality_country_name",
"value": "Emirati"
},
{
"code": "relationship",
"value": "Self"
},
{
"code": "gender",
"value": "male"
},
{
"code": "age_type",
"value": ""
},
{
"code": "title",
"value": "Mr"
},
{
"code": "title_code",
"value": "Mr"
}
]
},
{
"code": "traveler2",
"value": [
{
"code": "id",
"value": "291020"
},
{
"code": "first_name",
"value": ""
},
{
"code": "last_name",
"value": ""
},
{
"code": "date_of_birth",
"value": "05/05/1991"
},
{
"code": "passport_no",
"value": "P786EGF"
},
{
"code": "residence_country_code",
"value": ""
},
{
"code": "nationality_country_code",
"value": "AE"
},
{
"code": "nationality_country_name",
"value": "Emirati"
},
{
"code": "relationship",
"value": "Father"
},
{
"code": "gender",
"value": "male"
},
{
"code": "age_type",
"value": ""
},
{
"code": "title",
"value": "Mr"
},
{
"code": "title_code",
"value": "Mr"
}
]
}
]
}
]
},
"providers": [
{
"id": "10051",
"code": "GIG_INS",
"name": "GIG (Previously AXA)",
"description": null,
"thumbnail_url": "http://localhost:1044/\\Uploads\\Provider\\4KLM77-10A5-8FF1-K647-FC7DB23EK4\\gig-logo-thumb.jpg",
"offers": [
{
"id": "AXA3080adb3-a079-4499-903f-f52c5ee8f2b0",
"title": "Travel Smart",
"sub_title": "",
"description": "",
"code": "",
"tags": "",
"is_installment_allowed": false,
"emi_amount": 0.0,
"total_amount_emi": 0.0,
"base_amount": 27.311,
"base_amount_tax": 0.0,
"amount_pre_discount": 27.311,
"amount_discount": 0.0,
"total_amount": 27.311,
"discount_type": "",
"discount_description": "",
"thumbnail_url": "",
"info_url": "",
"age_limit_from": 0,
"age_limit_to": 0,
"offer_is_valid": true,
"offer_is_valid_description": "",
"covers": [
{
"id": "31",
"code": "AREA_WORLDWIDE",
"title": "Area : Worldwide",
"sub_title": "",
"description": "",
"terms_and_condition": {
"content": "",
"acknowledgment": ""
},
"amount": 0.0,
"is_mandatory": false,
"is_selected": false,
"order_no": 0.0,
"thumbnail_url": "",
"options": []
},
{
"id": "52",
"code": "MEDICAL_TRAVEL",
"title": "Medical Travel Insurance",
"sub_title": "",
"description": "",
"terms_and_condition": {
"content": "",
"acknowledgment": ""
},
"amount": 0.0,
"is_mandatory": true,
"is_selected": true,
"order_no": 0.0,
"thumbnail_url": "",
"options": []
},
{
"id": "62",
"code": "TERRORISM",
"title": "Terrorism",
"sub_title": "",
"description": "",
"terms_and_condition": {
"content": "",
"acknowledgment": ""
},
"amount": 0.0,
"is_mandatory": false,
"is_selected": false,
"order_no": 0.0,
"thumbnail_url": "",
"options": []
},
{
"id": "63",
"code": "TRAVEL_INCONVENIENCE",
"title": "Travel Inconvenience",
"sub_title": "",
"description": "",
"terms_and_condition": {
"content": "",
"acknowledgment": ""
},
"amount": 0.0,
"is_mandatory": false,
"is_selected": false,
"order_no": 0.0,
"thumbnail_url": "",
"options": []
},
{
"id": "64",
"code": "ADVENTURE_SPORTS",
"title": "Adventure Sports",
"sub_title": "",
"description": "",
"terms_and_condition": {
"content": "",
"acknowledgment": ""
},
"amount": 0.0,
"is_mandatory": false,
"is_selected": false,
"order_no": 0.0,
"thumbnail_url": "",
"options": []
}
],
"messages": []
}
]
}
],
"required_info": []
},
"messages": []
}
API response has status code (200). In case of error, check the request message (description for error code).
- Add travel details to get offers.
- Add travelers details to get offers.
REQUEST PARAMETERS
| Field | Type | Value | Required | Description |
|---|---|---|---|---|
| request_type | String | TRAVEL | Yes | The type of Insurance to create Quotation |
| lang_code | String | en / ar | Yes | The Language Code |
| voucher_code | String | Max 50 Cheracters | No | Voucher Code for discounts. |
| customer | Object | Yes | Customer Detail for travel | |
| request_data | Array | Yes | Travel and travelers data to create quotation |
CUSTOMER OBJECT
| Field | Type | Value | Required | Description |
|---|---|---|---|---|
| contact_no | String | Yes | The Customer Contact Number including Country Code | |
| first_name | String | Optional | Customer First Name. | |
| last_name | String | Optional | Customer Last Name. | |
| title | String | mr/mrs etc | Yes | Customer Title. |
| nationality_country_code | String | AE / OM / USA etc | Yes | Customer nationality country code. |
| residence_country_code | String | AE / OM / USA etc | Yes | Customer residence country code. |
REQUEST DATA
| Field | Type | Value | Required | Description |
|---|---|---|---|---|
| code | String | travel_details / travelers_details | Yes | Its to send information for travel and travelers. |
| value | Array | Yes | Will be Array of Objects with "code" and "value" formate to send information |
REQUEST DATA REQUIRED CODES
Note: The request_data will be always Array of object formate of
{"code": "any field code", "value": "value for that field" } .
| Code | Type | Value | Required | Description |
|---|---|---|---|---|
| travel_details | Array | Yes | The detail of trip | |
| travelers_details | Array | Yes | The detail of travelers |
REQUEST DATA TRAVEL DETAILS CODES
| Code | Type | Value | Required | Description |
|---|---|---|---|---|
| country_code_from | String | Yes | The country code customer is going from | |
| country_code_to | String | Yes | The country code customer is going to | |
| departure_date | String | i.e 25/4/2024 | Yes | The departure date of trip. Date format dd/M/yyyy |
| return_date | String | i.e 28/4/2024 | Yes | The return date of trip. Date format dd/M/yyyy |
REQUEST DATA TRAVELERS
| Code | Type | Value | Required | Description |
|---|---|---|---|---|
| first_name | String | Yes | Traveler First Name. | |
| last_name | String | Yes | Traveler Last Name. | |
| title_code | String | mr/mrs etc | Yes | Traveler Title. |
| nationality_country_code | String | AE / OM / USA etc | Yes | Traveler nationality country code. |
| relationship | String | Father / Mother / Wife etc | Yes | Traveler relashionship if multiple travelers and also for customer itself it will be always "Self" and default/first one should have "Self" relationship. |
| gender | String | male / female | Yes | The traveler gender. |
| passport_no | String | Yes | Passport number of traveler. | |
| date_of_birth | String | i.e 28/04/2024 | Yes | The date of birth of traveler. Date format dd/MM/yyyy |
Its required to input traveling from country name and traveling to country name, one side/way it must be Oman (either From or To country).
If the customer is traveling to Oman and he/she is resident of Oman is not allowed to get quotation.
Note: You can get country name and codes from the api given in the last.
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.
/api/Insurance/UpdateOfferCover
Note: When FeatureCategoryCode=CHOICE and Options has more than one options. Allow user to choose option.
Update Offer Payload
{
"quotation_id": "6AA91012-46A1-4A8B-8D89-40A2F1343ACF",
"offer_id": "AXA64d23e95-c6c3-48c5-9b46-918ae404a866",
"lang_code": "en",
"is_selected": true,
"cover_code": "AREA_WORLDWIDE"
}
Result example :
{
"status_code": "200",
"status_message": "",
"data": {
"id": "",
"code": "GIG_INS",
"name": "GIG (Previously AXA)",
"description": null,
"thumbnail_url": "http://localhost:1044/\\Uploads\\Provider\\4KLM77-10A5-8FF1-K647-FC7DB23EK4\\gig-logo-thumb.jpg",
"offers": [
{
"id": "AXA64d23e95-c6c3-48c5-9b46-918ae404a866",
"title": "",
"sub_title": "",
"description": "",
"is_installment_allowed": false,
"emi_amount": 0,
"total_amount_emi": 0,
"base_amount": 0,
"base_amount_tax": 0,
"amount_pre_discount": 0,
"amount_discount": 0,
"total_amount": 47.793,
"discount_type": "",
"discount_description": "",
"thumbnail_url": "",
"info_url": "",
"offer_is_valid": false,
"offer_is_valid_description": "",
"covers": [
{
"id": "",
"code": "AREA_WORLDWIDE",
"title": "Area : Worldwide",
"sub_title": "",
"description": null,
"terms_and_condition": {
"content": "",
"acknowledgment": ""
},
"amount": 0,
"is_mandatory": false,
"is_selected": true,
"order_no": 0,
"thumbnail_url": "",
"options": []
},
{
"id": "",
"code": "MEDICAL_TRAVEL",
"title": "Medical Travel Insurance",
"sub_title": "",
"description": null,
"terms_and_condition": {
"content": "",
"acknowledgment": ""
},
"amount": 0,
"is_mandatory": true,
"is_selected": true,
"order_no": 0,
"thumbnail_url": "",
"options": []
},
],
"messages": []
}
]
},
"messages": []
}
REQUEST PARAMETERS
| Field | Type | Description |
|---|---|---|
| quotation_id | String | Quotation unique reference |
| offer_id | String | Offer unique number |
| provider_id | String | Offer provider id |
| cover_code | String | Requested cover code |
| option_id | String | Selected option id of cover |
| is_selected | Boolean | Requested cover is added or removed (true/false) |
| lang_code | String | Language code en/ar |
UPDATE TRAVELERS
Its required to provide all travelers details including TravelerID which is available in create quote api response
/api/Insurance/UpdateTravelers
{
"quotation_id": "25BC56C5-EFCE-4308-8DAB-03A3C3C4D93F",
"lang_code": "en",
"request_data": [
{
"code": "travelers_details",
"value": [
{
"code": "traveler1",
"value": [
{
"code": "id",
"value": "291019"
},
{
"code": "first_name",
"value": "Hassan"
},
{
"code": "last_name",
"value": "Javed"
},
{
"code": "date_of_birth",
"value": "05/05/1994"
},
{
"code": "passport_no",
"value": "P786EGS"
},
{
"code": "nationality_country_code",
"value": "AE"
},
{
"code": "relationship",
"value": "Self"
},
{
"code": "gender",
"value": "male"
},
{
"code": "title",
"value": "Mr"
},
{
"code": "title_code",
"value": "Mr"
}
]
},
{
"code": "traveler2",
"value": [
{
"code": "id",
"value": "291020"
},
{
"code": "first_name",
"value": "Qusay"
},
{
"code": "last_name",
"value": "Al Rashdi"
},
{
"code": "date_of_birth",
"value": "05/05/1991"
},
{
"code": "passport_no",
"value": "P786EGF"
},
{
"code": "nationality_country_code",
"value": "AE"
},
{
"code": "relationship",
"value": "Father"
},
{
"code": "gender",
"value": "male"
},
{
"code": "title",
"value": "Mr"
},
{
"code": "title_code",
"value": "Mr"
}
]
}
]
}
]
}
Result example :
{
"status_code": "200",
"status_message": "Request completed successfully",
"data": "",
"messages": []
}
REQUEST PARAMETERS
| Field | Type | Description |
|---|---|---|
| quotation_id | String | Quotation unique reference |
| offer_id | String | Offer unique number |
| request_data | Array | Travel and travelers data to create quotation |
REQUEST DATA TRAVELERS
| Code | Type | Value | Required | Description |
|---|---|---|---|---|
| id | int | Yes | Traveler id | |
| first_name | String | Yes | Traveler First Name. | |
| last_name | String | Yes | Traveler Last Name. | |
| title_code | String | mr/mrs etc | Yes | Traveler Title. |
| nationality_country_code | String | AE / OM / USA etc | Yes | Traveler nationality country code. |
| relationship | String | Father / Mother / Wife etc | Yes | Traveler relashionship if multiple travelers and also for customer itself it will be always "Self" and default/first one should have "Self" relationship. |
| gender | String | male / female | Yes | The traveler gender. |
| passport_no | String | Yes | Passport number of traveler. | |
| date_of_birth | String | i.e 28/04/2024 | Yes | The date of birth of traveler. Date format dd/MM/yyyy |
VIEW MORE DETAILS
Result example :
{
"quotation_id": "29D24D5F-6BD5-45B1-A8B9-7F95D241CCE9",
"offer_id": "7E82DCCF-EB54-4604-9185-6E5678D8BB74",
"lang_code": "en"
}
Result example :
{
"status_code": "200",
"status_message": "",
"data": "View more detailsCoverage in US dollars except for Schengen in Euro.
",
"messages": []
}
To view more details for the offer, use below URL and system will return HTML content.
/api/Insurance/ViewMoreDetails
Content page is also available to view more details, you can use iFrame to display offer further details.
/Insurance/ProductInfo?refID=1C0FF587-9FE3-4339-BA89-BCF880F0557D&refPlanID=1eccaf4e-229b-4430-baec-848476cd1b8a&langCode=en
REQUEST PARAMETERS
| Field | Type | Description |
|---|---|---|
| quotation_id | String | Quotation unique reference number |
| offer_id | Integer | Offer unique reference number |
| lang_code | String | Language code ar/en |
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/ConfirmOfferPayment
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.
Offer Payment Confirm Payload :
{
"quotation_id": "082A3867-0FB8-4312-B0AC-0382D45C33DE",
"offer_id": "D95CA4B2-7078-4437-817C-4402E80FC36A",
"lang_code": "en",
"trans_id": "2302926213527977",
"payment_id": "772228",
"amount": 43.0,
"fee_amount": 0.0
}
Offer Payment Confirm Response :
{
"status_code": "200",
"status_message": "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.",
"data": "",
"messages": []
}
REQUEST PARAMETERS
| Code | Type | Required | Description |
|---|---|---|---|
| quotation_id | String | Yes | Quotation unique reference number |
| offer_id | String | Yes | Offer unique reference number |
| trans_id | String | Yes | Collector/External payment gateway transaction id |
| payment_id | String | Yes | Collector/External payment id |
| lang_code | String | Yes | Language code en/ar (default English) |
| amount | Double | Yes | Selected offer amount |
| fee_amount | Double | Yes | Payment gateway fee if any |
OTHER APIs
List of APIs required to load predefined data options for user additional input
-
Get quotation details
/api/Insurance/GetTravelOffers -
Country List
/api/Common/GetCounteries/?langCode=en -
Nationality List
/api/Common/GetNantionalities/?langCode=en -
Name titles
/api/Insurance/GetPrefixTitles/?langCode=ar -
Relationship
/api/Common/GetRelationshpOptions_Travel/?langCode=en