POST api/Bookings

POST: api/Bookings<br/> Adds a new booking using the <para>bookingData</para>.<br/>

Request Information

URI Parameters

None.

Body Parameters

BookingData

BookingRequest
NameDescriptionTypeAdditional information
StorageCardId

globally unique identifier

Required

TimebookReservationDate

date

Required

EventId

Event id from the booking in the CalendarAPI.

integer

Required

BranchCalendarId

This property can be get by using Branches/BranchCalendars/ or api/Branches/BranchCalendars/
and then use the calendar id for the reservation.

integer

Required

TimebookReservationDepartmentId

globally unique identifier

None.

InternalNote

string

Max length: 4000

ExternalNote

string

Max length: 4000

Remarks

None.

Example

None.

Request Formats

application/json, text/json

Sample:
{
  "StorageCardId": "ffee45dd-bfcc-4b71-9ac7-870966082dec",
  "TimebookReservationDate": "12/21/2025 1:01:55 PM",
  "EventId": 3,
  "BranchCalendarId": 4,
  "TimebookReservationDepartmentId": "df87d1b2-8a54-44b2-aadc-53f1745bf088",
  "InternalNote": "sample string 5",
  "ExternalNote": "sample string 6"
}

application/xml, text/xml

Sample:
<BookingRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Compilator.DDAPI.DTO.TyreHotel">
  <BranchCalendarId>4</BranchCalendarId>
  <EventId>3</EventId>
  <ExternalNote>sample string 6</ExternalNote>
  <InternalNote>sample string 5</InternalNote>
  <StorageCardId>ffee45dd-bfcc-4b71-9ac7-870966082dec</StorageCardId>
  <TimebookReservationDate>2025-12-21T13:01:55.1002603+00:00</TimebookReservationDate>
  <TimebookReservationDepartmentId>df87d1b2-8a54-44b2-aadc-53f1745bf088</TimebookReservationDepartmentId>
</BookingRequest>

application/x-www-form-urlencoded

Sample:

Failed to generate the sample for media type 'application/x-www-form-urlencoded'. Cannot use formatter 'JQueryMvcFormUrlEncodedFormatter' to write type 'BookingRequest'.

Response Information

Resource Description

BookingData as IHttpActionResult

IHttpActionResult

None.

Response Formats

application/json, text/json, application/xml, text/xml

Sample:

Sample not available.