v1

latestOpenAPI 3.0.02026-07-24161215397.4 KB
Bookings

Update existing booking

Update existing booking

Required scopes: flex.space.bookings.update

put/api/v2/organizations/{orgSlug}/bookings/{bookingId}

Path parameters

bookingIdstring required

booking id

orgSlugstring required

organization slug

Query parameters

isSilentboolean
Example:true

Whether to send notifications to the member. If true, a notification will not be sent. If false or not passed at all, the notification will be sent as normal.

enforceBookingPolicyboolean
Example:true

Whether to enforce the booking policy and member validation rules for this request. If true, member validations (business hours, min/max duration, future-booking limits, credits-only rule, recurrence span) and booking-policy-driven tentative/approval flagging are applied. If false or not passed at all, the request behaves as it does today, with no additional validation or policy-driven flagging.

Request body

propertiesobject

An object that contains all custom properties that can be applied to the item.

startstring required

The start date of the booking.

endstring required

The end date of the booking.

resourcestring required

The _id of the resource associated with the booking.

descriptionstring

The description of the booking.

titlestring

The title of the booking.

isTentativeboolean

Determines whether the booking is confirmed or not.

serviceSlotsobject

Determines whether the booking has buffer slots before and after.

extrasobject[]

Contains all the extra fees associated with the booking. You can enter the id of the one-off that will be used as an extra and its quantity.

isFreeboolean

Determines whether the booking is free or not.

recurrenceobject

Determines the recurrence rules for the booking.

memberstring

The _id of the member associated with the booking.

companystring

The _id of the company associated with the booking.

membersstring[]

An array containing a list of all the _ids of teammates associated with the booking. This is possible if the member associated with the booking is part of a company - these company members can be added here.

visitorsstring[]

An array containg a list of all the _ids of external visitors associated with the booking.

customPricenumber

Used if you want to set a custom price for the booking and ignore the standard rate.

Example request

{
  "properties": {
    "customProperty1": "value1",
    "customProperty2": "value2"
  },
  "start": "2024-10-31T13:00:00.000Z",
  "end": "2024-10-31T13:00:00.000Z",
  "resource": "603dfbc260f4054084125d36",
  "description": "Meeting with John",
  "title": "Quick meeting",
  "isTentative": true,
  "serviceSlots": {
    "before": 10,
    "after": 10
  },
  "extras": [
    {
      "_id": "603dfbc260f4054084125d39",
      "count": 2
    }
  ],
  "isFree": true,
  "recurrence": {
    "rrule": "FREQ=WEEKLY;BYDAY=MO,WE,FR;COUNT=10",
    "exdates": [
      "2024-10-31T13:00:00.000Z"
    ]
  },
  "member": "603dfbc260f4054084125d36",
  "company": "603dfbc260f4054084125d36",
  "members": [
    "603dfbc260f4054084125d36",
    "603dfbc260f4054084125d37"
  ],
  "visitors": [
    "603dfbc260f4054084125d36",
    "603dfbc260f4054084125d37"
  ],
  "customPrice": 25.5
}

Response

propertiesobject

An object that contains all custom properties that can be applied to the item.

_idstring

The _id of the booking.

timezonestring

The timezone of the booking.

startstring

The start date of the booking.

endstring

The end date of the booking.

seriesStartstring

The start date of the series or standalone booking. For recurring bookings, this refers to the start of the entire series

seriesEndstring

The end date of the series or standalone booking. For recurring bookings, this refers to the end of the last occurrence.

locationstring

The _id of the location of booking.

companystring

Reference to the company.

memberstring

Reference to the member.

resourcestring

Reference to the booked resource.

referencestring

The reference id of the booking.

isCancelledboolean

Whether the booking got canceled or not.

titlestring

Booking title/summary.

ratestring

Reference to the resource rate used for the booking.

descriptionstring

Long description of the booking.

isTentativeboolean

True if the booking is not confirmed. Tentative bookings are not charged.

isFreeboolean

True if the booking is marked as free. If create a booking marked as free, no fees will be added for it.

isAccountedboolean

True if the booking is marked as accounted.

extrasobject[]

Extras that are added to the booking.

visitorsstring[]

An array containg a list of all the ids of external visitors associated with the booking.

membersstring[]

An array containing a list of all the _ids of teammates associated with the booking. This is possible if the member associated with the booking is part of a company - these company members can be added here.

sourcestring

Shows where the booking was created

createdAtstring

The date when the booking has been created.

createdBystring

The user that created the booking.

modifiedAtstring

The date of the last update of the booking.

modifiedBystring

The user that did the last modification to the booking. If no update is made this field will match the createdBy field.

Example response

{
  "properties": {
    "customProperty1": "value1",
    "customProperty2": "value2"
  },
  "_id": "603dfbc260f4054084125d39",
  "timezone": "Europe/London",
  "start": "2024-10-31T13:00:00.000Z",
  "end": "2024-10-31T13:30:00.000Z",
  "recurrence": {
    "rrule": "FREQ=WEEKLY;BYDAY=MO,WE,FR;COUNT=10",
    "exdates": [
      "2024-10-31T13:00:00.000Z"
    ]
  },
  "seriesStart": "2024-10-31T13:00:00.000Z",
  "seriesEnd": "2024-10-31T13:30:00.000Z",
  "location": "603dfbc260f4054084125d39",
  "company": "603dfbc260f4054084125d39",
  "member": "603dfbc260f4054084125d39",
  "resource": "603dfbc260f4054084125d39",
  "fees": [
    {
      "date": "2017-10-31T00:00:00.000Z",
      "extraFees": [],
      "credits": [
        {
          "count": 2,
          "credit": "594932ea518f3f150d306c89"
        }
      ],
      "customPrice": 100
    }
  ],
  "reference": "81LCV6S",
  "title": "Meeting with John",
  "rate": "603dfbc260f4054084125d39",
  "description": "Meeting with John at the office.",
  "isTentative": true,
  "extras": [
    {
      "_id": "603dfbc260f4054084125d39",
      "count": 2
    }
  ],
  "visitors": [
    "603dfbc260f4054084125d36",
    "603dfbc260f4054084125d37"
  ],
  "members": [
    "603dfbc260f4054084125d36",
    "603dfbc260f4054084125d37"
  ],
  "serviceSlots": {
    "before": 10,
    "after": 10
  },
  "source": "admin",
  "createdAt": "2022-02-07T10:03:33.169Z",
  "createdBy": "5bbb155174321f100085eac1",
  "modifiedAt": "2022-02-08T10:03:33.169Z",
  "modifiedBy": "5bbb155174321f100085eac1"
}