Services

Get all services

Returns all services offered by the enterprise.

Request

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

{
"ClientToken": "E0D439EE522F44368DC78E1BFB03710C-D24FB11DBE31D4621C4817E028D9E1D",
"AccessToken": "C66EF7B239D24632943D115EDE9CB810-EA00F8FD8294692C940F6B5A8F9453D",
"Client": "Sample Client 1.0.0"
}

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.

Response

{
"Services": [
{
"Id": "fc79a518-bc69-45b8-93bd-83326201bd14",
"IsActive": true,
"Name": "Restaurant",
"Data": {
"Discriminator": "Additional",
"Value": {
"Promotions": {
"BeforeCheckIn": false,
"AfterCheckIn": false,
"DuringStay": false,
"BeforeCheckOut": false,
"AfterCheckOut": false,
"DuringCheckOut": false
}
}
}
},
{
"Id": "bd26d8db-86da-4f96-9efc-e5a4654a4a94",
"IsActive": true,
"Name": "Accommodation",
"Data": {
"Discriminator": "Bookable",
"Value": {
"StartOffset": "P0M0DT15H0M0S",
"EndOffset": "P0M0DT12H0M0S",
"OccupancyStartOffset": "P0M0DT15H0M0S",
"OccupancyEndOffset": "P0M0DT12H0M0S",
"TimeUnit": "Day"
}
}
}
]
}

Property

Type

Contract

Description

Services

array of Service

required

Services offered by the enterprise.

Service

Property

Type

Contract

Description

Id

string

required

Unique identifier of the service.

IsActive

boolean

required

Whether the service is still active.

Name

string

required

Name of the service.

Data

Service data

required

Additional information about the specific service.

Service data

Property

Type

Contract

Description

Discriminator

string Service data discriminator

required

Determines type of value.

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

StartOffset

string

required

Offset from the start of the time unit defining the default start of the service orders in ISO 8601 duration format.

EndOffset

string

required

Offset from the end of the time unit defining the default end of the service orders in ISO 8601 duration format.

OccupancyStartOffset

string

required

Offset from the start of the time unit defining the occupancy start of the service in ISO 8601 duration format that is considered regarding the availability and reporting.

OccupancyEndOffset

string

required

Offset from the end of the time unit defining the occupancy end of the service in ISO 8601 duration format that is considered regarding the availability and reporting.

TimeUnit

Time unit

required

Time unit of the service.

Time units represent a fixed, finite time interval: a minute, a day, a month, etc. A Time unit defines the operable periods for a bookable service. We currently only support the Day unit. We think of the daily time unit as the physical time unit that starts at midnight and ends at midnight the following day.

Start offsets are anchored to the start of the time unit and end offsets are anchored to the end of the time unit. StartOffset and EndOffset define the default start and end of the service (so, the service orders). OccupancyStartOffset and OccupancyEndOffset define the time where the space is considered occupied in Mews.

Positive end offsets of the daily time unit define the nightly service as depicted in the diagram below.

Negative or zero end offsets of the daily time unit define the daily service as depicted on the picture below.

Time unit

  • Day

  • ...

Additional service data

Property

Type

Contract

Description

Promotions

Promotions

required

Promotions of the service.

Promotions

Property

Type

Contract

Description

BeforeCheckIn

boolean

required

Whether it can be promoted before check-in.

AfterCheckIn

boolean

required

Whether it can be promoted after check-in.

DuringStay

boolean

required

Whether it can be promoted during stay.

BeforeCheckOut

boolean

required

Whether it can be promoted before check-out.

AfterCheckOut

boolean

required

Whether it can be promoted after check-out.

DuringCheckOut

boolean

required

Whether it can be promoted during check-out.

Get all availability blocks

Returns all availability blocks filtered by services, unique identifiers and other filters.

Request

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

