Availability blocks

Get all availability blocks

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.

Request

[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

AvailabilityBlockIds

string

optional, max 1000 items

ServiceIds

string

optional, max 1000 items

CreatedUtc

optional, max length 3 months

UpdatedUtc

optional, max length 3 months

CollidingUtc

optional, max length 3 months

ReleasedUtc

optional, max length 3 months

States

optional

States the availability blocks should be in.

ExternalIdentifiers

string

optional, max 1000 items

ActivityStates

optional

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

Extent

required

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

Availability block state

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

Availability block extent

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.

Response

{
    "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,
            "AvailabilityBlockNumber": "478",
            "ReleaseStrategy": "FixedRelease"
        },
        {
            "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",
            "AvailabilityBlockNumber": "479",
            "ReleaseStrategy": "FixedRelease"
        }
    ],
    "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

optional

Availability blocks.

ServiceOrders

optional

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

Adjustments

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.

Availability block

Property
Type
Contract
Description

Id

string

required

Unique identifier of the availability block.

ServiceId

string

required

RateId

string

required

VoucherId

string

optional

BookerId

string

optional

CompanyId

string

optional

Budget

optional

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

State

required

State of the availability block.

ReservationPurpose

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

LastTimeUnitStartUtc

string

required

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.

AvailabilityBlockNumber

string

required

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

ReleaseStrategy

required

The strategy for automatic release of the availability block.

Add availability blocks

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.

Request

[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

AvailabilityBlocks

required, max 1000 items

Availability blocks to be added.

Availability block parameters

Property
Type
Contract
Description

ServiceId

string

required

RateId

string

required

VoucherCode

string

optional

Name

string

optional

The name of the block.

FirstTimeUnitStartUtc

string

required

LastTimeUnitStartUtc

string

required

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

optional

The tentative budget for the total price of reservations.

ReservationPurpose

optional

The purpose of the block.

Notes

string

optional

Additional notes of the block.

State

required

State of the availability block.

BookerId

string

optional

QuoteId

string

optional

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

Response

{
    "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

required

Availability blocks.

Reservation purpose

  • Leisure

  • Business

  • Student

Update availability blocks

This feature is being actively developed, features and behavior of this operation might change on short notice.

Updates information about the specified Availability block.

Request

[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

AvailabilityBlocks

required, max 1000 items

Availability blocks to be updated.

Availability block update parameters

Property
Type
Contract
Description

AvailabilityBlockId

string

required

Name

optional

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

FirstTimeUnitStartUtc

required

LastTimeUnitStartUtc

required

ExternalIdentifier

optional, max 255 characters

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

State

optional

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

ReservationPurpose

optional

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

BookerId

optional

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

Notes

optional

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

Budget

optional

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

RollingReleaseOffset

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

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

optional

The strategy for automatic release of the availability block. If this property is not specified, the release strategy is not updated.

QuoteId

optional

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

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.

Response

{
    "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

required

Availability blocks.

Delete availability blocks

Delete availability blocks. Note that an availability block containing active reservations (reservations which are not Canceled) cannot be deleted.

Request

[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

AvailabilityBlockIds

array of string

required, max 1000 items

Unique identifier of the Availability block to delete.

Response

{}

Last updated