Skip to content

Get all rules

POST
/api/connector/v1/rules/getAll

Returns all rules applied with the reservations. Note this operation uses Pagination and supports Portfolio Access Tokens.

RuleFilterParameters
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
Ids
Array<string>
nullable >= 1 items <= 1000 items
ServiceIds
required

Unique identifiers of the Services.

Array<string>
>= 1 items <= 1000 items
UpdatedUtc
TimeFilterInterval
object
StartUtc
string format: date-time
nullable
EndUtc
string format: date-time
nullable
Extent
required
RuleExtent

Extent of data to be returned.

object
RuleActions
boolean
Rates
boolean
RateGroups
boolean
ResourceCategories
boolean
BusinessSegments
boolean
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"
],
"UpdatedUtc": {
"StartUtc": "2023-10-01T00:00:00Z",
"EndUtc": "2023-10-31T00:00:00Z"
},
"Extent": {
"RuleActions": true,
"Rates": true,
"RateGroups": true,
"ResourceCategories": true,
"BusinessSegments": true
},
"Limitation": {
"Count": 10
}
}

OK

RuleResult
object
Rules

Rules used with reservation creations and modifications.

Array<object>
nullable
Rule
object
Id
required

Unique identifier of the rule.

string format: uuid
ServiceId
required

Unique identifier of the Service the rule is assigned to.

string format: uuid
Conditions
RuleConditions

Conditions of the rule.

object
RateId
RuleCondition
object
Value
string
nullable
ConditionType
Any of:
string
Allowed values: Equals NotEquals
RateGroupId
RuleCondition
object
Value
string
nullable
ConditionType
Any of:
string
Allowed values: Equals NotEquals
BusinessSegmentId
RuleCondition
object
Value
string
nullable
ConditionType
Any of:
string
Allowed values: Equals NotEquals
ResourceCategoryId
RuleCondition
object
Value
string
nullable
ConditionType
Any of:
string
Allowed values: Equals NotEquals
ResourceCategoryType
RuleCondition
object
Value
string
nullable
ConditionType
Any of:
string
Allowed values: Equals NotEquals
Origin
RuleCondition
object
Value
string
nullable
ConditionType
Any of:
string
Allowed values: Equals NotEquals
TravelAgencyId
RuleCondition
object
Value
string
nullable
ConditionType
Any of:
string
Allowed values: Equals NotEquals
MinimumTimeUnitCount
integer format: int32
nullable
MaximumTimeUnitCount
integer format: int32
nullable
CreatedUtc
required

Creation date and time of the rule in UTC timezone in ISO 8601 format.

string format: date-time
>= 1 characters
UpdatedUtc
required

Last update date and time of the rule in UTC timezone in ISO 8601 format.

string format: date-time
>= 1 characters
RuleActions

Rule actions applied in rules.

Array<object>
nullable
Rule action
object
Id

Unique identifier of the rule action.

string format: uuid
RuleId

Unique identifier of the rule.

string format: uuid
Data
Data

Additional information about action.

object
Discriminator
string
Allowed values: Product
Value
One of:
RuleActionProductData
object
ActionType
string
nullable
ProductId
string format: uuid
Rates

Rates used in conditions.

Array<object>
nullable
Rate for extent

Rate entity, without some of the details, e.g. pricing.

object
Id
required

Unique identifier of the rate.

string format: uuid
GroupId
required

Unique identifier of Rate Group where the rate belongs.

string format: uuid
ServiceId
required

Unique identifier of the Service.

string format: uuid
BaseRateId

Unique identifier of the base Rate.

string format: uuid
nullable
IsBaseRate
required

Whether the rate is a base rate.

boolean
BusinessSegmentId

Unique identifier of the Business Segment.

string format: uuid
nullable
IsActive
required

Whether the rate is still active.

boolean
IsEnabled
required

Whether the rate is currently available to customers.

boolean
IsPublic
required

Whether the rate is publicly available.

boolean
Type
required
Rate type

Type of the rate.

Public

Private

AvailabilityBlock

string
Allowed values: Public Private AvailabilityBlock
Name

Name of the rate (in the default language).

string
nullable
Names
required
Localized text

All translations of the name.

object
key
additional properties
string
ShortName

Short name of the rate (in the default language).

string
nullable
UpdatedUtc
required

Interval in which the rates were updated.

string format: date-time
>= 1 characters
ExternalNames
Localized text

All translations of the external name of the rate.

object
key
additional properties
string
Description
Localized text