{
"ClientToken": "E0D439EE522F44368DC78E1BFB03710C-D24FB11DBE31D4621C4817E028D9E1D",
"AccessToken": "C66EF7B239D24632943D115EDE9CB810-EA00F8FD8294692C940F6B5A8F9453D",
"Client": "Sample Client 1.0.0",
"AvailabilityBlockIds": [
"aaaa654a4a94-4f96-9efc-86da-bd26d8db"
],
"ServiceIds": [
"bd26d8db-86da-4f96-9efc-e5a4654a4a94"
],
"CreatedUtc" : {
"StartUtc": "2020-11-04T00:00:00Z",
"EndUtc": "2020-11-05T00:00:00Z"
},
"UpdatedUtc" : {
"StartUtc": "2020-11-04T00:00:00Z",
"EndUtc": "2020-11-05T00:00:00Z"
},
"CollidingUtc" : {
"StartUtc": "2020-11-05T00:00:00Z",
"EndUtc": "2020-11-05T00:00:00Z"
},
"ExternalIdentifiers": [
"Block-0001"
],
"Extent": {
"AvailabilityBlocks": true,
"Adjustments": true,
"ServiceOrders": false
}
}

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.

AvailabilityBlockIds

string

optional, max 1000 items

Unique identifiers of the requested Availability blocks.

ServiceIds

string

optional, max 1000 items

Unique identifiers of the Services to which Availability blocks are assigned.

CreatedUtc

Time interval

optional, max length 3 months

Interval in which the Availability blocks were created.

UpdatedUtc

Time interval

optional, max length 3 months

Interval in which the Availability blocks were updated.

CollidingUtc

Time interval

optional, max length 3 months

Interval in which the Availability blocks are active.

ExternalIdentifiers

string

optional, max 1000 items

Identifiers of Availability blocks from external systems

Extent

Availability block extent

required

Extent of data to be returned. E.g. it is possible to specify that related service orders (for example Reservations) are returned.

Availability block extent

Property

Type

Contract

Description

AvailabilityBlocks

bool

optional

Whether the response should contain the general availability blocks.

Adjustments

bool

optional

Whether the response should contain individual availability adjustments related to availability blocks.

ServiceOrders

bool

optional

Whether the response should contain reservations related to availability blocks.

Response

{
"AvailabilityBlocks": [
{
"Id": "aaaa654a4a94-4f96-9efc-86da-bd26d8db",
"ServiceId": "bd26d8db-86da-4f96-9efc-e5a4654a4a94",
"RateId": "ed4b660b-19d0-434b-9360-a4de2ea42eda",
"StartUtc": "2020-11-05T00:00:00Z",
"EndUtc": "2020-11-06T00:00:00Z",
"ReleasedUtc": "2020-11-04T00:00:00Z",
"ExternalIdentifier": "Block-0001"
}
],
"ServiceOrders": [
{
"Id": "5281b551-bd90-4def-b211-acbd00d3ac8c",
"ServiceId": "bd26d8db-86da-4f96-9efc-e5a4654a4a94",
"GroupId": "edad92db-0b60-4b91-a090-acbd00d3ac75",
"Number": "61",
"ChannelNumber": "68845CDD-1340-49B5-9071-ACBD00B1D091",
"ChannelManagerNumber": null,
"ChannelManagerGroupNumber": null,
"ChannelManager": null,
"State": "Confirmed",
"Origin": "Connector",
"CreatedUtc": "2020-11-05T12:50:40Z",
"UpdatedUtc": "2020-11-06T07:59:19Z",
"CancelledUtc": null,
"StartUtc": "2020-11-05T00:00:00Z",
"EndUtc": "2020-11-06T00:00:00Z",
"ReleasedUtc": null,
"RequestedCategoryId": "1268c440-21c5-415d-bf58-ac87008b2bda",
"AssignedResourceId": "f97a6b96-b17f-421f-9b97-ac87008b3324",
"AssignedResourceLocked": false,
"BusinessSegmentId": null,
"CompanyId": null,
"TravelAgencyId": null,
"AvailabilityBlockId": "aaaa654a4a94-4f96-9efc-86da-bd26d8db",
"RateId": "ed4b660b-19d0-434b-9360-a4de2ea42eda",
"VoucherId": null,
"AdultCount": 2,
"ChildCount": 0,
"CustomerId": "c2730cbc-53ca-440d-8b30-ac87008b30af",
"CompanionIds": []
}
],
"Adjustments": [
{
"AvailabilityBlockId": "aaaa654a4a94-4f96-9efc-86da-bd26d8db",
"ResourceCategoryId": "1268c440-21c5-415d-bf58-ac87008b2bda",
"StartUtc": "2020-11-05T23:00:00Z",
"EndUtc": "2020-11-06T23:00:00Z",
"UnitCount": 6
}
]
}

