Connector API
  • Mews Connector API
  • Getting started
  • Usage guidelines
    • Authentication
    • Requests
    • Responses
    • Environments
    • Serialization
    • Pagination
    • Best practices
  • Concepts
    • Multi-property
    • Restrictions
    • Taxation
    • Time units
  • Use cases
    • 'How to' use cases
    • Accounting
    • Customer loyalty
    • Customer management
    • Customer messaging
    • Data export
    • Device integration
    • Events
    • Guest technology
    • Housekeeping
    • Kiosk
    • Mews Payment Terminals
    • Payment automation
    • Point of sale
    • Reputation management
    • Revenue management
    • Upsell
  • API Operations
    • Common objects
    • Accounting categories
    • Accounting items
    • Accounts
    • Account notes
    • Addresses
    • Age categories
    • Availability adjustments
    • Availability blocks
    • Bills
    • Business segments
    • Cancellation policies
    • Cashiers
    • Cashier transactions
    • Commands
    • Companies
    • Companionships
    • Company contracts
    • Configuration
    • Counters
    • Countries
    • Credit cards
    • Currencies
    • Customers
    • Departments
    • Devices
    • Enterprises
    • Exchange rates
    • Exports
    • Identity documents
    • Images
    • Languages
    • Loyalty memberships
    • Loyalty programs
    • Loyalty tiers
    • Messages
    • Message threads
    • Order items
    • Orders
    • Outlet bills
    • Outlet items
    • Outlets
    • Payments
    • Payment requests
    • Preauthorizations
    • Product categories
    • Product service orders
    • Products
    • Rates
    • Rate groups
    • Reservations
    • Reservation groups
    • Resource access tokens
    • Resource blocks
    • Resources
    • Resource categories
    • Resource features
    • Restrictions
    • Routing rules
    • Rules
    • Service order notes
    • Service overbooking limits
    • Services
    • Source assignments
    • Sources
    • Tasks
    • Tax environments
    • Taxations
    • Vouchers
    • Voucher codes
  • API Events
    • Ways to communicate
    • General Webhooks
    • Integration Webhooks
    • Webhooks FAQ
    • WebSockets
  • Your integration journey
    • Certification
  • Deprecations
    • Migration guide: Get all reservations
  • Changelog
    • Changelog 2024
    • Changelog 2023
    • Changelog 2022
    • Changelog 2021
    • Changelog 2020
    • Changelog 2019
    • Changelog 2018
    • Changelog 2017
    • Changelog 2016
Powered by GitBook
On this page
  • Get all rules
  • Request
  • Response

Was this helpful?

  1. API Operations

Rules

PreviousRouting rulesNextService order notes

Last updated 4 months ago

Was this helpful?

Get all rules

Returns all rules applied with the reservations. Note this operation uses and supports .

Request

[PlatformAddress]/api/connector/v1/rules/getAll

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

ServiceIds

array of string

required, max 1000 items

UpdatedUtc

optional, max length 3 months

Extent

required

Extent of data to be returned.

Limitation

required

Limitation on the quantity of data returned.

Rule extent

Property
Type
Contract
Description

RuleActions

bool

optional

Whether the response should contain rule actions.

Rates

bool

optional

Whether the response should contain rates.

RateGroups

bool

optional

Whether the response should contain rate groups.

ResourceCategories

bool

optional

Whether the response should contain rate resource categories.

BusinessSegments

bool

optional

Whether the response should contain business segments.

Response

{
    "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"
}
Property
Type
Contract
Description

Rules

required

Rules used with reservation creations and modifications.

RuleActions

required

Rule actions applied in rules.

Rates

required

Rates used in conditions.

RateGroups

required

Rate groups used in conditions.

ResourceCategories

required

Resource categories used in conditions.

BusinessSegments

required

Business segments used in conditions.

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.

Rule

Property
Type
Contract
Description

Id

string

required

Unique identifier of the rule.

ServiceId

string

required

Conditions

required

Conditions of the rule.

CreatedUtc

string

required

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

UpdatedUtc

string

required

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

Rule conditions

Property
Type
Contract
Description

RateId

required

RateGroupId

required

BusinessSegmentId

required

ResourceCategoryId

required

ResourceCategoryType

required

Origin

required

TravelAgencyId

required

MinimumTimeUnitCount

string

required

Condition based on minimum amount of time units.

MaximumTimeUnitCount

string

required

Condition based on maximum amount of time units.

Rule condition

Property
Type
Contract
Description

ConditionType

required

Type of condition.

Value

string

required

Condition type

  • Equals

  • NotEquals

Rule action

Property
Type
Contract
Description

Id

string

required

Unique identifier of the rule action.

RuleId

string

required

Unique identifier of the rule.

Data

optional

Additional information about action.

Rule action data

Property
Type
Contract
Description

Discriminator

required

Determines type of value.

Value

object

required

Rule action discriminator

  • Product - Data specific to a product.

Rule action product data

Property
Type
Contract
Description

ProductId

string

required

Unique identifier of product.

ActionType

required

Action of rule.

Product action type

  • Add - Adds specified item.

  • Delete - Deletes specified item.

Unique identifiers of the .

Interval in which was updated.

array of

array of

array of

array of

array of

array of

Unique identifier of the the rule is assigned to.

Condition based on .

Condition based on .

Condition based on .

Condition based on .

Condition based on .

Condition based on .

Condition based on .

string

Value of the condition depending on the property. E.g. in case of origin condition or unique identifier of a rate in case of rate condition.

string

Structure of object depends on .

string

Pagination
Portfolio Access Tokens
Rule
Rule extent
Rule
Rule action
Rule conditions
Rule condition
Rule condition
Rule condition
Rule condition
Rule condition
Rule condition
Rule condition
Condition type
RuleActionData
Rule action discriminator
Rule action discriminator
Product action type
Limitation
Business segment
Business segment
Resource category
Resource category
Resource category type
Time interval
Services
Service
Reservation origin
Reservation origin
Company
Rate
Rate group
Rate
Rate group