Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 6

Smart Galaxy Solutions

SGS
‫المجلس الوطني االتحادي‬

Host Order API

1|Page
Smart Galaxy Solutions

1 Host Order API.......................................................................................................................3


1.1 Introduction....................................................................................................................3
1.2 Save New Data Request Service Properties....................................................................3
1.2.1 Request and Response Message.............................................................................3

2|Page
Smart Galaxy Solutions

1 Host Order API


1.1 Introduction
This API used to Make Request of Host Order Requests:

1- Save New Data

1.2 Save New Data Request Service Properties


This API Responsible to save New Data Request for Host Order Request.

1.2.1 Request and Response Message


The URL For This Method Can Be Invoked by Calling This URL:

http://fnchqapps01/FncPurchasingAPI/api/SaveNewDataHostingOrder

For the link of the QA Can Be Invoked by Calling This URL:

http://fncstgapp01/PurchasingEndPoint/api/SaveNewDataHostingOrder

Request Protocol: http Post

The following unique IDs can be used to invoke the virtual service for each user.

1.2.2 Retrieve the Hotels Account Number


For retrieving the vendor account number to you used on mapping by
calling this URL: -

http://fnchqapps01/FncPurchasingAPI /api/GetAllVendorList

the QA link:-

http://fncstgapp01/PurchasingEndPoint//api/GetAllVendorList

1.2.2.1 Request HTTP Header Structure

Value Mandatory/
Element / Attribute Notes
Optional
Content-Type application/ The Request Header Content Type
Mandatory
json
Authorization token Bearer Token Used for Authorization
Mandatory
Created by the Login API

3|Page
Smart Galaxy Solutions

1.2.2.2 Request Message Body Structure


Request Messages:
Mandatory/ Element in Arabic
Element / Attribute Type Notes
Optional
This will be the main
response object
HostingOrderHdrDto
containing data in
properties
HostingOrderNO Decimal? Not need Auto from the system ‫رقم أمر االستضافة يتم إصداره‬
‫تلقائي من النظام‬
TransYear decimal Mandatory The year of request ‫السنة يتم ارسال سنة امر التكليف‬
HostingOrderDate Datetime Mandatory Date Time Hosting date ‫يتم ارسال تاريخ امر التكليف‬
Vendor No ‫رقم حساب المورد بناءا على حقل‬
SAccNO string Mandatory ‫الربط لكل فندق برقم الحساب‬
‫الموازي له‬
Note string Mandatory Note ‫البيان او مالحظات الطلب يتم‬
‫إدخالها يدويا‬
List<HostingOrder List of Attachments for ‫تحميل المرفقات على مستوى‬
HostingOrderFiles Optional
Files> the request ‫الطلب موضحة بالجدول ادناه‬
List<HostingOrder List of Items , Required ‫تفاصيل المقيمين موضحة‬
HostingOrderDtl Mandatory
Dtl> 1 at least ‫بالجدول ادناه‬

HostingOrderFiles
Mandatory/ Element in
Element / Attribute Type Notes
Optional Arabic
This will be the files attachments of the
HostingOrderFilesDto
request
File Name of Attachment and extension ‫نوع الملف‬
FileNameWithExtention string Mandatory
(ex, Pic.png)
FileAttachment Byte[] Mandatory The Physically file attachments ‫الملف‬

HostingOrderDtl
Mandatory/ Element in
Element / Attribute Type Notes
Optional Arabic
HostingOrderDtlDto This will be the details of request
HostName string Mandatory Host Name ‫أسم المستضيف‬
FromDate Datetime? Mandatory From Date ‫من تاريخ‬
ToDate Datetime? Mandatory To Date ‫إلى تاريخ‬

4|Page
Smart Galaxy Solutions

Example:
{

{
"TransYear" : 2023 ,
"HostingOrderDate" :"2023-05-05"
,"SAccNO" : "4121"
,"Note" :"Test1"
,"HostingOrderFiles" : [

{
"FileNameWithExtention" : "Pic.jpg",
"FileAttachment" : "/9j/4AAQSkZJRgABAQEASABIAAD/”
}]

, "HostingOrderDtl" : [{
"HostName":"kholoud Mohamed"
,"FromDate" : "2023-05-05"
,"ToDate":"2023-05-10"

}]

1.2.2.3 Response Message Body Structure

The Response Will Be in json Format contain Class ResultApi

Mandatory/
Element / Attribute Type Notes
Optional
This will be the main response object
ResultApi
containing data in properties
Status int - 0 Not Valid , 1 is valid
The respone Message in Arabic
MessageAr string -
Language
The respone Message in English
MessageEn string -
Language
Valid bool - Valid of not
Returned IDNo if succeed (Primary
IDNO Decimal -
Key of the Table)

5|Page
Smart Galaxy Solutions

Example:
{

"Status": 1,
"MessageAr": "‫"تم الحفظ بنجاح‬,
"MessageEn": "Saved Successfully ",
"Valid": true,
"IDNO": 20.0

6|Page

You might also like