دليل الربط
دليل الربط
Context
1. General instruction ……………………………………………………………….. 3
2. First APIs : Create or Update Booking ……………………………………..4
3. Second APIs : Cancel Booking …………………………………………………18
4. Third APIs : Expenses Details ………………………………………………….23
5. Forth APIs : Occupancy Update …………………………………………….31
2 Integration guide
Integration guide for NTMP
• If Sequence Check In Check out, then at the time of Check In this will be
generated by SCTH and consumer receives as response, consumer should
later provide in Check Out Process.
• UserID (Your User ID, you have to provide it other than providing
authentication headers).
- You have to integrate using staging first , once SCTH verify the
integration you will be provided production details
3 Integration guide
Integration guide for NTMP
API’s Details
CreateOrUpdateBooking:
Interface description
The interface can be used to create or update the hotel booking with the initial required
details from customer.
4 Integration guide
Integration guide for NTMP
Request
Customer should hit the above URL’s to get the response and no input query-parameters
required
Query Parameters
Request Body
5 Integration guide
Integration guide for NTMP
DateOfBirth Numeric No YYYYMMDD format, default 0
PaymentType Numeric Yes Payment Type Lookup
NoOfRooms Numeric Yes Default 1 and can be up to 99 Length Min-1
Max-2
CUFlag Numeric Yes 1 =New, 2=Update
HTTP Headers
Response
Response Body
HTTP Headers
6 Integration guide
Integration guide for NTMP
Response Codes
This section covers all the success and failure response codes.
7 Integration guide
Integration guide for NTMP
8 Integration guide
Integration guide for NTMP
2 SWAGGER Descriptor
TBU
"bookingNo" : "123",
"nationalityCode" : "630",
"checkInDate" : "20180201",
"checkOutDate" : "20180205",
"totalDurationDays" : "3",
"allotedRoomNo" : "1",
"roomRentType" : "1",
9 Integration guide
Integration guide for NTMP
"dailyRoomRate" : "1000",
"totalRoomRate" : "3000",
"vat" : "10",
"municipalityTax" : "5",
"discount" : "5",
"grandTotal" : "5000",
"transactionTypeId" : "1",
"gender" : "1",
"transactionId" : "1234567891",
"checkInTime" : "120000",
"checkOutTime" : "120000",
"customerType" : "1",
"noOfGuest" : "2",
"roomType" : "2",
"purposeOfVisit" : "3",
"dateOfBirth" : "20010101",
"paymentType" : "1",
"noOfRooms" : "1",
"cuFlag" : "1"
"errorCode" : [ "0" ],
10 Integration guide
Integration guide for NTMP
"transactionId" : "08ccc084-fd7e-4854-8f67-c379951c67b3",
“correlationId” : “8b9d9a00-4445-4c9e-bfbb-db13f794d5c2”
“correlationId” : “5737e370-4a8a-41cc-a2b2-8f263336459a”
Purpose of Visit
11 Integration guide
Integration guide for NTMP
Payment Types
Gender
Customer Types
12 Integration guide
Integration guide for NTMP
Room Types
Transaction Type ID
13 Integration guide
Integration guide for NTMP
Nationalities
CODE ARABIC_NAME ENGLISH_NAME CODE ARABIC_NAME ENGLISH_NAME
101 االمارات العربية Arab Emirates 318 كوريا الجنوبية South Korea
102 االردن Jordan 319 مالييا Malaysia
103 البحرين Bahrain 320 نيبال Nepal
104 سوريا Syria 321 الهند India
105 العراق Iraq 322 هونج كونج HONG KONG
106 عمان Oman 323 اليابان Japan
107 فلسطي Palestine 324 بهوتان Bhutan
108 قطر Country 325 الصي الشعبية China
109 الكويت Kuwait 326 رقيص Cyprus
110 لبنان Lebanon 328 كوريا الشمالية North Korea
111 اليمن Yemen 329 الوس Laos
112 الجنوب
ر اليمن Southern Yemen 143 غي معروف/مقيم
113 العربية السعودية Saudi Arabia 901 اخرى OTHER
-جنوب
ر يمن ال يحمل/مقيم
114 السالطي Yemeni the sultans 144 وثيقة
115 بن حارث Bani Harith 145 قبيلة الصيعر ALSAYAR
ALMNAHIL AND
116 بدون- الكويت Kuwait - without 146 المناهيل والمهرة ALMAHRH
Member of the
117 افراد القبائل tribes 201 تونس Tunisia
118 من سكان البحرين Residents of Bahrain 202 الجزائر Algeria
قبائل مجاورة
119 للعطفي Tribes adj to Ataf 203 ى
جيبوب Djibouti
اجنن بجواز
ر
120 سعودي Alien KSA Passprt 204 السودان Sudan
فلسطين بوثيقة
121 مرصية Palestinian Egyptian 205 الصومال Somalia
فلسطين
122 بوثيقةلبناب Palestinian Lebanese 206 ليبيا Libya
فلسطين
123 بوثيقةاردنية Palestinian Jordan 207 مرص Egypt
فلسطين
124 بوثيقةعراقية Palestinian Iraqi 208 المغرب Morocco
فلسطين بوثيقة
125 سورية Palestinian Syria 209 موريتانيا Mauritania
126 وثيقة قطريه document Syria 301 افغانستان Afghanistan
14 Integration guide
Integration guide for NTMP
مكررلقرغييا
348 اليستخدم Kyrgyzstan not used 435 نيجييا Nigeria
349 الشقيةتيمور ر East Timor 436 النيجر Niger
350 مقيم Resident 437 افريقيا الوسىط Central Africa
351 مقيم/ميانمار 438 انجوال Angola
جواز/ميانمار
352 باكستان - 439 الراس االخرص Cape Verde
جوازبنجال/ميانمار
353 دش - 440 غينيا االستوائية Equatorial Guinea
401 اثيوبيا Ethiopia 441 مالجاس Mlajasi
Sao
402 اوغندة Uganda 442 برنسن
ر /ساوتوم Tome/FranceBank
403 بوتسوانا Botswana 443 جزر سيشل Seychelles Islands
404 بورندي Burundi 444 سوزيالند Swaziland
405 تشاد Chad 445 بوفثاتسوانا Bovthatswana
406 تيانيا Tanzania 446 رينيون Reunion
407 توجو Togo 447 ترانسك Transkei
408 جابون Answer 448 فيندا Venda
409 غامبيا Gambia 449 ارتييا Eritrea
Other African
410 جزر القمر Comoros 450 دول افريقية اخري States
411 جنوب افريقيا South Africa 451 سانت هيالنة Saint Helena
412 ناميبيا Namibia 452 جزيرةمايوت Comorian island
جمهورية جنوب
413 بني Benin 453 السودان Republic of South
414 رواندا Rwanda 454 كاب فيد CAPE VERDE
415 زمبابوي Zimbabwe 501 اسبانيا Spain
503 المانيا Germany 502 البانيا Albania
Bosnia /
504 ايرلندا Ireland 545 البوسنة والهرسك Herzegovina
505 ايطاليا Italy 546 كرواتيا Croatia
506 المملكة المتحدة United Kingdom 547 سلوفينيا Slovenia
رصبيا والجبل Serbia /
507 اليتغال
ر Portugal 548 األسود Montenegro
508 بلغاريا Bulgaria 549 مقدونيا Macedonia
509 بلجيكا Belgium 550 كوسوفوا Kosovo
رمزقديم للجبل code to
510 بولندا Poland 551 االسود Montenegro
15 Integration guide
Integration guide for NTMP
رمزقديم
511 تشكوسلوفاكيا old to Czechoslovak 552 تشيك CZECH REPUBLIC
512 الدانمارك Denmark 553 سلوفاكيا Slovakia
513 رومانيا Romania 554 جزر فيو Faroe Islands
ى
مييوبوليتان FRANCE
514 السويد Sweden 555 فرنسية METROPOLITAN
515 سويشا Switzerland 601 الواليات المتحدة United States
516 فرنسا France 602 االرجنتي Argentina
517 فنلندا Finland 603 بربادوس Barbados
518 رصبيا SERBIA 604 اليازيل
ر Brazil
519 هولندا Netherlands 605 بنما Panama
Trinidad and
520 يوغسالفيا Yugoslavia 606 ترينداد وتوباجو Tobago
521 اليونان Greece 607 جامايكا Jamaica
522 اندورا Andorra 608 جوانا Joanna
523 النمسا Austria 609 فيويال Venezuela
524 الجبل األ سود MONTENEGRO 610 كندا Canada
525 هنغاريا Hungary 611 كولمبيا Columbia
526 ايسلندا Iceland 612 جزر البهاما Bahamas
527 ليختنشتي Liechtenstein 613 كوستاريكا Costa Rica
528 لوكسمبورغ Luxembourg 614 كوبا Cuba
529 مالطا Malta 615 دومينيكا Dominica
Republic
530 موناكو Monaco 616 جمهورية دمينكان Dominica
531 اليوي ج Norway 617 السلفادور El Salvador
532 سان مورينو San Moreno 618 جرانادا Granada
533 مدينة الفاتيكان Vatican City 619 جواتيماال Guatemala
534 جبل طارق Gibraltar 620 ى
هاين Haiti
536 اوكرانيا Ukraine 621 هوندوراس Honduras
537 روسيا البيضاء Byelorussia 622 المكسيك Mexico
539 ارمينيا Armenia 623 نيكاراجوا Nicaragua
540 مولدافيا Moldova 624 سانت لوسيا Saint Lucia
541 جورجيا Georgia 625 سان فينسنت Saintt Vincent
542 ليتوانيا Lithuania 626 بوليفيا Bolivia
543 استونيا Estonia 627 شيل Chile
544 التفيا Latvia 628 اكوادور Ecuador
629 باراجواي Paraguay 702 نيوزيلندا New Zealand
630 بيو Peru 703 بابوا نيوغينا Papua yoga
16 Integration guide
Integration guide for NTMP
17 Integration guide
Integration guide for NTMP
CancelBooking:
Interface description
The interface can be used to cancel the hotel booking.
Existing Service Name
N/A
18 Integration guide
Integration guide for NTMP
Environme URL
nt
Sandbox https://dev-hotelsapi.scth.gov.sa/gateway/CancelBooking/1.0/cancelBooking
(DEV)
Test (e.g. https://api-stg.ntmp.gov.sa/gateway/CancelBooking/1.0/cancelBooking
SIT)
Production https://api.ntmp.gov.sa/gateway/CancelBooking/1.0/cancelBooking
Request
Customer should hit the above URL’s to get the response and no input query-parameters
required
Query Parameters
Request Body
19 Integration guide
Integration guide for NTMP
HTTP Headers
Property Name Required Allowed Values Description
?
Accept Yes application/json Indicator from consumer regarding the
accepted format as a response.
Response
Response Body
HTTP Headers
Response Required Allowed Description
Property Name ? Values
20 Integration guide
Integration guide for NTMP
Response Codes
This section covers all the success and failure response codes.
21 Integration guide
Integration guide for NTMP
SWAGGER Descriptor
TBU
"transactionId" : "5737e370-4a8a-41cc-a2b2-8f263336459a",
"cancelReason" : "1",
"cancelWithCharges" : "1",
"chargeableDays" : "2",
"roomRentType" : "1",
"dailyRoomRate" : "500",
"totalRoomRate" : "1000",
"vat" : "200",
"municipalityTax" : "200",
"discount" : "400",
"grandTotal" : "1500",
"paymentType" : "1",
"cuFlag" : "1"
22 Integration guide
Integration guide for NTMP
"errorCode" : [ "0" ],
“correlationId” : “8b9d9a00-4445-4c9e-bfbb-db13f794d5c2”
“correlationId” : “5737e370-4a8a-41cc-a2b2-8f263336459a”
23 Integration guide
Integration guide for NTMP
BookingExpenseDetails:
Interface description
The interface can be used to book expense details of the hotel booking .
Existing Service Name
N/A
24 Integration guide
Integration guide for NTMP
Request
Customer should hit the above URL’s to get the response and no input query-parameters
required
Query Parameters
Name Requi Type Allowed Values Description
red?
NA
Request Body
HTTP Headers
Property Name Required Allowed Values Description
?
Accept Yes application/json Indicator from consumer regarding the
accepted format as a response.
25 Integration guide
Integration guide for NTMP
Response
Response Body
HTTP Headers
26 Integration guide
Integration guide for NTMP
Response Codes
This section covers all the success and failure response codes.
27 Integration guide
Integration guide for NTMP
SWAGGER Descriptor
"transactionId" : "AFE30234-9768-4EC8-9993-7FE1F3D814CA",
"expenseItems" : [ {
"expenseDate" : "20180205",
"itemNumber" : "220",
"expenseTypeId" : "1",
"unitPrice" : "200",
"discount" : "50",
"vat" : "40",
"municipalityTax" : "40",
"grandTotal" : "5000",
"paymentType" : "1",
"cuFlag" : "1"
}, {
"expenseDate" : "20180617",
"itemNumber" : "221",
"expenseTypeId" : "1",
"unitPrice" : "200",
"discount" : "50",
"vat" : "40",
28 Integration guide
Integration guide for NTMP
"municipalityTax" : "40",
"grandTotal" : "5000",
"paymentType" : "1",
"cuFlag" : "1"
}]
{
"correlationId": "58da01a5-5c92-4fae-9864-21e85af928bc",
"expenseItems": [
{
"itemNumber": "220",
"errorCode": [
"0"
]
},
{
"itemNumber": "221",
"errorCode": [
"0"
]
}
],
"errorCode": [
"0"
]
}
Error Response JSON Sample
"errorCode": ["1"] ,
"correlationId": "0e1d4630-33e8-4f9b-a498-17c080276557",
"expenseItems": [
29 Integration guide
Integration guide for NTMP
"itemNumber": "221",
"errorCode": [ "15"]
},
"itemNumber": "222",
"errorCode": [
"0"
Note: Please refer below details about the header level “errorCode” field value to interpret the
overall response status.
Header level “errorCode=1” : This response says that REST service unable to process a
expense lineitem or lineitems due to business validation failure or technical
reason.Please refer above error reponse sample for reference.
30 Integration guide
Integration guide for NTMP
Payment Type
Expense Types
5 Food الطعام
ر
والمشوبات الطعام
6 Food & Beverages
ال ر
مشوبات
7 Beverages
ر
المشوبات الباردة
8 Cold Drinks
ال ر
مشوبات الساخنة
9 Hot Drinks
31 Integration guide
Integration guide for NTMP
10 Breakfast اإلفطار
11 Lunch الغداء
12 Dinner العشاء
13 Bakery & Cakes المخبوزات
14 Swimming pool المسبح
15 Gym النادي الرياض
النادي الصج
16 SPA & Beauty Services
والتجميل
17 Pick & Drop (Transport Services) خدمة المواصالت
18 Minibar مين بار
قنوات فضائية
19 Cable - TV
إضافية
20 Extra Bed رسيرإضاف
21 Hairdresser العناية بالشعر
22 Shopping تسوق
23 Organized Tours Services تنظيم رحلة سياحية
24 Tour Guide Services خدمة مرشد سياح
32 Integration guide
Integration guide for NTMP
OccupancyUpdate:
Interface description
The interface can be used to create a occupancy details of the hotels for booking.
Existing Service Name
N/A
Request
Customer should hit the above URL’s to get the response and no input query-parameters
required
Query Parameters
Name Requi Type Allowed Values Description
red?
NA
Request Body
33 Integration guide
Integration guide for NTMP
HTTP Headers
Property Name Required Allowed Values Description
?
Accept Yes application/json Indicator from consumer regarding the
accepted format as a response.
Response
Response Body
Property Type Description
Success Response
ErrorCode StringLis 0 for success
t
CorrelationID String CorrelationID generated at webMethods
Failure Response
ErrorCode StringLis Refer to Response Code Table below
t
CorrelationID String CorrelationID generated at webMethods
HTTP Headers
Response Required Allowed Description
Property Name ? Values
Response Codes
This section covers all the success and failure response codes.
34 Integration guide
Integration guide for NTMP
SWAGGER Descriptor
TBU
{
"updateDate" : "20180203",
"roomsOccupied" : "3",
"roomsAvailable" : "10",
"roomsBooked" : "2",
"roomsOnMaintenance" : "2"
"errorCode" : [ "0" ],
“correlationId” : “8b9d9a00-4445-4c9e-bfbb-db13f794d5c2”
“correlationId” : “5737e370-4a8a-41cc-a2b2-8f263336459a”
35 Integration guide