Create Room

Last Updated on : 2023-06-21 07:12:59download

Create a room under a specified hotel industry project.

API address

POST: /v1.0/osaas/projects/{project_id}/room

Request parameter

Parameter nameTypeINRequiredDescription
projectIdStringuritrueThe unique ID of a specified project.
spaceIdStringurifalseThe unique ID of a specified space. A room can be linked with any space.
roomNameStringuritrueThe name of a specified room. Up to 64 characters can be entered.
roomNoStringuritrueThe number of a specified room. Up to 32 characters can be entered.
telephoneStringurifalseThe mobile phone number. Up to 20 characters can be entered.
descriptionStringurifalseThe description of a specified room. Up to 255 characters can be entered.
uidStringurifalseThe unique ID of a specified user. Create a room for a specified user.

Return parameter

Parameter nameTypeDescription
codeIntegerThe response code if the API call fails. This parameter value is empty if the API call succeeds.
successStringIndicates whether the operation is successful.
msgStringThe response message that is returned if the request fails. It is empty if the request is successful.
tLongThe 13-bit timestamp.
resultStringThe unique ID of a specified room.

Request example

POST: {url}/v1.0/osaas/projects/1160823965053******/room
{
  "room_no": "101",
  "room_name": "Room ***",
  "space_id": "116082396505312****"
}

Return example

{
    "result": "1112382396505******",
    "t": 1566053034624,
    "success": true
}

Error code

For more information, see error code.