Skip to content

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 and supports Portfolio Access Tokens.

AvailabilityBlockParameters
object
ClientToken
required

Token identifying the client application.

string
>= 1 characters
AccessToken
required

Access token of the client application.

string
>= 1 characters
Client
required

Name and version of the client application.

string
>= 1 characters
Limitation
required

Limitation on the quantity of data returned and optional Cursor for the starting point of data.

object
Count
required
integer format: int32
Cursor
string format: uuid
nullable
EnterpriseIds

Unique identifiers of the Enterprises. If not specified, the operation returns data for all enterprises within scope of the Access Token.

Array<string>
nullable >= 1 items <= 1000 items
Extent
required
Availability block extent

Extent of data to be returned, e.g. it is possible to specify that related service orders (for example reservations) are returned.

object
AvailabilityBlocks

Whether the response should contain the general availability blocks.

boolean
nullable
Adjustments

Whether the response should contain individual availability adjustments related to availability blocks.

boolean
nullable
ServiceOrders

Whether the response should contain reservations related to availability blocks.

boolean
nullable
Rates

Whether the response should contain rates related to availability blocks.

boolean
nullable
ServiceIds

Unique identifiers of the Services to which Availability blocks are assigned.

Array<string>
nullable >= 1 items <= 1000 items
AvailabilityBlockIds

Unique identifiers of the requested Availability blocks.

Array<string>
nullable >= 1 items <= 1000 items
CreatedUtc
TimeFilterInterval

Interval in which the availability blocks were created.

object
StartUtc
string format: date-time
nullable
EndUtc
string format: date-time
nullable
UpdatedUtc
TimeFilterInterval

Interval in which the Availability blocks were updated.

object
StartUtc
string format: date-time
nullable
EndUtc
string format: date-time
nullable
CollidingUtc
TimeFilterInterval

Interval in which the Availability blocks are active.

object
StartUtc
string format: date-time
nullable
EndUtc
string format: date-time
nullable
ReleasedUtc
TimeFilterInterval

Interval in which the Availability blocksare released.

object
StartUtc
string format: date-time
nullable
EndUtc
string format: date-time
nullable
ExternalIdentifiers

Identifiers of Availability blocks from external systems.

Array<string>
nullable >= 1 items <= 1000 items
States

States the availability blocks should be in.

Array<string>
nullable
Allowed values: Confirmed Optional Inquired Canceled
ActivityStates

Whether to return only active, only deleted or both records.

Array<string>
nullable
Example
{
"ClientToken": "E0D439EE522F44368DC78E1BFB03710C-D24FB11DBE31D4621C4817E028D9E1D",
"AccessToken": "C66EF7B239D24632943D115EDE9CB810-EA00F8FD8294692C940F6B5A8F9453D",
"Client": "Sample Client 1.0.0",
"Extent": {
"AvailabilityBlocks": true,
"Adjustments": true,
"ServiceOrders": false,
"Rates": false
},
"ServiceIds": [
"bd26d8db-86da-4f96-9efc-e5a4654a4a94"
],
"AvailabilityBlockIds": [
"5ee074b1-6c86-48e8-915f-c7aa4702086f"
],
"CreatedUtc": {
"StartUtc": "2020-11-04T00:00:00Z",
"EndUtc": "2020-11-05T00:00:00Z"
},
"UpdatedUtc": {
"StartUtc": "2020-11-04T00:00:00Z",
"EndUtc": "2020-11-05T00:00:00Z"
},
"CollidingUtc": {
"StartUtc": "2020-11-04T00:00:00Z",
"EndUtc": "2020-11-05T00:00:00Z"
},
"ReleasedUtc": {
"StartUtc": "2020-11-04T00:00:00Z",
"EndUtc": "2020-11-05T00:00:00Z"
},
"ExternalIdentifiers": [
"Block-0001"
],
"States": [
"Confirmed"
],
"ActivityStates": [
"Active"
],
"Limitation": {
"Count": 100
}
}

OK

