Generate Insurance Policy and Policy Number for Booking
Book method is called to generate the insurance policy based on the selected insurance plan.On successful policy creation a policy number is generated. In case of multi passenger booking for each passenger separate insurance policy will generate.
Parameters
Name
Description
Accept
string
( header )
*required application/json
Accept - Encoding
string
( header )
*required gzip
Authorization
string
( header )
Must be Your PID
Must be Your API Key
Customer-Ip
string
( header )
*required IP address of the customer, as captured by your integration. Send IPV4 addresses only.
Ensure your integration passes the customer’s IP, not your own. This value helps determine their location and other settings.
Also used for fraud recovery and other important analytics.
Definition and request parameters for Insurance Book Method
action
string
( query )
*required "bookInsurance" as a parameter
ResultIndex
Integer
Define ResultIndex
TraceId
String
Unique identifier for identifying every unique search Required for audit purpose
price
String
Net Price
currency
String
Currency
Passenger[]
Array
Array of passenger details for the insurance policy as requested in Insurance search
Title
String
Title of the passenger(Possible values can be Mr, Mrs, Miss,Ms,SHRI,SMT)
FirstName
String
First name of the Insured passenger
LastName
String
Last name of the Insured passenger
BeneficiaryTitle
String
Title of beneficiary
BeneficiaryName
String
Name of beneficiary
(Example: Mr John Doe)
RelationShipToInsure
String
RelationShipToInsured(Ex: Self)
RelationToBeneficiary
String
Insured person relationship to Beneficiary ( Ex: Son, Father, Mother, Brother,Sister)
Gender
String
Gender
Sex
Enumeration
Sex
DOB
Enumeration
DOB of the insured passenger. Format: (dd/mm/yyyy)
PassportNo
Integer
Passport no of insured passenger
PassportCountry
Integer
Ex-"IN"
PhoneNumber
Integer
PhoneNumber of insured passenger
EmailId
String
Emailid of insured passenger
AddressLine1
String
Address of insured passenger
AddressLine2
String
Address of insured passenger
CityCode
String
City of insured passenger
CountryCode
String
Country of insured passenger
MajorDestination
String
Destination where passenger is travelling
PinCode
Integer
Pincode of insured passenger
REQUEST
API Endpoint: https://www.abengines.com/api/v1/travel-api/insurance/
header: array( 'Content-Type:application/json', 'Accept-encoding: gzip', 'PID:'ADD-PID-KEY', 'x-api-key:'ADD-API-YOUR-KEY' ); POST: { "action": "bookInsurance", "TraceId": "26006c8e-0e10-4984-a0c3-19007253ae61", "ResultIndex": 1, "price": 112.7, "currency": "INR", "Passenger": [ { "Title": "Mr", "FirstName": "Mukesh", "LastName": "Sharma", "BeneficiaryTitle": "Mr", "BeneficiaryName": "Mr John Doe", "RelationShipToInsured": "Self", "RelationToBeneficiary": "Brother", "Gender": 1, "Sex": 1, "DOB": "1985-10-15T00:00:00", "PassportNo": "KJHHJKHKJH", "PassportCountry": "IN", "PhoneNumber": "9988776655", "EmailId": "praveen@thewebconz.com", "AddressLine1": "Lajpat Nagar", "AddressLine2": "", "CityCode": "Delhi", "CountryCode": "IND", "MajorDestination": "India", "PinCode": "110065" } ] }
Response
The API returns an HTTP response, which generally includes the result of the request invocation
{ "Response": { "ResponseStatus": 1, "Error": { "ErrorCode": 0, "ErrorMessage": "" }, "TraceId": "1d91c4e0-f879-4c76-8ad3-f9f3911f4c51", "order_id": "3445566778", "Itinerary": { "BookingId": 1853094, "InsuranceId": 23247, "PlanType": 1, "PlanName": "Axa Spl Smart Domestic Plan", "PlanDescription": "Axa Spl Smart Domestic Plan", "PlanCoverage": 4, "CoverageDetails": [ { "Coverage": "a) Medical expenses", "SumInsured": "10000", "Excess": "100" } ], "PlanCategory": 1, "PaxInfo": [ { "PaxId": 27719, "PolicyNo": "", "ClaimCode": null, "SiebelPolicyNumber": "", "ReferenceId": "TBO-04112023165731390", "DocumentURL": null, "MaxAge": 70.00, "MinAge": 1.00, "Title": "Mr", "FirstName": "Mukesh", "LastName": "Sharma", "Gender": "Male", "DOB": "1985-10-15T00:00:00", "BeneficiaryName": "Karthik", "RelationShipToInsured": "Self", "RelationToBeneficiary": "Brother", "EmailId": "praveen@thewebconz.com", "PhoneNumber": "9988776655", "PassportNo": "KJHHJKHKJH", "AddressLine1": "Lajpat Nagar", "AddressLine2": "", "Country": "India", "State": "Delhi", "City": "Delhi", "PinCode": "110065", "MajorDestination": "IN", "Price": { "Currency": "INR", "GrossFare": 161.00, "PublishedPrice": 161.00, "PublishedPriceRoundedOff": 161.00, "OfferedPrice": 112.70, "OfferedPriceRoundedOff": 112.70, "CommissionEarned": 48.30, "TdsOnCommission": 19.32, "ServiceTax": 0, "SwachhBharatTax": 0, "KrishiKalyanTax": 0 }, "OldPolicyNumber": "", "PolicyStatus": 2, "ErrorMsg": "" } ], "PolicyStartDate": "2023-11-30T00:00:00", "PolicyEndDate": "2023-11-30T23:59:59", "CreatedOn": "2023-11-04T16:57:31", "Source": "TrawellTag", "IsDomestic": true, "Status": 2, "GSTIN": null } } }