Μετάβαση στο περιεχόμενο

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 a sync last changed the calendar's 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

deactivated_reasonExternalCalendarDeactivatedReason | null

Why the import was deactivated: by hand, or because it kept failing

errortext | null

Error message if the calendar could not be synced

error_notified_attimestamp with time zone | null

Timestamp at which admins were notified of the current failure

event_status_syncEventStatusSync

How to treat incoming events

failing_sincetimestamp with time zone | null

Timestamp of the first failed sync since the last successful one

ical_urltext

URL of the iCal feed

last_syncedread-onlytimestamp with time zone | null

Deprecated: read-only copy of last_synced_at. Use last_synced_at

last_synced_attimestamp with time zone | null

Timestamp at which the feed was last checked

nametext | null

Name of the calendar, or null when it has none

sync_requested_attimestamp with time zone | null

Timestamp at which a sync last claimed the calendar, or null before the first

time_offsetint32

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-11-30T11:28:10.001Z",
  "updated_at": "2026-11-30T11:28:10.001Z",
  "active": false,
  "deactivated_at": "2026-11-30T11:28:10.001Z",
  "deactivated_reason": "manual",
  "error": "",
  "error_notified_at": "2026-11-30T11:28:10.001Z",
  "event_status_sync": "import",
  "failing_since": "2026-11-30T11:28:10.001Z",
  "ical_url": "https://example.com",
  "last_synced": "2026-11-30T11:28:10.001Z",
  "last_synced_at": "2026-11-30T11:28:10.001Z",
  "name": "Summer cottage",
  "sync_requested_at": "2026-11-30T11:28:10.001Z",
  "time_offset": 0,
  "tld": ""
}
Including related resources
curl "https://api.bookingmood.com/v1/external_calendars?limit=10&select=*,products!product_id(*),calendar_events(*)" \
  -H "Authorization: Bearer YOUR_API_KEY"

List external calendars

Requiresproducts:read

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 a sync last changed the calendar's 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

deactivated_reasonFilter<ExternalCalendarDeactivatedReason | null>

Why the import was deactivated: by hand, or because it kept failing

errorFilter<text | null>

Error message if the calendar could not be synced

error_notified_atFilter<timestamp with time zone | null>

Timestamp at which admins were notified of the current failure

event_status_syncFilter<EventStatusSync>

How to treat incoming events

failing_sinceFilter<timestamp with time zone | null>

Timestamp of the first failed sync since the last successful one

ical_urlFilter<text>

URL of the iCal feed

last_syncedFilter<timestamp with time zone | null>

Deprecated: read-only copy of last_synced_at. Use last_synced_at

last_synced_atFilter<timestamp with time zone | null>

Timestamp at which the feed was last checked

nameFilter<text | null>

Name of the calendar, or null when it has none

sync_requested_atFilter<timestamp with time zone | null>

Timestamp at which a sync last claimed the calendar, or null before the first

time_offsetFilter<int32>

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.

403

The API key or access token doesn't have the scope this request needs.

429

The API key made more requests per minute than its rate limit allows. Retry after the number of seconds in the `Retry-After` header.

Error responses have a JSON body with a code, message, details and hint. See the introduction for more on errors.
GET/external_calendars
curl "https://api.bookingmood.com/v1/external_calendars?select=*&limit=10" \
  -H "Authorization: Bearer YOUR_API_KEY"
Example
JSON
[
  {
    "id": "00000000-0000-0000-0000-000000000000",
    "product_id": "00000000-0000-0000-0000-000000000000",
    "created_at": "2026-11-30T11:28:10.001Z",
    "updated_at": "2026-11-30T11:28:10.001Z",
    "active": false,
    "deactivated_at": "2026-11-30T11:28:10.001Z",
    "deactivated_reason": "manual",
    "error": "",
    "error_notified_at": "2026-11-30T11:28:10.001Z",
    "event_status_sync": "import",
    "failing_since": "2026-11-30T11:28:10.001Z",
    "ical_url": "https://example.com",
    "last_synced": "2026-11-30T11:28:10.001Z",
    "last_synced_at": "2026-11-30T11:28:10.001Z",
    "name": "Summer cottage",
    "sync_requested_at": "2026-11-30T11:28:10.001Z",
    "time_offset": 0,
    "tld": ""
  }
]

Create external calendars

Requiresproducts:write

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 or access token doesn't have the scope this request needs, or 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.

429

The API key made more requests per minute than its rate limit allows. Retry after the number of seconds in the `Retry-After` header.

Error responses have a JSON body with a code, message, details and hint. See the introduction for more on errors.
POST/external_calendars
curl "https://api.bookingmood.com/v1/external_calendars" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "product_id": "00000000-0000-0000-0000-000000000000",
    "event_status_sync": "import",
    "ical_url": "https://example.com",
    "time_offset": 0,
    "tld": ""
  }'