AvailabilityBlockResult
object
AvailabilityBlocks

Availability blocks.

Array<object>
nullable
Availability block
object
Id

Unique identifier of the availability block.

string format: uuid
EnterpriseId

Unique identifier of the enterprise.

string format: uuid
ServiceId

Unique identifier of the Service the block is assigned to.

string format: uuid
RateId

Unique identifier of the Rate the block is assigned to.

string format: uuid
VoucherId

Unique identifier of the Voucher used to access specified private Rate.

string format: uuid
nullable
BookerId

Unique identifier of the Customer on whose behalf the block was made.

string format: uuid
nullable
CompanyId

Unique identifier of the Company linked to the block.

string format: uuid
nullable
TravelAgencyId

Unique identifier of Companywith Travel agency contract the Availability Block is related to.

string format: uuid
nullable
Budget
Currency value (ver 2018-06-07)

The tentative budget for the total price of reservations in the block.

object
Currency
required
string format: currency
>= 1 characters
Value
number format: double
nullable
Net
number format: double
nullable
Tax
number format: double
nullable
TaxRate
number format: double
nullable
State
required
Availability block state

State of the availability block.

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).)

string
Allowed values: Confirmed Optional Inquired Canceled
ReservationPurpose

The purpose of the block.

Leisure

Business

Student

string
Allowed values: Leisure Business Student
CreatedUtc
required

Creation date and time of the block in UTC timezone in ISO 8601 format.

string
>= 1 characters
UpdatedUtc
required

Last update date and time of the block in UTC timezone in ISO 8601 format.

string
>= 1 characters
FirstTimeUnitStartUtc
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.

string
>= 1 characters
LastTimeUnitStartUtc
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.

string
>= 1 characters
ReleasedUtc

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 RollingReleaseOffsetUtc is specified.

string
nullable
RollingReleaseOffset

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. Mutually exclusive with ReleasedUtc; the block will not be automatically released if neither ReleasedUtc nor RollingReleaseOffsetUtc is specified.

string
nullable
ExternalIdentifier

Identifier of the block from external system.

string
nullable <= 255 characters
Name

The name of the block in Mews.

string
nullable
Notes

Additional notes of the block.

string
nullable
PickupDistribution
required
Pickup distribution

Whether assigning spaces to reservations within an availability block is done as a single group or divided into individual groups.

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.)

string
Allowed values: AllInOneGroup IndividualGroups
IsActive
required

Whether the Availability Block is still active.

boolean
QuoteId

Unique identifier of the Mews Events quote associated with the availability block.

string format: uuid
nullable
AvailabilityBlockNumber
required

Unique number for a specific availability block within the Mews system.

string
>= 1 characters
ReleaseStrategy
required
Release strategy

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.)

string
Allowed values: FixedRelease RollingRelease None
PurchaseOrderNumber

Unique number of the purchase order. This number is propagated to any newly picked up Reservation within the block.

string
nullable
ServiceOrders

Service orders (for example reservations) linked to availability blocks.

Array<object>
nullable
Reservation (ver 2017-04-12)
object
Id
required

Unique identifier of the reservation.

string format: uuid
ServiceId
required

Unique identifier of the Service that is reserved.

string format: uuid
GroupId
required

Unique identifier of the Reservation group.

string format: uuid
Number
required

Confirmation number of the reservation in Mews.

string
>= 1 characters
ChannelNumber

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).

string
nullable
ChannelManagerNumber

Unique number of the reservation within the reservation group.

string
nullable
ChannelManagerGroupNumber

Number of the reservation group within a Channel manager that transferred the reservation from Channel to Mews.

string
nullable
ChannelManager

Name of the Channel manager (e.g. AvailPro, SiteMinder, TravelClick, etc).

string
nullable
State
required
Service order state (ver 2017-04-12)
string
Allowed values: Enquired Confirmed Started Processed Canceled Optional Requested
Origin
required
Reservation origin (ver 2017-04-12)
string
Allowed values: Distributor ChannelManager Import Connector Navigator CommanderInPerson CommanderChannel CommanderPhone CommanderEmail CommanderWebsite CommanderMessage CommanderCallCenter
OriginDetails

