Connector API
Search…
Restrictions

Get all restrictions

Returns all restrictions of the default service provided by the enterprise.

Request

[PlatformAddress]/api/connector/v1/restrictions/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
"ResourceCategoryIds": [
9
"34c29e73-c8db-4e93-b51b-981e42655e03"
10
],
11
"RateIds": [
12
"ed4b660b-19d0-434b-9360-a4de2ea42eda"
13
],
14
"CollidingUtc": {
15
"StartUtc": "2020-02-15T00:00:00Z",
16
"EndUtc": "2020-02-20T00:00:00Z"
17
},
18
"CreatedUtc": {
19
"StartUtc": "2020-02-05T00:00:00Z",
20
"EndUtc": "2020-02-15T00:00:00Z"
21
},
22
"UpdatedUtc": {
23
"StartUtc": "2020-02-05T00:00:00Z",
24
"EndUtc": "2020-02-15T00:00:00Z"
25
}
26
}
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 from which the restrictions are requested.
ResourceCategoryIds
array of string
optional, max 1000 items
Unique identifiers of Resource categories.
RateIds
array of string
optional, max 1000 items
Unique identifiers of Rates. Returns all restrictions that affect given rates (i.e. ones without any Conditions, ones assigned directly to specified rates, ones assigned to Rate group of specified rates, or ones inherited from base rates).
BaseRateIds
array of string
optional, max 1000 items
Unique identifiers of Rates. Returns only those restrictions which have matching BaseRateId set in Conditions.
ExactRateIds
array of string
optional, max 1000 items
Unique identifiers of Rates. Returns only those restrictions which have matching ExactRateId set in Conditions.
CollidingUtc
optional, max length 3 months
Interval in which the Restriction is active. Required if no other filter is provided.
CreatedUtc
optional, max length 3 months
Interval in which the Restriction was created.
UpdatedUtc
optional, max length 3 months
Interval in which the Restriction was updated.

Time interval

Property
Type
Contract
Description
StartUtc
string
required
Start of the interval in UTC timezone in ISO 8601 format.
EndUtc
string
required
End of the interval in UTC timezone in ISO 8601 format.

Response

1
{
2
"Restrictions": [
3
{
4
"Id": "40c24757-c16e-4094-91d3-4ca952e488a1",
5
"ServiceId": "bd26d8db-86da-4f96-9efc-e5a4654a4a94",
6
"ExternalIdentifier": "5678",
7
"Conditions": {
8
"Type": "Stay",
9
"ExactRateId": "7c7e89d6-69c0-4cce-9d42-35443f2193f3",
10
"BaseRateId": null,
11
"RateGroupId": null,
12
"ResourceCategoryId": "86336EAC-4168-46B1-A544-2A47251BF864",
13
"ResourceCategoryType": null,
14
"StartUtc": "2018-10-09T00:00:00Z",
15
"EndUtc": "2018-10-31T00:00:00Z",
16
"Days": [
17
"Saturday",
18
"Sunday"
19
]
20
},
21
"Exceptions": {
22
"MinAdvance": null,
23
"MaxAdvance": null,
24
"MinLength": "P0M2DT0H0M0S",
25
"MaxLength": "P0M7DT0H0M0S",
26
"MinPrice": {
27
"Value": 50,
28
"Currency": "EUR"
29
},
30
"MaxPrice": {
31
"Value": 150,
32
"Currency": "EUR"
33
}
34
}
35
},
36
{
37
"Id": "b40ac4a8-f5da-457d-88fe-7a895e1580ab",
38
"ServiceId": "bd26d8db-86da-4f96-9efc-e5a4654a4a94",
39
"ExternalIdentifier": "5678",
40
"Conditions": {
41
"Type": "Start",
42
"ExactRateId": null,
43
"BaseRateId": "e5b538b1-36e6-43a0-9f5c-103204c7f68e",
44
"RateGroupId": null,
45
"ResourceCategoryId": null,
46
"ResourceCategoryType": "Room",
47
"StartUtc": "2018-10-01T00:00:00Z",
48
"EndUtc": "2018-10-31T00:00:00Z",
49
"Days": [
50
"Monday",
51
"Tuesday",
52
"Wednesday",
53
"Thursday",
54
"Friday"
55
]
56
},
57
"Exceptions": {
58
"MinAdvance": "P0M1DT0H0M0S",
59
"MaxAdvance": "P0M3DT0H0M0S",
60
"MinLength": null,
61
"MaxLength": null,
62
"MinPrice": null,
63
"MaxPrice": null
64
}
65
}
66
]
67
}
Copied!
Property
Type
Contract
Description
Restrictions
array of Restriction
required
Restrictions of the default service.

