Skip to content

Get all restrictions

POST
/api/connector/v1/restrictions/getAll

Returns all restrictions of the default service provided by the enterprise. Note this operation uses Pagination and supports Portfolio Access Tokens.

RestrictionFilterParameters
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
Limitation
required

Limitation on the quantity of data returned and optional Cursor for the starting point of data.

object
Count
required
integer format: int32
Cursor
string format: uuid
nullable
EnterpriseIds

Unique identifiers of the Enterprises. If not specified, the operation returns data for all enterprises within scope of the Access Token.

Array<string>
nullable >= 1 items <= 1000 items
TimeFilter
string
nullable
StartUtc
string
nullable
EndUtc
string
nullable
CollidingUtc
TimeFilterInterval

Interval in which the Restriction is active.

object
StartUtc
string format: date-time
nullable
EndUtc
string format: date-time
nullable
CreatedUtc
TimeFilterInterval

Interval in which the Restriction was created.

object
StartUtc
string format: date-time
nullable
EndUtc
string format: date-time
nullable
UpdatedUtc
TimeFilterInterval

Interval in which the Restriction was updated.

object
StartUtc
string format: date-time
nullable
EndUtc
string format: date-time
nullable
RestrictionIds

Unique identifiers of the Restriction.

Array<string>
nullable <= 1000 items
ResourceCategoryIds

Unique identifiers of Resource category.

Array<string>
nullable <= 1000 items
RateIds