Details about the reservation origin.

string
nullable
Purpose
Any of:
Reservation purpose
string
Allowed values: Leisure Business Student
CreatedUtc
required

Creation date and time of the reservation in UTC timezone in ISO 8601 format.

string
>= 1 characters
UpdatedUtc
required

Last update date and time of the reservation in UTC timezone in ISO 8601 format.

string
>= 1 characters
CancelledUtc

Cancellation date and time in UTC timezone in ISO 8601 format.

string
nullable
StartUtc
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.

string
>= 1 characters
EndUtc
required

End of the reservation (departure) in UTC timezone in ISO 8601 format.

string
>= 1 characters
ReleasedUtc

Date when the optional reservation is released in UTC timezone in ISO 8601 format.

string
nullable
RequestedCategoryId
required

Identifier of the requested Resource category.

string format: uuid
AssignedSpaceId

Identifier of the assigned Space.

string format: uuid
nullable
AssignedSpaceLocked

Whether the reservation is locked to the assigned Space and cannot be moved.

boolean
AssignedResourceId

Identifier of the assigned Resource.

string format: uuid
nullable
AssignedResourceLocked
required

Whether the reservation is locked to the assigned Resource and cannot be moved.

boolean
BusinessSegmentId

Identifier of the reservation Business segment.

string format: uuid
nullable
CompanyId

Identifier of the Company on behalf of which the reservation was made.

string format: uuid
nullable
TravelAgencyId

Identifier of the Company that mediated the reservation.

string format: uuid
nullable
AvailabilityBlockId

Unique identifier of the Availability block the reservation is assigned to.

string format: uuid
nullable
RateId
required

Identifier of the reservation Rate.

string format: uuid
VoucherId

Unique identifier of the Voucher that has been used to create reservation.

string format: uuid
nullable
CreditCardId

Unique identifier of the Credit card.

string format: uuid
nullable
CancellationReason
Any of:
string
Allowed values: Other ConfirmationMissed BookedElsewhere ForceMajeure GuestComplaint NoShow PriceTooHigh ServiceNotAvailable InputError InvalidPayment TravelAgency RequestedByGuest Update BookingAbandoned RequestedByBooker
AdultCount

Count of adults the reservation was booked for.

integer format: int32
ChildCount

Count of children the reservation was booked for.

integer format: int32
PersonCounts
required

Number of people per age category the reservation was booked for.

Array<object>
Age category parameters
object
AgeCategoryId
required

Unique identifier of the Age category.

string format: uuid
Count
required

Number of people of a given age category. Only positive value is accepted.

integer format: int32
OwnerId
required

Unique identifier of the Customer or Company who owns the reservation.

string format: uuid
CustomerId
required

Unique identifier of the Customer who owns the reservation.

string format: uuid
BookerId

Unique identifier of the Customer on whose behalf the reservation was made.

string format: uuid
nullable
CompanionIds
required

Unique identifiers of the Customers that will use the resource.

Array<string>
ChannelManagerId

Channel Manager number.

string
nullable
Options
required
Reservation options

Options of the reservation.

object
OwnerCheckedIn
required

Owner of the reservation checked in.

boolean
AllCompanionsCheckedIn
required

All companions of the reservation checked in.

boolean
AnyCompanionCheckedIn
required

Any companion of the reservation checked in.

boolean
Adjustments

Availability adjustments of availability blocks.

Array<object>
nullable
Availability adjustment
object
Id
required

Unique identifier of the Availability adjustment.

string format: uuid
AvailabilityBlockId

Unique identifier of the Availability block which the availability adjustment belongs to.

string format: uuid
nullable
ResourceCategoryId
required

Unique identifier of the Resource category whose availability is updated.

string format: uuid
StartUtc

Start of the interval in UTC timezone in ISO 8601 format.

string
nullable
EndUtc

End of the interval in UTC timezone in ISO 8601 format.