Example
JSON
[
  {
    "id": "00000000-0000-0000-0000-000000000000",
    "product_id": "00000000-0000-0000-0000-000000000000",
    "created_at": "2026-11-30T11:28:10.001Z",
    "updated_at": "2026-11-30T11:28:10.001Z",
    "active": false,
    "deactivated_at": "2026-11-30T11:28:10.001Z",
    "deactivated_reason": "manual",
    "error": "",
    "error_notified_at": "2026-11-30T11:28:10.001Z",
    "event_status_sync": "import",
    "failing_since": "2026-11-30T11:28:10.001Z",
    "ical_url": "https://example.com",
    "last_synced": "2026-11-30T11:28:10.001Z",
    "last_synced_at": "2026-11-30T11:28:10.001Z",
    "name": "Summer cottage",
    "sync_requested_at": "2026-11-30T11:28:10.001Z",
    "time_offset": 0,
    "tld": ""
  }
]

Delete external calendars

Requiresproducts:write

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 a sync last changed the calendar's 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

deactivated_reasonFilter<ExternalCalendarDeactivatedReason | null>

Why the import was deactivated: by hand, or because it kept failing

errorFilter<text | null>

Error message if the calendar could not be synced

error_notified_atFilter<timestamp with time zone | null>

Timestamp at which admins were notified of the current failure

event_status_syncFilter<EventStatusSync>

How to treat incoming events

failing_sinceFilter<timestamp with time zone | null>

Timestamp of the first failed sync since the last successful one

ical_urlFilter<text>

URL of the iCal feed

last_syncedFilter<timestamp with time zone | null>

Deprecated: read-only copy of last_synced_at. Use last_synced_at

last_synced_atFilter<timestamp with time zone | null>

Timestamp at which the feed was last checked

nameFilter<text | null>

Name of the calendar, or null when it has none

sync_requested_atFilter<timestamp with time zone | null>

Timestamp at which a sync last claimed the calendar, or null before the first

time_offsetFilter<int32>

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 or access token doesn't have the scope this request needs, or no permission for this change, for example when writing rows of another organization.

429

The API key made more requests per minute than its rate limit allows. Retry after the number of seconds in the `Retry-After` header.

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
JSON
[
  {
    "id": "00000000-0000-0000-0000-000000000000",
    "product_id": "00000000-0000-0000-0000-000000000000",
    "created_at": "2026-11-30T11:28:10.001Z",
    "updated_at": "2026-11-30T11:28:10.001Z",
    "active": false,
    "deactivated_at": "2026-11-30T11:28:10.001Z",
    "deactivated_reason": "manual",
    "error": "",
    "error_notified_at": "2026-11-30T11:28:10.001Z",
    "event_status_sync": "import",
    "failing_since": "2026-11-30T11:28:10.001Z",
    "ical_url": "https://example.com",
    "last_synced": "2026-11-30T11:28:10.001Z",
    "last_synced_at": "2026-11-30T11:28:10.001Z",
    "name": "Summer cottage",
    "sync_requested_at": "2026-11-30T11:28:10.001Z",
    "time_offset": 0,
    "tld": ""
  }
]

Update external calendars

Requiresproducts:write

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 a sync last changed the calendar's 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

deactivated_reasonFilter<ExternalCalendarDeactivatedReason | null>

Why the import was deactivated: by hand, or because it kept failing

errorFilter<text | null>

Error message if the calendar could not be synced

error_notified_atFilter<timestamp with time zone | null>

Timestamp at which admins were notified of the current failure

event_status_syncFilter<EventStatusSync>

How to treat incoming events

failing_sinceFilter<timestamp with time zone | null>

Timestamp of the first failed sync since the last successful one

ical_urlFilter<text>

URL of the iCal feed

last_syncedFilter<timestamp with time zone | null>

Deprecated: read-only copy of last_synced_at. Use last_synced_at

last_synced_atFilter<timestamp with time zone | null>

Timestamp at which the feed was last checked

nameFilter<text | null>

Name of the calendar, or null when it has none

sync_requested_atFilter<timestamp with time zone | null>

Timestamp at which a sync last claimed the calendar, or null before the first

time_offsetFilter<int32>

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 or access token doesn't have the scope this request needs, or 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.

429

The API key made more requests per minute than its rate limit allows. Retry after the number of seconds in the `Retry-After` header.

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
JSON
[
  {
    "id": "00000000-0000-0000-0000-000000000000",
    "product_id": "00000000-0000-0000-0000-000000000000",
    "created_at": "2026-11-30T11:28:10.001Z",
    "updated_at": "2026-11-30T11:28:10.001Z",
    "active": false,
    "deactivated_at": "2026-11-30T11:28:10.001Z",
    "deactivated_reason": "manual",
    "error": "",
    "error_notified_at": "2026-11-30T11:28:10.001Z",
    "event_status_sync": "import",
    "failing_since": "2026-11-30T11:28:10.001Z",
    "ical_url": "https://example.com",
    "last_synced": "2026-11-30T11:28:10.001Z",
    "last_synced_at": "2026-11-30T11:28:10.001Z",
    "name": "Summer cottage",
    "sync_requested_at": "2026-11-30T11:28:10.001Z",
    "time_offset": 0,
    "tld": ""
  }
]