Update availability blocks
POST /api/connector/v1/availabilityBlocks/update
Updates information about the specified Availability block
. Note this operation 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.
Unique identifier of the enterprise. Required when using Portfolio Access Tokens, ignored otherwise.
Availability blocks to be updated.
object
Unique identifier of the Availability block.
The name of the block (or null
if the name should not be updated).
object
Value which is to be updated.
Start of the time interval, expressed as the timestamp for the start of the first time unit, in UTC timezone ISO 8601 format (or null
if the start time should not be updated).
object
Value which is to be updated.
End of the time interval, expressed as the timestamp for the start of the last time unit, in UTC timezone ISO 8601 format (or null
if the end time should not be updated).
object
Value which is to be updated.
Identifier of the block from external system (or null
if the identifier should not be updated).
object
Value which is to be updated.
State of the availability block (or null
if not updated).
object
Value which is to be updated.
The purpose of the block (or null
if not updated).
object
Value which is to be updated.
Unique identifier of the Company (or null
if not updated).
object
Value which is to be updated.
Unique identifier of the travel agency (i.e. Company
; or null
if not updated).
object
Value which is to be updated.
Unique identifier of the Booker as a creator of an availability block (or null
if not updated).
object
Value which is to be updated.
Additional notes of the block (or null
if not updated).
object
Value which is to be updated.
The tentative budget for the total price of reservations (or null
if not updated).
object
Value in the specified currency.
object
Cancellation reason of the availability block (or null
if not updated).
object
Value which is to be updated.
Cancellation reason detail of the availability block (or null
if not updated).
object
Value which is to be updated.
Exact offset from the start of availability adjustments to the moment the availability adjustment should be released, in ISO 8601 duration format. Required if ReleaseStrategy
is set to RollingRelease
, ignored otherwise.
object
Value which is to be updated.
The moment when the block and its availability is released, in UTC timezone ISO 8601 format. Required if ReleaseStrategy
is set to FixedRelease
, or used when ReleaseStrategy
update is unspecified.
object
Value which is to be updated.
The strategy for automatic release of the availability block (or null
if not updated).
object
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 identifier of the Mews Events quote associated with the availability block (or null
if not updated).
object
Value which is to be updated.
Unique number of the purchase order. This number is propagated to any newly picked up Reservation
within the block.
object
Value which is to be updated.
Example
{ "AvailabilityBlocks": [ { "AvailabilityBlockId": "5ee074b1-6c86-48e8-915f-c7aa4702086f", "Name": { "Value": "Mr. Smith's block" }, "FirstTimeUnitStartUtc": { "Value": "2021-07-05T00:00:00Z" }, "LastTimeUnitStartUtc": { "Value": "2021-07-15T00:00:00Z" }, "ExternalIdentifier": { "Value": "Block-0001" }, "State": { "Value": "Confirmed" }, "ReservationPurpose": { "Value": "Leisure" }, "BookerId": { "Value": "ebd507c5-6bfd-4ca9-96aa-ffed6fa94f72" }, "Notes": { "Value": "Have a nice stay" }, "Budget": { "Value": { "Currency": "USD", "Value": 48 } }, "ReleasedUtc": { "Value": "2021-07-01T00:00:00Z" }, "QuoteId": {} }, { "AvailabilityBlockId": "c32386aa-1cd2-414a-a823-489325842fbe", "Name": { "Value": "Rolling release block" }, "FirstTimeUnitStartUtc": { "Value": "2022-07-05T00:00:00Z" }, "LastTimeUnitStartUtc": { "Value": "2022-07-15T00:00:00Z" }, "ExternalIdentifier": { "Value": "Block-0002" }, "State": { "Value": "Confirmed" }, "ReservationPurpose": { "Value": "Leisure" }, "BookerId": { "Value": "ebd507c5-6bfd-4ca9-96aa-ffed6fa94f72" }, "Notes": { "Value": "Have a nice stay" }, "Budget": { "Value": { "Currency": "USD", "Value": 48 } }, "RollingReleaseOffset": { "Value": "P-3DT4H" }, "ReleasedUtc": { "Value": "2021-07-01T00:00:00Z" }, "ReleaseStrategy": { "Value": "RollingRelease" }, "QuoteId": { "Value": "67eaf3c8-81e0-4ffb-b5f2-2b61803feb9c" } } ]}
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.
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.