PMS Services


1st Stage Login

Login Method

As a result of successful request, token information is returned. In case of an error, unauthorized returns.

Last Update Date: 06.03.2017
Method Adress /api/system/login
Method Type GET
Token Required NO
Note: You should add returned token information as a header to your request after login.

request.Headers.Add(“cookie”, “29147ccf-a15e-47a2-93d4-a595d8ad444b”);
Response Sample

 eccb3171-8b55-4b44-840c-90f6718e360f

URL Parameters
Parameter Name Bound Shape Definition Data Type Description
user yes URI string User information required for login
pass yes URI string Password information required for login

2nd Stage Preparation

GetHotelAgencies

Hotel Agency Import : You can use "gethotelagencies" method to import connected agency list in Hotel2Sejour.

Last Update Date: 06.03.2017
Method Adress /api/pax/gethotelagencies>
Method Type GET
Token Required YES
Request Sample

GET http://admin.stage.hotel2sejour.com/api/pax/gethotelagencies?format=xml

Response Sample
<ServiceResultOfArrayOfDefinitionHotelAgency>
  <Data>
    <DefinitionHotelAgency xmlns="">
      <Id>8dc82479-495e-46e9-a060-03da9fceba60</Id>
      <Name>Zem Expert</Name>
    </DefinitionHotelAgency>
    <DefinitionHotelAgency xmlns="">
      <Id>d226f2d4-7cc1-4648-94f2-0515d8db03b4</Id>
      <Name>Northern Travel</Name>
    </DefinitionHotelAgency>
  </Data>
  <Error>
    <Code/>
    <Message/>
  </Error>
  <InfoMessage>2 data item returned</InfoMessage>
  <IsSuccessful>true</IsSuccessful>
</ServiceResultOfArrayOfDefinitionHotelAgency>
URL Parameters
Parameter Name Bound Shape Definition Data Type Description
format no URI string response return format Sample:xml,json
GetNotConfirmMessages

Not Confirm Message Import : You can use “getnotconfirmmessages” method to import not confirm messages in Hotel2Sejour.

Last Update Date: 06.03.2017
Method Adress /api/pax/getnotconfirmmessages
Method Type GET
Token Required YES
Request Sample

http://admin.stage.hotel2sejour.com/api/pax/getnotconfirmmessages?paximumId=2222&format=xml&langId=tr-TR

Response Sample
<ServiceResultOfArrayOfNotConfirmMessage>
  <Data>
    <NotConfirmMessage>
      <Id>2508d966-56e6-46ff-b98d-13940f9f5ddb</Id>
      <Name>Allotment Exceed</Name>
    </NotConfirmMessage>
    <NotConfirmMessage>
      <Id>a860847a-3abf-48f2-9396-3859ea187277</Id>
      <Name>Fulness</Name>
    </NotConfirmMessage>
  </Data>
  <Error>
    <Code/>
    <Message/>
  </Error>
  <InfoMessage>2 data item returned</InfoMessage>
  <IsSuccessful>true</IsSuccessful>
</ServiceResultOfArrayOfNotConfirmMessage>
URL Parameters
Parameter Name Bound Shape Definition Data Type Description
format no URI string response return format Sample:xml, json
paximumId no URI int a unique hotel value
langId no URI string for Turkish = tr-TR , for English en-US
GetSejourForMapping

Sejour Definitions Import : You can use “getsejourformapping” method, to mapping; room, room type, pansion definitons in Hotel2Sejour.

Last Update Date: 06.03.2017
Method Adress /api/pax/getsejourformapping
Method Type GET
Token Required YES
Request Sample

 http://admin.stage.hotel2sejour.com/api/pax/getsejourformapping?agencyId=873B1E6A-C5D0-4E52-ABBD-634CC9CFF1D7&paximumId=2222&format=xml

Response Sample
<ServiceResultOfArrayOfSejourCodesForMapping xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/HotelWeb.Web.Framework">
 <Data>