All translations of the description of the rate.

object
key
additional properties
string
ExternalIdentifier

Identifier of the rate from external system.

string
nullable <= 255 characters
RateGroups

Rate groups used in conditions.

Array<object>
nullable
Rate group (ver 2017-04-12)
object
Id

Unique identifier of the rate group.

string format: uuid
ServiceId

Unique identifier of the Service that the rate group belongs to.

string format: uuid
IsActive

Whether the rate group is still active.

boolean
Name

Name of the rate group.

string
nullable
ExternalIdentifier

External identifier of the rate group.

string
nullable <= 255 characters
ResourceCategories

Resource categories used in conditions.

Array<object>
nullable
Resource category
object
Id
required

Unique identifier of the category.

string format: uuid
EnterpriseId
required

Unique identifier of the Enterprise.

string format: uuid
ServiceId
required

Unique identifier of the Service of the resource category.

string format: uuid
IsActive
required

Whether the category is still active.

boolean
Type
required
Resource category type
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
Classification
required
string
Allowed values: StandardSingle StandardDouble SuperiorTwin SuperiorDouble JuniorSuite SharedOrDorm Other SuperiorSingle Triple Family StandardTwin Studio SuperiorTripleRoom OneBedroomApartment ThreeBedroomsApartment TwoBedroomsApartment
Names
required
Localized text

All translations of the name.

object
key
additional properties
string
ShortNames
required
Localized text

All translations of the short name.

object
key
additional properties
string
Descriptions
required
Localized text

All translations of the description.

object
key
additional properties
string
Ordering
required
integer format: int32
Capacity
required
integer format: int32
ExtraCapacity
required

Extra capacity that can be served (e.g. extra bed count).

integer format: int32
ExternalIdentifier

Identifier of the resource category from external system.

string
nullable <= 255 characters
AccountingCategoryId
string format: uuid
nullable
BusinessSegments

Business segments used in conditions.

Array<object>
nullable
Business segment
object
Id
required

Unique identifier of the business segment.

string format: uuid
ServiceId
required

Unique identifier of the Service.

string format: uuid
IsActive
required

Whether the business segment is still active.

boolean
Name
required

Name of the business segment.

string
>= 1 characters
CreatedUtc
required

Creation date and time of the business segment in UTC timezone in ISO 8601 format.

string format: date-time
>= 1 characters
UpdatedUtc
required

Last update date and time of the business segment in UTC timezone in ISO 8601 format.

string format: date-time
>= 1 characters
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
{
"Rules": [
{
"Id": "13638b12-53f1-4b35-baab-ac1e006ed8cb",
"ServiceId": "bd26d8db-86da-4f96-9efc-e5a4654a4a94",
"Conditions": {
"RateId": {
"Value": "8a13f4e8-0274-4bcc-b2d4-ac1c00d1cd3f",
"ConditionType": "Equals"
},
"RateGroupId": null,
"BusinessSegmentId": null,
"ResourceCategoryId": null,
"ResourceCategoryType": null,
"Origin": {
"Value": "Connector",
"ConditionType": "NotEquals"
},
"TravelAgencyId": null,
"MinimumTimeUnitCount": null,
"MaximumTimeUnitCount": null
},
"CreatedUtc": "2023-10-01T11:48:57Z",
"UpdatedUtc": "2023-10-28T11:48:57Z"
}
],
"RuleActions": [
{
"Id": "307e75a6-2cc8-4226-a600-ac1e006fbdb9",
"RuleId": "13638b12-53f1-4b35-baab-ac1e006ed8cb",
"Data": {
"Discriminator": "Product",
"Value": {
"ProductId": "122fd92d-c561-4995-8ebc-ac1c00d1eaa8",
"ActionType": "Add"
}
}
}
],
"Rates": [
{
"Id": "8a13f4e8-0274-4bcc-b2d4-ac1c00d1cd3f",
"GroupId": "e4a9d8d1-5793-4d35-954e-ac1c00d1eaa8",
"ServiceId": "ea80bbca-372f-4550-8e48-ac1c00d1cd20",
"BaseRateId": null,
"IsActive": true,
"IsEnabled": true,
"IsPublic": true,
"Name": "Fully Flexible",
"ShortName": "FF",
"ExternalNames": {}
}
],
"RateGroups": [],
"ResourceCategories": [],
"BusinessSegments": [],
"Cursor": "13638b12-53f1-4b35-baab-ac1e006ed8cb"
}

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