---
title: "List availability rules for a package"
method: GET
path: "/shop/packages/{packageId}/availability-rules"
tags: ["Packages"]
---

# List availability rules for a package

`GET /shop/packages/{packageId}/availability-rules`

Returns all `AvailabilityRule`s configured on the given `Package`.
Availability rules carve up the working calendar into windows when
the package can or cannot be booked — useful for blocking holidays,
restricting weekend hours, or making the package available only
during specific seasons.

Rule semantics: any `is_available: false` rule overrides any
`is_available: true` rule for the same time period. Results are
paginated.

## Query parameters

- `page` integer
- `per_page` integer

## Response `200`

A paginated list of `AvailabilityRule`s on a `Package`.

- object
  - `data` AvailabilityRule[], required — The availability rules configured for this package on the current page.
    - `id` string, object-id, required — The ID of the availability rule.
    - `date_from` string, date, required — The start of the rule period.
    - `date_to` string, date, required — The end of the rule period.
    - `is_available` boolean, required — Whether the resource is available during this period. Any `false` rules will override `true` rules.
    - `max_duration` integer — Maximum number of minutes.
    - `min_duration` integer — Minimum number of minutes.
    - `time_from` string, required — The daily start time of the time period, in 24 hour format.
    - `time_to` string, required — The daily end time of the time period, in 24 hour format.
    - `weekdays` string[] — The weekdays this rule applies to.
  - `meta` PaginationMeta, required — Counts and positional information for the current page of a list response. Use `current_page` and `last_page` to drive pagination UI, `total` for result counts, and `per_page` to confirm the page size the server actually applied (which may differ from the requested value when capped).
    - `from` integer, required — The item number from which this results set starts from
    - `to` integer, required — The item number from which this results set ends at
    - `total` integer, required — The total number of results
    - `current_page` integer, required — The current page number
    - `last_page` integer, required — The page number of the last result set
    - `per_page` integer, required — The number of results per page
    - `path` string, required — The path of this api request

## Other responses

- `401` — The user is unauthenticated
- `403` — The authenticated user does not have permission.
- `404` — The resource couldn't be found

---

[API](https://skmtc.dev/try/apis/trybe-api.md) · [All operations](https://skmtc.dev/try/apis/trybe-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/try/trybe-api/revisions/f37f92702da5/schema)
