Pređi na sadržaj

Calendar events

Events on the timeline: bookings, blocked periods or notes

The calendar event object

Attributes

iduuid

Unique identifier

booking_iduuid | null
bookings.id

Identifier of the related booking

calendar_iduuid | null
external_calendars.id

Identifier of the external calendar the event is imported from

creator_iduuid | null
user_profiles.user_id

Identifier of the user that created the event

organization_iduuid
organizations.id

Identifier of the organization this event is defined in

product_iduuid
products.id

Identifier of the related unit

created_atread-onlytimestamp with time zone

Creation timestamp

updated_atread-onlytimestamp with time zone

Last modification timestamp

durationread-onlyinteger

Number of nights of the event, or days for units rented per day

end_datedate

End date of the event

ftstsvector
generated_titletext

Title of the event, generated from the unit name and the guest name

has_non_invoiced_itemsboolean

Whether the booking of the event has line items that are not on an invoice

has_open_paymentsboolean

Whether the booking of the event has payments that are due

notestext

Private notes about the event

occupancyRecord<uuid, integer>

Occupancy per capacity group

origintext | null

Origin of the event

paddingsmallint

Padding of the event due to cooldown time

start_datedate

Start date of the event

statusCalendarEventStatus

Status of the event

titletext

Title of the event

typeCalendarEventType

Type of the event

uidtext

Identifier of the event in the external calendar

Related resources

Embed related resources in the response with the select parameter, for example select=*,bookings!booking_id(*). Resources related through more than one column need the column as a hint, like table!column(*).

bookings!booking_id(*)object | null
bookings

The booking referenced by booking_id.

external_calendars(*)object | null
external_calendars

The external calendar referenced by calendar_id.

organizations!organization_id(*)object | null
organizations

The organization referenced by organization_id.

products!product_id(*)object | null
products

The product referenced by product_id.

user_profiles!creator_id(*)object | null
user_profiles

The user profile referenced by creator_id.

booking_details(*)array
booking_details

The booking details referencing this calendar event through booking_details.calendar_event_id.

calendar_event_notes(*)array
calendar_event_notes

The calendar event notes referencing this calendar event through calendar_event_notes.calendar_event_id.

calendar_event_updates(*)array
calendar_event_updates

The calendar event updates referencing this calendar event through calendar_event_updates.calendar_event_id.

line_items(*)array
line_items

The line items referencing this calendar event through line_items.event_id.

tasks(*)array
tasks

The tasks referencing this calendar event through tasks.calendar_event_id.

The calendar event object
JSON
{
  "id": "00000000-0000-0000-0000-000000000000",
  "booking_id": "00000000-0000-0000-0000-000000000000",
  "calendar_id": "00000000-0000-0000-0000-000000000000",
  "creator_id": "00000000-0000-0000-0000-000000000000",
  "organization_id": "00000000-0000-0000-0000-000000000000",
  "product_id": "00000000-0000-0000-0000-000000000000",
  "created_at": "2026-10-30T22:27:57.301Z",
  "updated_at": "2026-10-30T22:27:57.301Z",
  "duration": 0,
  "end_date": "2026-10-30",
  "generated_title": "Summer cottage",
  "has_non_invoiced_items": false,
  "has_open_payments": false,
  "notes": "A short description.",
  "occupancy": {},
  "origin": "",
  "padding": 0,
  "start_date": "2026-10-30",
  "status": "CONFIRMED",
  "title": "Summer cottage",
  "type": "booking",
  "uid": ""
}
Including related resources
curl -X GET "https://api.bookingmood.com/v1/calendar_events?limit=10&select=*,bookings!booking_id(*),external_calendars(*)" \
  -H "Authorization: Bearer YOUR_API_KEY"

List calendar events

Filters

idFilter<uuid>

Unique identifier

booking_idFilter<uuid | null>
bookings.id

Identifier of the related booking

calendar_idFilter<uuid | null>
external_calendars.id

Identifier of the external calendar the event is imported from

creator_idFilter<uuid | null>
user_profiles.user_id

Identifier of the user that created the event

organization_idFilter<uuid>
organizations.id

Identifier of the organization this event is defined in

product_idFilter<uuid>
products.id

Identifier of the related unit

created_atFilter<timestamp with time zone>

Creation timestamp

updated_atFilter<timestamp with time zone>

Last modification timestamp

durationFilter<integer>

Number of nights of the event, or days for units rented per day

end_dateFilter<date>

End date of the event

ftsFilter<tsvector>
generated_titleFilter<text>