<SejourCodesForMapping xmlns="">
<SejourBoards/>
<SejourNationals/>
<SejourRoomTypes/>
<SejourRooms/>
</SejourCodesForMapping>
</Data>
<Error>
<Code/>
<Message/>
</Error>
<InfoMessage/>
<IsSuccessful>true</IsSuccessful>
</ServiceResultOfArrayOfSejourCodesForMapping>

URL Parameters
Parameter Name Bound Shape Definition Data Type Description
paximumId yes URI int a unique hotel value in Hotel2Sejour
agencyId yes URI Guid Id information returned from Gethotelagencies method
format no URI string response return format Sample:xml,json

3rd Stage Reservation

GetReservationList

Hotel Reservation Import From Hotel2Sejour: You can use “getReservationList” method to import waiting or confirmed reservation in Hotel2Sejour. As the structure of all response, Data , Error ,InfoMessage and IsSuccessful, it consist of 4 parts. As a result of successful request, IsSuccessful true returns and the result is listed under Data. In case of any error, IsSuccessful return false and the error details is listed under Error.

Last Update Date: 06.03.2017
Method Adress /api/pax/getReservationList
Method Type GET
Token Required YES
HTTP Request

GET http://admin.stage.hotel2sejour.com/api/pax/getReservationList?checkInStart={checkInStart}&checkInEnd={checkInEnd}&paximumId={paximumId}&agencyId={agencyId}&format={format}}&IsSendRequired={IsSendRequired}

Request Sample

http://admin.stage.hotel2sejour.com/api/pax/getReservationList?checkInStart=10.01.2014&checkInEnd=10.08.2014&agencyId=873B1E6A-C5D0-4E52-ABBD-634CC9CFF1D7&format=xml

Response Sample

For less than 1000 reservations:

<?xml version="1.0" encoding="utf-8"?>
<ServiceResultOfArrayOfReservationPms xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/HotelWeb.Web.Framework">
  <Data>
    <ReservationPms xmlns="">
      <AccomId>AI</AccomId>
      <AccomName>ALL INCLUSIVE (AI)</AccomName>
      <Adults>2</Adults>
      <AgencyId>dd5896c9-ff9c-4f43-bab6-85fa2f820f39</AgencyId>
      <AgencyName>stage_db_test_1</AgencyName>
      <CheckIn>2014-06-08T00:00:00</CheckIn>
      <CheckOut>2014-06-15T00:00:00</CheckOut>
      <Childs>0</Childs>
      <ConfirmDate i:nil="true" />
      <ConfirmationNo></ConfirmationNo>
      <ConfirmationStatus>W</ConfirmationStatus>
      <ConfirmeNote></ConfirmeNote>
      <Customers>
        <CustomerPms>
          <Age>63</Age>
          <Arrival>ARR?</Arrival>
          <ArrivalTime i:nil="true" />
          <BirthDate i:nil="true" />
          <Departure>DEP?</Departure>
          <DepartureTime i:nil="true" />
          <MusNo>95</MusNo>
          <MusTakipNo></MusTakipNo>
          <Name>BERG, WILHELMIENA    N</Name>
          <Nationality></Nationality>
          <NationalityString></NationalityString>
          <ReservationKeyField>H2S|0042|44|H2S|f3ba442b-9d2e-4315-b3ed-20224837fcde|e76e1cf7-0c8a-42d6-a163-65f8d848dff5|0|f01819aa-df05-48ec-8683-572eaa354ad0|16.9.2015 17:21:51</ReservationKeyField>
          <Title>Mrs</Title>
        </CustomerPms>
        <CustomerPms>
          <Age>61</Age>
          <Arrival>ARR?</Arrival>
          <ArrivalTime i:nil="true" />
          <BirthDate i:nil="true" />
          <Departure>DEP?</Departure>
          <DepartureTime i:nil="true" />
          <MusNo>96</MusNo>
          <MusTakipNo></MusTakipNo>
          <Name>SMEUR, ANTONIUS      N</Name>
          <Nationality></Nationality>
          <NationalityString></NationalityString>
          <ReservationKeyField>H2S|0042|44|H2S|f3ba442b-9d2e-4315-b3ed-20224837fcde|e76e1cf7-0c8a-42d6-a163-65f8d848dff5|0|f01819aa-df05-48ec-8683-572eaa354ad0|16.9.2015 17:21:51</ReservationKeyField>
          <Title>Mr</Title>
        </CustomerPms>
      </Customers>
      <ExtraBed>0</ExtraBed>
      <ExtraServices />
      <FisNo>0</FisNo>
      <FreeOfCharge>N</FreeOfCharge>
      <HoneyMoon>N</HoneyMoon>
      <HotelId>00000000-0000-0000-0000-000000000000</HotelId>
      <HotelName>H2S Test Hotel</HotelName>
      <Infants>0</Infants>
      <KeyField>H2S|0042|44|H2S|f3ba442b-9d2e-4315-b3ed-20224837fcde|e76e1cf7-0c8a-42d6-a163-65f8d848dff5|0|f01819aa-df05-48ec-8683-572eaa354ad0|16.9.2015 17:21:51</KeyField>
      <LastChangeUser>ADMIN</LastChangeUser>
      <LogId>44</LogId>
      <Nights>7</Nights>
      <Note></Note>
      <OriginalHotelCode>OTELL</OriginalHotelCode>
      <Pax>2</Pax>
      <PaximumId>100826</PaximumId>
      <PmsStatus>0</PmsStatus>
      <PromosyonRoom>N</PromosyonRoom>
      <QuotaType>1</QuotaType>
      <ReservationStatus>0</ReservationStatus>
      <RoomCount>1</RoomCount>
      <RoomId>DBL</RoomId>
      <RoomName>DOUBLE ROOM (DBL)</RoomName>
      <RoomNo i:nil="true" />
      <RoomTypeId>STD</RoomTypeId>
      <RoomTypeName>STANDARD ROOM (STD)</RoomTypeName>
      <SejourHotelName>H2S TEST OTEL</SejourHotelName>
      <SellDate i:nil="true" />
      <ServiceId>f3ba442b-9d2e-4315-b3ed-20224837fcde</ServiceId>
      <SoldCurrency>-</SoldCurrency>
      <SoldPrice>0</SoldPrice>
      <TourOpCode>H2S</TourOpCode>
      <TourOpName>-</TourOpName>
      <VoucherNo>0042</VoucherNo>
    </ReservationPms>
  </Data>
  <Error>
    <Code></Code>
    <Message></Message>
  </Error>
  <InfoMessage>1 data item returned</InfoMessage>
  <IsSuccessful>true</IsSuccessful>
</ServiceResultOfArrayOfReservationPms>

For more thatn 1000 reservations:

<ServiceResultOfArrayOfPmsResListExceed>
  <Data>
    <PmsResListExceed>
      <FileCode>25267891-4999-4949-b04c-9dda5626065f</FileCode>
    </PmsResListExceed>
  </Data>
  <Error>
    <Code/>
    <Message/>
  </Error>
  <InfoMessage>Reservation list limit is exceeded</InfoMessage>
  <IsSuccessful>true</IsSuccessful>
</ServiceResultOfArrayOfPmsResListExceed>

URL Parameters

Parameter Name Bound Shape Definition Data Type Description
checkInStart yes URI datetime Hotel checkin start date. date format : (mm.dd.yyyy)
checkInEnd yes URI datetime Hotel checkin end date. date format : (mm.dd.yyyy)
paximumId no URI int a unique Hotel value.
agencyId no URI Guid In case of Agency Id is not used, all the agencies reservation will be listed.
status no URI string It's not required field for waiting reservations. If it will send, for waiting reservations 'W', for confirmed reservations 'E', for not confirmed reservations 'H'.
format no URI string response return format Sample:xml,json
IsSendRequired no URI bool In case of true send, send reservations as “postsentlogids” method ,cannot be resubmitted unless there is any change.

