Services
Get all services
Returns all services offered by the enterprise. Note this operation uses Pagination and supports Portfolio Access Tokens.
Request
[PlatformAddress]/api/connector/v1/services/getAll
Property | Type | Contract | Description |
---|---|---|---|
| string | required | Token identifying the client application. |
| string | required | Access token of the client application. |
| string | required | Name and version of the client application. |
| array of string | optional, max 1000 items | Unique identifiers of the Enterprises. If not specified, the operation returns the resource categories for all enterprises within scope of the Access Token. |
| array of string | optional, max 1000 items | Unique identifiers of Services. |
| optional, max length 3 months | Interval in which Services was updated. | |
| required | Limitation on the quantity of data returned. |
Response
Property | Type | Contract | Description |
---|---|---|---|
| array of Service | required | Services offered by the enterprise. |
| 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. |
Service
Property | Type | Contract | Description |
---|---|---|---|
| string | required | Unique identifier of the service. |
| string | required | Unique identifier of the Enterprise. |
| string | required | Creation date and time of the service in UTC timezone in ISO 8601 format. |
| string | required | Last update date and time of the service in UTC timezone in ISO 8601 format. |
| boolean | required | Whether the service is still active. |
| string | required | Name of the service. |
| required | Options of the service. | |
| required | Additional information about the specific service. | |
| string | optional, max 255 characters | Identifier of the service from external system. |
Service options
Property | Type | Contract | Description |
---|---|---|---|
| boolean | required | Products should be displayed as a single package instead of individual items. |
Service data
Property | Type | Contract | Description |
---|---|---|---|
| string Service data discriminator | required | Determines type of value. |
| object | required | Structure of object depends on Service data discriminator. |
Service data discriminator
Bookable
- Data specific to a bookable service.Additional
- Data specific to an additional service.
Bookable service data
Property | Type | Contract | Description |
---|---|---|---|
| string | required | Offset from the start of the time unit which defines the default start of the service; expressed in ISO 8601 duration format. |
| string | required | Offset from the end of the time unit which defines the default end of the service; expressed in ISO 8601 duration format. |
| string | required | Offset from the start of the time unit which defines the occupancy start of the service; expressed in ISO 8601 duration format. 'Occupancy start' is used for availability and reporting purposes, it implies the time at which the booked resource is considered occupied. |
| string | required | Offset from the end of the time unit which defines the occupancy end of the service; expressed in ISO 8601 duration format. 'Occupancy end' is used for availability and reporting purposes, it implies the time at which the booked resource is no longer considered occupied. |
| required | The length of time or period represented by a time unit, for which the service can be booked. |
Time unit
Bookable Services are booked in terms of integer multiples of standard time units
. The length of a time unit depends on the particular service and is given by time unit period
, which can be obtained through Get all services. For example, a service with a time unit period of "Day" can be booked in multiples of days. This is equivalent to booking a hotel room stay for a specified number of days or a specified number of nights.
A monthly time unit, i.e. a time unit with time unit period of "Month", starts at midnight on the first day of the month and ends at midnight on the first day of the following month.
The service is not assumed to start at the beginning of a time unit, e.g. 00:00 midnight for a "Day", nor end at the end of a time unit, e.g. the following midnight. Instead we define StartOffset
as the offset from the beginning of the time unit at which the service starts, and EndOffset
as the offset from the end of the time unit at which the service actually ends - see the illustrations below. Similarly, OccupancyStartOffset
and OccupancyEndOffset
define the offsets for which the service is considered occupied.
A positive value for EndOffset
is normal for a nightly stay and implies that the service ends on the following morning. A negative value for EndOffset
can be used to specify a daytime service that ends before the end of the day.
Figure 1: Illustration of a nightly service
Figure 2: Illustration of a daytime service
Time unit period
Hour
Day
Month
...
Additional service data
Property | Type | Contract | Description |
---|---|---|---|
| required | Promotions of the service. |
Promotions
Property | Type | Contract | Description |
---|---|---|---|
| boolean | required | Whether it can be promoted before check-in. |
| boolean | required | Whether it can be promoted after check-in. |
| boolean | required | Whether it can be promoted during stay. |
| boolean | required | Whether it can be promoted before check-out. |
| boolean | required | Whether it can be promoted after check-out. |
| boolean | required | Whether it can be promoted during check-out. |
Get service availability (ver 2024-01-22)
Restricted!This operation is currently in beta-test and as such it is subject to change.
Returns selected availability and occupancy metrics of a bookable service for a specified time interval, similar to the availability & occupancy report. Availability 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 time unit for 2nd Jan
, while Interval 1st Jan 23:00 UTC - 2nd Jan 23:00 UTC
will result in two time units 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 depends on the service's time unit: 367 hours if hours, 367 days if days, or 24 months if months.
Request
[PlatformAddress]/api/connector/v1/services/getAvailability/2024-01-22
Property | Type | Contract | Description |
---|---|---|---|
| string | required | Token identifying the client application. |
| string | required | Access token of the client application. |
| string | required | Name and version of the client application. |
| string | required | Unique identifier of the Service whose availability should be returned. |
| 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. |
| string | required | |
| array of Service availability metrics | required | Set of Service availability metrics to be returned. |
Response
Property | Type | Contract | Description |
---|---|---|---|
| array of string | required | Set of all time units covered by the time interval; expressed in UTC timezone ISO 8601 format. |
| array of Resource category availability | required | Resource category availabilities. |
Service availability metrics
OutOfOrderBlocks
- Number of resources that are out of order for the resource category (resource block).PublicAvailabilityAdjustment
- Number of resources marked as manual availability adjustments.OtherServiceReservationCount
- Number of resources occupied by another service.Occupied
- Number of bookings that have been assigned to the resource category (i.e. reservations and blocks).ConfirmedReservations
- Number of confirmed reservations that have been assigned to the resource category.OptionalReservations
- Number of optional reservations that have been assigned to the resource category.BlockAvailability
- Number of blocked resources (from an availability block / allotment).AllocatedBlockAvailability
- Number of blocked resources that are in a deducting state (from an availability block / allotment).ActiveResources
- Number of active resources.UsableResources
- Number of usable resources (i.e. which are not out of order).…
Resource category availability (ver 2024-01-22)
Property | Type | Contract | Description |
---|---|---|---|
| string | required | Unique identifier of the Resource category. |
| required | Dictionary keys are names of Service availability metrics, values are arrays of integers with metric values for corresponding time unit in |
Get service availability
Returns availability of a bookable service for a specified time interval including applied availability adjustments. Availability 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 depends on the service's time unit: 367 hours if hours, 367 days if days, or 24 months if months.
Request
[PlatformAddress]/api/connector/v1/services/getAvailability
Property | Type | Contract | Description |
---|---|---|---|
| string | required | Token identifying the client application. |
| string | required | Access token of the client application. |
| string | required | Name and version of the client application. |
| string | required | Unique identifier of the Service whose availability should be returned. |
| 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. |
| string | required |
Response
Property | Type | Contract | Description |
---|---|---|---|
| array of Resource category availability | required | Resource category availabilities. |
| array of string | required | Set of all time units covered by the time interval; expressed in UTC timezone ISO 8601 format. |
Resource category availability
Property | Type | Contract | Description |
---|---|---|---|
| string | required | Unique identifier of the Resource category. |
| array of number | required | Absolute availabilities of the resource category in the covered dates. |
| array of number | required | Relative availability adjustments set for resource category in the covered dates. |
Update service availability
Updates the number of available resources in Resource category by a certain amount (relative adjustment). Note that availabilities are defined per time unit, so when the server receives the UTC interval, it first converts it to enterprise timezone and updates the availability on all time units that the interval intersects. It's not allowed to update past availabilities outside of EditableHistoryInterval
, future updates are allowed for up to 5 years.
Request
[PlatformAddress]/api/connector/v1/services/updateAvailability
Property | Type | Contract | Description |
---|---|---|---|
| string | required | Token identifying the client application. |
| string | required | Access token of the client application. |
| string | required | Name and version of the client application. |
| string | required | Unique identifier of the Service to update. |
| array of Availability update | required, max 1000 items | Availability updates. |
Availability update
Property | Type | Contract | Description |
---|---|---|---|
| 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. |
| string | required | |
| string | optional | Unique identifier of the Availability block whose availability to update. |
| string | required | Unique identifier of the Resource category whose availability to update. |
| required | Adjustment value to be applied on the interval, can be both positive and negative (relative adjustment, not an absolute number). If specified without |
Response
Last updated