Reference

Booking

The booking object

Attributes
Id: int required, autogenerated, unique
The unique identifier for this booking
CancelIfNotCheckedIn: bool optional read-only
ChargeNow: bool optional
CheckedInAt: DateTime? optional read-only
CoworkerId: Id optional
CoworkerExtraServiceChargePeriod: int? optional
CoworkerExtraServiceCurrencyCode: string optional
CoworkerExtraServiceIds: string optional
CoworkerExtraServicePrice: decimal? optional
CoworkerExtraServiceTotalUses: int? optional
CoworkerInvoiceId: int? optional
CoworkerInvoiceNumber: string optional
CoworkerInvoicePaid: bool optional
DiscountCode: string optional
DoNotUseBookingCredit: bool optional
ExtraServiceId: Id optional
FromTime: DateTime required
IncludeZoomInvite: bool optional
InternalNotes: string optional
Invoiced: bool optional read-only
InvoiceDate: DateTime? optional read-only
InvoiceNow: bool optional
Notes: string optional
Online: bool optional read-only
OverridePrice: decimal? optional
PurchaseOrder: string optional
RepeatBooking: bool optional
RepeatEvery: int? optional
RepeatOnFridays: bool optional
RepeatOnMondays: bool optional
RepeatOnSaturdays: bool optional
RepeatOnSundays: bool optional
RepeatOnThursdays: bool optional
RepeatOnTuesdays: bool optional
RepeatOnWednesdays: bool optional
Repeats: Nexudus.Coworking.Core.Enums.eBookingRepeatCycle optional
RepeatSeriesUniqueId: Guid? optional
RepeatUntil: DateTime? optional
ResourceId: Id required
TariffAtTheTimeOfBooking: string optional
TeamsAtTheTimeOfBooking: string optional
Tentative: bool optional
ToTime: DateTime required
WhichBookingsToUpdate: Nexudus.Coworking.Core.Enums.eRepeatedBookingUpdateAction optional
UniqueId: Guid required, autogenerated, unique
The globally unique identifier for this booking
SystemId: string optional api-only
User defined data about this booking. This property can only be seen and updated using the API.

Json Structure Example


{
  "Id": 1234567,
  "CancelIfNotCheckedIn": false,
  "ChargeNow": false,
  "CheckedInAt": ,
  "CoworkerId": 12345678,
  "CoworkerExtraServiceChargePeriod": ,
  "CoworkerExtraServiceCurrencyCode": "Abc123456",
  "CoworkerExtraServiceIds": "Abc123456",
  "CoworkerExtraServicePrice": ,
  "CoworkerExtraServiceTotalUses": ,
  "CoworkerInvoiceId": ,
  "CoworkerInvoiceNumber": "Abc123456",
  "CoworkerInvoicePaid": false,
  "DiscountCode": "DiscountCode",
  "DoNotUseBookingCredit": false,
  "ExtraServiceId": 12345678,
  "FromTime": 2020-01-01T21:03:54Z,
  "IncludeZoomInvite": false,
  "InternalNotes": "Notes",
  "Invoiced": false,
  "InvoiceDate": ,
  "InvoiceNow": false,
  "Notes": "Notes",
  "Online": false,
  "OverridePrice": ,
  "PurchaseOrder": "PurchaseOrder",
  "RepeatBooking": false,
  "RepeatEvery": ,
  "RepeatOnFridays": false,
  "RepeatOnMondays": false,
  "RepeatOnSaturdays": false,
  "RepeatOnSundays": false,
  "RepeatOnThursdays": false,
  "RepeatOnTuesdays": false,
  "RepeatOnWednesdays": false,
  "Repeats": 1,
  "RepeatSeriesUniqueId": ,
  "RepeatUntil": ,
  "ResourceId": 12345678,
  "TariffAtTheTimeOfBooking": "false",
  "TeamsAtTheTimeOfBooking": "false",
  "Tentative": false,
  "ToTime": 2020-01-01T21:03:54Z,
  "WhichBookingsToUpdate": 1,
  "UniqueId": "bc1febb6-352e-4317-80f9-a48898340e70",
  "SystemId": "{ metadata: { id: 887766, processed: true } }"
}


Find a Booking

