From 4804a4c4a4551f0d3a05cd6fa0863f680f685535 Mon Sep 17 00:00:00 2001 From: Jan Langer Date: Tue, 31 Oct 2023 12:59:17 +0100 Subject: [PATCH] Updated docs --- dist/index.html | 198 ++++++++++++++++++++++++------------------------ docs/CNAME | 1 - openapi.yaml | 51 ++++++++----- 3 files changed, 132 insertions(+), 118 deletions(-) delete mode 100644 docs/CNAME diff --git a/dist/index.html b/dist/index.html index ca3f12a..87ce43d 100644 --- a/dist/index.html +++ b/dist/index.html @@ -345,7 +345,7 @@ -
Common error codes <h3 id="2023">2023</h3> <h4 id="x-x-2023">x. x. 2023</h4> <ul> -<li>Deprecate <code>occupations</code> and <code>occupations-update</code> endpoints. Use capacities instead</li> +<li>Added children ages and bed entitlement to reservation data (<code>reservation.children</code>)</li> +<li>Added meal plan to reservation data (<code>reservation.meal</code>)</li> +<li>Deprecate <code>occupations</code> and <code>occupations-update</code> endpoints to be used for blockages. Use capacities instead.</li> <li>Deprecate <code>rooms</code> parameter from RoomType structure. Only <code>roomCount</code> parameter is now needed to define room type structure</li> -<li>Added children ages and bed entitlement to reservation data</li> +<li>Deprecate <code>roomId</code> parameter from Occupation and Reservation structure. Only <code>roomTypeId</code> parameter is now needed to define occupation</li> </ul> <h3 id="2021">2021</h3> <h4 id="24-11-2021">24. 11. 2021</h4> @@ -557,9 +559,11 @@

Common error codes

2023

x. x. 2023

    -
  • Deprecate occupations and occupations-update endpoints. Use capacities instead
  • +
  • Added children ages and bed entitlement to reservation data (reservation.children)
  • +
  • Added meal plan to reservation data (reservation.meal)
  • +
  • Deprecate occupations and occupations-update endpoints to be used for blockages. Use capacities instead.
  • Deprecate rooms parameter from RoomType structure. Only roomCount parameter is now needed to define room type structure
  • -
  • Added children ages and bed entitlement to reservation data
  • +
  • Deprecate roomId parameter from Occupation and Reservation structure. Only roomTypeId parameter is now needed to define occupation

2021

24. 11. 2021

@@ -571,9 +575,87 @@

9. 1. 2020

  • Initial release
-

Pull endpoints

Pull endpoints should by implemented by PMS/CM side and are called by Termino, either periodically or when specific action is performed (eg. hotel connection).

-

Hotel info and Room Types

Termino endpoints

Endpoints on Termino side are called from PMS/CM system and mostly used to push data changes. +If unsuccessful response is returned, the request has to be repeated until it is successfully delivered to Termino.

+

Occupations (push)

Synchronization of changed reservations on the hotel side.

+

It is deprecated to send updates for other reservations then those created by Termino/Slevomat.

+

Usage:

+
    +
  • Partner changes Slevomat reservation in their system and this endpoint is called to update the reservation in Termino/Slevomat
  • +
  • Deprecated Pushing blockage and reservation updates when using pull endpoint /occupations
  • +
+

Updates of occupations in multiple hotels has to be sent in multiple requests.

+
Request Body schema: application/json
required
accessToken
required
string

Access token to your API.

+
required
string or integer

Hotel id.

+
required
Array of objects (Occupation)

List of updated occupations.

+

Responses

Request samples

Content type
application/json
{
  • "accessToken": "string",
  • "hotelId": "string",
  • "occupations": [
    ]
}

Response samples

Content type
application/json
{
  • "success": true
}

Capacities (push)

Synchronization of changed capacities

+

Usage:

+
    +
  • CM / PMS pushes capacity changes to Termino
  • +
+
Request Body schema: application/json
required
accessToken
required
string

Access token to your API.

+
required
string or integer

Your hotel id.

+
required
Array of objects (Capacity)

List of updated capacities.

+

Responses

Request samples

Content type
application/json
{
  • "accessToken": "string",
  • "hotelId": "string",
  • "capacities": [
    ]
}

Response samples

Content type
application/json
{
  • "success": true
}

Hotel update (push)

Synchronization of changed hotel info and structure.

+

Usage:

+
    +
  • CM / PMS pushes hotel info and structure changes to Termino
  • +
+
Request Body schema: application/json
required
accessToken
required
string

Access token to your API.

+
required
string or integer

Your hotel id.

+
required
object (HotelInfo)

Responses

Request samples

