Connector API
Search…
Rules

Get all rules

Returns all rules applied with the reservations.

Request

[PlatformAddress]/api/connector/v1/rules/getAll
1
{
2
"ClientToken": "E0D439EE522F44368DC78E1BFB03710C-D24FB11DBE31D4621C4817E028D9E1D",
3
"AccessToken": "C66EF7B239D24632943D115EDE9CB810-EA00F8FD8294692C940F6B5A8F9453D",
4
"Client": "Sample Client 1.0.0",
5
"ServiceIds": [
6
"bd26d8db-86da-4f96-9efc-e5a4654a4a94"
7
],
8
"Extent":
9
{
10
"RuleActions": true,
11
"Rates": true,
12
"RateGroups": true,
13
"ResourceCategories": true,
14
"BusinessSegments": true
15
}
16
}
Copied!
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
Unique identifiers of the Services.
Extent
required
Extent of data to be 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

1
{
2
"Rules": [
3
{
4
"Id": "13638b12-53f1-4b35-baab-ac1e006ed8cb",
5
"Conditions": {
6
"RateId": {
7
"Value": "8a13f4e8-0274-4bcc-b2d4-ac1c00d1cd3f",
8
"ConditionType": "Equals"
9
},
10
"RateGroupId": null,
11
"BusinessSegmentId": null,
12
"ResourceCategoryId": null,
13
"ResourceCategoryType": null,
14
"Origin": {
15
"Value": "Connector",
16
"ConditionType": "NotEquals"
17
},
18
"MinimumTimeUnitCount": null,
19
"MaximumTimeUnitCount": null
20
}
21
}
22
],
23
"RuleActions": [
24
{
25
"Id": "307e75a6-2cc8-4226-a600-ac1e006fbdb9",
26
"RuleId": "13638b12-53f1-4b35-baab-ac1e006ed8cb",
27
"Data": {
28
"Discriminator": "Product",
29
"Value": {
30
"ProductId": "122fd92d-c561-4995-8ebc-ac1c00d1eaa8",
31
"ActionType": "Add"
32
}
33
}
34
}
35
],
36
"Rates": [
37
{
38
"Id": "8a13f4e8-0274-4bcc-b2d4-ac1c00d1cd3f",
39
"GroupId": "e4a9d8d1-5793-4d35-954e-ac1c00d1eaa8",
40
"ServiceId": "ea80bbca-372f-4550-8e48-ac1c00d1cd20",
41
"BaseRateId": null,
42
"IsActive": true,
43
"IsEnabled": true,
44
"IsPublic": true,
45
"Name": "Fully Flexible",
46
"ShortName": "FF",
47
"ExternalNames": {}
48
}
49
],
50
"RateGroups": [],
51
"ResourceCategories": [],
52
"BusinessSegments": []
53
}
Copied!
Property
Type
Contract
Description
Rules
array of Rule
required
Rules used with reservation creations and modifications.
RuleActions
array of Rule action
required
Rule actions applied in rules.
Rates
array of Rate
required
Rates used in conditions.
RateGroups
array of Rate group
required
Rate groups used in conditions.
ResourceCategories
array of Resource category
required
Resource categories used in conditions.
BusinessSegments
array of Business segment
required
Business segments used in conditions.

Rule

Property
Type
Contract
Description
Id
string
required
Unique identifier of the rule.
Conditions
required
Conditions of the rule.

Rule conditions

Property
Type
Contract
Description
RateId
required
Condition based on Rate.
RateGroupId
required
Condition based on Rate group.
BusinessSegmentId
required
Condition based on Business segment.
ResourceCategoryId
required
Condition based on Resource category.
ResourceCategoryType
required
Condition based on Resource category type.
Origin
required
Condition based on Reservation origin.
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
string Condition type
required
Type of condition.
Value
string
required
Value of the condition depending on the property. E.g. Reservation origin in case of origin condition or unique identifier of a rate in case of rate condition.

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
Structure of object depends on Rule action discriminator.

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.