Property

Type

Contract

Description

AvailabilityBlocks

array of Availability block

optional

Availability blocks.

ServiceOrders

array of Reservation

optional

Service orders (for example Reservations) linked to availability blocks.

Adjustments

array of Availability block adjustment

optional

Availability adjustments of availability blocks.

Availability block

Property

Type

Contract

Description

Id

string

required

Unique identifier of the availability block.

ServiceId

string

required

Unique identifier of the Service the block is assigned to.

RateId

string

required

Unique identifier of the Rate the block is assigned to.

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.

ReleasedUtc

string

required

The moment when the block and its availability is released in UTC timezone in ISO 8601 format.

ExternalIdentifier

string

optional, max 255 characters

Identifier of the block from external system.

Availability block adjustment

Property

Type

Contract

Description

AvailabilityBlockId

string

required

Unique identifier of the Availability block whose availability is updated.

ResourceCategoryId

string

required

Unique identifier of the Resource category whose availability is updated.

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.

UnitCount

string

required

Adjustment value applied on the interval.

Add availability blocks

Adds availability blocks which are used to group related Availability updates. This makes limiting public availability easier and more organized.

Request

[PlatformAddress]/api/connector/v1/availabilityBlocks/add

{
"ClientToken": "E0D439EE522F44368DC78E1BFB03710C-D24FB11DBE31D4621C4817E028D9E1D",
"AccessToken": "C66EF7B239D24632943D115EDE9CB810-EA00F8FD8294692C940F6B5A8F9453D",
"Client": "Sample Client 1.0.0",
"AvailabilityBlocks": [
{
"ServiceId": "bd26d8db-86da-4f96-9efc-e5a4654a4a94",
"RateId": "ed4b660b-19d0-434b-9360-a4de2ea42eda",
"VoucherCode": null,
"Name": "Mr. Smith's block",
"StartUtc": "2020-11-05T00:00:00Z",
"EndUtc": "2020-11-06T00:00:00Z",
"ReleasedUtc": "2020-11-04T00:00:00Z",
"ExternalIdentifier": "Block-0001",
"Budget": {
"Value": 500,
"Currency": "EUR"
},
"ReservationPurpose": null,
"Notes": null,
}
]
}

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.

AvailabilityBlocks

array of Availability block parameters

required, max 1000 items

Availability blocks to be added.

Availability block parameters

Property

Type

Contract

Description

ServiceId

string

required

Unique identifier of the Service to assign block to.

RateId

string

required

Unique identifier of the Rate to assign block to.

VoucherCode

string

optional

Voucher code providing access to specified private Rate.

Name

string

optional

The name of the block.

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.

ReleasedUtc

string

required

The moment when the block and its availability is released.

ExternalIdentifier

string

optional, max 255 characters

Identifier of the block from external system.

Budget

Currency value

optional

The tentative budget for the total price of reservations.

ReservationPurpose

string Reservation purpose

optional

The purpose of the block.

Notes

string

optional

Additional notes of the block.

Response

{
"AvailabilityBlocks": [
{
"Id": "aaaa654a4a94-4f96-9efc-86da-bd26d8db",
"ServiceId": "bd26d8db-86da-4f96-9efc-e5a4654a4a94",
"RateId": "ed4b660b-19d0-434b-9360-a4de2ea42eda",
"StartUtc": "2020-11-05T00:00:00Z",
"EndUtc": "2020-11-06T00:00:00Z",
"ReleasedUtc": "2020-11-04T00:00:00Z",
"ExternalIdentifier": "Block-0001"
}
]
}