Restriction

Property
Type
Contract
Description
Id
string
required
Unique identifier of the restriction.
ServiceId
string
required
Unique identifier of the Service.
ExternalIdentifier
string
optional
External identifier of the restriction.
Conditions
string
required
Conditions are rules that must be met by a reservation for the restriction to apply.
Exceptions
string
optional
Exceptions are rules that prevent the restriction from applying to a reservation, even when all conditions have been met.

Restriction Conditions

Property
Type
Contract
Description
Type
string
required
ExactRateId
string
optional
Unique identifier of the restricted exact Rate.
BaseRateId
string
optional
Unique identifier of the restricted base Rate.
RateGroupId
string
optional
Unique identifier of the restricted Rate group.
ResourceCategoryId
string
optional
Unique identifier of the restricted Resource category.
ResourceCategoryType
string
optional
Name of the restricted Resource category type.
StartUtc
string
optional
Start of the restricted interval in UTC timezone in ISO 8601 format.
EndUtc
string
optional
End of the restricted interval in UTC timezone in ISO 8601 format.
Days
array of string Day
optional
The restricted days of week. Will automatically be set to all values when not provided or when the service uses a time unit longer than a day.

Restriction Exceptions

Property
Type
Contract
Description
MinAdvance
string
optional
The minimum time before the reservation starts, you can reserve in ISO 8601 duration format.
MaxAdvance
string
optional
The maximum time before the reservation starts, you can reserve in ISO 8601 duration format.
MinLength
string
optional
Minimal reservation length in ISO 8601 duration format.
MaxLength
string
optional
Maximal reservation length in ISO 8601 duration format.
MinPrice
optional
Value of the minimum price per time unit.
MaxPrice
optional
Value of the maximum price per time unit.

Day

  • Monday
  • Tuesday
  • Wednesday
  • Thursday
  • Friday
  • Saturday
  • Sunday

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.

Add restrictions

Adds new restrictions with the specified conditions.

Request

[PlatformAddress]/api/connector/v1/restrictions/add
1
{
2
"ClientToken": "E0D439EE522F44368DC78E1BFB03710C-D24FB11DBE31D4621C4817E028D9E1D",
3
"AccessToken": "C66EF7B239D24632943D115EDE9CB810-EA00F8FD8294692C940F6B5A8F9453D",
4
"ServiceId": "bd26d8db-86da-4f96-9efc-e5a4654a4a94",
5
"Restrictions": [
6
{
7
"Identifier": "1234",
8
"ExternalIdentifier": "5678",
9
"Conditions": {
10
"Type": "Start",
11
"ExactRateId": "7c7e89d6-69c0-4cce-9d42-35443f2193f3",
12
"ResourceCategoryId": "86336EAC-4168-46B1-A544-2A47251BF864",
13
"Days": [
14
"Friday",
15
"Saturday",
16
"Sunday"
17
]
18
},
19
"Exceptions": {
20
"MinLength": "P0M2DT0H0M0S",
21
"MaxLength": "P0M7DT0H0M0S",
22
}
23
},
24
{
25
"Identifier": "1235",
26
"ExternalIdentifier": "5678",
27
"Conditions": {
28
"Type": "Start",
29
"BaseRateId": "e5b538b1-36e6-43a0-9f5c-103204c7f68e",
30
"Days": [
31
"Friday",
32
"Saturday",
33
"Sunday"
34
]
35
},
36
"Exceptions": {
37
"MinAdvance": "P0Y0M1DT0H0M0S",
38
"MaxAdvance": "P0Y0M3DT0H0M0S"
39
}
40
}
41
]
42
}
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.
ServiceId
string
required
Unique identifier of the Service restrictions will be added in.
Restrictions
required
Parameters of restrictions.