This endpoint allows you to GET a list of bookings based on one or more filter querystring parameters.

GET https://spaces.nexudus.com/api/spaces/bookings?...

πŸ”’ Requires role "Booking-List"

Pagination querystring parameters
Lets control how many records to return at a time and their order.
page integer optional
?page=1
size integer optional default=25
Sets the maximum number of records to return each page of results.
?size=25
orderby string optional default=FromTime
Sets the property to use when ordering the results of the search.
?orderby=Id
dir 'ascending' or 'descending' optional default=SortDirection.Ascending
Sets the direction to use when ordering the records.
?sort=ascending

Search querystring parameters
Lets you search booking records based on their different properties.
Id number
?Id=12345678
Booking_CancelIfNotCheckedIn bool
?Booking_CancelIfNotCheckedIn=...
Booking_ChargeNow bool
?Booking_ChargeNow=...
Booking_CheckedInAt DateTime?
?Booking_CheckedInAt=...
Booking_Coworker Coworker
?Booking_Coworker=...
Booking_CoworkerExtraServiceChargePeriod int?
?Booking_CoworkerExtraServiceChargePeriod=...
Booking_CoworkerExtraServiceCurrencyCode string
?Booking_CoworkerExtraServiceCurrencyCode=...
Booking_CoworkerExtraServiceIds string
?Booking_CoworkerExtraServiceIds=...
Booking_CoworkerExtraServicePrice decimal?
?Booking_CoworkerExtraServicePrice=...
Booking_CoworkerExtraServiceTotalUses int?
?Booking_CoworkerExtraServiceTotalUses=...
Booking_CoworkerInvoiceId int?
?Booking_CoworkerInvoiceId=...
Booking_CoworkerInvoiceNumber string
?Booking_CoworkerInvoiceNumber=...
Booking_CoworkerInvoicePaid bool
?Booking_CoworkerInvoicePaid=...
Booking_DiscountCode string
?Booking_DiscountCode=...
Booking_DoNotUseBookingCredit bool
?Booking_DoNotUseBookingCredit=...
Booking_ExtraService ExtraService
?Booking_ExtraService=...
Booking_FromTime DateTime
?Booking_FromTime=...
Booking_IncludeZoomInvite bool
?Booking_IncludeZoomInvite=...
Booking_InternalNotes string
?Booking_InternalNotes=...
Booking_Invoiced bool
?Booking_Invoiced=...
Booking_InvoiceDate DateTime?
?Booking_InvoiceDate=...
Booking_InvoiceNow bool
?Booking_InvoiceNow=...
Booking_Notes string
?Booking_Notes=...
Booking_Online bool
?Booking_Online=...
Booking_OverridePrice decimal?
?Booking_OverridePrice=...
Booking_PurchaseOrder string
?Booking_PurchaseOrder=...
Booking_RepeatBooking bool
?Booking_RepeatBooking=...
Booking_RepeatEvery int?
?Booking_RepeatEvery=...
Booking_RepeatOnFridays bool
?Booking_RepeatOnFridays=...
Booking_RepeatOnMondays bool
?Booking_RepeatOnMondays=...
Booking_RepeatOnSaturdays bool
?Booking_RepeatOnSaturdays=...
Booking_RepeatOnSundays bool
?Booking_RepeatOnSundays=...
Booking_RepeatOnThursdays bool
?Booking_RepeatOnThursdays=...
Booking_RepeatOnTuesdays bool
?Booking_RepeatOnTuesdays=...
Booking_RepeatOnWednesdays bool
?Booking_RepeatOnWednesdays=...
Booking_Repeats Nexudus.Coworking.Core.Enums.eBookingRepeatCycle
?Booking_Repeats=...
Booking_RepeatSeriesUniqueId Guid?
?Booking_RepeatSeriesUniqueId=...
Booking_RepeatUntil DateTime?
?Booking_RepeatUntil=...
Booking_Resource Resource
?Booking_Resource=...
Booking_TariffAtTheTimeOfBooking string
?Booking_TariffAtTheTimeOfBooking=...
Booking_TeamsAtTheTimeOfBooking string
?Booking_TeamsAtTheTimeOfBooking=...
Booking_Tentative bool
?Booking_Tentative=...
Booking_ToTime DateTime
?Booking_ToTime=...
Booking_WhichBookingsToUpdate Nexudus.Coworking.Core.Enums.eRepeatedBookingUpdateAction
?Booking_WhichBookingsToUpdate=...
Booking_ResourceName string
?Booking_ResourceName=...
Booking_ResourceHideInCalendar string
?Booking_ResourceHideInCalendar=...
Booking_ResourceResourceType_Id string
?Booking_ResourceResourceType_Id=...
Booking_ResourceResourceType_Name string
?Booking_ResourceResourceType_Name=...
Booking_CoworkerFullName string
?Booking_CoworkerFullName=...
Booking_ExtraServiceName string
?Booking_ExtraServiceName=...