Unique identifiers of Rate. Returns all restrictions that affect the given rates, i.e. ones without any Restriction Conditions, ones assigned directly to specified rates, ones assigned to Rate group of specified rates, or ones inherited from base rates.`.

Array<string>
nullable <= 1000 items
ExactRateIds

Unique identifiers of Rate. Returns only those restrictions which have matching ExactRateId set in Restriction Condition.

Array<string>
nullable <= 1000 items
BaseRateIds

Unique identifiers of Rate. Returns only those restrictions which have matching BaseRateId set in Restriction Condition.

Array<string>
nullable <= 1000 items
Origin
Any of:
Restriction origin
string
Allowed values: User Integration
ServiceIds
required

Unique identifiers of the Service from which the restrictions are requested.

Array<string>
>= 1 items <= 1000 items
Example
{
"ClientToken": "E0D439EE522F44368DC78E1BFB03710C-D24FB11DBE31D4621C4817E028D9E1D",
"AccessToken": "C66EF7B239D24632943D115EDE9CB810-EA00F8FD8294692C940F6B5A8F9453D",
"Client": "Sample Client 1.0.0",
"EnterpriseIds": [
"3fa85f64-5717-4562-b3fc-2c963f66afa6",
"4d0201db-36f5-428b-8d11-4f0a65e960cc"
],
"ServiceIds": [
"bd26d8db-86da-4f96-9efc-e5a4654a4a94"
],
"ResourceCategoryIds": [
"34c29e73-c8db-4e93-b51b-981e42655e03"
],
"RateIds": [
"ed4b660b-19d0-434b-9360-a4de2ea42eda"
],
"Origin": "Integration",
"CollidingUtc": {
"StartUtc": "2020-02-15T00:00:00Z",
"EndUtc": "2020-02-20T00:00:00Z"
},
"CreatedUtc": {
"StartUtc": "2020-02-05T00:00:00Z",
"EndUtc": "2020-02-15T00:00:00Z"
},
"UpdatedUtc": {
"StartUtc": "2020-02-05T00:00:00Z",
"EndUtc": "2020-02-15T00:00:00Z"
},
"Limitation": {
"Count": 10
}
}

OK

RestrictionResult
object
Restrictions
required

Restrictions of the default service.

Array<object>
Restriction

The added restriction.

object
Id
required

Unique identifier of the restriction.

string format: uuid
ServiceId
required

Unique identifier of the Service.

string format: uuid
ExternalIdentifier

External identifier of the restriction.

string
nullable
Origin
required
Restriction origin

Restriction origin

User (Restriction was created by a user in Mews.)

Integration (Restriction was created by a 3rd-party integration.)

string
Allowed values: User Integration
Conditions
required
Restriction condition

The conditions or rules that must be met by a reservation for the restriction to apply.

object
Type
required
Restriction type

Restriction type.

Stay (Guests can’t stay within specified dates.)

Start (Guests can’t check in within specified dates.)

End (Guests can’t check out within specified dates.)

string
Allowed values: Stay Start End
ExactRateId

Unique identifier of the restricted exact Rate.

string format: uuid
nullable
BaseRateId

Unique identifier of the restricted base Rate.

string format: uuid
nullable
RateGroupId

Unique identifier of the restricted Rate group.

string format: uuid
nullable
ResourceCategoryId

Unique identifier of the restricted Resource category.

string format: uuid
nullable
ResourceCategoryType

Name of the restricted Resource category type.

Room

Bed

Dorm

Apartment

Suite

Villa

Site

Office

MeetingRoom

ParkingSpot

Desk

TeamArea

Membership

Tent

CaravanOrRV

UnequippedCampsite

Bike

ExtraBed

Cot

Crib

ConferenceRoom

Rooftop

Garden

Restaurant

Amphitheater

PrivateSpaces

string
Allowed values: Room Bed Dorm Apartment Suite Villa Site Office MeetingRoom ParkingSpot Desk TeamArea Membership Tent CaravanOrRV UnequippedCampsite Bike ExtraBed Cot Crib ConferenceRoom Rooftop Garden Restaurant Amphitheater PrivateSpaces
StartUtc

Start date of the restriction time interval, specified in ISO 8601 format and adjusted to UTC - see Datetimes for important information on format and implementation.

string
nullable
EndUtc

End date of the restriction time interval, specified in ISO 8601 format and adjusted to UTC - see Datetimes for important information on format and implementation.

string
nullable
Days

The restricted days of week. Defaults to all days when not provided. Ignored when the service uses a time unit longer than a day.

Array<string>
nullable
Hours
Hours

The restricted hours. Defaults to all hours when not provided.

object
Zero
required

Hour 0 enabled

boolean
One
required

Hour 1 enabled

boolean
Two
required

Hour 2 enabled

boolean
Three
required

Hour 3 enabled

boolean
Four
required

Hour 4 enabled

boolean
Five
required

Hour 5 enabled

boolean
Six
required

Hour 6 enabled

boolean
Seven
required

Hour 7 enabled

boolean
Eight
required

Hour 8 enabled

boolean
Nine
required

Hour 9 enabled

boolean
Ten
required

Hour 10 enabled

boolean
Eleven
required

Hour 11 enabled

boolean
Twelve
required

Hour 12 enabled

boolean
Thirteen
required

Hour 13 enabled

boolean
Fourteen
required

Hour 14 enabled

boolean
Fifteen
required

Hour 15 enabled

boolean
Sixteen
required

Hour 16 enabled

boolean
Seventeen
required

Hour 17 enabled

boolean
Eighteen
required

Hour 18 enabled

boolean
Nineteen
required

Hour 19 enabled

boolean
Twenty
required

Hour 20 enabled

boolean
TwentyOne
required

Hour 21 enabled

boolean
TwentyTwo
required

Hour 22 enabled

boolean
TwentyThree
required

Hour 23 enabled

boolean
Exceptions
Restriction exception

The rules that prevent the restriction from applying to a reservation, even when all conditions have been met.

object
MinAdvance

The minimum time before the reservation starts, you can reserve in ISO 8601 duration format.

string
nullable
MaxAdvance

The maximum time before the reservation starts, you can reserve in ISO 8601 duration format.

string
nullable
MinLength

Minimal reservation length in ISO 8601 duration format.

string
nullable
MaxLength

Maximal reservation length in ISO 8601 duration format.

string
nullable
MinPrice
Currency value (ver 2018-06-07)

Value of the minimum price per time unit.

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
MaxPrice
Currency value (ver 2018-06-07)

Value of the maximum price per time unit.

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
Cursor

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.

string format: uuid
nullable
Example
{
"Restrictions": [
{
"Id": "40c24757-c16e-4094-91d3-4ca952e488a1",
"ServiceId": "bd26d8db-86da-4f96-9efc-e5a4654a4a94",
"ExternalIdentifier": "5678",
"Origin": "Integration",
"Conditions": {
"Type": "Stay",
"ExactRateId": "7c7e89d6-69c0-4cce-9d42-35443f2193f3",
"BaseRateId": null,
"RateGroupId": null,
"ResourceCategoryId": "86336EAC-4168-46B1-A544-2A47251BF864",
"ResourceCategoryType": null,
"StartUtc": "2018-10-09T00:00:00Z",
"EndUtc": "2018-10-31T00:00:00Z",
"Days": [
"Saturday",
"Sunday"
]
},
"Exceptions": {
"MinAdvance": null,
"MaxAdvance": null,
"MinLength": "P0M2DT0H0M0S",
"MaxLength": "P0M7DT0H0M0S",
"MinPrice": {
"Value": 50,
"Currency": "EUR"
},
"MaxPrice": {
"Value": 150,
"Currency": "EUR"
}
}
},
{
"Id": "b40ac4a8-f5da-457d-88fe-7a895e1580ab",
"ServiceId": "bd26d8db-86da-4f96-9efc-e5a4654a4a94",
"ExternalIdentifier": "5678",
"Origin": "Integration",
"Conditions": {
"Type": "Start",
"ExactRateId": null,
"BaseRateId": "e5b538b1-36e6-43a0-9f5c-103204c7f68e",
"RateGroupId": null,
"ResourceCategoryId": null,
"ResourceCategoryType": "Room",
"StartUtc": "2018-10-01T00:00:00Z",
"EndUtc": "2018-10-31T00:00:00Z",
"Days": [
"Monday",
"Tuesday",
"Wednesday",
"Thursday",
"Friday"
]
},
"Exceptions": {
"MinAdvance": "P0M1DT0H0M0S",
"MaxAdvance": "P0M3DT0H0M0S",
"MinLength": null,
"MaxLength": null,
"MinPrice": null,
"MaxPrice": null
}
}
],
"Cursor": "b40ac4a8-f5da-457d-88fe-7a895e1580ab"
}

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