GET Api/Rooms/GetForParent/{accommodationId}/{currentPage}/{itemsPerPage}

Pobiera listę wszystkich obiektów Room

Request Information

URI Parameters

NameDescriptionTypeAdditional information
accommodationId

identyfikator obiektu nadrzędnego Accommodation

integer

Required

currentPage

numer aktualnej strony

integer

Default value is 0

itemsPerPage

ilość elementów na stronie

integer

Default value is 2147483647

Body Parameters

None.

Response Information

Resource Description

lista wszystkich obiektów Room w bazie danych

Collection of RoomDto
NameDescriptionTypeAdditional information
RoomId

integer

Required

AccommodationId

integer

Required

Name

string

Required

NumberOfPlaces

integer

Required

TypeOfBedId

integer

None.

GenderRestriction

integer

None.

Price

decimal number

None.

TypeOfRoomId

integer

None.

Bookings

Lista rezerwacji pokoju

Collection of BookingDto

None.

NumberOfFreePlaces

integer

None.

Response Formats

application/json, text/json

Sample:
[
  {
    "roomId": 1,
    "accommodationId": 2,
    "name": "sample string 3",
    "numberOfPlaces": 4,
    "typeOfBedId": 1,
    "genderRestriction": 1,
    "price": 1.0,
    "typeOfRoomId": 1,
    "bookings": [
      {
        "bookingId": 1,
        "createDate": "2024-05-18T03:52:29.4640868+00:00",
        "roomId": 3,
        "profileId": "sample string 4",
        "startDate": "2024-05-18T03:52:29.4640868+00:00",
        "endDate": "2024-05-18T03:52:29.4640868+00:00",
        "reservationStatus": true,
        "createdBy": "sample string 6",
        "comment": "sample string 7",
        "error": "sample string 8",
        "recruitmentProjectId": 1,
        "personnelProcessId": 1,
        "workerName": "sample string 9",
        "workerSurname": "sample string 10",
        "workerGender": 1
      },
      {
        "bookingId": 1,
        "createDate": "2024-05-18T03:52:29.4640868+00:00",
        "roomId": 3,
        "profileId": "sample string 4",
        "startDate": "2024-05-18T03:52:29.4640868+00:00",
        "endDate": "2024-05-18T03:52:29.4640868+00:00",
        "reservationStatus": true,
        "createdBy": "sample string 6",
        "comment": "sample string 7",
        "error": "sample string 8",
        "recruitmentProjectId": 1,
        "personnelProcessId": 1,
        "workerName": "sample string 9",
        "workerSurname": "sample string 10",
        "workerGender": 1
      }
    ],
    "numberOfFreePlaces": 5
  },
  {
    "roomId": 1,
    "accommodationId": 2,
    "name": "sample string 3",
    "numberOfPlaces": 4,
    "typeOfBedId": 1,
    "genderRestriction": 1,
    "price": 1.0,
    "typeOfRoomId": 1,
    "bookings": [
      {
        "bookingId": 1,
        "createDate": "2024-05-18T03:52:29.4640868+00:00",
        "roomId": 3,
        "profileId": "sample string 4",
        "startDate": "2024-05-18T03:52:29.4640868+00:00",
        "endDate": "2024-05-18T03:52:29.4640868+00:00",
        "reservationStatus": true,
        "createdBy": "sample string 6",
        "comment": "sample string 7",
        "error": "sample string 8",
        "recruitmentProjectId": 1,
        "personnelProcessId": 1,
        "workerName": "sample string 9",
        "workerSurname": "sample string 10",
        "workerGender": 1
      },
      {
        "bookingId": 1,
        "createDate": "2024-05-18T03:52:29.4640868+00:00",
        "roomId": 3,
        "profileId": "sample string 4",
        "startDate": "2024-05-18T03:52:29.4640868+00:00",
        "endDate": "2024-05-18T03:52:29.4640868+00:00",
        "reservationStatus": true,
        "createdBy": "sample string 6",
        "comment": "sample string 7",
        "error": "sample string 8",
        "recruitmentProjectId": 1,
        "personnelProcessId": 1,
        "workerName": "sample string 9",
        "workerSurname": "sample string 10",
        "workerGender": 1
      }
    ],
    "numberOfFreePlaces": 5
  }
]

multipart/form-data

