Query Rooms on Pages

Last Updated on : 2023-06-21 07:13:01download

Query the information about rooms under a specified hotel industry project.

API address

GET: /v1.0/osaas/projects/{project_id}/rooms

Request parameter

Parameter nameTypeINRequiredDescription
projectIdStringuritrueThe unique ID of a specified project.

Return parameter

Parameter nameTypeDescription
totalintThe total number of results.
pageNointThe current page number.
pageSizeintThe number of items returned on each page.
roomsRoomResponse[]A list of rooms.

Request example

GET: {url}/v1.0/osaas/projects/1160823965053******/rooms

Return example

{
    "result": {
        "rooms": [
            {
                "room_id": "116082396505314*****",
                "gmt_create": 1559707046000,
                "description": "Description of the room",
                "gmt_modified": 1559707046000,
                "room_name": "Room **",
                "construction_status": "UNAUTHORIZED",
                "room_no": "1001"
            }
        ],
        "page_no": 1,
        "total": 1,
        "page_size": 10
    },
    "t": 1561381210234,
    "success": true
}

Error code

For more information, see error code.