---
title: "Get all availability blocks"
method: POST
path: "/api/connector/v1/availabilityBlocks/getAll"
tags: ["Availability blocks"]
---

# Get all availability blocks

`POST /api/connector/v1/availabilityBlocks/getAll`

Returns all availability blocks filtered by services, unique identifiers and other filters. Note this operation uses [Pagination](https://mews-systems.gitbook.io/connector-api/guidelines/pagination/) and supports [Portfolio Access Tokens](https://mews-systems.gitbook.io/connector-api/concepts/multi-property/).

## Request body

- AvailabilityBlockParameters
  - `ClientToken` string, required — Token identifying the client application.
  - `AccessToken` string, required — Access token of the client application.
  - `Client` string, required — Name and version of the client application.
  - `Limitation` Limitation, required — Limitation on the quantity of data returned.
    - `Count` integer, required
    - `Cursor` string, uuid, nullable
  - `EnterpriseIds` string[], nullable — Unique identifiers of the Enterprises. If not specified, the operation returns data for all enterprises within scope of the Access Token.
  - `Extent` AvailabilityBlockExtent, required
    - `AvailabilityBlocks` boolean, nullable — Whether the response should contain the general availability blocks.
    - `Adjustments` boolean, nullable — Whether the response should contain individual availability adjustments related to availability blocks.
    - `ServiceOrders` boolean, nullable — Whether the response should contain reservations related to availability blocks.
    - `Rates` boolean, nullable — Whether the response should contain rates related to availability blocks.
  - `ServiceIds` string[], nullable — Unique identifiers of the `Services` to which `Availability blocks` are assigned.
  - `AvailabilityBlockIds` string[], nullable — Unique identifiers of the requested `Availability blocks`.
  - `CreatedUtc` TimeFilterInterval — When a time interval is used for **filtering** (for example in parameters such as `CreatedUtc.StartUtc` / `CreatedUtc.EndUtc`), the following rules apply: - **Start equals End (equality mode)** If `StartUtc` and `EndUtc` are exactly the same timestamp, the filter is treated as an equality check for that precise moment in time: ``` CreatedUtc == StartUtc ``` This does not represent an interval; only records with `CreatedUtc` equal to that exact instant are returned. - **Start differs from End (interval mode)** If `StartUtc` and `EndUtc` are different, the filter is evaluated as a half-open interval: ``` StartUtc <= CreatedUtc < EndUtc ``` In other words, the start is inclusive and the end is exclusive. Make sure your integration takes inclusive Start / exclusive End behavior of time intervals into account so that no records at the boundaries are omitted.
    - `StartUtc` string, date-time, nullable
    - `EndUtc` string, date-time, nullable
  - `UpdatedUtc` TimeFilterInterval — When a time interval is used for **filtering** (for example in parameters such as `CreatedUtc.StartUtc` / `CreatedUtc.EndUtc`), the following rules apply: - **Start equals End (equality mode)** If `StartUtc` and `EndUtc` are exactly the same timestamp, the filter is treated as an equality check for that precise moment in time: ``` CreatedUtc == StartUtc ``` This does not represent an interval; only records with `CreatedUtc` equal to that exact instant are returned. - **Start differs from End (interval mode)** If `StartUtc` and `EndUtc` are different, the filter is evaluated as a half-open interval: ``` StartUtc <= CreatedUtc < EndUtc ``` In other words, the start is inclusive and the end is exclusive. Make sure your integration takes inclusive Start / exclusive End behavior of time intervals into account so that no records at the boundaries are omitted.
    - `StartUtc` string, date-time, nullable
    - `EndUtc` string, date-time, nullable
  - `CollidingUtc` TimeFilterInterval — When a time interval is used for **filtering** (for example in parameters such as `CreatedUtc.StartUtc` / `CreatedUtc.EndUtc`), the following rules apply: - **Start equals End (equality mode)** If `StartUtc` and `EndUtc` are exactly the same timestamp, the filter is treated as an equality check for that precise moment in time: ``` CreatedUtc == StartUtc ``` This does not represent an interval; only records with `CreatedUtc` equal to that exact instant are returned. - **Start differs from End (interval mode)** If `StartUtc` and `EndUtc` are different, the filter is evaluated as a half-open interval: ``` StartUtc <= CreatedUtc < EndUtc ``` In other words, the start is inclusive and the end is exclusive. Make sure your integration takes inclusive Start / exclusive End behavior of time intervals into account so that no records at the boundaries are omitted.
    - `StartUtc` string, date-time, nullable
    - `EndUtc` string, date-time, nullable
  - `ReleasedUtc` TimeFilterInterval — When a time interval is used for **filtering** (for example in parameters such as `CreatedUtc.StartUtc` / `CreatedUtc.EndUtc`), the following rules apply: - **Start equals End (equality mode)** If `StartUtc` and `EndUtc` are exactly the same timestamp, the filter is treated as an equality check for that precise moment in time: ``` CreatedUtc == StartUtc ``` This does not represent an interval; only records with `CreatedUtc` equal to that exact instant are returned. - **Start differs from End (interval mode)** If `StartUtc` and `EndUtc` are different, the filter is evaluated as a half-open interval: ``` StartUtc <= CreatedUtc < EndUtc ``` In other words, the start is inclusive and the end is exclusive. Make sure your integration takes inclusive Start / exclusive End behavior of time intervals into account so that no records at the boundaries are omitted.
    - `StartUtc` string, date-time, nullable
    - `EndUtc` string, date-time, nullable
  - `ExternalIdentifiers` string[], nullable — Identifiers of `Availability blocks` from external systems.
  - `States` AvailabilityBlockStateEnum[], nullable — States the availability blocks should be in.
  - `ActivityStates` ActivityStates[], nullable — Whether to return only active, only deleted or both records.

## Response `200`

OK

- AvailabilityBlockResult
  - `AvailabilityBlocks` AvailabilityBlock[], nullable — Availability blocks.
    - `Id` string, uuid — Unique identifier of the availability block.
    - `EnterpriseId` string, uuid — Unique identifier of the [enterprise](https://mews-systems.gitbook.io/connector-api/operations/enterprises#enterprise).
    - `ServiceId` string, uuid — Unique identifier of the `Service` the block is assigned to.
    - `RateId` string, uuid — Unique identifier of the `Rate` assigned to the block. Availability block is always created with a new dedicated rate so this value differs from `TemplateRateId` or `RateId` provided in the request.
    - `VoucherId` string, uuid, nullable — Unique identifier of the `Voucher` used to access specified private `Rate`.
    - `BookerId` string, uuid, nullable — Unique identifier of the `Customer` on whose behalf the block was made.
    - `CompanyId` string, uuid, nullable — Unique identifier of the `Company` linked to the block.
    - `TravelAgencyId` string, uuid, nullable — Unique identifier of `Company`with `Travel agency contract` the Availability Block is related to.
    - `Budget` CurrencyValueOld — Total price of the reservation.
      - `Currency` string, currency, required
      - `Value` number, double, nullable
      - `Net` number, double, nullable
      - `Tax` number, double, nullable
      - `TaxRate` number, double, nullable
    - `State` 'Confirmed' | 'Optional' | 'Inquired' | 'Canceled', required — Confirmed (The block deducts availability and can have reservations assigned.) Optional (The block deducts availability and cannot have reservations assigned.) Inquired (The block does not deduct availability and cannot have reservations assigned (waitlist).) Canceled (The block does not deduct availability and cannot have reservations assigned (waitlist).)
    - `ReservationPurpose` 'Leisure' | 'Business' | 'Student' — Leisure Business Student
    - `CreatedUtc` string, required — Creation date and time of the block in UTC timezone in ISO 8601 format.
    - `UpdatedUtc` string, required — Last update date and time of the block in UTC timezone in ISO 8601 format.
    - `FirstTimeUnitStartUtc` string, required — Start of the time interval, expressed as the timestamp for the start of the first time unit, in UTC timezone ISO 8601 format. See [Time units](https://mews-systems.gitbook.io/connector-api/concepts/time-units).
    - `LastTimeUnitStartUtc` string, required — End of the time interval, expressed as the timestamp for the start of the last time unit, in UTC timezone ISO 8601 format. See [Time units](https://mews-systems.gitbook.io/connector-api/concepts/time-units).
    - `ReleasedUtc` string, nullable — The moment when the block and its availability is released in UTC timezone in ISO 8601 format. Mutually exclusive with `RollingReleaseOffset`; the block will not be automatically released if neither `ReleasedUtc` nor `RollingReleaseOffset` is specified.
    - `RollingReleaseOffset` string, nullable — Exact offset from the start of availability adjustments to the moment the individual days in the adjustment should be released, in ISO 8601 duration format. A positive offset means the release happens before the start of the availability adjustment, a negative offset means it happens after the start. Mutually exclusive with `ReleasedUtc`; the block will not be automatically released if neither `ReleasedUtc` nor `RollingReleaseOffset` is specified.
    - `ExternalIdentifier` string, nullable — Identifier of the block from external system.
    - `Name` string, nullable — The name of the block in Mews.
    - `Notes` string, nullable — Additional notes of the block.
    - `PickupDistribution` 'AllInOneGroup' | 'IndividualGroups', required — AllInOneGroup (All created reservations in the block are added to the same reservation group.) IndividualGroups (Reservations can be picked up in multiple groups, with up to 750 reservations per group.)
    - `IsActive` boolean, required — Whether the `Availability Block` is still active.
    - `QuoteId` string, uuid, nullable — Unique identifier of the Mews Events quote associated with the availability block.
    - `AvailabilityBlockNumber` string, required — Unique number for a specific availability block within the Mews system.
    - `ReleaseStrategy` 'FixedRelease' | 'RollingRelease' | 'None', required — The strategy for automatic release of the availability block. FixedRelease (The availability block is released at a fixed time.) RollingRelease (Each availability adjustment is released at a fixed offset from its start.) None (The availability block is not automatically released.)
    - `PurchaseOrderNumber` string, nullable — Unique number of the purchase order. This number is propagated to any newly picked up `Reservation` within the block.
    - `BusinessSegmentId` string, uuid, nullable, required — Unique identifier of the associated `Business segment`.
    - `CanceledUtc` string, date-time, nullable — Date and time of the block cancellation in UTC timezone in ISO 8601 format.
    - `CancellationReason` 'Other' | 'ConfirmationMissed' | 'BookedElsewhere' | 'ForceMajeure' | 'GuestComplaint' | 'NoShow' | 'PriceTooHigh' | 'ServiceNotAvailable' | 'InputError' | 'InvalidPayment' | 'TravelAgency' | 'RequestedByGuest' | 'Update' | 'BookingAbandoned' | 'RequestedByBooker' — Other ConfirmationMissed BookedElsewhere ForceMajeure GuestComplaint NoShow PriceTooHigh ServiceNotAvailable InputError InvalidPayment TravelAgency RequestedByGuest Update BookingAbandoned RequestedByBooker
    - `CancellationReasonDetail` string, nullable — Additional details of availability block cancellation.
  - `ServiceOrders` ReservationOld[], nullable — Service orders (for example reservations) linked to availability blocks.
    - `Id` string, uuid, required — Unique identifier of the reservation.
    - `ServiceId` string, uuid, required — Unique identifier of the Service that is reserved.
    - `GroupId` string, uuid, required — Unique identifier of the Reservation group.
    - `Number` string, required — Confirmation number of the reservation in Mews.
    - `ChannelNumber` string, nullable — Number of the reservation within the Channel (i.e. OTA, GDS, CRS, etc) in case the reservation group originates there (e.g. Booking.com confirmation number).
    - `ChannelManagerNumber` string, nullable — Unique number of the reservation within the reservation group.
    - `ChannelManagerGroupNumber` string, nullable — Number of the reservation group within a Channel manager that transferred the reservation from Channel to Mews.
    - `ChannelManager` string, nullable — Name of the Channel manager (e.g. AvailPro, SiteMinder, TravelClick, etc).
    - `State` 'Enquired' | 'Confirmed' | 'Started' | 'Processed' | 'Canceled' | 'Optional' | 'Requested', required
    - `Origin` 'Distributor' | 'ChannelManager' | 'Import' | 'Connector' | 'Navigator' | 'CommanderInPerson' | 'CommanderChannel' | 'CommanderPhone' | 'CommanderEmail' | 'CommanderWebsite' | 'CommanderMessage' | 'CommanderCallCenter' | 'CommanderRoomingList', required
    - `OriginDetails` string, nullable — Details about the reservation origin.
    - `Purpose` 'Leisure' | 'Business' | 'Student'
    - `CreatedUtc` string, required — Creation date and time of the reservation in UTC timezone in ISO 8601 format.
    - `UpdatedUtc` string, required — Last update date and time of the reservation in UTC timezone in ISO 8601 format.
    - `CancelledUtc` string, nullable — Cancellation date and time in UTC timezone in ISO 8601 format.
    - `StartUtc` string, required — Start of the reservation in UTC timezone in ISO 8601 format. This is either the scheduled reservation start time, or the actual customer check-in time if this is earlier than the scheduled start time.
    - `EndUtc` string, required — End of the reservation (departure) in UTC timezone in ISO 8601 format.
    - `ReleasedUtc` string, nullable — Date when the optional reservation is released in UTC timezone in ISO 8601 format.
    - `RequestedCategoryId` string, uuid, required — Identifier of the requested Resource category.
    - `AssignedSpaceId` string, uuid, nullable — Identifier of the assigned Space.
    - `AssignedSpaceLocked` boolean — Whether the reservation is locked to the assigned Space and cannot be moved.
    - `AssignedResourceId` string, uuid, nullable — Identifier of the assigned Resource.
    - `AssignedResourceLocked` boolean, required — Whether the reservation is locked to the assigned Resource and cannot be moved.
    - `BusinessSegmentId` string, uuid, nullable — Identifier of the reservation Business segment.
    - `CompanyId` string, uuid, nullable — Identifier of the Company on behalf of which the reservation was made.
    - `TravelAgencyId` string, uuid, nullable — Identifier of the Company that mediated the reservation.
    - `AvailabilityBlockId` string, uuid, nullable — Unique identifier of the Availability block the reservation is assigned to.
    - `RateId` string, uuid, required — Identifier of the reservation Rate.
    - `VoucherId` string, uuid, nullable — Unique identifier of the Voucher that has been used to create reservation.
    - `CreditCardId` string, uuid, nullable — Unique identifier of the Credit card.
    - `CancellationReason` 'Other' | 'ConfirmationMissed' | 'BookedElsewhere' | 'ForceMajeure' | 'GuestComplaint' | 'NoShow' | 'PriceTooHigh' | 'ServiceNotAvailable' | 'InputError' | 'InvalidPayment' | 'TravelAgency' | 'RequestedByGuest' | 'Update' | 'BookingAbandoned' | 'RequestedByBooker'
    - `AdultCount` integer — Count of adults the reservation was booked for.
    - `ChildCount` integer — Count of children the reservation was booked for.
    - `PersonCounts` ReservationPersonCount[], required — Number of people per age category the reservation was booked for.
      - `AgeCategoryId` string, uuid, required — Unique identifier of the [Age category](https://mews-systems.gitbook.io/connector-api/operations/agecategories#age-category).
      - `Count` integer, required — Number of people of a given age category. Only positive value is accepted.
    - `OwnerId` string, uuid, required — Unique identifier of the Customer or Company who owns the reservation.
    - `CustomerId` string, uuid, required — Unique identifier of the Customer who owns the reservation.
    - `BookerId` string, uuid, nullable — Unique identifier of the Customer on whose behalf the reservation was made.
    - `CompanionIds` string[], required — Unique identifiers of the `Customer`s that will use the resource.
    - `ChannelManagerId` string, nullable — Channel Manager number.
    - `Options` ReservationOptions, required
      - `OwnerCheckedIn` boolean, required — Owner of the reservation checked in.
      - `AllCompanionsCheckedIn` boolean, required — All companions of the reservation checked in.
      - `AnyCompanionCheckedIn` boolean, required — Any companion of the reservation checked in.
  - `Adjustments` AvailabilityAdjustment[], nullable — Availability adjustments of availability blocks.
    - `Id` string, uuid, required — Unique identifier of the [Availability adjustment](https://mews-systems.gitbook.io/connector-api/operations/#availability-adjustment).
    - `AvailabilityBlockId` string, uuid, nullable — Unique identifier of the [Availability block](https://mews-systems.gitbook.io/connector-api/operations/availabilityblocks/#availability-block) which the availability adjustment belongs to.
    - `ResourceCategoryId` string, uuid, required — Unique identifier of the [Resource category](https://mews-systems.gitbook.io/connector-api/operations/resources/#resource-category) whose availability is updated.
    - `StartUtc` string, nullable — Start of the interval in UTC timezone in ISO 8601 format.
    - `EndUtc` string, nullable — End of the interval in UTC timezone in ISO 8601 format.
    - `FirstTimeUnitStartUtc` string, date-time, required — Start of the time interval, expressed as the timestamp for the start of the first [time unit](https://mews-systems.gitbook.io/connector-api/operations/services/#time-unit), in UTC timezone ISO 8601 format.
    - `LastTimeUnitStartUtc` string, date-time, required — End of the time interval, expressed as the timestamp for the start of the last [time unit](https://mews-systems.gitbook.io/connector-api/operations/services/#time-unit), in UTC timezone ISO 8601 format.
    - `UnitCount` integer, required — Adjustment value applied on the interval.
    - `ActivityState` 'Deleted' | 'Active', required — Deleted Active
    - `ReleaseOverrideUtc` string, date-time, nullable — Exact moment the availability adjustment is released if set; overrides the release strategy of the associated availability block.
    - `UpdatedUtc` string, date-time, required — Last update date and time of the adjustment in UTC timezone in ISO 8601 format.
    - `IsActive` boolean, required — Whether the availability adjustment is still active.
    - `PaxCounts` PaxCount[], nullable — Collection of predicted occupancy of availability adjustments. Relates to how many adjustments are assigned to each count of guests.
      - `PersonCount` integer, required — Guest count assigned to the resource. Must not exceed the resource category capacity. Must be unique within the `PaxCounts` collection.
      - `UnitCount` integer, required — Number of blocked units assigned to this `PersonCount`. The sum of all `UnitCount` values in `PaxCounts` must equal the absolute value of `UnitCountAdjustment`.
    - `FirstTimeUnitReleaseUtc` string, date-time, nullable — Exact moment the first time unit of the availability adjustment is released based on `ReleaseOverrideUtc` or the `ReleaseStrategy` of the associated availability block, or the `OperationalEditableHistoryInterval` of the associated enterprise if not set, or `null` if `AvailabilityBlockId` is `null`.
  - `Rates` RateForExtent[], nullable — `Rates` assigned to the block.
    - `Id` string, uuid, required — Unique identifier of the rate.
    - `GroupId` string, uuid, required — Unique identifier of `Rate Group` where the rate belongs.
    - `ServiceId` string, uuid, required — Unique identifier of the `Service`.
    - `BaseRateId` string, uuid, nullable — Unique identifier of the base `Rate`.
    - `IsBaseRate` boolean, required — Whether the rate is a base rate.
    - `BusinessSegmentId` string, uuid, nullable — Unique identifier of the `Business Segment`.
    - `IsActive` boolean, required — Whether the rate is still active.
    - `IsEnabled` boolean, required — Whether the rate is currently available to customers.
    - `IsPublic` boolean, required — Whether the rate is publicly available.
    - `Type` 'Public' | 'Private' | 'AvailabilityBlock', required — Public Private AvailabilityBlock
    - `Name` string, nullable — Name of the rate (in the default language).
    - `Names` object, required — All translations of the name.
    - `ShortName` string, nullable — Short name of the rate (in the default language).
    - `UpdatedUtc` string, date-time, required — Interval in which the rates were updated.
    - `ExternalNames` object, nullable — All translations of the external name of the rate.
    - `Description` object, nullable — All translations of the description of the rate.
    - `ExternalIdentifier` string, nullable — Identifier of the rate from external system.
  - `Cursor` string, uuid, nullable — Unique identifier of the last returned availability block. This can be used in Limitation in a subsequent request to fetch the next batch of availability block.

## Other responses

- `204` — Server has successfully fulfilled the request and there is no additional information to send back.
- `400` — Error caused by the client app, e.g. in case of malformed request or invalid identifier of a resource. In most cases, such an error signifies a bug in the client app (consumer of the API).
- `401` — Error caused by usage of invalid ClientToken, AccessToken, or you may not have the necessary permission to use the endpoint.
- `403` — Server error that should be reported to the end user of the client app. Happens for example when the server-side validation fails or when a business-logic check is violated.
- `408` — Error caused by heavy request that takes too long to process (typically tens of seconds). To get around this, request data in smaller batches. For more information, see [Request timeouts](https://mews-systems.gitbook.io/connector-api/guidelines/requests#request-timeouts)
- `429` — Error caused by too many requests sent in a given amount of time. Response contains `Retry-After` header indicating how long the user agent should wait before making a follow-up request. For more information, see [Request limits](https://mews-systems.gitbook.io/connector-api/guidelines/requests#request-limits).
- `500` — Unexpected error on the Mews side. This may be due to a software fault. If such a situation occurs, the error will be logged and the development team notified, however you can raise an issue through GitHub on our [documentation repository](https://github.com/MewsSystems/gitbook-connector-api).

---

[API](https://skmtc.net/mews/apis/connector-api.md) · [All operations](https://skmtc.net/mews/apis/connector-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/mews/connector-api/versions/81933a8ff730/schema)