CheckReservationFile

Created According To The FileCode Hotel Reservation List Url Information :

You can access the URL information of the created reservation list using the “checkreservationfile” method.

Last Update Date: 06.03.2017
Method Adress /api/Pax/checkreservationfile
Method Type GET
Token Required YES
 
Note : File content is created as send parameters and it's returned as URL address.
;You can download the file from the specified URL.
HTTP Request

GET http://admin.stage.hotel2sejour.com/api/Pax/checkreservationfile?fileCode={fileCode}&format={format}.

Request Sample

http://admin.stage.hotel2sejour.com/api/pax/checkreservationfile?fileCode=25267891-4999-4949-b04c-9dda5626065f&format=xml

Response Sample(Dosya hazir degil ise)
<ServiceResultOfArrayOfCheckReservationFile>
  <Data/>
  <Error>
    <Code/>
    <Message/>
  </Error>
  <InfoMessage>Reservation list is not ready</InfoMessage>
  <IsSuccessful>false</IsSuccessful>
</ServiceResultOfArrayOfCheckReservationFile>
Response Sample(If the file is ready)
<ServiceResultOfArrayOfCheckReservationFile>
  <Data>
    <CheckReservationFile>
      <FileUrl>http://uploads.stage.hotel2sejour.com/temp/25267891-4999-4949-b04c-9dda5626065f.txt</FileUrl>
    </CheckReservationFile>
  </Data>
  <Error>
    <Code/>
    <Message/>
  </Error>
  <InfoMessage>1 data item returned</InfoMessage>
  <IsSuccessful>true</IsSuccessful>
</ServiceResultOfArrayOfCheckReservationFile>

URL Parameters

Parameter Name Bound Shape Definition Data Type Description
fileCode yes URI guid Guid value returned by "“FileCode”" from “getreservations”
format no URI string response return format Sample:xml,json
PostSentLogIds

Reservation Notifications which import with GetReservationList method:

Reservations reported with the "postsentlogids" method will not be sent again with the "getreservationList" method if has not changed

Last Update Date: 06.03.2017
Method Adress /api/Pax/postsentlogids
Method Type POST
Token Required YES
Note :If the request is posted as successfull, it will response True.
Request Sample


POST http://admin.stage.hotel2sejour.com/api/pax/postsentlogids?serviceId=c6231ce5-bb83-4acd-81b4-d61a6cffbdb4 HTTP/1.1
Accept: application/xml, text/plain
Token: 8029de98-0feb-44f6-bdc4-dd554da93847
Content-Type: application/json;charset=UTF-8
Accept-Encoding: gzip, deflate, br

{logId:"7,8"}

Response Sample
<ServiceResultOfArrayOfstringuHEDJ7Dj xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/HotelWeb.SanAdminSite.RestWebApi.App_Data">
    <Data xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
        <d2p1:string>7</d2p1:string>
        <d2p1:string>8</d2p1:string>
    </Data>
    <Error>
        <Code/>
        <Message/>
    </Error>
    <InfoMessage/>
    <IsSuccessful>true</IsSuccessful>
</ServiceResultOfArrayOfstringuHEDJ7Dj>

URL Parameters

Parameter Name Bound Shape Definition Data Type Description
serviceId yes URI guid a Guid value which response from “getreservationList” method in “ServiceId” field.
logIds yes body string int value which response from “LogId” field

4th Stage Confirm / Not Confirm

SendConfirmation

Send Confirmation And Not Confirmation: You can confirm or not confirm the reservations which is waiting in your system by using “sendconfirmation” method.

Last Update Date: 06.03.2017
Method Adress /api/pax/sendconfirmation
Method Type GET
Token Required YES
 
