This feature is being actively developed, features and behavior of this operation may change at short notice.
Returns all availability blocks filtered by services, unique identifiers and other filters. Note this operation uses Pagination and supports Portfolio Access Tokens.
[PlatformAddress]/api/connector/v1/availabilityBlocks/getAll
{
"ClientToken": "E0D439EE522F44368DC78E1BFB03710C-D24FB11DBE31D4621C4817E028D9E1D",
"AccessToken": "C66EF7B239D24632943D115EDE9CB810-EA00F8FD8294692C940F6B5A8F9453D",
"Client": "Sample Client 1.0.0",
"EnterpriseIds": [
"3fa85f64-5717-4562-b3fc-2c963f66afa6",
"4d0201db-36f5-428b-8d11-4f0a65e960cc"
],
"AvailabilityBlockIds": [
"aaaa654a4a94-4f96-9efc-86da-bd26d8db"
],
"ServiceIds": [
"bd26d8db-86da-4f96-9efc-e5a4654a4a94"
],
"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-05T00:00:00Z",
"EndUtc": "2020-11-05T00:00:00Z"
},
"ReleasedUtc" : {
"StartUtc": "2020-11-04T00:00:00Z",
"EndUtc": "2020-11-05T00:00:00Z"
},
"States": [
"Confirmed"
],
"ExternalIdentifiers": [
"Block-0001"
],
"ActivityStates": [
"Active"
],
"Extent": {
"AvailabilityBlocks": true,
"Adjustments": true,
"ServiceOrders": false,
"Rates": false
},
"Limitation": { "Count": 10 }
}
Property | Type | Contract | Description |
---|---|---|---|
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. |
EnterpriseIds |
array of string | optional, max 1000 items | Unique identifiers of the Enterprises. If not specified, the operation returns data for all enterprises within scope of the Access Token. |
AvailabilityBlockIds |
string | optional, max 1000 items | Unique identifiers of the requested Availability blocks. |
ServiceIds |
string | optional, max 1000 items | Unique identifiers of the Services to which Availability blocks are assigned. |
CreatedUtc |
Time interval | optional, max length 3 months | Interval in which the Availability blocks were created. |
UpdatedUtc |
Time interval | optional, max length 3 months | Interval in which the Availability blocks were updated. |
CollidingUtc |
Time interval | optional, max length 3 months | Interval in which the Availability blocks are active. |
ReleasedUtc |
Time interval | optional, max length 3 months | Interval in which the Availability blocks are released. |
States |
array of string Availability block state | optional | States the availability blocks should be in. |
ExternalIdentifiers |
string | optional, max 1000 items | Identifiers of Availability blocks from external systems. |
ActivityStates |
array of string Activity state | optional | Whether to return only active, only deleted or both records. |
Extent |
Availability block extent | required | Extent of data to be returned, e.g. it is possible to specify that related service orders (for example reservations) are returned. |
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).Released
- The block deducts availability, but only for reservations assigned to the block before release. Remaining availability is returned back to general availability (waitlist).Canceled
- The block does not deduct availability and cannot have reservations assigned (waitlist).
Property | Type | Contract | Description |
---|---|---|---|
AvailabilityBlocks |
bool | optional | Whether the response should contain the general availability blocks. |
Adjustments |
bool | optional | Whether the response should contain individual availability adjustments related to availability blocks. |
ServiceOrders |
bool | optional | Whether the response should contain reservations related to availability blocks. |
Rates |
bool | optional | Whether the response should contain rates related to availability blocks. |
{
"AvailabilityBlocks": [
{
"Id": "aaaa654a4a94-4f96-9efc-86da-bd26d8db",
"ServiceId": "bd26d8db-86da-4f96-9efc-e5a4654a4a94",
"RateId": "ed4b660b-19d0-434b-9360-a4de2ea42eda",
"VoucherId": null,
"BookerId": null,
"CompanyId": null,
"Budget": {
"Currency": "USD",
"Value": 48.0
},
"State": "Confirmed",
"ReservationPurpose": "Leisure",
"CreatedUtc": "2021-10-11T13:32:32Z",
"UpdatedUtc": "2021-10-11T13:32:32Z",
"FirstTimeUnitStartUtc": "2021-10-14T00:00:00Z",
"LastTimeUnitStartUtc": "2021-10-17T00:00:00Z",
"ReleasedUtc": "2021-10-13T00:00:00Z",
"RollingReleaseOffset": null,
"ExternalIdentifier": "Block-0001",
"Name": "Wedding group",
"Notes": "Have a nice stay",
"QuoteId": null
},
{
"Id": "82ce1bb4-78b2-4b4e-aef3-edfc28d26773",
"ServiceId": "bd26d8db-86da-4f96-9efc-e5a4654a4a94",
"RateId": "ed4b660b-19d0-434b-9360-a4de2ea42eda",
"VoucherId": null,
"BookerId": null,
"CompanyId": null,
"Budget": {
"Currency": "USD",
"Value": 48.0
},
"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,
"QuoteId": "67eaf3c8-81e0-4ffb-b5f2-2b61803feb9c"
}
],
"ServiceOrders": [
{
"Id": "5281b551-bd90-4def-b211-acbd00d3ac8c",
"ServiceId": "bd26d8db-86da-4f96-9efc-e5a4654a4a94",
"GroupId": "edad92db-0b60-4b91-a090-acbd00d3ac75",
"Number": "61",
"ChannelNumber": "68845CDD-1340-49B5-9071-ACBD00B1D091",
"ChannelManagerNumber": null,
"ChannelManagerGroupNumber": null,
"ChannelManager": null,
"State": "Confirmed",
"Origin": "Connector",
"CreatedUtc": "2020-11-05T12:50:40Z",
"UpdatedUtc": "2020-11-06T07:59:19Z",
"CancelledUtc": null,
"StartUtc": "2020-11-05T00:00:00Z",
"EndUtc": "2020-11-06T00:00:00Z",
"ReleasedUtc": null,
"RequestedCategoryId": "1268c440-21c5-415d-bf58-ac87008b2bda",
"AssignedResourceId": "f97a6b96-b17f-421f-9b97-ac87008b3324",
"AssignedResourceLocked": false,
"BusinessSegmentId": null,
"CompanyId": null,
"TravelAgencyId": null,
"AvailabilityBlockId": "aaaa654a4a94-4f96-9efc-86da-bd26d8db",
"RateId": "ed4b660b-19d0-434b-9360-a4de2ea42eda",
"VoucherId": null,
"AdultCount": 2,
"ChildCount": 0,
"CustomerId": "c2730cbc-53ca-440d-8b30-ac87008b30af",
"CompanionIds": []
}
],
"Adjustments": [
{
"Id": "e19297af-373e-4701-b4ea-afae0129bded",
"AvailabilityBlockId": "aaaa654a4a94-4f96-9efc-86da-bd26d8db",
"ResourceCategoryId": "1268c440-21c5-415d-bf58-ac87008b2bda",
"FirstTimeUnitStartUtc": "2021-10-14T00:00:00Z",
"LastTimeUnitStartUtc": "2021-10-17T00:00:00Z",
"UnitCount": 6,
"ActivityState": "Active",
"UpdatedUtc": "2021-10-21T13:32:32Z"
}
],
"Cursor": "82ce1bb4-78b2-4b4e-aef3-edfc28d26773"
}
Property | Type | Contract | Description |
---|---|---|---|
AvailabilityBlocks |
array of Availability block | optional | Availability blocks. |
ServiceOrders |
array of Reservation | optional | Service orders (for example reservations) linked to availability blocks. |
Adjustments |
array of Availability adjustment | optional | Availability adjustments of availability blocks. |
Cursor |
string | optional | Unique identifier of the item one newer in time order than the items to be returned. If Cursor is not specified, i.e. null, then the latest or most recent items will be returned. |
Property | Type | Contract | Description |
---|---|---|---|
Id |
string | required | Unique identifier of the availability block. |
ServiceId |
string | required | Unique identifier of the Service the block is assigned to. |
RateId |
string | required | Unique identifier of the Rate the block is assigned to. |
VoucherId |
string | optional | Unique identifier of the Voucher used to access specified private Rate. |
BookerId |
string | optional | Unique identifier of the Customer on whose behalf the block was made. |
CompanyId |
string | optional | Unique identifier of the Company linked to the block. |
Budget |
Currency value | optional | The tentative budget for the total price of reservations in the block. |
State |
string Availability block state | required | State of the availability block. |
ReservationPurpose |
string Reservation purpose | optional | The purpose of the block. |
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. |
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. |
ReleasedUtc |
string | optional | 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. |
RollingReleaseOffset |
string | optional | 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. |
ExternalIdentifier |
string | optional, max 255 characters | Identifier of the block from external system. |
Name |
string | optional | The name of the block in Mews. |
Notes |
string | optional | Additional notes of the block. |
QuoteId |
string | optional | Unique identifier of the Mews Events quote associated with the availability block. |
This feature is being actively developed, features and behavior of this operation might change on short notice.
Adds availability blocks which are used to group related Availability updates. This makes limiting public availability easier and more organized. Note this operation supports Portfolio Access Tokens.
[PlatformAddress]/api/connector/v1/availabilityBlocks/add
{
"ClientToken": "E0D439EE522F44368DC78E1BFB03710C-D24FB11DBE31D4621C4817E028D9E1D",
"AccessToken": "C66EF7B239D24632943D115EDE9CB810-EA00F8FD8294692C940F6B5A8F9453D",
"Client": "Sample Client 1.0.0",
"EnterpriseId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"AvailabilityBlocks": [
{
"ServiceId": "bd26d8db-86da-4f96-9efc-e5a4654a4a94",
"RateId": "ed4b660b-19d0-434b-9360-a4de2ea42eda",
"VoucherCode": null,
"Name": "Mr. Smith's block",
"FirstTimeUnitStartUtc": "2020-11-05T00:00:00Z",
"LastTimeUnitStartUtc": "2020-11-06T00:00:00Z",
"ReleasedUtc": "2020-11-04T00:00:00Z",
"ExternalIdentifier": "Block-0001",
"Budget": {
"Value": 500,
"Currency": "EUR"
},
"ReservationPurpose": null,
"Notes": null,
"State": "Confirmed",
"BookerId": null,
"QuoteId": null
},
{
"ServiceId": "bd26d8db-86da-4f96-9efc-e5a4654a4a94",
"RateId": "ed4b660b-19d0-434b-9360-a4de2ea42eda",
"VoucherCode": null,
"Name": "ROlling release block",
"FirstTimeUnitStartUtc": "2021-11-05T00:00:00Z",
"LastTimeUnitStartUtc": "2021-11-06T00:00:00Z",
"RollingReleaseOffset": "P-3DT4H",
"ExternalIdentifier": "Block-0002",
"Budget": {
"Value": 500,
"Currency": "EUR"
},
"ReservationPurpose": null,
"Notes": null,
"State": "Confirmed",
"BookerId": null,
"QuoteId": null
}
]
}
Property | Type | Contract | Description |
---|---|---|---|
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. |
EnterpriseId |
string | optional | Unique identifier of the Enterprise. Required when using a Portfolio Access Token, ignored otherwise. |
AvailabilityBlocks |
array of Availability block parameters | required, max 1000 items | Availability blocks to be added. |
Property | Type | Contract | Description |
---|---|---|---|
ServiceId |
string | required | Unique identifier of the Service to assign block to. |
RateId |
string | required | Unique identifier of the Rate to assign block to. |
VoucherCode |
string | optional | Voucher code providing access to specified private Rate. |
Name |
string | optional | The name of the block. |
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. |
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. |
ReleasedUtc |
string | optional | The moment when the block and its availability is released, in UTC timezone ISO 8601 format. Takes precedence over RollingReleaseOffset . |
RollingReleaseOffset |
string | optional | Exact offset from the start of availability adjustments to the moment the availability adjustment should be released, in ISO 8601 duration format. Ignored if ReleasedUtc is specified. |
ExternalIdentifier |
string | optional, max 255 characters | Identifier of the block from external system. |
Budget |
Currency value | optional | The tentative budget for the total price of reservations. |
ReservationPurpose |
string Reservation purpose | optional | The purpose of the block. |
Notes |
string | optional | Additional notes of the block. |
State |
string Availability block state | required | State of the availability block. |
BookerId |
string | optional | Unique identifier of the Booker as a creator of an availability block. |
QuoteId |
string | optional | Unique identifier of the Mews Events quote associated with the availability block. |
{
"AvailabilityBlocks": [
{
"Id": "aaaa654a4a94-4f96-9efc-86da-bd26d8db",
"ServiceId": "bd26d8db-86da-4f96-9efc-e5a4654a4a94",
"RateId": "ed4b660b-19d0-434b-9360-a4de2ea42eda",
"FirstTimeUnitStartUtc": "2020-11-05T00:00:00Z",
"LastTimeUnitStartUtc": "2020-11-06T00:00:00Z",
"ReleasedUtc": "2020-11-04T00:00:00Z",
"ExternalIdentifier": "Block-0001"
}
]
}
Property | Type | Contract | Description |
---|---|---|---|
AvailabilityBlocks |
array of Availability block | required | Availability blocks. |
- Leisure
- Business
- Student
This feature is being actively developed, features and behavior of this operation might change on short notice.
Updates information about the specified Availability block.
[PlatformAddress]/api/connector/v1/availabilityBlocks/update
{
"ClientToken": "E0D439EE522F44368DC78E1BFB03710C-D24FB11DBE31D4621C4817E028D9E1D",
"AccessToken": "C66EF7B239D24632943D115EDE9CB810-EA00F8FD8294692C940F6B5A8F9453D",
"Client": "Sample Client 1.0.0",
"EnterpriseId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"AvailabilityBlocks": [
{
"AvailabilityBlockId": "aaaa654a4a94-4f96-9efc-86da-bd26d8db",
"Name": { "Value": "Mr. John Snow block" },
"FirstTimeUnitStartUtc": { "Value": "2021-07-05T00:00:00Z" },
"LastTimeUnitStartUtc": { "Value": "2021-07-15T00:00:00Z" },
"ExternalIdentifier": { "Value": "123456798" }
"State": { "Value": "Confirmed" },
"ReservationPurpose": { "Value": "Leisure" },
"BookerId": { "Value": "bdc54ad5-e3bd-4393-80b9-f96d6f63f92e" },
"Notes": { "Value": "Have a nice stay" },
"Budget": {
"Value": {
"Value": 500,
"Currency": "EUR"
}
},
"ReleasedUtc": { "Value": "2021-07-01T00:00:00Z" },
"ReleaseStrategy": { "Value": "None" },
"QuoteId": { "Value": null }
},
{
"AvailabilityBlockId": "82ce1bb4-78b2-4b4e-aef3-edfc28d26773",
"Name": { "Value": "Rolling release block" },
"FirstTimeUnitStartUtc": { "Value": "2022-07-05T00:00:00Z" },
"LastTimeUnitStartUtc": { "Value": "2022-07-15T00:00:00Z" },
"ExternalIdentifier": { "Value": "Block2" }
"State": { "Value": "Confirmed" },
"ReservationPurpose": { "Value": "Leisure" },
"BookerId": { "Value": "bdc54ad5-e3bd-4393-80b9-f96d6f63f92e" },
"Budget": {
"Value": {
"Value": 500,
"Currency": "EUR"
}
},
"RollingReleaseOffset": { "Value": "P-3DT4H" },
"ReleaseStrategy": { "Value": "RollingRelease" },
"QuoteId": { "Value": "3a995033-3fbd-4b4c-9bc2-a60523d78bc5" }
}
]
}
Property | Type | Contract | Description |
---|---|---|---|
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. |
EnterpriseId |
string | optional | Unique identifier of the Enterprise. Required when using a Portfolio Access Token, ignored otherwise. |
AvailabilityBlocks |
array of Availability block update parameters | required, max 1000 items | Availability blocks to be updated. |
Property | Type | Contract | Description |
---|---|---|---|
AvailabilityBlockId |
string | required | Unique identifier of the Availability block. |
Name |
String update value | optional | The name of the block (or null if the name should not be updated). |
FirstTimeUnitStartUtc |
String update value | required | 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). See Time units. |
LastTimeUnitStartUtc |
String update value | required | 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). See Time units. |
ExternalIdentifier |
String update value | optional, max 255 characters | Identifier of the block from external system (or null if the identifier should not be updated). |
State |
String update value for Availability block state | optional | State of the availability block (or null if not updated). |
ReservationPurpose |
String update value for Reservation purpose | optional | The purpose of the block (or null if not updated). |
BookerId |
Guid update value | optional | Unique identifier of the Booker as a creator of an availability block (or null if not updated). |
Notes |
String update value | optional | Additional notes of the block (or null if not updated). |
Budget |
Currency update value | optional | The tentative budget for the total price of reservations (or null if not updated). |
RollingReleaseOffset |
String update value | optional | 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. |
ReleasedUtc |
String update value | optional | 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. |
ReleaseStrategy |
String update value | optional | The strategy for automatic release of the availability block. If this property is not specified, the release strategy is not updated. |
QuoteId |
Guid update value | optional | Unique identifier of the Mews Events quote associated with the availability block (or null if not updated). |
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.
{
"AvailabilityBlocks": [
{
"Id": "aaaa654a4a94-4f96-9efc-86da-bd26d8db",
"ServiceId": "bd26d8db-86da-4f96-9efc-e5a4654a4a94",
"RateId": "ed4b660b-19d0-434b-9360-a4de2ea42eda",
"FirstTimeUnitStartUtc": "2020-11-05T00:00:00Z",
"LastTimeUnitStartUtc": "2020-11-06T00:00:00Z",
"ReleasedUtc": "2020-11-04T00:00:00Z",
"ExternalIdentifier": "Block-0001"
}
]
}
Property | Type | Contract | Description |
---|---|---|---|
AvailabilityBlocks |
array of Availability block | required | Availability blocks. |
Delete availability blocks. Note that an availability block containing active reservations (reservations which are not Canceled
) cannot be deleted.
[PlatformAddress]/api/connector/v1/availabilityBlocks/delete
{
"ClientToken": "E0D439EE522F44368DC78E1BFB03710C-D24FB11DBE31D4621C4817E028D9E1D",
"AccessToken": "C66EF7B239D24632943D115EDE9CB810-EA00F8FD8294692C940F6B5A8F9453D",
"Client": "Sample Client 1.0.0",
"EnterpriseId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"AvailabilityBlockIds": [
"e5a4654a4a94-86da-4f96-9efc-bd26d8db",
"aaaa654a4a94-4f96-9efc-86da-bd26d8db"
]
}
Property | Type | Contract | Description |
---|---|---|---|
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. |
EnterpriseId |
string | optional | Unique identifier of the Enterprise. Required when using a Portfolio Access Token, ignored otherwise. |
AvailabilityBlockIds |
array of string | required, max 1000 items | Unique identifier of the Availability block to delete. |
{}