Content type
application/json
{
  • "accessToken": "string",
  • "hotelId": "string",
  • "hotel": {
    }
}

Response samples

Content type
application/json
{
  • "success": true
}

Hotel info (reversed)

Provides same information as /hotel endpoint, but in reversed direction. This endpoint is called by CM to load room types created on Termino side and set up mapping.

+
Request Body schema: application/json
required
accessToken
required
string

Access token to your API.

+
required
string or integer

Hotel id.

+

Responses

Request samples

Content type
application/json
{
  • "accessToken": "string",
  • "hotelId": "string"
}

Response samples

Content type
application/json
{
  • "id": "123456",
  • "name": "Hotel Example",
  • "address": {
    },
  • "roomTypes": [
    ]
}

PMS/CM endpoints

Partner endpoints should be implemented in your PMS/CM system and are called by Termino, either periodically or when specific action is performed (eg. new reservation, hotel connection).

+

Hotel info and Room Types

9. 1. 2020 " class="sc-iJCSeZ sc-cBornZ gJcGEt AiHgN sc-ciSkmu iZNUXd">

OK

Request samples

Content type
application/json
{
  • "accessToken": "aa5ae844-051c-4d30-9c67-54b70c99b580",
  • "hotelId": "123456"
}

Response samples

Content type
application/json
{
  • "id": "123456",
  • "name": "Hotel Example",
  • "address": {
    },
  • "roomTypes": [
    ]
}

Capacities

Request samples

Content type
application/json
{
  • "accessToken": "aa5ae844-051c-4d30-9c67-54b70c99b580",
  • "hotelId": "123456"
}

Response samples

Content type
application/json
{
  • "id": "123456",
  • "name": "Hotel Example",
  • "address": {
    },
  • "roomTypes": [
    ]
}

Capacities

9. 1. 2020 " class="sc-iJCSeZ sc-cBornZ gJcGEt AiHgN sc-ciSkmu iZNUXd">

Successful response

Request samples

Content type
application/json
{
  • "accessToken": "string",
  • "hotelId": "string",
  • "interval": {
    },
  • "roomTypeIds": [
    ]
}

Response samples

Content type
application/json
{
  • "capacities": [
    ]
}

Create/update reservation

Request samples

Content type
application/json
{
  • "accessToken": "string",
  • "hotelId": "string",
  • "interval": {
    },
  • "roomTypeIds": [
    ]
}

Response samples

Content type
application/json
{
  • "capacities": [
    ]
}

Create/update reservation

Usage: " class="sc-iJCSeZ sc-cBornZ gJcGEt AiHgN sc-ciSkmu iZNUXd">

Successful response

Request samples

Content type
application/json
{
  • "id": 123456,
  • "status": "option",
  • "roomTypeId": 123,
  • "term": {
    },
  • "price": {
    },
  • "adultsCount": 2,
  • "childrenCount": 1,
  • "children": [
    ],
  • "guestNote": "I would like to have a room with a view.",
  • "voucher": "1234567890",
  • "contact": {
    }
}

Response samples

Content type
application/json
{
  • "reservation": {
    }
}

Reservation query

Request samples

Content type
application/json
{
  • "id": 123456,
  • "status": "option",
  • "roomTypeId": 123,
  • "term": {
    },
  • "price": {
    },
  • "adultsCount": 2,
  • "childrenCount": 1,
  • "children": [
    ],
  • "guestNote": "I would like to have a room with a view.",
  • "voucher": "1234567890",
  • "contact": {
    }
}

Response samples

Content type
application/json
{
  • "reservation": {
    }
}

Reservation query

Usage: " class="sc-iJCSeZ sc-cBornZ gJcGEt AiHgN sc-ciSkmu iZNUXd">

Successful response

Request samples

Content type
application/json
{
  • "accessToken": "string",
  • "hotelId": "string",
  • "reservationId": "string"
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "status": "option",
  • "roomTypeId": "string",
  • "roomId": "string",
  • "term": {
    },
  • "price": {
    },
  • "meal": "breakfast",
  • "adultsCount": 0,
  • "childrenCount": 0,
  • "children": [
    ],
  • "guestNote": "string",
  • "voucher": "string",
  • "contact": {
    }
}

Reservations search

Request samples

Content type
application/json
{
  • "accessToken": "string",
  • "hotelId": "string",
  • "reservationId": "string"
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "status": "option",
  • "roomTypeId": "string",
  • "roomId": "string",
  • "term": {
    },
  • "price": {
    },
  • "meal": "breakfast",
  • "adultsCount": 0,
  • "childrenCount": 0,
  • "children": [
    ],
  • "guestNote": "string",
  • "voucher": "string",
  • "contact": {
    }
}

Reservations search