Range search querystring parameters
Lets you search booking records based on a range of date or numeric values.
To_Booking_CreatedOn date
?To_Booking_CreatedOn=2010-01-01T20:32
From_Booking_CreatedOn date
?From_Booking_CreatedOn=2010-01-01T20:32
To_Booking_UpdatedOn date
?To_Booking_UpdatedOn=2010-01-01T20:32
From_Booking_UpdatedOn date
?From_Booking_UpdatedOn=2010-01-01T20:32
To_Booking_FromTime date
?To_Booking_FromTime=2010-01-01T20:32
From_Booking_FromTime date
?From_Booking_FromTime=2010-01-01T20:32
To_Booking_ToTime date
?To_Booking_ToTime=2010-01-01T20:32
From_Booking_ToTime date
?From_Booking_ToTime=2010-01-01T20:32
To_Booking_RepeatEvery number
?To_Booking_RepeatEvery=0
From_Booking_RepeatEvery number
?From_Booking_RepeatEvery=10
To_Booking_RepeatUntil date
?To_Booking_RepeatUntil=2010-01-01T20:32
From_Booking_RepeatUntil date
?From_Booking_RepeatUntil=2010-01-01T20:32
To_Booking_OverridePrice number
?To_Booking_OverridePrice=0
From_Booking_OverridePrice number
?From_Booking_OverridePrice=10
To_Booking_InvoiceDate date
?To_Booking_InvoiceDate=2010-01-01T20:32
From_Booking_InvoiceDate date
?From_Booking_InvoiceDate=2010-01-01T20:32
To_Booking_CoworkerInvoiceId number
?To_Booking_CoworkerInvoiceId=0
From_Booking_CoworkerInvoiceId number
?From_Booking_CoworkerInvoiceId=10
To_Booking_CoworkerExtraServicePrice number
?To_Booking_CoworkerExtraServicePrice=0
From_Booking_CoworkerExtraServicePrice number
?From_Booking_CoworkerExtraServicePrice=10
To_Booking_CoworkerExtraServiceChargePeriod number
?To_Booking_CoworkerExtraServiceChargePeriod=0
From_Booking_CoworkerExtraServiceChargePeriod number
?From_Booking_CoworkerExtraServiceChargePeriod=10
To_Booking_CoworkerExtraServiceTotalUses number
?To_Booking_CoworkerExtraServiceTotalUses=0
From_Booking_CoworkerExtraServiceTotalUses number
?From_Booking_CoworkerExtraServiceTotalUses=10
To_Booking_CheckedInAt date
?To_Booking_CheckedInAt=2010-01-01T20:32
From_Booking_CheckedInAt date
?From_Booking_CheckedInAt=2010-01-01T20:32

Example request

GET https://spaces.nexudus.com/api/spaces/bookings?Booking_FromTime=...
Content-Type: application/json
Authentication: Basic ZXhhbXBsZUBuZXh1ZHVzLmNvbTpFeGFtcGxlMTIzNA==

Example response