Sample:
[{"roomId":1,"accommodationId":2,"name":"sample string 3","numberOfPlaces":4,"typeOfBedId":1,"genderRestriction":1,"price":1.0,"typeOfRoomId":1,"bookings":[{"bookingId":1,"createDate":"2024-05-18T03:52:29.4640868+00:00","roomId":3,"profileId":"sample string 4","startDate":"2024-05-18T03:52:29.4640868+00:00","endDate":"2024-05-18T03:52:29.4640868+00:00","reservationStatus":true,"createdBy":"sample string 6","comment":"sample string 7","error":"sample string 8","recruitmentProjectId":1,"personnelProcessId":1,"workerName":"sample string 9","workerSurname":"sample string 10","workerGender":1},{"bookingId":1,"createDate":"2024-05-18T03:52:29.4640868+00:00","roomId":3,"profileId":"sample string 4","startDate":"2024-05-18T03:52:29.4640868+00:00","endDate":"2024-05-18T03:52:29.4640868+00:00","reservationStatus":true,"createdBy":"sample string 6","comment":"sample string 7","error":"sample string 8","recruitmentProjectId":1,"personnelProcessId":1,"workerName":"sample string 9","workerSurname":"sample string 10","workerGender":1}],"numberOfFreePlaces":5},{"roomId":1,"accommodationId":2,"name":"sample string 3","numberOfPlaces":4,"typeOfBedId":1,"genderRestriction":1,"price":1.0,"typeOfRoomId":1,"bookings":[{"bookingId":1,"createDate":"2024-05-18T03:52:29.4640868+00:00","roomId":3,"profileId":"sample string 4","startDate":"2024-05-18T03:52:29.4640868+00:00","endDate":"2024-05-18T03:52:29.4640868+00:00","reservationStatus":true,"createdBy":"sample string 6","comment":"sample string 7","error":"sample string 8","recruitmentProjectId":1,"personnelProcessId":1,"workerName":"sample string 9","workerSurname":"sample string 10","workerGender":1},{"bookingId":1,"createDate":"2024-05-18T03:52:29.4640868+00:00","roomId":3,"profileId":"sample string 4","startDate":"2024-05-18T03:52:29.4640868+00:00","endDate":"2024-05-18T03:52:29.4640868+00:00","reservationStatus":true,"createdBy":"sample string 6","comment":"sample string 7","error":"sample string 8","recruitmentProjectId":1,"personnelProcessId":1,"workerName":"sample string 9","workerSurname":"sample string 10","workerGender":1}],"numberOfFreePlaces":5}]

application/xml, text/xml

Sample:
<ArrayOfRoomDto xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <RoomDto>
    <RoomId>1</RoomId>
    <AccommodationId>2</AccommodationId>
    <Name>sample string 3</Name>
    <NumberOfPlaces>4</NumberOfPlaces>
    <TypeOfBedId>1</TypeOfBedId>
    <GenderRestriction>1</GenderRestriction>
    <Price>1</Price>
    <TypeOfRoomId>1</TypeOfRoomId>
    <Bookings>
      <BookingDto>
        <BookingId>1</BookingId>
        <CreateDate />
        <RoomId>3</RoomId>
        <ProfileId>sample string 4</ProfileId>
        <StartDate />
        <EndDate />
        <ReservationStatus>true</ReservationStatus>
        <CreatedBy>sample string 6</CreatedBy>
        <Comment>sample string 7</Comment>
        <Error>sample string 8</Error>
        <RecruitmentProjectId>1</RecruitmentProjectId>
        <PersonnelProcessId>1</PersonnelProcessId>
        <WorkerName>sample string 9</WorkerName>
        <WorkerSurname>sample string 10</WorkerSurname>
        <WorkerGender>1</WorkerGender>
      </BookingDto>
      <BookingDto>
        <BookingId>1</BookingId>
        <CreateDate />
        <RoomId>3</RoomId>
        <ProfileId>sample string 4</ProfileId>
        <StartDate />
        <EndDate />
        <ReservationStatus>true</ReservationStatus>
        <CreatedBy>sample string 6</CreatedBy>
        <Comment>sample string 7</Comment>
        <Error>sample string 8</Error>
        <RecruitmentProjectId>1</RecruitmentProjectId>
        <PersonnelProcessId>1</PersonnelProcessId>
        <WorkerName>sample string 9</WorkerName>
        <WorkerSurname>sample string 10</WorkerSurname>
        <WorkerGender>1</WorkerGender>
      </BookingDto>
    </Bookings>
    <NumberOfFreePlaces>5</NumberOfFreePlaces>
  </RoomDto>
  <RoomDto>
    <RoomId>1</RoomId>
    <AccommodationId>2</AccommodationId>
    <Name>sample string 3</Name>
    <NumberOfPlaces>4</NumberOfPlaces>
    <TypeOfBedId>1</TypeOfBedId>
    <GenderRestriction>1</GenderRestriction>
    <Price>1</Price>
    <TypeOfRoomId>1</TypeOfRoomId>
    <Bookings>
      <BookingDto>
        <BookingId>1</BookingId>
        <CreateDate />
        <RoomId>3</RoomId>
        <ProfileId>sample string 4</ProfileId>
        <StartDate />
        <EndDate />
        <ReservationStatus>true</ReservationStatus>
        <CreatedBy>sample string 6</CreatedBy>
        <Comment>sample string 7</Comment>
        <Error>sample string 8</Error>
        <RecruitmentProjectId>1</RecruitmentProjectId>
        <PersonnelProcessId>1</PersonnelProcessId>
        <WorkerName>sample string 9</WorkerName>
        <WorkerSurname>sample string 10</WorkerSurname>
        <WorkerGender>1</WorkerGender>
      </BookingDto>
      <BookingDto>
        <BookingId>1</BookingId>
        <CreateDate />
        <RoomId>3</RoomId>
        <ProfileId>sample string 4</ProfileId>
        <StartDate />
        <EndDate />
        <ReservationStatus>true</ReservationStatus>
        <CreatedBy>sample string 6</CreatedBy>
        <Comment>sample string 7</Comment>
        <Error>sample string 8</Error>
        <RecruitmentProjectId>1</RecruitmentProjectId>
        <PersonnelProcessId>1</PersonnelProcessId>
        <WorkerName>sample string 9</WorkerName>
        <WorkerSurname>sample string 10</WorkerSurname>
        <WorkerGender>1</WorkerGender>
      </BookingDto>
    </Bookings>
    <NumberOfFreePlaces>5</NumberOfFreePlaces>
  </RoomDto>
</ArrayOfRoomDto>