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.
Request Body
Section titled “Request Body ”object
Token identifying the client application.
Access token of the client application.
Name and version of the client application.
Limitation on the quantity of data returned and optional Cursor for the starting point of data.
object
Unique identifiers of the Enterprises. If not specified, the operation returns data for all enterprises within scope of the Access Token.
Unique identifiers of the Services.
object
Extent of data to be returned.
object
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 }}
Responses
Section titled “ Responses ”OK
object
Rules used with reservation creations and modifications.
object
Unique identifier of the rule.
Unique identifier of the Service the rule is assigned to.
Conditions of the rule.
object
Creation date and time of the rule in UTC timezone in ISO 8601 format.
Last update date and time of the rule in UTC timezone in ISO 8601 format.
Rule actions applied in rules.
object
Unique identifier of the rule action.
Unique identifier of the rule.
Additional information about action.
object
object
Rates used in conditions.
Rate
entity, without some of the details, e.g. pricing.
object
Unique identifier of the rate.
Unique identifier of Rate Group
where the rate belongs.
Unique identifier of the Service
.
Unique identifier of the base Rate
.
Whether the rate is a base rate.
Unique identifier of the Business Segment
.
Whether the rate is still active.
Whether the rate is currently available to customers.
Whether the rate is publicly available.
Type of the rate.
Public
Private
AvailabilityBlock
Name of the rate (in the default language).
All translations of the name.
object
Short name of the rate (in the default language).
Interval in which the rates were updated.
All translations of the external name of the rate.
object
All translations of the description of the rate.
object
Identifier of the rate from external system.
Rate groups used in conditions.
object
Unique identifier of the rate group.
Unique identifier of the Service that the rate group belongs to.
Whether the rate group is still active.
Name of the rate group.
External identifier of the rate group.
Resource categories used in conditions.
object
Unique identifier of the category.
Unique identifier of the Enterprise.
Unique identifier of the Service of the resource category.
Whether the category is still active.
All translations of the name.
object
All translations of the short name.
object
All translations of the description.
object
Extra capacity that can be served (e.g. extra bed count).
Identifier of the resource category from external system.
Business segments used in conditions.
object
Unique identifier of the business segment.
Unique identifier of the Service
.
Whether the business segment is still active.
Name of the business segment.
Creation date and time of the business segment in UTC timezone in ISO 8601 format.
Last update date and time of the business segment in UTC timezone in ISO 8601 format.
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.
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.
object
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).
object
Error caused by usage of invalid ClientToken, AccessToken, or you may not have the necessary permission to use the endpoint.
object
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.
object
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
object
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.
object
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.