Title of the event, generated from the unit name and the guest name

has_non_invoiced_itemsFilter<boolean>

Whether the booking of the event has line items that are not on an invoice

has_open_paymentsFilter<boolean>

Whether the booking of the event has payments that are due

notesFilter<text>

Private notes about the event

occupancyFilter<Record<uuid, integer>>

Occupancy per capacity group

originFilter<text | null>

Origin of the event

paddingFilter<smallint>

Padding of the event due to cooldown time

start_dateFilter<date>

Start date of the event

statusFilter<CalendarEventStatus>

Status of the event

titleFilter<text>

Title of the event

typeFilter<CalendarEventType>

Type of the event

uidFilter<text>

Identifier of the event in the external calendar

Responses

200

A list of calendar events with the selected columns

206

Partial Content

400

The request is malformed, for example an unknown column or an invalid filter.

401

The API key is missing or invalid.

Error responses have a JSON body with a code, message, details and hint. See the introduction for more on errors.
GET /calendar_events
curl -X GET "https://api.bookingmood.com/v1/calendar_events?select=*&limit=10" \
  -H "Authorization: Bearer YOUR_API_KEY"
Example response
JSON
[
  {
    "id": "00000000-0000-0000-0000-000000000000",
    "booking_id": "00000000-0000-0000-0000-000000000000",
    "calendar_id": "00000000-0000-0000-0000-000000000000",
    "creator_id": "00000000-0000-0000-0000-000000000000",
    "organization_id": "00000000-0000-0000-0000-000000000000",
    "product_id": "00000000-0000-0000-0000-000000000000",
    "created_at": "2026-10-30T22:27:57.301Z",
    "updated_at": "2026-10-30T22:27:57.301Z",
    "duration": 0,
    "end_date": "2026-10-30",
    "generated_title": "Summer cottage",
    "has_non_invoiced_items": false,
    "has_open_payments": false,
    "notes": "A short description.",
    "occupancy": {},
    "origin": "",
    "padding": 0,
    "start_date": "2026-10-30",
    "status": "CONFIRMED",
    "title": "Summer cottage",
    "type": "booking",
    "uid": ""
  }
]

Delete calendar events

Filters

Without filters, this request deletes all calendar events you have access to. Always filter on at least one column, e.g. id=eq.{id}.

idFilter<uuid>

Unique identifier

booking_idFilter<uuid | null>
bookings.id

Identifier of the related booking

calendar_idFilter<uuid | null>
external_calendars.id

Identifier of the external calendar the event is imported from

creator_idFilter<uuid | null>
user_profiles.user_id

Identifier of the user that created the event

organization_idFilter<uuid>
organizations.id

Identifier of the organization this event is defined in

product_idFilter<uuid>
products.id

Identifier of the related unit

created_atFilter<timestamp with time zone>

Creation timestamp

updated_atFilter<timestamp with time zone>

Last modification timestamp

durationFilter<integer>

Number of nights of the event, or days for units rented per day

end_dateFilter<date>

End date of the event

ftsFilter<tsvector>
generated_titleFilter<text>

Title of the event, generated from the unit name and the guest name

has_non_invoiced_itemsFilter<boolean>

Whether the booking of the event has line items that are not on an invoice

has_open_paymentsFilter<boolean>

Whether the booking of the event has payments that are due

notesFilter<text>

Private notes about the event

occupancyFilter<Record<uuid, integer>>

Occupancy per capacity group

originFilter<text | null>

Origin of the event

paddingFilter<smallint>

Padding of the event due to cooldown time

start_dateFilter<date>

Start date of the event

statusFilter<CalendarEventStatus>

Status of the event

titleFilter<text>

Title of the event

typeFilter<CalendarEventType>

Type of the event

uidFilter<text>

Identifier of the event in the external calendar

Responses

200

The deleted calendar events with the selected columns. Returns 204 without a body when sending the header Prefer: return=minimal.

400

The request is malformed, for example an unknown column or an invalid filter.

401

The API key is missing or invalid.

403

The API key has no permission for this change, for example when writing rows of another organization.

Error responses have a JSON body with a code, message, details and hint. See the introduction for more on errors.
DELETE /calendar_events
curl -X DELETE "https://api.bookingmood.com/v1/calendar_events?id=eq.00000000-0000-0000-0000-000000000000" \
  -H "Authorization: Bearer YOUR_API_KEY"