Property

Type

Contract

Description

AvailabilityBlocks

array of Availability block

required

Availability blocks.

Reservation purpose

  • Leisure

  • Business

  • Student

Update availability blocks

Updates information about the specified Availability block.

Request

[PlatformAddress]/api/connector/v1/availabilityBlocks/update

{
"ClientToken": "E0D439EE522F44368DC78E1BFB03710C-D24FB11DBE31D4621C4817E028D9E1D",
"AccessToken": "C66EF7B239D24632943D115EDE9CB810-EA00F8FD8294692C940F6B5A8F9453D",
"Client": "Sample Client 1.0.0",
"AvailabilityBlocks": [
{
"AvailabilityBlockId": "aaaa654a4a94-4f96-9efc-86da-bd26d8db",
"Name": {"Value": "Mr. John Snow block"},
"StartUtc":{"Value": "2021-07-05T00:00:00Z"},
"EndUtc":{"Value": "2021-07-15T00:00:00Z"},
"ReleasedUtc":{"Value": "2021-07-04T00:00:00Z"},
"ExternalIdentifier": {"Value": "123456798"}
}
]
}

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.

AvailabilityBlocks

array of Availability block update parameters

required, max 1000 items

Availability blocks to be updated.

Availability block update parameters

Property

Type

Contract

Description

AvailabilityBlockId

string

required

Unique identifier of the Availability block.

Name

String update value

optional

The name of the block (or null if the name should not be updated).

StartUtc

String update value

required

Start of the interval in UTC timezone in ISO 8601 format (or null if the start time should not be updated).

EndUtc

String update value

required

End of the interval in UTC timezone in ISO 8601 format (or null if the end time should not be updated).

ReleasedUtc

String update value

required

The moment when the block and its availability is released (or null if the released time should not be updated).

ExternalIdentifier

String update value

optional, max 255 characters

Identifier of the block from external system (or null if the identifier should not be updated).

Response

{}

Delete availability blocks

Delete availability blocks. Note that an availability block containing active reservations (reservations which are not Canceled) cannot be deleted.

Request

[PlatformAddress]/api/connector/v1/availabilityBlocks/delete

{
"ClientToken": "E0D439EE522F44368DC78E1BFB03710C-D24FB11DBE31D4621C4817E028D9E1D",
"AccessToken": "C66EF7B239D24632943D115EDE9CB810-EA00F8FD8294692C940F6B5A8F9453D",
"Client": "Sample Client 1.0.0",
"AvailabilityBlockIds": [
"e5a4654a4a94-86da-4f96-9efc-bd26d8db",
"aaaa654a4a94-4f96-9efc-86da-bd26d8db"
]
}

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.

AvailabilityBlockIds

array of string

required, max 1000 items

Unique identifier of the Availability block to delete.

Response

{}

Get service availability

Returns availability of a bookable service in the specified interval including applied availability adjustments. The response contains availability for all dates that the specified interval intersects.

Request

[PlatformAddress]/api/connector/v1/services/getAvailability

{
"ClientToken": "E0D439EE522F44368DC78E1BFB03710C-D24FB11DBE31D4621C4817E028D9E1D",
"AccessToken": "C66EF7B239D24632943D115EDE9CB810-EA00F8FD8294692C940F6B5A8F9453D",
"Client": "Sample Client 1.0.0",
"ServiceId": "bd26d8db-86da-4f96-9efc-e5a4654a4a94",
"StartUtc":"2017-01-01T00:00:00.000Z",
"EndUtc":"2017-01-03T00:00:00.000Z"
}

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 whose availability should be returned.

StartUtc

string

required, max length 3 months

Start of the interval in UTC timezone in ISO 8601 format.

EndUtc

string

required, max length 3 months

End of the interval in UTC timezone in ISO 8601 format.

Response

