Connector API
Search…
Rates

Get all rates

Returns all rates (pricing setups) and rate groups (condition settings) of the default service provided by the enterprise.

Request

[PlatformAddress]/api/connector/v1/rates/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
"Rates": true,
10
"RateGroups": true
11
}
12
}
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 rates are requested.
Extent
required
Extent of data to be returned.

Rate extent

Property
Type
Contract
Description
Rates
bool
optional
Whether the response should contain rates.
RateGroups
bool
optional
Whether the response should contain rate groups.
RateRestrictions
bool
optional
Whether the response should contain rate restrictions.

Response

1
{
2
"Rates": [
3
{
4
"BaseRateId": null,
5
"GroupId": "c8b866b3-be2e-4a47-9486-034318e9f393",
6
"Id": "ed4b660b-19d0-434b-9360-a4de2ea42eda",
7
"ServiceId": "bd26d8db-86da-4f96-9efc-e5a4654a4a94",
8
"IsActive": true,
9
"IsEnabled": true,
10
"IsPublic": true,
11
"Name": "Fully Flexible",
12
"ShortName": "FF",
13
"ExternalNames": {
14
"en-US": "Long Stay Flexible Rate"
15
}
16
}
17
],
18
"RateGroups": [
19
{
20
"Id": "c8b866b3-be2e-4a47-9486-034318e9f393",
21
"ServiceId": "bd26d8db-86da-4f96-9efc-e5a4654a4a94",
22
"IsActive": true,
23
"Name": "Default"
24
}
25
]
26
}
Copied!
Property
Type
Contract
Description
Rates
array of Rate
required
Rates of the default service.
RateGroups
array of Rate group
required
Rate groups of the default service.

Rate

Property
Type
Contract
Description
Id
string
required
Unique identifier of the rate.
GroupId
string
required
Unique identifier of Rate group where the rate belongs.
BaseRateId
string
required
Unique identifier of the base Rate.
ServiceId
string
required
Unique identifier of the Service.
IsActive
boolean
required
Whether the rate is still active.
IsEnabled
boolean
required
Whether the rate is currently available to customers.
IsPublic
boolean
required
Whether the rate is publicly available.
Name
string
required
Name of the rate.
ShortName
string
required
Short name of the rate.
ExternalNames
required
All translations of the external name of the rate.

Rate group

Property
Type
Contract
Description
Id
string
required
Unique identifier of the group.
ServiceId
string
required
Unique identifier of the Service.
IsActive
boolean
required
Whether the rate group is still active.
Name
string
required
Name of the rate group.

Get rate pricing

Returns prices for a given rate for a specified time interval. Prices will be returned for all service time units that the specified time interval intersects. So, for example, an interval 1st Jan 23:00 UTC - 1st Jan 23:00 UTC will result in one price for 2nd Jan, while Interval 1st Jan 23:00 UTC - 2nd Jan 23:00 UTC will result in two prices for 2nd Jan and 3rd Jan (assuming a time unit period of "Day"). UTC timestamps must correspond to the start boundary of a time unit, e.g. 00:00 converted to UTC for a time unit of "Day". Other timestamps are not permitted. The maximum size of time interval is 100 time units or 2 years, whichever is the shorter amount of time.
The price in the response is dependent on the enterprise's pricing setting. If the enterprise is set to a Gross pricing environment, then the price returned is the gross price (inclusive of tax). If the enterprise is set to a Net pricing environment, the price returned is the net price (excluding tax).

Request

[PlatformAddress]/api/connector/v1/rates/getPricing
1
{
2
"ClientToken": "E0D439EE522F44368DC78E1BFB03710C-D24FB11DBE31D4621C4817E028D9E1D",
3
"AccessToken": "C66EF7B239D24632943D115EDE9CB810-EA00F8FD8294692C940F6B5A8F9453D",
4
"Client": "Sample Client 1.0.0",
5
"RateId": "ed4b660b-19d0-434b-9360-a4de2ea42eda",
6
"FirstTimeUnitStartUtc": "2022-01-01T23:00:00.000Z",
7
"LastTimeUnitStartUtc": "2022-01-03T23:00:00.000Z"
8
}
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.
RateId
string
required
Unique identifier of the Rate whose prices should be returned.
FirstTimeUnitStartUtc
string
required
Start of the time interval, expressed as the timestamp for the start of the first time unit, in UTC timezone ISO 8601 format. The maximum size of time interval is 100 time units or 2 years, whichever is the shorter amount of time.
LastTimeUnitStartUtc
string
required
End of the time interval, expressed as the timestamp for the start of the last time unit, in UTC timezone ISO 8601 format. The maximum size of time interval is 100 time units or 2 years, whichever is the shorter amount of time.

Response