{
    "Records": [{
        "Id": 1234567,
        "Resource": ,
        "Coworker": ,
        "ExtraService": ,
        "FromTime": 2020-01-01T21:03:54Z,
        "ToTime": 2020-01-01T21:03:54Z,
        "Notes": "Notes",
        "InternalNotes": "Notes",
        "ChargeNow": false,
        "InvoiceNow": false,
        "DoNotUseBookingCredit": false,
        "PurchaseOrder": "PurchaseOrder",
        "DiscountCode": "DiscountCode",
        "Tentative": false,
        "Online": false,
        "TeamsAtTheTimeOfBooking": "false",
        "TariffAtTheTimeOfBooking": "false",
        "RepeatSeriesUniqueId": ,
        "RepeatBooking": false,
        "Repeats": 1,
        "WhichBookingsToUpdate": 1,
        "RepeatEvery": ,
        "RepeatUntil": ,
        "RepeatOnMondays": false,
        "RepeatOnTuesdays": false,
        "RepeatOnWednesdays": false,
        "RepeatOnThursdays": false,
        "RepeatOnFridays": false,
        "RepeatOnSaturdays": false,
        "RepeatOnSundays": false,
        "OverridePrice": ,
        "Invoiced": false,
        "InvoiceDate": ,
        "CoworkerInvoiceId": ,
        "CoworkerInvoiceNumber": "Abc123456",
        "CoworkerInvoicePaid": false,
        "CoworkerExtraServiceIds": "Abc123456",
        "CoworkerExtraServicePrice": ,
        "CoworkerExtraServiceCurrencyCode": "Abc123456",
        "CoworkerExtraServiceChargePeriod": ,
        "CoworkerExtraServiceTotalUses": ,
        "IncludeZoomInvite": false,
        "CheckedInAt": ,
        "CancelIfNotCheckedIn": false,
        "BookingResourceName": "...",
        "BookingResourceHideInCalendar": "...",
        "BookingResourceResourceType_Id": "...",
        "BookingResourceResourceType_Name": "...",
        "BookingCoworkerFullName": "...",
        "BookingExtraServiceName": "...",
        "CreatedOn": "2018-07-03T06:23:01Z",
        "UpdatedOn": "2020-01-01T21:57:21Z",
        "UpdatedBy": "System",
        "UniqueId": "6e0b5a73-ef5e-46ac-8544-8f235aaba63a",
        "SystemId": "{ metadata: { id: 887766, processed: true } }"
    }],
    "CurrentPageSize": 25,
    "CurrentPage": 1,
    "CurrentOrderField": "Id",
    "CurrentSortDirection": 1,
    "FirstItem": 1,
    "HasNextPage": true,
    "HasPreviousPage": false,
    "LastItem": 25,
    "PageNumber": 1,
    "PageSize": 25,
    "TotalItems": 60,
    "TotalPages": 3
}


Find Bookings by IDs

Gets one or more booking records based on their Id.
GET https://spaces.nexudus.com/api/spaces/bookings?Booking_Id=[:id1,:id2,...]

πŸ”’ Requires role "Booking-List"

Querystring parameters
Booking_Id: array requried
?Booking_Id=[12345678,87654651]

Example request

GET https://spaces.nexudus.com/api/spaces/bookings?Booking_Id=[1234567,9876541]
Content-Type: application/json
Authentication: Basic ZXhhbXBsZUBuZXh1ZHVzLmNvbTpFeGFtcGxlMTIzNA==

Example response