{
"CategoryAvailabilities": [
{
"Availabilities": [ 6, 7, 5 ],
"Adjustments ": [ 0, 1, -1 ],
"CategoryId": "773d5e42-de1e-43a0-9ce6-f940faf2303f"
},
{
"Availabilities": [ 7, 7, 7 ],
"Adjustments ": [ 1, 0, -1 ],
"CategoryId": "a0a7a5c5-c4ef-494a-8b34-6cca97629076"
}
],
"DatesUtc": [
"2016-12-31T23:00:00Z",
"2017-01-01T23:00:00Z",
"2017-01-02T23:00:00Z"
]
}

Property

Type

Contract

Description

CategoryAvailabilities

array of Resource category availability

required

Resource category availabilities.

DatesUtc

array of string

required

Covered dates in UTC timezone in ISO 8601 format.

Resource category availability

Property

Type

Contract

Description

CategoryId

string

required

Unique identifier of the Resource category.

Availabilities

array of number

required

Absolute availabilities of the resource category in the covered dates.

Adjustments

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 daily, so when the server receives the UTC interval, it first converts it to enterprise timezone and updates the price on all dates 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

{
"ClientToken": "E0D439EE522F44368DC78E1BFB03710C-D24FB11DBE31D4621C4817E028D9E1D",
"AccessToken": "C66EF7B239D24632943D115EDE9CB810-EA00F8FD8294692C940F6B5A8F9453D",
"Client": "Sample Client 1.0.0",
"ServiceId": "bd26d8db-86da-4f96-9efc-e5a4654a4a94",
"AvailabilityUpdates": [
{
"StartUtc": "2020-10-05T00:00:00Z",
"EndUtc": "2020-10-05T00:00:00Z",
"AvailabilityBlockId": "23e85a44-d95a-4dcf-9f36-acb000b10abe",
"ResourceCategoryId": "46bc1498-38cf-4d03-b144-aa69012f5d50",
"UnitCountAdjustment": { "Value": 6 }
},
{
"StartUtc": "2020-10-07T00:00:00Z",
"EndUtc": "2020-10-08T00:00:00Z",
"ResourceCategoryId": "46bc1498-38cf-4d03-b144-aa69012f5d50",
"UnitCountAdjustment": { }
}
]
}

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 to update.

AvailabilityUpdates

array of Availability update

required, max 1000 items

Availability updates.

Availability update

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.

AvailabilityBlockId

string

optional

Unique identifier of the Availability block whose availability to update.

ResourceCategoryId

string

required

Unique identifier of the Resource category whose availability to update.

UnitCountAdjustment

Number update value

required

Adjustment value to be applied on the interval, can be both positive and negative (relative adjustment, not an absolute number). If specified without Value parameter, removes all adjustments within the interval.

Response

{}

Get all products

Returns all products offered together with the specified services.

Request

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

{
"ClientToken": "E0D439EE522F44368DC78E1BFB03710C-D24FB11DBE31D4621C4817E028D9E1D",
"AccessToken": "C66EF7B239D24632943D115EDE9CB810-EA00F8FD8294692C940F6B5A8F9453D",
"Client": "Sample Client 1.0.0",
"ServiceIds": [
"bd26d8db-86da-4f96-9efc-e5a4654a4a94"
]
}

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.

Response

{
"Products": [
{
"Id": "198bc308-c1f2-4a1c-a827-c41d99d52f3d",
"ServiceId": "bd26d8db-86da-4f96-9efc-e5a4654a4a94",
"CategoryId": null,
"IsActive": true,
"Name": "Breakfast",
"ExternalName": "Breakfast",
"ShortName": "BFST",
"Description": "Nice continental breakfast.",
"Charging": "PerPersonPerTimeUnit",
"Posting": "Once",
"Promotions": {
"BeforeCheckIn": false,
"AfterCheckIn": false,
"DuringStay": false,
"BeforeCheckOut": false,
"AfterCheckOut": false,
"DuringCheckOut": false
},
"Classifications": {
"Food": false,
"Beverage": false,
"Wellness": false,
"CityTax": false
},
"Price": {
"Currency": "GBP",
"NetValue": 7.5,
"GrossValue": 9
"TaxValues": [
{
"Code": "UK-S",
"Value": 1.50
}
],
}
}
]
}

Property

Type

Contract

Description

