Integration Specification Document V5.0.0
Integration Specification Document V5.0.0
2020/08/05
Version: 5.0.0
1
Changes
Version Role Date
descriptions
Development Draft
1.1.0 6-1-2019
Manager
Development Draft
2.1.0 09-09-2019
Manager
Development Release
3.0.0 14-10-2019
Manager
Adding number of
Development
3.1.0 21-10-2019 accident and
Manager
liabilities
Adding number of
Development accident and
3.2.0 24-10-2019
Manager liabilities for policy
holder
Development
3.3.0 30-10-2019
Manager
Adding Error tags to
Development
3.4.0 3-11-2019 Get Vehicle Images
Manager
Service
Adding Insurance
Development Company Id For
3.5.0 5-11-2019
Manager GetVehicleImages &
UpdateNajmId
Development
4.0.0 01-01-2020
Manager
Remove
Development InsuredCityId and
5.0.0 28-07-2020
Manager replace with
PostCode
2
Contents
Contents .................................................................................................................................... 3
.1 .................................................................................................................................... Introduc
tion: ............................................................................................................................................ 4
2. Intended Audience ............................................................................................................ 4
3. Implementation Overview................................................................................................. 4
4. High-level overview of process workflow ........................................................................ 4
5. Insurance Company Onboard Process ........................................................................... 7
6. Technical Guide ................................................................................................................ 7
6.1. Web API Integration Prerequisite ................................................................................ 7
6.2. Communication Interface ............................................................................................. 8
6.3. Live & UAT Environments ............................................................................................ 8
6.4. Request and Response format .................................................................................... 8
6.5. Field Type Abbreviation ................................................................................................ 8
6.6. Definitions, Acronyms, and Abbreviations .................................................................. 9
7. Authentication Mechanism ............................................................................................... 9
.8 ............................................................................................ Insurance Company & Web API
Methods................................................................................................................................... 10
1. Quotation Request (Service specification) ................................................................... 12
2. Quotation Response (Service specification) ................................................................ 18
3. Purchase Notification Request (Service specifications) .............................................. 20
4. Purchase Notification Response (Service specifications) ........................................... 21
5. Update Najm Id Request (Service specifications) ....................................................... 22
6. Update Najm Id Response (Service specifications)..................................................... 22
7. Get Vehicle Images Request (Service specifications) ................................................. 23
8. Get Vehicle Images Response (Service specifications) .............................................. 23
3
1. Introduction:
This service enables our customers to view and compare third party and comprehensive
policies provided by different insurance companies simultaneously.
This document explains how Insurance Company can design & develop Web API to
integrate with our service.
2. Intended Audience
This document is created for Insurance Company developers and technical teams who
will integrate with our service.
3. Implementation Overview
Compare Insurance policies prices service has an Online Policy Aggregator where it
uses Insurance Company’s API to request and receive the policy quotes & details. The
web service sends a request to Insurance Company API containing the vehicle owner,
vehicle details (verified by National Information Center) and other important details as
well.
After that Insurance Company respond back to The web service request with the policy
quote & details. Then, The web service presents all insurance companies quotes to the
customer.
Once the customer selected a particular policy quote, he will be asked to pay for that
policy (online). If the payment process completed, The web service will notify the
insurance company (through Insurance Company API) of success purchase where the
selected policy belongs to. In addition, it will notify other insurance companies (through
Insurance Company API) of failed purchase.
Note:
In case the customer didn’t purchase any policy and the Policy Grace Period (policy
lifetime agreed between Insurance Company & The web service) has reached, The
web service will notify all quoted insurance companies (through Insurance Company
API) of failed purchase.
As a final step, once the insurance company uploaded successfully purchased policy to
Najm system, Insurance Company will call, the web service API
To send Najm’s reference number for that policy.
4
5. Insurance Company API analyze the request and provide a quote and policy details in
response
6. The web service presents all received policy quotes to the customer
7. Customer select a policy and proceed for payment
8. The web service notify Insurance Company with policy purchase status of the policy quote
9. Once the insurance company uploaded the policy successfully to Najm system, Insurance
Company then will send to web service API “Najm reference number (Vehicle ID)”.
5
6
5. Insurance Company Onboard Process
1. Insurance Company request for integration with our portal.
2. We will creates a user for Insurance Company
3. We will provide API integration guideline to Insurance Company.
4. Insurance Company develop API for Test environment and live environment and provide
details to us.
5. We will configure Test and Live environment API details in system with following
• Test Environment:
1. API URL (URLs will be given and specified below on each method)
2. Username
3. Password
• Live Environment:
1. API URL (URLs will be given and specified below on each method)
2. Username
3. Password
6. Technical Guide
▪ Web API
▪ JSON
7
6.2. Communication Interface
▪ Web API (HTTPS Protocol).
• Test Environment:
1. API URL (URLs will be given and specified below on each method)
2. Username
3. Password
• Live Environment:
1. API URL (URLs will be given and specified below on each method)
2. Username
3. Password
8
6.6. Definitions, Acronyms, and Abbreviations
Definitions, Abb. Description
IC Insurance Company
Policy Grace Period It is the time given and agreed between
Insurance company and us. So, the insurance
company will give us a period of time (for
example 12 hours) once they shared the policy
with us. During that time, if we sent to
insurance company a success purchase of the
policy then this policy will be issued. If we
didn’t sent purchase notification to the
insurance company and that Policy Grace
Period (12 hours) has ended, then the
insurance company will cancel that policy
automatically.
7. Authentication Mechanism
Basic Authentication:
Header Parameter Name: Authorization
Following are the Authentication parameters (as provided with API URL at the time of on board
process):
▪ Username
▪ Password
9
8. Insurance Company & Web API Methods
- The URL of service should be in secure protocol (HTTPS). (HTTP) URL will not be accepted (for
UAT purpose could be allowed). Dual authentication is not allowed with SSL certificate as well.
- Method names, Parameters, Request and Response formats MUST be followed exactly
according to this Integration Guide Document and supported documents or files.
10
- Method names and Parameters are case sensitive; therefore, it MUST be followed as it is.
11
1. Quotation Request (Service specification)
Quote Request
Mandator
# Field FieldAr Datatype Description Size
y
Reference ID generated by
1. RequestId رقم الطلب String Aggregator system for 15 Yes
quotation request
رمز المنتج 1 if TPL or 2 if
Comprehensive
2. ProductCode Number 1 Yes
(refer to Product Code Table
for more information )
Start Policy Effective Date (1-
14 days)
Minimum 1 Day Maximum 14
Days
3. EffectiveDate تاريخ التفعيل DateTime 25 Yes
Format: ISO 8601 (yyyy-MM-
ddTHH:mm:ss±hh:mm)
Example (2017-08-
22T14:47:17+03:00)
1 for Citizen and 2 for
رمز نوع بطاقة Resident
4. InsuredIdTypeCode Number 1 Yes
هوية المؤمن له (refer to ID Types Table
for more information )
رقم بطاقة هوية
5. InsuredId Number National ID / Iqama ID 10 Yes
المؤمن له
For Resident :
Format (mm-dd-yyyy)
تاريخ ميالد المؤمن Example (06-15-1984)
6. InsuredBirthDate String 10 Yes
له For Citizen :
Format(yyyy-mm-dd)
Example(1401-03-29)
Insured Gender Code 1 for
male 2 for female
7. InsuredGender جنس المؤمن له Number 1 Yes
(refer to Gender Table
for more information )
Insured Nationality Code
8. InsuredNationality جنسية المؤمن له Number (refer to Nationalities Table 4 Yes
for more information )
Insured ID Issue Place Code
رمز مكان اصدار
9. InsuredIdIssuePlaceCode Number (refer to Regions Table 3 Yes
هوية المؤمن له
for more information )
12
الحالة االجتماعية Code 1 Yes
10. InsuredSocialStatusCode للمؤمن له Number (refer to Social Status Table
for more information )
عدد السنوات دون Number Example ( 3 ) 2 Yes
11. InsuredNCDFreeYears
مطالبات
مرجع عدد السنوات String Example ( NCD0710194832 ) 20 Yes
12. InsuredNCDReference
دون مطالبات
InsuredNoOfAccidents عدد الحوادث آلخر Number It will come from Najm service 2 Yes
13.
سنوات5
InsuredNoOfClaims عدد المطالبات آلخر Number It will come from Najm service 2 No
14.
سنوات5
InsuredNajmCaseDetails JSON NajmCaseDetails:[{ Yes
"CaseNumber":
"RD030816757",
"AccidentDate":
"20160803T16: 50: 03",
15. "Liability": 50,
"DriverID": 1049034331
}]
Null if 0 Accidents
Insured ID Issue Place in
اسم مكان اصدار
English
16. InsuredIdIssuePlace هوية المؤمن له String 50 Yes
(refer to Regions Table
باالنجليزي
for more information )
اسم المؤمن له باللغة
17. InsuredNameAr String Insured Full Name in Arabic 50 Yes
العربية
اسم المؤمن له باللغة
18. InsuredNameEn String Insured Full Name in English 50 Yes
باالنجليزية
Occupation Code
19. InsuredOccupation مهنة المؤمن له Number (refer to Occupation Table 50 No
for more information )
Education code
20. InsuredEducation تعليم المؤمن له Number (refer to Education Table 2 No
for more information(
عدد اوالد المؤمن له
Number of children under age
21. InsuredChildrenBelow16Years الذين اعمارهم تحت Number 2 No
16 years
سنة16
رمز مدينة عمل (refer to Cities Table
22. InsuredWorkCityCode Number 3
المؤمن له for more information(
اسم مدنة عمل (refer to Cities Table
23. InsuredWorkCityAr String 50
المؤمن له بالعربي for more information(
اسم مدنة عمل
(refer to Cities Table
24. InsuredWorkCityEn المؤمن له String
for more information(
باالنجليزي
13
رمز مدينة سكن (refer to Cities Table
25. InsuredCityCode Number 3
المؤمن له for more information(
اسم مدنة سكن (refer to Cities Table
26. InsuredCityAr String 50
المؤمن له بالعربي for more information(
اسم مدنة سكن
(refer to Cities Table
27. InsuredCityEn المؤمن له String 50
for more information(
باالنجليزي
Refere to Postal Code
رقم المنطقة حسب
28. InsuredPostalCode Int retruned from National
العنوان الوطني
Address
(refer to Vehicle Id Type
Table for more information
29. VehicleIdType نوع تعريف المركبة Number 3 Yes
1 for Sequence Number and 2
for Custom Card
Generated by Gonsure
system(If VehicleIdType==1)
30. VehicleId رقم تعريف المركبة Number SequanceNumber 20
Else
CustomCardNumber
0 for new insurance and 1 for
31. VehicleTransferFlag Number
new ownership
New owner id when
32. TrassferCaseOwnerid Number VehicleTransferFlag = 1 and
null if VehicleTransferFlag = 0
Required if VehicleIdType is Condition
Commented [WU1]: Allow Null
33. VehiclePlateNumber رقم لوحة المركبة Number 4
<1> al
أحرف لوحة المركبة Required if VehicleIdType is Condition
34. VehiclePlate1 String 1 Commented [WU2]: Allow Null
1 <1> al
أحرف لوحة المركبة Required if VehicleIdType is Condition
35. VehiclePlate2 String 1 Commented [WU3]: Allow Null
2 <1> al
أحرف لوحة المركبة Required if VehicleIdType is Condition
36. VehiclePlate3 String 1 Commented [WU4]: Allow Null
3 <1> al
37. VehicleChassisNumber رقم الشاسيه للمركبة String -- 25 Yes
Required if VehicleIdType is Condition
38. VehicleOwnerName اسم مالك المركبة String 200
<1> al
رقم هوية مالك Required if VehicleIdType is Condition
39. VehicleOwnerId Number 10
المركبة <1> al
40. VehicleModelYear سنة صناعة المركبة Number Example (2019) 4 Yes
It will come from Yakeen
41. VehicleMakerCode رمز صانع المركبة Number 5 Yes
service
42. VehicleMakerName صانع المركبة String
14
It will come from Yakeen
43. VehicleModelCode رمز طراز المركبة Number 5 Yes
service
44. VehicleModelName طراز المركبة String
رمز لون المركبة It will come from Yakeen
45. VehicleMajorColorCode Number 5 Yes
االساسي service
رمز نوع هيكل It will come from Yakeen
46. VehicleBodyTypeCode Number 5 Yes
المركبة service
Required if VehicleIdType is
مكان تسجيل <1> Condition
47. VehicleRegPlace Number 3
المركبة It will come from Yakeen al
service
Required if VehicleIdType is
تاريخ انتهاء رخصة <1> Condition
48. VehicleRegExpiryDate String 10
السير Format (dd-mm-yyyy) al
Example (13-08-1440)
القيمة السوقية Required if Product Type is Condition
49. VehicleSumInsured Number 10
للمركبة <2> al
Required if Product Type is
<2>
Condition
50. DeductibleValue قيمة التحمل Number If this value = 0 then return all 10
al
product with different
deductible values
صيانة المركبة Required if Product Type is Condition
51. VehicleAgencyRepair Boolean 1
بالوكالة <2> al
It will come from Yaqeen
52. VehicleEngineSize سعة المحرك Number 2 Yes
service
Code
(refer to Vehicle Usage
53. VehicleUsage استخدام المركبة Number 2 Yes
Table
for more information(
المسافة المقطوعة
54. VehicleMileage Number -- 6 No
Commented [WU5]: Will send default value
بالمركبة
Code
(refer to Transmission
55. VehicleTransmissionType نوع ناقل الحركة Number 1 Yes
Type Table for more
information(
عدد الكيلومترات
VehicleMileageExpectedAn
56. المتوقع للمركبة أن Number -- 1 No
Commented [WU6]: Will send default value (10000)
nual
تقطعها سنويا
57. VehicleAxleWeight وزن محور المركبة Number -- 4 No
Commented [WU7]: Will send default value
Code
VehicleOvernightParkingLoc
58. مكان إيقاف المركبة Number (refer to Parking Location 1 Yes
ation
Table for more information(
15
Code
التعديالت على (refer to Vehicle
59. VehicleModification Boolean 1 Yes
المركبة Modification Table for more
information(
تفاصيل التعديالت
60. VehicleModificationDetails String -- 200 Yes
على المركبة
List<Driv
61. Drivers -- Yes
er>
Driver Details
Mandator
# Field Datatype Description Size
y
DriverType نوع السائق Number 1 for Main Driver 1 Yes
62.
2 for Additional Driver
63. DriverId رقم هوية السائق Number 10 Yes
DriverBirthDate تاريخ ميالد السائق String Gregorian date 10 Yes
64. بالميالدي Format (mm-dd-yyyy)
Example (06-15-1984)
DriverBirthDateH تاريخ ميالد السائق String Hijri
65. بالهجري Format (yyyy-mm-dd)
Example (1404-09-13)
Insured Nationality Code
66. DriverNationality جنسية السائق Number (refer to Nationalities Table 4 Yes
for more information )
DriverGender Insured Gender Code 1 for
male 2 for female
67. جنس السائق Number 1 Yes
(refer to Gender Table
for more information )
68. DriverNameAr اسم السائق بالعربي String -- 50 Yes
DriverNameEn اسم السائق String -- 50 No
Commented [WU8]: Some people do not have an English
69.
باالنجليزي name so we will send an English name as an empty string
DriverSocialStatus الحالة االجتماعية Code 1 Yes
70. للسائق Number (refer to Social Status Table
for more information )
71. DriverOccupation وظيفة السائق String -- 50 Yes
DriverDrivingPercentage نسبة قيادة المركة Number Code 3 Yes
Commented [WU9]: We will send 0 when the policy
(refer to Driving Percentage holder is not driving the vehicle
72.
Table
for more information )
DriverEducation نوع التعليم للسائق Education code
73. Number (refer to Education Table 2 Yes
for more information(
DriverMedicalCondition الحالة الصحية Number code 2 Yes
74. للسائق (refer to Medical Condition
Table for more information(
16
عدد اوالد للسائق
DriverChildrenBelow16Year
75. الذين هم تحت سن Number -- 2 Yes
s
سنة16
منطقة سكن السائق Refer to PostalCode returned
76. DriverPostalCode Int Yes
from National Address
DriverHomeCity مدينة سكن السائق String (refer to Cities Table 4 Yes
77.
for more information(
DriverWorkCity مدينة عمل السائق String (refer to Cities Table 4 Yes
78.
for more information(
DriverNoOfAccidents عدد الحوادث آلخر Number It will come from Najm service 2 Yes
79.
سنوات5
DriverNoOfClaims عدد المطالبات آلخر Number It will come from Najm service 2 No
80.
سنوات5
DriverNajmCaseDetails JSON NajmCaseDetails:[{ Yes
"CaseNumber":
"RD030816757",
"AccidentDate":
"20160803T16: 50: 03",
81. "Liability": 50,
"DriverID": 1049034331
}]
Null if 0 Accidents
DriverNCDFreeYears عدد السنوات دون Number Example ( 3 ) 2 Yes
82.
مطالبات
DriverNCDReference مرجع عدد السنوات String Example ( NCD0710194832 ) 20 Yes
83.
دون مطالبات
84. DriverLicense نوع رخصة القياده Number -- 200 Yes
85. DriverViolations مخالفات السائق Array [1,2] No
DriverLicenceExpiryDateH تاريخ انتهاء رخصة String Hijri Date Yes
Commented [WU10]: We will send NULL when the policy
86. القياده Format (dd-mm-yyyy) holder is not driving the vehicle
Example (19-04-1442)
DriverRelationCode عالقة السائق بمالك Int Code Yes
الوثيقة (refer to DriverRelations
87.
Table
for more information )
17
2. Quotation Response (Service specification)
Response Details:
# Field Datatype Description Size Mandatory
1. RequestId String Return Request Id for request 15 Yes
Status Boolean Status will be: 1 Yes
2. <true> for Success
<false> for Failure
Errors List<Error> - This is the errors list in case No
the Status = false
- Errors list will be:
o Message <String><Required>
3. // Error Message
o Code <String><Optional> //
Error Code
o Field <String><Optional> //
Error Field Name
4. QuotationNo String 50 Yes
QuotationDate DateTime Quotation Date 25 Yes
Format: ISO 8601 (yyyy-MM-
5. ddTHH:mm:ss±hh:mm)
Example (2017-08-
22T14:47:17+03:00)
QuotationExpiryDate DateTime Quotation Expiry Date (10 hours) 25 Yes
Format: ISO 8601 (yyyy-MM-
6. ddTHH:mm:ss±hh:mm)
Example (2017-08-
22T14:47:17+03:00)
Products List<Product Yes
7.
>
Product Details
# Field Datatype Description Size Mandatory
8. ProductId String 15 Yes
9. ProductPrice Decimal 10 Yes
10. DeductibleReference String Optional if Product Type is <2> 15 Conditional
11. DeductibleValue Number Optional if Product Type is <2> 4 Conditional
12. VehicleLimit Number 10 Yes
13. PriceDetails List<Price> Yes
List<Benefit List of BenefitId, Yes
14. Benefits > BenefitNameEn, BenefitNameAr,
BenefitPrice
Price Details
# Field Datatype Description Size Mandatory
18
1. No Claim Discount
2. Loyalty Discount
3. Additional loading (Due
to accidents)
4. Additional Age
Contribution
15. PriceType Number 1 Yes
5. Admin Fees
6. Basic Premium
7. Value Added Tax (VAT)
8. More …
*those values depending on
insurance company
16. PriceValue Decimal 10 Yes
17. Percentage Decimal 10 Yes
19
3. Purchase Notification Request (Service specifications)
20
4. Purchase Notification Response (Service specifications)
21
5. Update Najm Id Request (Service specifications)
Request
# Field Datatype Description Size Mandatory
1. QuotaionRequestId String 15 Yes
2. Status Boolean Najm Status 1 Yes
3. StatusDescription String 255 Yes
4. UploadedDate DateTime 50 Yes
5. NajmId String 10 Yes
6. InsuranceCompayId String Yes
Update Najm
# Field Datatype Description Size Mandatory
1. QuotaionRequestId String 15 Yes
2. Status Boolean 1 Yes
Errors List<Error> - This is the errors list in case No
the Status = 2
- Errors list will be:
o Message <String><Required>
3. // Error Message
o Code <String><Optional> //
Error Code
o Field <String><Optional> //
Error Field Name
22
7. Get Vehicle Images Request (Service specifications)
Request
# Field Datatype Description Size Mandatory
1. VehicleId String Yes
2. QuotationRequestId String Yes
3. InsuranceCompayId String Yes
Response
# Field Datatype Description Size Mandatory
1. VehicleId String Yes
2. QuotationRequestId String Yes
Status Boolean Status will be: 1 Yes
3. <true> for Success
<false> for Failure
Errors List<Error> - This is the errors list in case No
the Status = false
- Errors list will be:
o Message <String><Required>
4. // Error Message
o Code <String><Optional> //
Error Code
o Field <String><Optional> //
Error Field Name
List<Vehicle
5. VehicleImages Yes
Images>
Vehicle Images
# Field Datatype Description Size Mandatory
1. Id String Yes
2. FileName String Yes
3. FileSize String No
4. FileType String No
5. FileContent Binaries Yes
23