{
    "Records": [{
        "Id": 1234567,
        "Resource": ,
        "Coworker": ,
        "ExtraService": ,
        "FromTime": 2020-01-01T21:03:54Z,
        "ToTime": 2020-01-01T21:03:54Z,
        "Notes": "Notes",
        "InternalNotes": "Notes",
        "ChargeNow": false,
        "InvoiceNow": false,
        "DoNotUseBookingCredit": false,
        "PurchaseOrder": "PurchaseOrder",
        "DiscountCode": "DiscountCode",
        "Tentative": false,
        "Online": false,
        "TeamsAtTheTimeOfBooking": "false",
        "TariffAtTheTimeOfBooking": "false",
        "RepeatSeriesUniqueId": ,
        "RepeatBooking": false,
        "Repeats": 1,
        "WhichBookingsToUpdate": 1,
        "RepeatEvery": ,
        "RepeatUntil": ,
        "RepeatOnMondays": false,
        "RepeatOnTuesdays": false,
        "RepeatOnWednesdays": false,
        "RepeatOnThursdays": false,
        "RepeatOnFridays": false,
        "RepeatOnSaturdays": false,
        "RepeatOnSundays": false,
        "OverridePrice": ,
        "Invoiced": false,
        "InvoiceDate": ,
        "CoworkerInvoiceId": ,
        "CoworkerInvoiceNumber": "Abc123456",
        "CoworkerInvoicePaid": false,
        "CoworkerExtraServiceIds": "Abc123456",
        "CoworkerExtraServicePrice": ,
        "CoworkerExtraServiceCurrencyCode": "Abc123456",
        "CoworkerExtraServiceChargePeriod": ,
        "CoworkerExtraServiceTotalUses": ,
        "IncludeZoomInvite": false,
        "CheckedInAt": ,
        "CancelIfNotCheckedIn": false,
        "BookingResourceName": "...",
        "BookingResourceHideInCalendar": "...",
        "BookingResourceResourceType_Id": "...",
        "BookingResourceResourceType_Name": "...",
        "BookingCoworkerFullName": "...",
        "BookingExtraServiceName": "...",
        "CreatedOn": "2018-07-03T06:23:01Z",
        "UpdatedOn": "2020-01-01T21:57:21Z",
        "UpdatedBy": "System",
        "UniqueId": "cfcff90b-53af-4436-95ce-09b789e339ae",
        "SystemId": "{ metadata: { id: 887766, processed: true } }"
    }],
    "CurrentPageSize": 25,
    "CurrentPage": 1,
    "CurrentOrderField": "FromTime",
    "CurrentSortDirection": 1,
    "FirstItem": 1,
    "HasNextPage": true,
    "HasPreviousPage": false,
    "LastItem": 1,
    "PageNumber": 1,
    "PageSize": 25,
    "TotalItems": 1,
    "TotalPages": 1
}


Get single Booking by Id

Gets one booking record by its Id.
GET https://spaces.nexudus.com/api/spaces/bookings/:Id

πŸ”’ Requires role "Booking-Read"

URL parameters
Id: number requried

Example request

GET https://spaces.nexudus.com/api/spaces/bookings/1234567
Content-Type: application/json
Authentication: Basic ZXhhbXBsZUBuZXh1ZHVzLmNvbTpFeGFtcGxlMTIzNA==

Example response


{
  "Id": 1234567,
  "CancelIfNotCheckedIn": false,
  "ChargeNow": false,
  "CheckedInAt": ,
  "CoworkerId": 12345678,
  "CoworkerExtraServiceChargePeriod": ,
  "CoworkerExtraServiceCurrencyCode": "Abc123456",
  "CoworkerExtraServiceIds": "Abc123456",
  "CoworkerExtraServicePrice": ,
  "CoworkerExtraServiceTotalUses": ,
  "CoworkerInvoiceId": ,
  "CoworkerInvoiceNumber": "Abc123456",
  "CoworkerInvoicePaid": false,
  "DiscountCode": "DiscountCode",
  "DoNotUseBookingCredit": false,
  "ExtraServiceId": 12345678,
  "FromTime": 2020-01-01T21:03:54Z,
  "IncludeZoomInvite": false,
  "InternalNotes": "Notes",
  "Invoiced": false,
  "InvoiceDate": ,
  "InvoiceNow": false,
  "Notes": "Notes",
  "Online": false,
  "OverridePrice": ,
  "PurchaseOrder": "PurchaseOrder",
  "RepeatBooking": false,
  "RepeatEvery": ,
  "RepeatOnFridays": false,
  "RepeatOnMondays": false,
  "RepeatOnSaturdays": false,
  "RepeatOnSundays": false,
  "RepeatOnThursdays": false,
  "RepeatOnTuesdays": false,
  "RepeatOnWednesdays": false,
  "Repeats": 1,
  "RepeatSeriesUniqueId": ,
  "RepeatUntil": ,
  "ResourceId": 12345678,
  "TariffAtTheTimeOfBooking": "false",
  "TeamsAtTheTimeOfBooking": "false",
  "Tentative": false,
  "ToTime": 2020-01-01T21:03:54Z,
  "WhichBookingsToUpdate": 1,
  "CreatedOn": "2018-07-03T06:23:01Z",
  "UpdatedOn": "2020-01-01T21:57:21Z",
  "UpdatedBy": "System",
  "UniqueId": "cc69faa7-e4a8-4d46-803d-f87617d98d10",
  "SystemId": "{ metadata: { id: 887766, processed: true } }"
}