Example response
JSON
[
  {
    "id": "00000000-0000-0000-0000-000000000000",
    "booking_id": "00000000-0000-0000-0000-000000000000",
    "calendar_id": "00000000-0000-0000-0000-000000000000",
    "creator_id": "00000000-0000-0000-0000-000000000000",
    "organization_id": "00000000-0000-0000-0000-000000000000",
    "product_id": "00000000-0000-0000-0000-000000000000",
    "created_at": "2026-10-30T22:27:57.301Z",
    "updated_at": "2026-10-30T22:27:57.301Z",
    "duration": 0,
    "end_date": "2026-10-30",
    "generated_title": "Summer cottage",
    "has_non_invoiced_items": false,
    "has_open_payments": false,
    "notes": "A short description.",
    "occupancy": {},
    "origin": "",
    "padding": 0,
    "start_date": "2026-10-30",
    "status": "CONFIRMED",
    "title": "Summer cottage",
    "type": "booking",
    "uid": ""
  }
]

Update calendar events

Filters

Without filters, this request updates all calendar events you have access to. Always filter on at least one column, e.g. id=eq.{id}.

idFilter<uuid>

Unique identifier

booking_idFilter<uuid | null>
bookings.id

Identifier of the related booking

calendar_idFilter<uuid | null>
external_calendars.id

Identifier of the external calendar the event is imported from

creator_idFilter<uuid | null>
user_profiles.user_id

Identifier of the user that created the event

organization_idFilter<uuid>
organizations.id

Identifier of the organization this event is defined in

product_idFilter<uuid>
products.id

Identifier of the related unit

created_atFilter<timestamp with time zone>

Creation timestamp

updated_atFilter<timestamp with time zone>

Last modification timestamp

durationFilter<integer>

Number of nights of the event, or days for units rented per day

end_dateFilter<date>

End date of the event

ftsFilter<tsvector>
generated_titleFilter<text>

Title of the event, generated from the unit name and the guest name

has_non_invoiced_itemsFilter<boolean>

Whether the booking of the event has line items that are not on an invoice

has_open_paymentsFilter<boolean>

Whether the booking of the event has payments that are due

notesFilter<text>

Private notes about the event

occupancyFilter<Record<uuid, integer>>

Occupancy per capacity group

originFilter<text | null>

Origin of the event

paddingFilter<smallint>

Padding of the event due to cooldown time

start_dateFilter<date>

Start date of the event

statusFilter<CalendarEventStatus>

Status of the event

titleFilter<text>

Title of the event

typeFilter<CalendarEventType>

Type of the event

uidFilter<text>

Identifier of the event in the external calendar

Body

Partial<CalendarEvent>

Read-only attributes are set by the database and can't be written.

Responses

200

The updated calendar events with the selected columns. Returns 204 without a body when sending the header Prefer: return=minimal.

400

The request is malformed, for example an unknown column, an invalid filter or an invalid body.

401

The API key is missing or invalid.

403

The API key has no permission for this change, for example when writing rows of another organization.

409

The change conflicts with existing data, for example a duplicate key or a reference to a row that does not exist.

Error responses have a JSON body with a code, message, details and hint. See the introduction for more on errors.
PATCH /calendar_events
curl -X PATCH "https://api.bookingmood.com/v1/calendar_events?id=eq.00000000-0000-0000-0000-000000000000" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "end_date": "2026-10-30"
  }'
Example response
JSON
[
  {
    "id": "00000000-0000-0000-0000-000000000000",
    "booking_id": "00000000-0000-0000-0000-000000000000",
    "calendar_id": "00000000-0000-0000-0000-000000000000",
    "creator_id": "00000000-0000-0000-0000-000000000000",
    "organization_id": "00000000-0000-0000-0000-000000000000",
    "product_id": "00000000-0000-0000-0000-000000000000",
    "created_at": "2026-10-30T22:27:57.301Z",
    "updated_at": "2026-10-30T22:27:57.301Z",
    "duration": 0,
    "end_date": "2026-10-30",
    "generated_title": "Summer cottage",
    "has_non_invoiced_items": false,
    "has_open_payments": false,
    "notes": "A short description.",
    "occupancy": {},
    "origin": "",
    "padding": 0,
    "start_date": "2026-10-30",
    "status": "CONFIRMED",
    "title": "Summer cottage",
    "type": "booking",
    "uid": ""
  }
]

Preuzmite kontrolu nad svojim rezervacijama. Izgradite svoj posao.

Pridružite se 1200+ nezavisnim kompanijama za iznajmljivanje smeštaja koristeći Bookingmood kako biste povećali broj direktnih rezervacija i izgradili jače odnose sa gostima.

Započnite besplatnu probnu verziju od 14 dana