Booking

Familiarise yourself with the particulars of the booking endpoint.

Description

A booking represents a reservation of one or more workspaces. Booking data can be pushed to the BuildingMinds Platform via this API.


Create bookings

POST Request: {{BASE_URL}}/booking

Field attributes

Field

Type

Description

bookingDate

string

Date booking was created in yyyy-mm-ddThh:mm:ssZ form (conform to ISO 8061)
minLength: 20 (mandatory)

bookingId

string

Unique identifier; must either originate from the previous system or be explicitly defined
minLength: 1; maxLength: 50 (mandatory)

cancelled

boolean

Has the reservation been cancelled? (Y/N)

checkInTime

string

Check-in time in yyyy-mm-ddThh:mm:ssZ form (conform to ISO 8061)
minLength: 20 (mandatory)

checkOutTime

string

Check-out time in yyyy-mm-ddThh:mm:ssZ form (conform to ISO 8061)
minLength: 20 (mandatory)

eventType

string

Type of the event as specific domain event

Options: WorkspaceBookingCompleted, WorkspaceBookingCheckedIn, WorkspaceBookingCheckedOut, WorkspaceBookingCancelled

extensionData

json

Extension data for storing any custom data

validFrom

string

The records can be used from this date onwards in yyyy-mm-ddThh:mm:ssZ form (conform to ISO 8061)
minLength: 20 (mandatory)

validUntil

string

The records can be used until this date in yyyy-mm-ddThh:mm:ssZ form (conform to ISO 8061)
minLength: 20 (mandatory)

workspaceIds

string, array

Array of workspace IDs
minLength: 1; maxLength: 50

[
  {
    "bookingDate": "stringstringstringst",
    "bookingId": "string",
    "cancelled": true,
    "checkInTime": "stringstringstringst",
    "checkOutTime": "stringstringstringst",
    "eventType": "WorkspaceBookingCompleted",
    "extensionData": {
      "additionalProp1": {}
    },
    "validFrom": "stringstringstringst",
    "validUntil": "stringstringstringst",
    "workspaceIds": [
      "string"
    ]
  }
]

Check in or out of bookings

The only change will be in the eventType: WorkspaceBookingCheckedIn/WorkspaceBookingCheckedOut.

POST Request:{{BASE_URL}}/booking

[
  {
    "bookingDate": "string",
    "bookingId": "string",
    "cancelled": true,
    "checkInTime": "string",
    "checkOutTime": "string",
    "eventType": "WorkspaceBookingCheckedIn",
    "extensionData": {},
    "validFrom": "string",
    "validUntil": "string",
    "workspaceIds": [
      "string"
    ]
  }
]
[
  {
    "bookingDate": "string",
    "bookingId": "string",
    "cancelled": true,
    "checkInTime": "string",
    "checkOutTime": "string",
    "eventType": "WorkspaceBookingCheckedOut",
    "extensionData": {},
    "validFrom": "string",
    "validUntil": "string",
    "workspaceIds": [
      "string"
    ]
  }
]

Cancel booking

The only change will be in the eventType: WorkspaceBookingCancelled.

POST Request:{{BASE_URL}}/booking

[
  {
    "bookingDate": "string",
    "bookingId": "string",
    "cancelled": true,
    "checkInTime": "string",
    "checkOutTime": "string",
    "eventType": "WorkspaceBookingCancelled",
    "extensionData": {},
    "validFrom": "string",
    "validUntil": "string",
    "workspaceIds": [
      "string"
    ]
  }
]

View status of bookings

Based on the batchID generated you can GET the batch of the on-boarded bookings with the below mentioned request. This will be the same for Check-In, Check-Out and Cancel.

GET Request:{{BASE_URL}}/batch/{id}/inbound

Please refer to Batch page for more details.