Create new Booking

Creates a new booking.
POST https://spaces.nexudus.com/api/spaces/bookings

πŸ”’ Requires role "Booking-Create"

Body parameters
ResourceId: number required
CoworkerId: number optional
ExtraServiceId: number optional
FromTime: DateTime required
ToTime: DateTime required
Notes: string optional
InternalNotes: string optional
ChargeNow: bool optional
InvoiceNow: bool optional
DoNotUseBookingCredit: bool optional
PurchaseOrder: string optional
DiscountCode: string optional
Tentative: bool optional
TeamsAtTheTimeOfBooking: string optional
TariffAtTheTimeOfBooking: string optional
RepeatSeriesUniqueId: Guid? optional
RepeatBooking: bool optional
Repeats: Nexudus.Coworking.Core.Enums.eBookingRepeatCycle optional
RepeatEvery: int? optional
RepeatUntil: DateTime? optional
RepeatOnMondays: bool optional
RepeatOnTuesdays: bool optional
RepeatOnWednesdays: bool optional
RepeatOnThursdays: bool optional
RepeatOnFridays: bool optional
RepeatOnSaturdays: bool optional
RepeatOnSundays: bool optional
OverridePrice: decimal? optional
CoworkerInvoiceId: int? optional
CoworkerInvoiceNumber: string optional
CoworkerInvoicePaid: bool optional
CoworkerExtraServiceIds: string optional
CoworkerExtraServicePrice: decimal? optional
CoworkerExtraServiceCurrencyCode: string optional
CoworkerExtraServiceChargePeriod: int? optional
CoworkerExtraServiceTotalUses: int? optional
IncludeZoomInvite: bool optional

Example request

POST https://spaces.nexudus.com/api/spaces/bookings
Content-Type: application/json
Authentication: Basic ZXhhbXBsZUBuZXh1ZHVzLmNvbTpFeGFtcGxlMTIzNA==

{
    "ResourceId": 12345678,
    "CoworkerId": 12345678,
    "ExtraServiceId": 12345678,
    "FromTime": 2020-01-01T21:03:54Z,
    "ToTime": 2020-01-01T21:03:54Z,
    "Notes": "Notes",
    "InternalNotes": "Notes",
    "ChargeNow": false,
    "InvoiceNow": false,
    "DoNotUseBookingCredit": false,
    "PurchaseOrder": "PurchaseOrder",
    "DiscountCode": "DiscountCode",
    "Tentative": false,
    "TeamsAtTheTimeOfBooking": "false",
    "TariffAtTheTimeOfBooking": "false",
    "RepeatSeriesUniqueId": ,
    "RepeatBooking": false,
    "Repeats": 1, //(check Enumerated values section below)
    "RepeatEvery": ,
    "RepeatUntil": ,
    "RepeatOnMondays": false,
    "RepeatOnTuesdays": false,
    "RepeatOnWednesdays": false,
    "RepeatOnThursdays": false,
    "RepeatOnFridays": false,
    "RepeatOnSaturdays": false,
    "RepeatOnSundays": false,
    "OverridePrice": ,
    "CoworkerInvoiceId": ,
    "CoworkerInvoiceNumber": "Abc123456",
    "CoworkerInvoicePaid": false,
    "CoworkerExtraServiceIds": "Abc123456",
    "CoworkerExtraServicePrice": ,
    "CoworkerExtraServiceCurrencyCode": "Abc123456",
    "CoworkerExtraServiceChargePeriod": ,
    "CoworkerExtraServiceTotalUses": ,
    "IncludeZoomInvite": false,
}


Example valid response


{
    "Status": 200,
    "WasSuccessful": true,
    "Message": "Record 'Name of the record' has been succesfully created.",
    "Value": {
        "Id": 12354678
    }
}


Example invalid response


{
    "Status": 500,
    "Message": "Name: may not be null or empty",
    "Value": null,
    "WasSuccessful": false,
    "Errors": [
        {
            "AttemptedValue": null,
            "Message": "may not be null or empty",
            "PropertyName": "Name"
        },
    ]
}