Products

array of Product

required

Products offered with the service.

Product

Property

Type

Contract

Description

Id

string

required

Unique identifier of the product.

ServiceId

string

required

Unique identifier of the Service.

CategoryId

string

optional

Unique identifier of the Product category.

IsActive

boolean

required

Whether the product is still active.

Name

string

required

Name of the product.

ExternalName

string

required

Name of the product meant to be displayed to customer.

ShortName

string

required

Short name of the product.

Description

string

optional

Description of the product.

Charging

string Product charging

required

Charging of the product.

Posting

string Product posting

required

Posting of the product.

Promotions

Promotions

required

Promotions of the service.

Classifications

Product classifications

required

Classifications of the service.

Price

Currency value

required

Price of the product.

Product charging

  • Once

  • PerTimeUnit

  • PerPersonPerTimeUnit

  • PerPerson

Product posting

  • Once

  • Daily

Product classifications

Property

Type

Contract

Description

Food

boolean

required

Product is classified as food.

Beverage

boolean

required

Product is classified as beverage.

Wellness

boolean

required

Product is classified as wellness.

CityTax

boolean

required

Product is classified as city tax.

Get all rules

Returns all rules applied with the reservations.

Request

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

{
"ClientToken": "E0D439EE522F44368DC78E1BFB03710C-D24FB11DBE31D4621C4817E028D9E1D",
"AccessToken": "C66EF7B239D24632943D115EDE9CB810-EA00F8FD8294692C940F6B5A8F9453D",
"Client": "Sample Client 1.0.0",
"ServiceIds": [
"bd26d8db-86da-4f96-9efc-e5a4654a4a94"
],
"Extent":
{
"RuleActions": true,
"Rates": true,
"RateGroups": true,
"ResourceCategories": true,
"BusinessSegments": true
}
}

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

Rule 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

{
"Rules": [
{
"Id": "13638b12-53f1-4b35-baab-ac1e006ed8cb",
"Conditions": {
"RateId": {
"Value": "8a13f4e8-0274-4bcc-b2d4-ac1c00d1cd3f",
"ConditionType": "Equals"
},
"RateGroupId": null,
"BusinessSegmentId": null,
"ResourceCategoryId": null,
"ResourceCategoryType": null,
"Origin": {
"Value": "Connector",
"ConditionType": "NotEquals"
},
"MinimumTimeUnitCount": null,
"MaximumTimeUnitCount": null
}
}
],
"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": []
}

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

Rule conditions

required

Conditions of the rule.

Rule conditions

Property

Type

Contract

Description

RateId

Rule condition

required

Condition based on Rate.

RateGroupId

Rule condition

required

Condition based on Rate group.

BusinessSegmentId

Rule condition

required

Condition based on Business segment.

ResourceCategoryId

Rule condition

required

Condition based on Resource category.

ResourceCategoryType

Rule condition

required

Condition based on Resource category type.

Origin

Rule condition

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

RuleActionData

optional

Additional information about action.

Rule action data

Property

Type

Contract

Description

Discriminator

string Rule action 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

string Product action type

required

Action of rule.

Product action type

  • Add - Adds specified item.

  • Delete - Deletes specified item.

Get all business segments

Returns all business segments of the default service provided by the enterprise.

Request

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

{
"ClientToken": "E0D439EE522F44368DC78E1BFB03710C-D24FB11DBE31D4621C4817E028D9E1D",
"AccessToken": "C66EF7B239D24632943D115EDE9CB810-EA00F8FD8294692C940F6B5A8F9453D",
"Client": "Sample Client 1.0.0",
"ServiceIds": [
"bd26d8db-86da-4f96-9efc-e5a4654a4a94"
]
}

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

Unique identifiers of the Services from which the business segments are requested.

Response

{
"BusinessSegments": [
{
"Id": "7760b5cb-a666-41bb-9758-76bf5d1df399",
"ServiceId": "bd26d8db-86da-4f96-9efc-e5a4654a4a94",
"IsActive": true,
"Name": "Business"
},
{
"Id": "54ec08b6-e6fc-48e9-b8ae-02943e0ac693",
"ServiceId": "bd26d8db-86da-4f96-9efc-e5a4654a4a94",
"IsActive": true,
"Name": "Leisure"
}
]
}

