Skip to content

Update availability blocks

POST
/api/connector/v1/availabilityBlocks/update

Updates information about the specified Availability block. Note this operation supports Portfolio Access Tokens.

MultipleAvailabilityBlockUpdateParameters
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
EnterpriseId

Unique identifier of the enterprise. Required when using Portfolio Access Tokens, ignored otherwise.

string format: uuid
nullable
AvailabilityBlocks
required

Availability blocks to be updated.

Array<object>
>= 1 items <= 1000 items
Availability block update parameters
object
AvailabilityBlockId

Unique identifier of the Availability block.

string format: uuid
Name
String update value

The name of the block (or null if the name should not be updated).

object
Value

Value which is to be updated.

string
nullable
FirstTimeUnitStartUtc
String update value

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

Value which is to be updated.

string
nullable
LastTimeUnitStartUtc
String update value

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

Value which is to be updated.

string
nullable
ExternalIdentifier
String update value

Identifier of the block from external system (or null if the identifier should not be updated).

object
Value

Value which is to be updated.

string
nullable
State
String update value

State of the availability block (or null if not updated).

object
Value

Value which is to be updated.

string
nullable
ReservationPurpose
String update value

The purpose of the block (or null if not updated).

object
Value

Value which is to be updated.

string
nullable
CompanyId
Guid update value

Unique identifier of the Company (or null if not updated).

object
Value

Value which is to be updated.

string format: uuid
nullable
TravelAgencyId
Guid update value

Unique identifier of the travel agency (i.e. Company; or null if not updated).

object
Value

Value which is to be updated.

string format: uuid
nullable
BookerId
Guid update value

Unique identifier of the Booker as a creator of an availability block (or null if not updated).

object
Value

Value which is to be updated.

string format: uuid
nullable
Notes
String update value

Additional notes of the block (or null if not updated).

object
Value

Value which is to be updated.

string
nullable
Budget
Currency value (ver 2018-06-07) update value

The tentative budget for the total price of reservations (or null if not updated).

object
Value
Currency value (ver 2018-06-07)

Value in the specified currency.

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
CancellationReason
String update value

Cancellation reason of the availability block (or null if not updated).

object
Value

Value which is to be updated.

string
nullable
CancellationReasonDetail
String update value

Cancellation reason detail of the availability block (or null if not updated).

object
Value

Value which is to be updated.

string
nullable
RollingReleaseOffset
String update value

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

Value which is to be updated.

string
nullable
ReleasedUtc
String update value

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

Value which is to be updated.

string
nullable
ReleaseStrategy
Release strategy update value

The strategy for automatic release of the availability block (or null if not updated).

object
Value
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
QuoteId
Guid update value

Unique identifier of the Mews Events quote associated with the availability block (or null if not updated).

object
Value

Value which is to be updated.

string format: uuid
nullable
PurchaseOrderNumber
String update value

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

object
Value

Value which is to be updated.

string
nullable
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"
}
}
]
}

OK

AvailabilityBlockAddResult
object
AvailabilityBlocks
required

Availability blocks.

Array<object>
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
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