GET api/bookings/{id}
Gets booking by Id
Request Information
URI Parameters
| Name | Description | Type | Additional information |
|---|---|---|---|
| id |
integer |
integer |
Required |
Body Parameters
None.
Response Information
Resource Description
The booking if found
BookingViewModel| Name | Description | Type | Additional information |
|---|---|---|---|
| BookingId | integer |
None. |
|
| BookingTypeId | integer |
None. |
|
| Title | string |
None. |
|
| StudentComment | string |
None. |
|
| TeacherName | string |
None. |
|
| School | string |
None. |
|
| PublishTypeIds | Collection of integer |
None. |
|
| PublishStart | date |
None. |
|
| PublishEnd | date |
None. |
|
| RoomIds | Collection of integer |
None. |
|
| TeacherId | integer |
None. |
|
| BookingImageID | integer |
None. |
|
| StartDate | date |
None. |
|
| ExternalId | string |
None. |
|
| BookingDates | Collection of BookingDatesViewModel |
None. |
|
| Blobs | Collection of BlobViewModel |
None. |
|
| Attributes | Collection of IAttribute |
None. |
Response Formats
application/json, text/json
Sample:
{
"BookingId": 1,
"BookingTypeId": 2,
"Title": "sample string 3",
"StudentComment": "sample string 4",
"TeacherName": "sample string 5",
"School": "sample string 6",
"PublishTypeIds": [
1,
2
],
"PublishStart": "2025-10-22T00:56:11.254964+02:00",
"PublishEnd": "2025-10-22T00:56:11.254964+02:00",
"RoomIds": [
1,
2
],
"TeacherId": 9,
"BookingImageID": 10,
"StartDate": "2025-10-22T00:56:11.254964+02:00",
"ExternalId": "sample string 12",
"BookingDates": [
{
"BookingDateId": 1,
"BookingDate": "2025-10-22T00:56:11.254964+02:00",
"StartTime": "2025-10-22T00:56:11.254964+02:00",
"EndTime": "2025-10-22T00:56:11.254964+02:00",
"Attributes": null
},
{
"BookingDateId": 1,
"BookingDate": "2025-10-22T00:56:11.254964+02:00",
"StartTime": "2025-10-22T00:56:11.254964+02:00",
"EndTime": "2025-10-22T00:56:11.254964+02:00",
"Attributes": null
}
],
"Blobs": [
{
"BlobId": "sample string 1",
"Name": "sample string 2",
"MimeType": "sample string 3",
"Size": 4,
"Extention": "sample string 5",
"UniqueId": 158727831
},
{
"BlobId": "sample string 1",
"Name": "sample string 2",
"MimeType": "sample string 3",
"Size": 4,
"Extention": "sample string 5",
"UniqueId": 158727831
}
],
"Attributes": null
}
application/xml, text/xml
Sample:
<BookingViewModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/SpeedadminApi.ViewModels">
<Attributes xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays" i:nil="true" />
<Blobs>
<BlobViewModel />
<BlobViewModel />
</Blobs>
<BookingDates>
<BookingDatesViewModel>
<BookingDate>2025-10-22T00:56:11.254964+02:00</BookingDate>
<EndTime>2025-10-22T00:56:11.254964+02:00</EndTime>
<StartTime>2025-10-22T00:56:11.254964+02:00</StartTime>
</BookingDatesViewModel>
<BookingDatesViewModel>
<BookingDate>2025-10-22T00:56:11.254964+02:00</BookingDate>
<EndTime>2025-10-22T00:56:11.254964+02:00</EndTime>
<StartTime>2025-10-22T00:56:11.254964+02:00</StartTime>
</BookingDatesViewModel>
</BookingDates>
<BookingImageID>10</BookingImageID>
<BookingTypeId>2</BookingTypeId>
<ExternalId>sample string 12</ExternalId>
<PublishEnd>2025-10-22T00:56:11.254964+02:00</PublishEnd>
<PublishStart>2025-10-22T00:56:11.254964+02:00</PublishStart>
<PublishTypeIds xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d2p1:int>1</d2p1:int>
<d2p1:int>2</d2p1:int>
</PublishTypeIds>
<RoomIds xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d2p1:int>1</d2p1:int>
<d2p1:int>2</d2p1:int>
</RoomIds>
<School>sample string 6</School>
<StartDate>2025-10-22T00:56:11.254964+02:00</StartDate>
<StudentComment>sample string 4</StudentComment>
<TeacherId>9</TeacherId>
<TeacherName>sample string 5</TeacherName>
<Title>sample string 3</Title>
</BookingViewModel>