Update Booking

Updates an existing booking.
PUT https://spaces.nexudus.com/api/spaces/bookings

PUT requests require ALL record properties to be submitted with every request. Any missing properties will be cleared or set to false.

πŸ”’ Requires role "Booking-Edit"

Body parameters
Id: number required
The unique Id of the booking to update.
ResourceId: number cleared if missing
CoworkerId: number cleared if missing
ExtraServiceId: number cleared if missing
FromTime: DateTime cleared if missing
ToTime: DateTime cleared if missing
Notes: string cleared if missing
ChargeNow: bool cleared if missing
InvoiceNow: bool cleared if missing
DoNotUseBookingCredit: bool cleared if missing
PurchaseOrder: string cleared if missing
DiscountCode: string cleared if missing
Tentative: bool cleared if missing
TeamsAtTheTimeOfBooking: string cleared if missing
TariffAtTheTimeOfBooking: string cleared if missing
RepeatSeriesUniqueId: Guid? cleared if missing
Repeats: Nexudus.Coworking.Core.Enums.eBookingRepeatCycle cleared if missing
WhichBookingsToUpdate: Nexudus.Coworking.Core.Enums.eRepeatedBookingUpdateAction cleared if missing
RepeatOnMondays: bool cleared if missing
RepeatOnTuesdays: bool cleared if missing
RepeatOnWednesdays: bool cleared if missing
RepeatOnThursdays: bool cleared if missing
RepeatOnFridays: bool cleared if missing
RepeatOnSaturdays: bool cleared if missing
RepeatOnSundays: bool cleared if missing
OverridePrice: decimal? cleared if missing
CoworkerInvoiceId: int? cleared if missing
CoworkerInvoiceNumber: string cleared if missing
CoworkerInvoicePaid: bool cleared if missing
CoworkerExtraServiceIds: string cleared if missing
CoworkerExtraServicePrice: decimal? cleared if missing
CoworkerExtraServiceCurrencyCode: string cleared if missing
CoworkerExtraServiceChargePeriod: int? cleared if missing
CoworkerExtraServiceTotalUses: int? cleared if missing
IncludeZoomInvite: bool cleared if missing

Example request

PUT https://spaces.nexudus.com/api/spaces/bookings
Content-Type: application/json
Authentication: Basic ZXhhbXBsZUBuZXh1ZHVzLmNvbTpFeGFtcGxlMTIzNA==

{
    "Id": 12345678,
    "ResourceId": 12345678,
    "CoworkerId": 12345678,
    "ExtraServiceId": 12345678,
    "FromTime": 2020-01-01T21:03:54Z,
    "ToTime": 2020-01-01T21:03:54Z,
    "Notes": "Notes",
    "InternalNotes": "Notes",
    "ChargeNow": false,
    "InvoiceNow": false,
    "DoNotUseBookingCredit": false,
    "PurchaseOrder": "PurchaseOrder",
    "DiscountCode": "DiscountCode",
    "Tentative": false,
    "TeamsAtTheTimeOfBooking": "false",
    "TariffAtTheTimeOfBooking": "false",
    "RepeatSeriesUniqueId": ,
    "RepeatBooking": false,
    "Repeats": 1, //(check Enumerated values section below)
    "RepeatEvery": ,
    "RepeatUntil": ,
    "RepeatOnMondays": false,
    "RepeatOnTuesdays": false,
    "RepeatOnWednesdays": false,
    "RepeatOnThursdays": false,
    "RepeatOnFridays": false,
    "RepeatOnSaturdays": false,
    "RepeatOnSundays": false,
    "OverridePrice": ,
    "CoworkerInvoiceId": ,
    "CoworkerInvoiceNumber": "Abc123456",
    "CoworkerInvoicePaid": false,
    "CoworkerExtraServiceIds": "Abc123456",
    "CoworkerExtraServicePrice": ,
    "CoworkerExtraServiceCurrencyCode": "Abc123456",
    "CoworkerExtraServiceChargePeriod": ,
    "CoworkerExtraServiceTotalUses": ,
    "IncludeZoomInvite": false,
}


Example valid response


{
    "Status": 200,
    "WasSuccessful": true,
    "Message": "Record 'Name of the record' has been succesfully updated.",
    "Value": {
        "Id": 12354678
    }
}


