智能桌面酒店PMS接口-1.2版本

By sxzcache at 2019-05-10 • 0人收藏 • 6044人看过

智能桌面酒店PMS接口-1.2版本

简介,对接采用http1.1 POST协议,PMS 中间件把酒店酒店入住,换房,退房,的信息中转推送到智能桌面酒店系统,API统一接口,http://IP:PORT/pms/action

智能桌面系统接收到信息以后保存到内存同步到数据库。为了避免有丢失的信息,传送失败等意外情况,提供了定时同步房间信息的接口参考第四条。

 

备注Gender:1男,0女,1-4 POST推送json房间信息或者同步所有房间信息,5返回值,200/404,正常,异常。所有json字符串默认采用utf8格式。注意json字段中大小写。

 

1,入住

POST /pms/action HTTP/1.1

Connection: close

Content-Length: 133

Content-Type: application/json; charset=utf-8

Accept: application/json

 

{

"action": "checkIn",

"hotelId": "123456",

"roomId": 101,

"data": [{

"guestName": "XX",

"gender": 1

}

]

}

双人入住,多人入住

POST /pms/action HTTP/1.1

Connection: close

Content-Length: 133

Content-Type: application/json; charset=utf-8

Accept: application/json

{

"action": "checkIn",

"hotelId": "123456",

"roomId": 101,

"data": [{

"guestName": "XX",

"gender": 1

},

{

"guestName": "XX",

"gender": 1

}

]

 

}

 

2,换房

POST /pms/action HTTP/1.1

Connection: close

Content-Length: 133

Content-Type: application/json; charset=utf-8

Accept: application/json

 

{

"action": "moveRoom",

"hotelId": "123456",

"oldRoomId": 101,

"newRoomId": 102,

"data": [{

"guestName": "XX",

"gender": 1

}

]

 

}

 

3,退房

POST /pms/action HTTP/1.1

Connection: close

Content-Length: 133

Content-Type: application/json; charset=utf-8

Accept: application/json

 

{

"action": "checkOut",

"hotelId": "123456",

"roomId": 102,

"data": [{

"guestName": "XX",

"gender": 1

}

]

 

}

 

 

4,同步所有房间信息

POST /pms/action HTTP/1.1

Connection: close

Content-Length: 133

Content-Type: application/json; charset=utf-8

Accept: application/json

 

{

"action":"sync",

"hotelId":"123456",

"data":[{

 "roomId":103,

 "guestName":"XX",

 "gender":1

 },{

 "roomId":104,

 "guestName":"XX",

 "gender":1

}]

}

 

5,回复信息状态code :0 成功,其他失败。

 

HTTP/1.1 200 OK

Accept-Ranges: bytes

Content-Type: application/json; charset=utf-8

Content-Length: 52

 

{

"code": 0,

"msg": "成功/失败原因"

}

 

 

 


登录后方可回帖

Loading...