string
nullable
FirstTimeUnitStartUtc
required

Start of the time interval, expressed as the timestamp for the start of the first time unit, in UTC timezone ISO 8601 format.

string format: date-time
>= 1 characters
LastTimeUnitStartUtc
required

End of the time interval, expressed as the timestamp for the start of the last time unit, in UTC timezone ISO 8601 format.

string format: date-time
>= 1 characters
UnitCount
required

Adjustment value applied on the interval.

integer format: int32
ActivityState
required
Activity State

Shows whether the availability adjustment is active or deleted.

Deleted

Active

string
Allowed values: Deleted Active
ReleaseOverrideUtc

Exact moment the availability adjustment is released if set; overrides the release strategy of the associated availability block.

string format: date-time
nullable
UpdatedUtc
required

Last update date and time of the adjustment in UTC timezone in ISO 8601 format.

string format: date-time
>= 1 characters
IsActive
required

Whether the availability adjustment is still active.

boolean
PaxCounts

Collection of predicted occupancy of availability adjustments. Relates to how many adjustments are assigned to each count of guests.

Array<object>
nullable <= 5 items
PaxCount
object
PersonCount
required

Predicted guest count that will be assigned to the Resource. The guest count must fit within the Resource Category maximum capacity.

integer format: int32
UnitCount
required

Positive number of adjustments that are assigned to PersonCount. The sum of all UnitCount in PaxCounts should match the adjustment value applied to the interval.

integer format: int32
FirstTimeUnitReleaseUtc

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.

string format: date-time
nullable
Rates

Rates assigned to the block.

Array<object>
nullable
Rate for extent

Rate entity, without some of the details, e.g. pricing.

object
Id
required

Unique identifier of the rate.

string format: uuid
GroupId
required

Unique identifier of Rate Group where the rate belongs.

string format: uuid
ServiceId
required

Unique identifier of the Service.

string format: uuid
BaseRateId

Unique identifier of the base Rate.

string format: uuid
nullable
IsBaseRate
required

Whether the rate is a base rate.

boolean
BusinessSegmentId

Unique identifier of the Business Segment.

string format: uuid
nullable
IsActive
required

Whether the rate is still active.

boolean
IsEnabled
required

Whether the rate is currently available to customers.

boolean
IsPublic
required

Whether the rate is publicly available.

boolean
Type
required
Rate type

Type of the rate.

Public

Private

AvailabilityBlock

string
Allowed values: Public Private AvailabilityBlock
Name

Name of the rate (in the default language).

string
nullable
Names
required
Localized text

All translations of the name.

object
key
additional properties
string
ShortName

Short name of the rate (in the default language).

string
nullable
UpdatedUtc
required

Interval in which the rates were updated.

string format: date-time
>= 1 characters
ExternalNames
Localized text

All translations of the external name of the rate.

object
key
additional properties
string
Description
Localized text

All translations of the description of the rate.

object
key
additional properties
string
ExternalIdentifier

Identifier of the rate from external system.

string
nullable <= 255 characters
Cursor

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.