This endpoint was previously used as alternative to /capacities. This usage is deprecated. Use capacities instead.

-

Synchronization of changes in reservations created by Termino/Slevomat. This allows changes in reservation made in PMS to be propagated to Termino and Slevomat. Changes can also be pushed via /occupations-update endpoint.

+

Synchronization of changes in reservations created by Termino/Slevomat. This allows changes in reservation made in PMS to be propagated to Termino and Slevomat. Changes can also be pushed via /occupations-update endpoint.

Usage:

  • synchronizing occupation changes once a day
  • @@ -701,14 +783,14 @@

    Usage:

    " class="sc-iJCSeZ sc-cBornZ gJcGEt AiHgN sc-ciSkmu iZNUXd">

    Successful response

Request samples

Content type
application/json
{
  • "accessToken": "string",
  • "hotelId": "string",
  • "interval": {
    },
  • "roomTypeIds": [
    ]
}

Response samples

Content type
application/json
{
  • "occupations": [
    ]
}

Ping

Request samples

Content type
application/json
{
  • "accessToken": "string",
  • "hotelId": "string",
  • "interval": {
    },
  • "roomTypeIds": [
    ]
}

Response samples

Content type
application/json
{
  • "occupations": [
    ]
}

Ping

Ping endpoint is used to check if hotel exists and synchronization is active on your side.

-

If you implement /hotel endpoint, you can ignore this endpoint.

+

If you implement /hotel endpoint, you can ignore this endpoint.

Usage:

  • called periodically to check if hotels are still active
  • @@ -721,87 +803,9 @@

    Usage:

    " class="sc-iJCSeZ sc-cBornZ gJcGEt AiHgN sc-ciSkmu iZNUXd">

    Successful response

Request samples

Content type
application/json
{
  • "accessToken": "string",
  • "hotelId": "string"
}

Response samples

Content type
application/json
{
  • "success": true
}

Push endpoints

Push endpoints, are called by PMS/CM system to deliver updates to Termino side. -If unsuccessful response is returned, the request has to be repeated until it is successfully delivered to Termino.

-

Occupations (push)

Synchronization of changed reservations on the hotel side.

-

It is deprecated to send updates for other reservations then those created by Termino/Slevomat.

-

Usage:

-
    -
  • Partner changes Slevomat reservation in their system and this endpoint is called to update the reservation in Termino/Slevomat
  • -
  • Deprecated Pushing blockage and reservation updates when using pull endpoint /occupations
  • -
-

Updates of occupations in multiple hotels has to be sent in multiple requests.

-
Request Body schema: application/json
required
accessToken
required
string

Access token to your API.

-
required
string or integer

Hotel id.

-
required
Array of objects (Occupation)

List of updated occupations.

-

Responses

Request samples

Content type
application/json
{
  • "accessToken": "string",
  • "hotelId": "string",
  • "occupations": [
    ]
}

Response samples

Content type
application/json
{
  • "success": true
}

Capacities (push)

Synchronization of changed capacities

-

Usage:

-
    -
  • CM / PMS pushes capacity changes to Termino
  • -
-
Request Body schema: application/json
required
accessToken
required
string

Access token to your API.

-
required
string or integer

Your hotel id.

-
required
Array of objects (Capacity)

List of updated capacities.

-

Responses

Request samples

Content type
application/json
{
  • "accessToken": "string",
  • "hotelId": "string",
  • "capacities": [
    ]
}

Response samples

Content type
application/json
{
  • "success": true
}

Hotel update (push)

Synchronization of changed hotel info and structure.

-

Usage:

-
    -
  • CM / PMS pushes hotel info and structure changes to Termino
  • -
-
Request Body schema: application/json
required
accessToken
required
string

Access token to your API.

-
required
string or integer

Your hotel id.

-
required
object (HotelInfo)

Responses

Request samples

Content type
application/json
{
  • "accessToken": "string",
  • "hotelId": "string",
  • "hotel": {
    }
}

Response samples

Content type
application/json
{
  • "success": true
}

Hotel info (reversed)

Provides same information as /hotel endpoint, but in reversed direction. This endpoint is called by CM to load room types created on Termino side and set up mapping.

-
Request Body schema: application/json
required
accessToken
required
string

Access token to your API.

-
required
string or integer

Hotel id.

-

Responses

Request samples

Content type
application/json
{
  • "accessToken": "string",
  • "hotelId": "string"
}

Response samples

Content type
application/json
{
  • "id": "123456",
  • "name": "Hotel Example",
  • "address": {
    },
  • "roomTypes": [
    ]
}
+

Request samples

Content type
application/json
{
  • "accessToken": "string",
  • "hotelId": "string"
}

Response samples

Content type
application/json
{
  • "success": true
}