Pereiti prie turinio

External calendars

Imported iCal calendars, for syncing bookings with platforms like Airbnb or Booking.com

The external calendar object

Attributes

iduuid

Unique identifier

product_iduuid
products.id

Identifier of the related unit

created_atread-onlytimestamp with time zone

Creation timestamp

updated_atread-onlytimestamp with time zone | null

Timestamp at which the calendar last received new events

activeread-onlyboolean

Whether the calendar is synced, i.e. it is not deactivated

deactivated_attimestamp with time zone | null

Timestamp at which the import was deactivated

errortext | null

Error message if the calendar could not be synced

event_status_syncEventStatusSync

How to treat incoming events

ical_urltext

URL of the iCal feed

last_syncedtimestamp with time zone | null

Timestamp at which the calendar was last synced

nametext

Name of the calendar

sync_requested_attimestamp with time zone

Timestamp at which a sync was last requested

time_offsetinteger

Time offset of the calendar in hours

tldtext

Top-level domain of the iCal feed URL

Related resources

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

products!product_id(*)object | null
products

The product referenced by product_id.

calendar_events(*)array
calendar_events

The calendar events referencing this external calendar through calendar_events.calendar_id.

The external calendar object
JSON
{
  "id": "00000000-0000-0000-0000-000000000000",
  "product_id": "00000000-0000-0000-0000-000000000000",
  "created_at": "2026-10-30T22:26:24.060Z",
  "updated_at": "2026-10-30T22:26:24.060Z",
  "active": false,
  "deactivated_at": "2026-10-30T22:26:24.060Z",
  "error": "",
  "event_status_sync": "import",
  "ical_url": "https://example.com",
  "last_synced": "2026-10-30T22:26:24.060Z",
  "name": "Nameless iCal import",
  "sync_requested_at": "2026-10-30T22:26:24.060Z",
  "time_offset": 0,
  "tld": ""
}
Including related resources
curl -X GET "https://api.bookingmood.com/v1/external_calendars?limit=10&select=*,products!product_id(*),calendar_events(*)" \
  -H "Authorization: Bearer YOUR_API_KEY"

List external calendars

Filters

idFilter<uuid>

Unique identifier

product_idFilter<uuid>
products.id

Identifier of the related unit

created_atFilter<timestamp with time zone>

Creation timestamp

updated_atFilter<timestamp with time zone | null>

Timestamp at which the calendar last received new events

activeFilter<boolean>

Whether the calendar is synced, i.e. it is not deactivated

deactivated_atFilter<timestamp with time zone | null>

Timestamp at which the import was deactivated

errorFilter<text | null>

Error message if the calendar could not be synced

event_status_syncFilter<EventStatusSync>

How to treat incoming events

ical_urlFilter<text>

URL of the iCal feed

last_syncedFilter<timestamp with time zone | null>

Timestamp at which the calendar was last synced

nameFilter<text>

Name of the calendar

sync_requested_atFilter<timestamp with time zone>

Timestamp at which a sync was last requested

time_offsetFilter<integer>

Time offset of the calendar in hours

tldFilter<text>

Top-level domain of the iCal feed URL

Responses

200

A list of external calendars 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 /external_calendars
curl -X GET "https://api.bookingmood.com/v1/external_calendars?select=*&limit=10" \
  -H "Authorization: Bearer YOUR_API_KEY"
Example response
JSON
[
  {
    "id": "00000000-0000-0000-0000-000000000000",
    "product_id": "00000000-0000-0000-0000-000000000000",
    "created_at": "2026-10-30T22:26:24.060Z",
    "updated_at": "2026-10-30T22:26:24.060Z",
    "active": false,
    "deactivated_at": "2026-10-30T22:26:24.060Z",
    "error": "",
    "event_status_sync": "import",
    "ical_url": "https://example.com",
    "last_synced": "2026-10-30T22:26:24.060Z",
    "name": "Nameless iCal import",
    "sync_requested_at": "2026-10-30T22:26:24.060Z",
    "time_offset": 0,
    "tld": ""
  }
]

Create external calendars

Body

Partial<ExternalCalendar> | Array<Partial<ExternalCalendar>>

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

Responses

201

The newly created external calendars with the selected columns

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.
POST /external_calendars
curl -X POST "https://api.bookingmood.com/v1/external_calendars" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "event_status_sync": "import",
    "ical_url": "https://example.com",
    "name": "Nameless iCal import",
    "product_id": "00000000-0000-0000-0000-000000000000",
    "sync_requested_at": "2026-10-30T22:26:24.060Z",
    "time_offset": 0,
    "tld": ""
  }'
