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.
Request Body
Section titled “Request Body ”object
Token identifying the client application.
Access token of the client application.
Name and version of the client application.
Limitation on the quantity of data returned and optional Cursor for the starting point of data.
object
Unique identifiers of the Enterprises. If not specified, the operation returns data for all enterprises within scope of the Access Token.
Extent of data to be returned, e.g. it is possible to specify that related service orders (for example reservations) are returned.
object
Whether the response should contain the general availability blocks.
Whether the response should contain individual availability adjustments related to availability blocks.
Whether the response should contain reservations related to availability blocks.
Whether the response should contain rates related to availability blocks.
Unique identifiers of the Services
to which Availability blocks
are assigned.
Unique identifiers of the requested Availability blocks
.
Interval in which the availability blocks were created.
object
Interval in which the Availability blocks
were updated.
object
Interval in which the Availability blocks
are active.
object
Interval in which the Availability blocks
are released.
object
Identifiers of Availability blocks
from external systems.
States the availability blocks should be in.
Whether to return only active, only deleted or both records.
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 }}
Responses
Section titled “ Responses ”OK
object
Availability blocks.
object
Unique identifier of the availability block.
Unique identifier of the enterprise.
Unique identifier of the Service
the block is assigned to.
Unique identifier of the Rate
the block is assigned to.
Unique identifier of the Voucher
used to access specified private Rate
.
Unique identifier of the Customer
on whose behalf the block was made.
Unique identifier of the Company
linked to the block.
Unique identifier of Company
with Travel agency contract
the Availability Block is related to.
The tentative budget for the total price of reservations in the block.
object
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).)
The purpose of the block.
Leisure
Business
Student
Creation date and time of the block in UTC timezone in ISO 8601 format.
Last update date and time of the block in UTC timezone in ISO 8601 format.
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.
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.
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.
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.
Identifier of the block from external system.
The name of the block in Mews.
Additional notes of the block.
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.)
Whether the Availability Block
is still active.
Unique identifier of the Mews Events quote associated with the availability block.
Unique number for a specific availability block within the Mews system.
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.)
Unique number of the purchase order. This number is propagated to any newly picked up Reservation
within the block.
Service orders (for example reservations) linked to availability blocks.
object
Unique identifier of the reservation.
Unique identifier of the Service that is reserved.
Unique identifier of the Reservation group.
Confirmation number of the reservation in Mews.
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).
Unique number of the reservation within the reservation group.
Number of the reservation group within a Channel manager that transferred the reservation from Channel to Mews.
Name of the Channel manager (e.g. AvailPro, SiteMinder, TravelClick, etc).
Details about the reservation origin.
Creation date and time of the reservation in UTC timezone in ISO 8601 format.
Last update date and time of the reservation in UTC timezone in ISO 8601 format.
Cancellation date and time in UTC timezone in ISO 8601 format.
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.
End of the reservation (departure) in UTC timezone in ISO 8601 format.
Date when the optional reservation is released in UTC timezone in ISO 8601 format.
Identifier of the requested Resource category.
Identifier of the assigned Space.
Whether the reservation is locked to the assigned Space and cannot be moved.
Identifier of the assigned Resource.
Whether the reservation is locked to the assigned Resource and cannot be moved.
Identifier of the reservation Business segment.
Identifier of the Company on behalf of which the reservation was made.
Identifier of the Company that mediated the reservation.
Unique identifier of the Availability block the reservation is assigned to.
Identifier of the reservation Rate.
Unique identifier of the Voucher that has been used to create reservation.
Unique identifier of the Credit card.
Count of adults the reservation was booked for.
Count of children the reservation was booked for.
Number of people per age category the reservation was booked for.
object
Unique identifier of the Age category.
Number of people of a given age category. Only positive value is accepted.
Unique identifier of the Customer or Company who owns the reservation.
Unique identifier of the Customer who owns the reservation.
Unique identifier of the Customer on whose behalf the reservation was made.
Unique identifiers of the Customer
s that will use the resource.
Channel Manager number.
Options of the reservation.
object
Owner of the reservation checked in.
All companions of the reservation checked in.
Any companion of the reservation checked in.
Availability adjustments of availability blocks.
object
Unique identifier of the Availability adjustment.
Unique identifier of the Availability block which the availability adjustment belongs to.
Unique identifier of the Resource category whose availability is updated.
Start of the interval in UTC timezone in ISO 8601 format.
End of the interval in UTC timezone in ISO 8601 format.
Start of the time interval, expressed as the timestamp for the start of the first time unit, in UTC timezone ISO 8601 format.
End of the time interval, expressed as the timestamp for the start of the last time unit, in UTC timezone ISO 8601 format.
Adjustment value applied on the interval.
Shows whether the availability adjustment is active or deleted.
Deleted
Active
Exact moment the availability adjustment is released if set; overrides the release strategy of the associated availability block.
Last update date and time of the adjustment in UTC timezone in ISO 8601 format.
Whether the availability adjustment is still active.
Collection of predicted occupancy of availability adjustments. Relates to how many adjustments are assigned to each count of guests.
object
Predicted guest count that will be assigned to the Resource. The guest count must fit within the Resource Category maximum capacity.
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.
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
assigned to the block.
Rate
entity, without some of the details, e.g. pricing.
object
Unique identifier of the rate.
Unique identifier of Rate Group
where the rate belongs.
Unique identifier of the Service
.
Unique identifier of the base Rate
.
Whether the rate is a base rate.
Unique identifier of the Business Segment
.
Whether the rate is still active.
Whether the rate is currently available to customers.
Whether the rate is publicly available.
Type of the rate.
Public
Private
AvailabilityBlock
Name of the rate (in the default language).
All translations of the name.
object
Short name of the rate (in the default language).
Interval in which the rates were updated.
All translations of the external name of the rate.
object
All translations of the description of the rate.
object
Identifier of the rate from external system.
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.
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.
object
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).
object
Error caused by usage of invalid ClientToken, AccessToken, or you may not have the necessary permission to use the endpoint.
object
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.
object
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
object
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.
object
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.