1
{
2
"Currency": "EUR",
3
"BasePrices": [ 20, 20, 20 ],
4
"CategoryAdjustments": [
5
{
6
"AbsoluteValue": 0,
7
"CategoryId": "34c29e73-c8db-4e93-b51b-981e42655e03",
8
"ParentCategoryId": null,
9
"RelativeValue": 0.2
10
},
11
{
12
"AbsoluteValue": 50,
13
"CategoryId": "a0a7a5c5-c4ef-494a-8b34-6cca97629076",
14
"ParentCategoryId": "34c29e73-c8db-4e93-b51b-981e42655e03",
15
"RelativeValue": 0
16
}
17
],
18
"CategoryPrices": [
19
{
20
"CategoryId": "e3aa3117-dff0-46b7-b49a-2c0391e70ff9",
21
"Prices": [ 20, 20, 20 ]
22
}
23
],
24
"TimeUnitStartsUtc": [
25
"2022-01-01T23:00:00Z",
26
"2022-01-02T23:00:00Z",
27
"2022-01-03T23:00:00Z"
28
]
29
}
Copied!
Property
Type
Contract
Description
Currency
string
required
ISO-4217 code of the Currency.
TimeUnitStartsUtc
array of string
required
Set of all time units covered by the time interval; expressed in UTC timezone ISO 8601 format.
BasePrices
array of number
required
Base prices of the rates for each time unit covered by the time interval.
CategoryPrices
required
Resource category prices.
CategoryAdjustments
required
Resource category adjustments.
RelativeAdjustment
decimal
required
Specific amount which shows the difference between this rate and the base rate.
AbsoluteAdjustment
decimal
required
Relative amount which shows the difference between this rate and the base rate.
EmptyUnitAdjustment
decimal
required
Price adjustment for when the resource booked with this rate is not full to capacity.
ExtraUnitAdjustment
decimal
required
Price adjustment for when the resource booked with this rate exceeds capacity.

Resource category pricing

Property
Type
Contract
Description
CategoryId
string
required
Unique identifier of the Resource category.
Prices
array of number
required
Prices of the rate for the resource category in the covered dates.

Resource category adjustment

Property
Type
Contract
Description
CategoryId
string
required
Unique identifier of the adjustment Resource category.
ParentCategoryId
string
optional
Unique identifier of the parent Resource category that serves as a base price for the current category.
RelativeValue
number
required
Relative value of the adjustment (e.g. 0.5 represents 50% increase).
AbsoluteValue
number
required
Absolute value of the adjustment (e.g. 50 represents 50 EUR in case the rate currency is EUR).

Update rate price

Updates the prices for a given rate. You can make multiple price updates with one API call, and for each one specify the time interval for which the update applies, the price value and the applicable resource category. The price will be updated for all service time units that the specified time interval intersects. The price is per time unit, e.g. per day or per month. If the resource category CategoryId is not specified, the updated price will apply to the base price for all resource categories.
Note that prices are defined daily, so when the server receives the UTC interval, it first converts it to the enterprise timezone and updates the price on all dates that the interval intersects. Only root rates can be updated (the rates that have no base rate, that have BaseRateId set to null). It is not permitted to update historical prices older than specified by EditableHistoryInterval. Future prices may be updated up to 5 years in the future. The maximum size of time interval is 100 time units or 2 years, whichever is the shorter amount of time.

Request

[PlatformAddress]/api/connector/v1/rates/updatePrice
1
{
2
"ClientToken": "E0D439EE522F44368DC78E1BFB03710C-D24FB11DBE31D4621C4817E028D9E1D",
3
"AccessToken": "C66EF7B239D24632943D115EDE9CB810-EA00F8FD8294692C940F6B5A8F9453D",
4
"Client": "Sample Client 1.0.0",
5
"RateId": "ed4b660b-19d0-434b-9360-a4de2ea42eda",
6
"PriceUpdates": [
7
{
8
"FirstTimeUnitStartUtc": "2022-01-01T23:00:00.000Z",
9
"LastTimeUnitStartUtc": "2022-01-03T23:00:00.000Z",
10
"Value": 111
11
},
12
{
13
"CategoryId": "e3aa3117-dff0-46b7-b49a-2c0391e70ff9",
14
"FirstTimeUnitStartUtc": "2022-01-04T23:00:00.000Z",
15
"LastTimeUnitStartUtc": "2022-01-05T23:00:00.000Z",
16
"Value": 222
17
}
18
]
19
}
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.
RateId
string
required
Unique identifier of the base Rate to update.
PriceUpdates
array of Price update
required, max 1000 items
Price updates.

Price update

Property
Type
Contract
Description
CategoryId
string
optional
Unique identifier of the Resource category whose prices to update. If not specified, base price is updated.
FirstTimeUnitStartUtc
string
required
Start of the time interval, expressed as the timestamp for the start of the first time unit, in UTC timezone ISO 8601 format. The maximum size of time interval is 100 time units or 2 years, whichever is the shorter amount of time.
LastTimeUnitStartUtc
string
required
End of the time interval, expressed as the timestamp for the start of the last time unit, in UTC timezone ISO 8601 format. The maximum size of time interval is 100 time units or 2 years, whichever is the shorter amount of time.
Value
number
optional
New value of the rate on the interval. If not specified, removes all adjustments within the interval.

Response

1
{}
Copied!