Example invalid response


{
    "Status": 500,
    "Message": "Name: may not be null or empty",
    "Value": null,
    "WasSuccessful": false,
    "Errors": [
        {
            "AttemptedValue": null,
            "Message": "may not be null or empty",
            "PropertyName": "Name"
        },
    ]
}


Delete Booking

Deletes an existing booking by its Id.
DELETE https://spaces.nexudus.com/api/spaces/bookings/:Id

πŸ”’ Requires role "Booking-Delete"

URL parameters
Id: number required
The unique Id of the booking to update.

Example request

DELETE https://spaces.nexudus.com/api/spaces/bookings/12345678
Content-Type: application/json
Authentication: Basic ZXhhbXBsZUBuZXh1ZHVzLmNvbTpFeGFtcGxlMTIzNA==

Example valid response


{
    "Status": 200,
    "WasSuccessful": true,
    "Message": "The record was deleted successfully.",
    "Value": null,
    "OpenInDialog": false,
    "RedirectURL": null,
    "JavaScript": null,
    "Errors": null
}


Commands

Commands allow to perform actions against one or more booking records. Some commands accept only one record while others can run an action for a number of records at the same time. Each command has metadata with information about how it can be used and the amount of records, if any, it needs to run.

Get Commands

Get all commands available to run for booking records.
GET https://spaces.nexudus.com/api/spaces/bookings/commands

Example request

GET https://spaces.nexudus.com/api/spaces/bookings/commands
Content-Type: application/json
Authentication: Basic ZXhhbXBsZUBuZXh1ZHVzLmNvbTpFeGFtcGxlMTIzNA==

Example valid response


[
	{
		"Key": "COMMAND_KEY_1",
		"Name": "Command 1 english description",
		"AppliesOnlyToMultipleEntities": false,
		"DisplayInDropdown": true,
		"DisplayInDropdownV2": true,
		"AppliesOnlyToOneEntity": false,
		"AppliesOnlyToTwoEntities": false,
		"DisplayInGrid": false,
		"NeedsEntitiesToRun": true,
		"Order": 2,
		"RequiresParameters": []
	},
	{
		"Key": "COMMAND_KEY_2",
		"Name": "Command 2 english description",
		"AppliesOnlyToMultipleEntities": false,
		"DisplayInDropdown": true,
		"DisplayInDropdownV2": true,
		"AppliesOnlyToOneEntity": true,
		"AppliesOnlyToTwoEntities": false,
		"DisplayInGrid": true,
		"NeedsEntitiesToRun": true,
		"Order": 10,
		"RequiresParameters": 
		[
			{
				"Name": "Parameter 1 description",
				"Type": "string",
			},
			{
				"Name": "Parameter 2 description",
				"Type": "Boolean",
			}
		]
	},
	...
]


Run Command

Runs a command based on its Key and one or more booking record IDs.
POST https://spaces.nexudus.com/api/spaces/bookings/runacommand
πŸ”’ Requires role "Booking-Edit"

Example request

POST https://spaces.nexudus.com/api/spaces/bookings/runcommand
Content-Type: application/json
Authentication: Basic ZXhhbXBsZUBuZXh1ZHVzLmNvbTpFeGFtcGxlMTIzNA==

{
	"Ids":[1329961649],
	"Parameters": 
	[
		{ 
			"Type": "string"
			"Value":987654321
		},
		{
			"Type": "Boolean",
			"Value":true
		},
		...
	],
	"Key":"COMMAND_KEY_2"
}


Example valid response


{
	"Errors": null
	"JavaScript": null
	"Message": "Result description"
	"OpenInDialog": false
	"OpenInWindow": false
	"RedirectURL": null
	"Status": 200
	"UpdatedBy": "email@example.net"
	"UpdatedOn: "2020-06-04T11:40:20Z"
	"Value: {Id: 12345678}
	"WasSuccessful: true
}


Enumerated values

Repeats

GET /api/utils/enums?name=eBookingRepeatCycle

WhichBookingsToUpdate

GET /api/utils/enums?name=eRepeatedBookingUpdateAction

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments

Please sign in to leave a comment.