Restriction parameters

Property
Type
Contract
Description
Identifier
string
optional
Identifier of the restriction within the transaction.
ExternalIdentifier
string
optional
External identifier of the restriction.
Conditions
string
required
Conditions are rules that must be met by a reservation for the restriction to apply.
Exceptions
string
optional
Exceptions are rules that prevent the restriction from applying to a reservation, even when all conditions have been met.

Response

1
{
2
"Restrictions": [
3
{
4
"Identifier": "1234",
5
"Restriction": {
6
"Id": "40c24757-c16e-4094-91d3-4ca952e488a1",
7
"ServiceId": "bd26d8db-86da-4f96-9efc-e5a4654a4a94",
8
"ExternalIdentifier": "5678",
9
"Conditions": {
10
"Type": "Stay",
11
"ExactRateId": "7c7e89d6-69c0-4cce-9d42-35443f2193f3",
12
"BaseRateId": null,
13
"RateGroupId": null,
14
"ResourceCategoryId": "86336EAC-4168-46B1-A544-2A47251BF864",
15
"ResourceCategoryType": null,
16
"StartUtc": "2018-10-09T00:00:00Z",
17
"EndUtc": "2018-10-31T00:00:00Z",
18
"Days": [
19
"Saturday",
20
"Sunday"
21
]
22
},
23
"Exceptions": {
24
"MinAdvance": null,
25
"MaxAdvance": null,
26
"MinLength": "P0M2DT0H0M0S",
27
"MaxLength": "P0M7DT0H0M0S",
28
"MinPrice": null,
29
"MaxPrice": null
30
}
31
}
32
},
33
{
34
"Identifier": "1235",
35
"Restriction": {
36
"Id": "b40ac4a8-f5da-457d-88fe-7a895e1580ab",
37
"ServiceId": "bd26d8db-86da-4f96-9efc-e5a4654a4a94",
38
"ExternalIdentifier": "5678",
39
"Conditions": {
40
"Type": "Start",
41
"ExactRateId": null,
42
"BaseRateId": "e5b538b1-36e6-43a0-9f5c-103204c7f68e",
43
"RateGroupId": null,
44
"ResourceCategoryId": null,
45
"ResourceCategoryType": "Room",
46
"StartUtc": "2018-10-01T00:00:00Z",
47
"EndUtc": "2018-10-31T00:00:00Z",
48
"Days": [
49
"Monday",
50
"Tuesday",
51
"Wednesday",
52
"Thursday",
53
"Friday"
54
]
55
},
56
"Exceptions": {
57
"MinAdvance": "P0M1DT0H0M0S",
58
"MaxAdvance": "P0M3DT0H0M0S",
59
"MinLength": null,
60
"MaxLength": null,
61
"MinPrice": null,
62
"MaxPrice": null
63
}
64
}
65
}
66
]
67
}
Copied!
Property
Type
Contract
Description
Restrictions
array of Added restriction
required
The added restrictions.

Added restriction

Property
Type
Contract
Description
Identifier
string
optional
Identifier of the restriction within the transaction.
Restriction
required
The added restriction.

Delete restrictions

Removes restrictions from the service.

Request

[PlatformAddress]/api/connector/v1/restrictions/delete
1
{
2
"ClientToken": "E0D439EE522F44368DC78E1BFB03710C-D24FB11DBE31D4621C4817E028D9E1D",
3
"AccessToken": "C66EF7B239D24632943D115EDE9CB810-EA00F8FD8294692C940F6B5A8F9453D",
4
"Client": "Sample Client 1.0.0",
5
"RestrictionIds": [
6
"af4949ce-c061-4f27-89f9-5a6a9ef725a7",
7
"e2f8aa29-0c09-4097-801c-7888c9fb57ae"
8
]
9
}
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.
RestrictionIds
array of string
required
Unique identifiers of the Restrictions.

Response

1
{}
Copied!
Last modified 9d ago