Property

Type

Contract

Description

BusinessSegments

array of Business segment

required

Business segments of the default service.

Business segment

Property

Type

Contract

Description

Id

string

required

Unique identifier of the segment.

ServiceId

string

required

Unique identifier of the Service.

IsActive

boolean

required

Whether the business segment is still active.

Name

string

required

Name of the segment.

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

{
"ClientToken": "E0D439EE522F44368DC78E1BFB03710C-D24FB11DBE31D4621C4817E028D9E1D",
"AccessToken": "C66EF7B239D24632943D115EDE9CB810-EA00F8FD8294692C940F6B5A8F9453D",
"Client": "Sample Client 1.0.0",
"ServiceIds": [
"bd26d8db-86da-4f96-9efc-e5a4654a4a94"
],
"Extent": {
"Rates": true,
"RateGroups": true
}
}

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

Rate 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

{
"Rates": [
{
"BaseRateId": null,
"GroupId": "c8b866b3-be2e-4a47-9486-034318e9f393",
"Id": "ed4b660b-19d0-434b-9360-a4de2ea42eda",
"ServiceId": "bd26d8db-86da-4f96-9efc-e5a4654a4a94",
"IsActive": true,
"IsEnabled": true,
"IsPublic": true,
"Name": "Fully Flexible",
"ShortName": "FF",
"ExternalNames": {
"en-US": "Long Stay Flexible Rate"
}
}
],
"RateGroups": [
{
"Id": "c8b866b3-be2e-4a47-9486-034318e9f393",
"ServiceId": "bd26d8db-86da-4f96-9efc-e5a4654a4a94",
"IsActive": true,
"Name": "Default"
}
]
}

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

Localized text

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 of a rate in the specified interval. Note that response contains prices for all dates that the specified interval intersects. So e.g. interval 1st Jan 13:00 - 1st Jan 14:00 will result in one price for 1st Jan. Interval 1st Jan 23:00 - 2nd Jan 01:00 will result in two prices for 1st Jan and 2nd Jan.

Request

[PlatformAddress]/api/connector/v1/rates/getPricing

{
"ClientToken": "E0D439EE522F44368DC78E1BFB03710C-D24FB11DBE31D4621C4817E028D9E1D",
"AccessToken": "C66EF7B239D24632943D115EDE9CB810-EA00F8FD8294692C940F6B5A8F9453D",
"Client": "Sample Client 1.0.0",
"RateId": "ed4b660b-19d0-434b-9360-a4de2ea42eda",
"StartUtc":"2017-01-01T00:00:00.000Z",
"EndUtc":"2017-01-03T00:00:00.000Z"
}

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.

StartUtc

string

required, max length 3 months

Start of the interval in UTC timezone in ISO 8601 format.

EndUtc

string

required, max length 3 months

End of the interval in UTC timezone in ISO 8601 format.

Response

{
"Currency": "EUR",
"BasePrices": [ 20, 20, 20 ],
"CategoryAdjustments": [
{
"AbsoluteValue": 0,
"CategoryId": "34c29e73-c8db-4e93-b51b-981e42655e03",
"ParentCategoryId": null,
"RelativeValue": 0.2
},
{
"AbsoluteValue": 50,
"CategoryId": "a0a7a5c5-c4ef-494a-8b34-6cca97629076",
"ParentCategoryId": "34c29e73-c8db-4e93-b51b-981e42655e03",
"RelativeValue": 0
}
]
"CategoryPrices": [
{
"CategoryId": "e3aa3117-dff0-46b7-b49a-2c0391e70ff9",
"Prices": [ 20, 20, 20 ]
}
],
"DatesUtc": [
"2016-12-31T23:00:00Z",
"2017-01-01T23:00:00Z",
"2017-01-02T23:00:00Z"
]
}

Property

Type

Contract

Description

Currency

string

required

ISO-4217 code of the