Example response
JSON
[
  {
    "id": "00000000-0000-0000-0000-000000000000",
    "product_id": "00000000-0000-0000-0000-000000000000",
    "created_at": "2026-10-30T22:26:24.060Z",
    "updated_at": "2026-10-30T22:26:24.060Z",
    "active": false,
    "deactivated_at": "2026-10-30T22:26:24.060Z",
    "error": "",
    "event_status_sync": "import",
    "ical_url": "https://example.com",
    "last_synced": "2026-10-30T22:26:24.060Z",
    "name": "Nameless iCal import",
    "sync_requested_at": "2026-10-30T22:26:24.060Z",
    "time_offset": 0,
    "tld": ""
  }
]

Delete external calendars

Filters

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

idFilter<uuid>

Unique identifier

product_idFilter<uuid>
products.id

Identifier of the related unit

created_atFilter<timestamp with time zone>

Creation timestamp

updated_atFilter<timestamp with time zone | null>

Timestamp at which the calendar last received new events

activeFilter<boolean>

Whether the calendar is synced, i.e. it is not deactivated

deactivated_atFilter<timestamp with time zone | null>

Timestamp at which the import was deactivated

errorFilter<text | null>

Error message if the calendar could not be synced

event_status_syncFilter<EventStatusSync>

How to treat incoming events

ical_urlFilter<text>

URL of the iCal feed

last_syncedFilter<timestamp with time zone | null>

Timestamp at which the calendar was last synced

nameFilter<text>

Name of the calendar

sync_requested_atFilter<timestamp with time zone>

Timestamp at which a sync was last requested

time_offsetFilter<integer>

Time offset of the calendar in hours

tldFilter<text>

Top-level domain of the iCal feed URL

Responses

200

The deleted external calendars 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 /external_calendars
curl -X DELETE "https://api.bookingmood.com/v1/external_calendars?id=eq.00000000-0000-0000-0000-000000000000" \
  -H "Authorization: Bearer YOUR_API_KEY"
Example response
JSON
[
  {
    "id": "00000000-0000-0000-0000-000000000000",
    "product_id": "00000000-0000-0000-0000-000000000000",
    "created_at": "2026-10-30T22:26:24.060Z",
    "updated_at": "2026-10-30T22:26:24.060Z",
    "active": false,
    "deactivated_at": "2026-10-30T22:26:24.060Z",
    "error": "",
    "event_status_sync": "import",
    "ical_url": "https://example.com",
    "last_synced": "2026-10-30T22:26:24.060Z",
    "name": "Nameless iCal import",
    "sync_requested_at": "2026-10-30T22:26:24.060Z",
    "time_offset": 0,
    "tld": ""
  }
]

Update external calendars

Filters

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

idFilter<uuid>

Unique identifier

product_idFilter<uuid>
products.id

Identifier of the related unit

created_atFilter<timestamp with time zone>

Creation timestamp

updated_atFilter<timestamp with time zone | null>

Timestamp at which the calendar last received new events

activeFilter<boolean>

Whether the calendar is synced, i.e. it is not deactivated

deactivated_atFilter<timestamp with time zone | null>

Timestamp at which the import was deactivated

errorFilter<text | null>

Error message if the calendar could not be synced

event_status_syncFilter<EventStatusSync>

How to treat incoming events

ical_urlFilter<text>

URL of the iCal feed

last_syncedFilter<timestamp with time zone | null>

Timestamp at which the calendar was last synced

nameFilter<text>

Name of the calendar

sync_requested_atFilter<timestamp with time zone>

Timestamp at which a sync was last requested

time_offsetFilter<integer>

Time offset of the calendar in hours

tldFilter<text>

Top-level domain of the iCal feed URL

Body

Partial<ExternalCalendar>

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

Responses

200

The updated external calendars 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 /external_calendars
curl -X PATCH "https://api.bookingmood.com/v1/external_calendars?id=eq.00000000-0000-0000-0000-000000000000" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "event_status_sync": "import"
  }'
Example response
JSON
[
  {
    "id": "00000000-0000-0000-0000-000000000000",
    "product_id": "00000000-0000-0000-0000-000000000000",
    "created_at": "2026-10-30T22:26:24.060Z",
    "updated_at": "2026-10-30T22:26:24.060Z",
    "active": false,
    "deactivated_at": "2026-10-30T22:26:24.060Z",
    "error": "",
    "event_status_sync": "import",
    "ical_url": "https://example.com",
    "last_synced": "2026-10-30T22:26:24.060Z",
    "name": "Nameless iCal import",
    "sync_requested_at": "2026-10-30T22:26:24.060Z",
    "time_offset": 0,
    "tld": ""
  }
]

Imkitės kontroliuoti savo užsakymus. Sukurkite savo verslą.

Prisijunkite prie 1200+ nepriklausomų atostogų būstų nuomos įmonių, kurios naudoja „Bookingmood“, siekdamos padidinti tiesioginių užsakymų skaičių ir užmegzti tvirtesnius santykius su svečiais.

Pradėkite nemokamą 14dienos bandomąją versiją