string format: uuid
nullable
Example
{
"AvailabilityBlocks": [
{
"Id": "5ee074b1-6c86-48e8-915f-c7aa4702086f",
"EnterpriseId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"ServiceId": "bd26d8db-86da-4f96-9efc-e5a4654a4a94",
"RateId": "ed4b660b-19d0-434b-9360-a4de2ea42eda",
"VoucherId": null,
"BookerId": "ebd507c5-6bfd-4ca9-96aa-ffed6fa94f72",
"CompanyId": null,
"TravelAgencyId": null,
"Budget": {
"Currency": "USD",
"Value": 48,
"Net": null,
"Tax": null,
"TaxRate": null
},
"State": "Confirmed",
"ReservationPurpose": "Leisure",
"CreatedUtc": "2020-11-04T13:00:00Z",
"UpdatedUtc": "2020-11-04T13:00:00Z",
"FirstTimeUnitStartUtc": "2020-11-04T13:00:00Z",
"LastTimeUnitStartUtc": "2020-11-04T13:00:00Z",
"ReleasedUtc": "2020-11-04T13:00:00Z",
"RollingReleaseOffset": null,
"ExternalIdentifier": "Block-0001",
"Name": "Wedding group",
"Notes": "Have a nice stay",
"PickupDistribution": "AllInOneGroup",
"IsActive": false,
"QuoteId": null,
"AvailabilityBlockNumber": "478",
"ReleaseStrategy": "FixedRelease",
"PurchaseOrderNumber": "XX-123"
},
{
"Id": "c32386aa-1cd2-414a-a823-489325842fbe",
"EnterpriseId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"ServiceId": "bd26d8db-86da-4f96-9efc-e5a4654a4a94",
"RateId": "ed4b660b-19d0-434b-9360-a4de2ea42eda",
"VoucherId": null,
"BookerId": "ebd507c5-6bfd-4ca9-96aa-ffed6fa94f72",
"CompanyId": null,
"TravelAgencyId": null,
"Budget": {
"Currency": "USD",
"Value": 48,
"Net": null,
"Tax": null,
"TaxRate": null
},
"State": "Confirmed",
"ReservationPurpose": "Leisure",
"CreatedUtc": "2022-10-11T13:32:32Z",
"UpdatedUtc": "2022-10-11T13:32:32Z",
"FirstTimeUnitStartUtc": "2022-10-14T00:00:00Z",
"LastTimeUnitStartUtc": "2022-11-17T00:00:00Z",
"ReleasedUtc": null,
"RollingReleaseOffset": "P-3DT4H",
"ExternalIdentifier": "Block-0002",
"Name": "Rolling release",
"Notes": null,
"PickupDistribution": "AllInOneGroup",
"IsActive": false,
"QuoteId": "67eaf3c8-81e0-4ffb-b5f2-2b61803feb9c",
"AvailabilityBlockNumber": "479",
"ReleaseStrategy": "RollingRelease",
"PurchaseOrderNumber": null
}
],
"ServiceOrders": null,
"Adjustments": [
{
"Id": "e19297af-373e-4701-b4ea-afae0129bded",
"AvailabilityBlockId": "5ee074b1-6c86-48e8-915f-c7aa4702086f",
"ResourceCategoryId": "773d5e42-de1e-43a0-9ce6-f940faf2303f",
"StartUtc": null,
"EndUtc": null,
"FirstTimeUnitStartUtc": "2021-10-14T00:00:00Z",
"LastTimeUnitStartUtc": "2021-10-17T00:00:00Z",
"UnitCount": 6,
"ActivityState": "Active",
"ReleaseOverrideUtc": "2021-10-13T00:00:00Z",
"UpdatedUtc": "2021-10-21T13:32:32Z",
"IsActive": false,
"PaxCounts": null,
"FirstTimeUnitReleaseUtc": "2021-10-13T00:00:00Z"
}
],
"Rates": null,
"Cursor": "c32386aa-1cd2-414a-a823-489325842fbe"
}

Server has successfully fulfilled the request and there is no additional information to send back.

ConnectorApiExceptionResult
object
Message
string
nullable
RequestId
string
nullable
Details
nullable

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).

ConnectorApiExceptionResult
object
Message
string
nullable
RequestId
string
nullable
Details
nullable

Error caused by usage of invalid ClientToken, AccessToken, or you may not have the necessary permission to use the endpoint.

ConnectorApiExceptionResult
object
Message
string
nullable
RequestId
string
nullable
Details
nullable

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.

ConnectorApiExceptionResult
object
Message
string
nullable
RequestId
string
nullable
Details
nullable

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

ConnectorApiExceptionResult
object
Message
string
nullable
RequestId
string
nullable
Details
nullable

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.

ConnectorApiExceptionResult
object
Message
string
nullable
RequestId
string
nullable
Details
nullable

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.

ConnectorApiExceptionResult
object
Message
string
nullable
RequestId
string
nullable
Details
nullable