Packages

Create an availability rule for a package

Adds a new AvailabilityRule to a Package. With is_available: true the rule opens new bookable windows; with is_available: false it blocks them. Any false rule overrides any true rule for the same period. Omitting date/time/weekday filters means the rule applies always.

date_from defaults to today in the package's timezone when omitted. Requires the SETTINGS_MANAGE permission on the package's site.

post/shop/packages/{packageId}/availability-rules

Request body

is_availableboolean required

When true, this rule opens bookable windows for the package. When false, it closes them. Any false rule overrides any true rule for the same time period.

date_fromstring date nullable

First date this rule applies (inclusive). Defaults to today in the package's timezone when omitted.

date_tostring date nullable

Last date this rule applies (inclusive). When omitted, the rule has no end date.

time_fromstring nullable

Start of the daily time window in 24-hour HH:MM format.

time_tostring nullable

End of the daily time window in 24-hour HH:MM format.

min_durationinteger nullable

Match the rule only when the package's total duration is ≥ this many minutes. Omit to apply to any duration.

max_durationinteger nullable

Match the rule only when the package's total duration is ≤ this many minutes.

weekdaysstring[]

Days of the week the rule applies on. Empty / omitted means every day.

Example request

{
  "date_from": "2026-12-24",
  "date_to": "2026-12-26",
  "time_from": "10:00",
  "time_to": "18:00",
  "min_duration": 60,
  "max_duration": 240,
  "weekdays": [
    "saturday",
    "sunday"
  ]
}

Response

A single AvailabilityRule belonging to a Package.

Example response

{
  "data": {
    "date_from": "2021-02-15",
    "date_to": "2021-02-15",
    "time_from": "11:00",
    "time_to": "17:00"
  }
}

Changes