Note: 0 PmsStatus “0” (new send reservation),”2” ( again send reservation-changes) , “3” (Cancellation) response. W ConfirmationStatus “W” (waiting) 0 ReservationStatus “0” (Ok), “1” (OnRequest), “2” (NoShow), “3”(GoShow), “4”(Option) response. 1 “0” (Guarantee), “1” (Normal), “2” (OnRequest) response. 
H2S|0997063|1|ATHENA|f679b28f-eec8-495f-8720-5f47f5d19f13|99806343-6a9a-45d9-9e2f-cd7f2f69d1d6|0 It's required for sendconfirmation method   N FreeOfCharge “N“ (no),”Y” (yes) response. N PromosyonRoom “N“ (no),”Y” (yes) response.
HTTP Request

GET http://admin.stage.hotel2sejour.com/api/pax/sendconfirmation?keyField={keyField}&agencyId={agencyId}&paximumId={paximumId}&confirmationNote={confirmationNote}&confirmationStatus={confirmationStatus}&notconfirmationNote={notconfirmationNote}&format={format}

Request Sample

GET http://admin.stage.hotel2sejour.com/api/pax/sendconfirmation?keyField=H2S|0997063|1|ATHENA|f679b28f-eec8-495f-8720-5f47f5d19f13|99806343-6a9a-45d9-9e2f-cd7f2f69d1d6|0&AgencyId=a3e131e1-8818-4b2c-8144-b1651b92151a&paximumId=2222&confirmationStatus=H& notconfirmationNote=2508d966-56e6-46ff-b98d-13940f9f5ddb &pmsUser=test_deneme&format=xml

Response Sample
<ServiceResultOfArrayOfSendConfirmation>
  <Data>
    <SendConfirmation>
      <KeyField>H2S|0997063|1|ATHENA|f679b28f-eec8-495f-8720-5f47f5d19f13|99806343-6a9a-45d9-9e2f-cd7f2f69d1d6|0</KeyField>
      <Status>H</Status>
    </SendConfirmation>
  </Data>
  <Error>
    <Code/>
    <Message/>
  </Error>
  <InfoMessage>1 data item returned</InfoMessage>
  <IsSuccessful>true</IsSuccessful>
</ServiceResultOfArrayOfSendConfirmation>

URL Parameters

Parameter Name Bound Shape Definition Data Type Description
agencyId yes URI Guid Agency Id
paximumId yes URI int a unique Hotel value
confirmationNote no URI string A note field for confirmed reservations Important Note : Cannot be more than 500 characters
confirmationStatus yes URI string For confirmed reservations “E” For not confirmed reservations “H” should be send.
notconfirmationNote Only required for not confirm reservations URI Guid A note information for not confirmed reservations Important Note : Response from “getnotconfirmmessages” method, Id should send
pmsUser no URI string User name
format no URI string response returned format Sample:xml,json

SendConfirmationV2

Note: Only difference from the above sendconfirmation is VoucherUrl response. 
VoucherUrl: Created pdf URL
Request Sample

GET http://admin.stage.hotel2sejour.com/api/pax/sendconfirmationv2?keyField=H2S|0997063|1|ATHENA|f679b28f-eec8-495f-8720-5f47f5d19f13|99806343-6a9a-45d9-9e2f-cd7f2f69d1d6|0&AgencyId=a3e131e1-8818-4b2c-8144-b1651b92151a&paximumId=2222&confirmationStatus=H& notconfirmationNote=2508d966-56e6-46ff-b98d-13940f9f5ddb &pmsUser=test_deneme&format=xml

Response Sample
<ServiceResultOfArrayOfSendConfirmation>
  <Data>
    <SendConfirmation>
      <KeyField>H2S|0997063|1|ATHENA|f679b28f-eec8-495f-8720-5f47f5d19f13|99806343-6a9a-45d9-9e2f-cd7f2f69d1d6|0</KeyField>
      <Status>H</Status>
      <VoucherUrl>http://tmp.voucherurl.com</VoucherUrl>        
    </SendConfirmation>
  </Data>
  <Error>
    <Code/>
    <Message/>
  </Error>
  <InfoMessage>1 data item returned</InfoMessage>
  <IsSuccessful>true</IsSuccessful>
</ServiceResultOfArrayOfSendConfirmation>