From bd76196769f55c9c28e9acf2c61348bf3e4b9584 Mon Sep 17 00:00:00 2001 From: Jan Langer Date: Mon, 30 Oct 2023 15:09:47 +0100 Subject: [PATCH] Initial docs --- .gitignore | 2 - .redocly.yaml | 43 +- LICENSE | 4 +- README.md | 236 +--- dist/favicon.png | Bin 0 -> 6318 bytes dist/index.html | 811 ++++++++++++ dist/logo.svg | 19 + dist/slevomat.svg | 10 + docs/favicon.png | Bin 716 -> 6318 bytes docs/index.html | 6 +- docs/logo.svg | 19 + docs/slevomat.svg | 10 + openapi.yaml | 1095 +++++++++++++++++ openapi/README.md | 13 - openapi/code_samples/C#/echo/post.cs | 12 - openapi/code_samples/PHP/echo/post.php | 7 - openapi/code_samples/README.md | 11 - openapi/components/README.md | 14 - openapi/components/headers/ExpiresAfter.yaml | 4 - openapi/components/schemas/Email.yaml | 4 - openapi/components/schemas/User.yaml | 19 - .../components/securitySchemes/api_key.yaml | 3 - .../securitySchemes/basic_auth.yaml | 2 - .../components/securitySchemes/main_auth.yaml | 7 - openapi/openapi.yaml | 84 -- openapi/paths/README.md | 105 -- openapi/paths/echo.yaml | 45 - openapi/paths/users@{username}.yaml | 77 -- package-lock.json | 889 +++++++++++-- package.json | 9 +- 30 files changed, 2769 insertions(+), 791 deletions(-) create mode 100644 dist/favicon.png create mode 100644 dist/index.html create mode 100644 dist/logo.svg create mode 100644 dist/slevomat.svg create mode 100644 docs/logo.svg create mode 100644 docs/slevomat.svg create mode 100644 openapi.yaml delete mode 100644 openapi/README.md delete mode 100644 openapi/code_samples/C#/echo/post.cs delete mode 100644 openapi/code_samples/PHP/echo/post.php delete mode 100644 openapi/code_samples/README.md delete mode 100644 openapi/components/README.md delete mode 100644 openapi/components/headers/ExpiresAfter.yaml delete mode 100644 openapi/components/schemas/Email.yaml delete mode 100644 openapi/components/schemas/User.yaml delete mode 100644 openapi/components/securitySchemes/api_key.yaml delete mode 100644 openapi/components/securitySchemes/basic_auth.yaml delete mode 100644 openapi/components/securitySchemes/main_auth.yaml delete mode 100644 openapi/openapi.yaml delete mode 100644 openapi/paths/README.md delete mode 100644 openapi/paths/echo.yaml delete mode 100644 openapi/paths/users@{username}.yaml diff --git a/.gitignore b/.gitignore index a179851..3c3629e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1 @@ -# Dir for bundles -dist node_modules diff --git a/.redocly.yaml b/.redocly.yaml index 3388ea1..d714ea3 100644 --- a/.redocly.yaml +++ b/.redocly.yaml @@ -1,14 +1,29 @@ -# See https://redoc.ly/docs/cli/configuration/ for more information. -apiDefinitions: - main: openapi/openapi.yaml -lint: - extends: - - recommended - rules: - no-unused-components: warning -referenceDocs: - htmlTemplate: ./docs/index.html - theme: - colors: - primary: - main: "#32329f" +apis: + main: + root: openapi.yaml + rules: + no-unused-components: warn +theme: + openapi: + htmlTemplate: ./docs/index.html + theme: + spacing: + sectionVertical: 30 + sidebar: + backgroundColor: "#00253d" + textColor: "rgba(255, 255, 255, 0.55)" + activeTextColor: "#ffffff" + typography: + fontSize: "16px" + fontFamily: "IBM Plex Sans, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol" + headings: + fontFamily: "IBM Plex Sans, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol" + code: + fontFamily: "Consolas, Courier New, monospace" + logo: + gutter: "15px 10px" + maxHeight: "60px" + #maxWidth: "200px" + colors: + primary: + main: "#32329f" diff --git a/LICENSE b/LICENSE index d41b8bd..c78dcbb 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ -The MIT License (MIT) +MIT License -Copyright (c) 2016 Ivan Goncharov +Copyright (c) 2023 Slevomat.cz s.r.o. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index e302360..e7c3b60 100644 --- a/README.md +++ b/README.md @@ -12,239 +12,9 @@ #### `npm start` Starts the reference docs preview server. -#### `npm run build` -Bundles the definition to the dist folder. - #### `npm test` Validates the definition. -## Contribution Guide - -Below is a sample contribution guide. The tools -in the repository don't restrict you to any -specific structure. Adjust the contribution guide -to match your own structure. However, if you -don't have a structure in mind, this is a -good place to start. - -Update this contribution guide if you -adjust the file/folder organization. - -The `.redocly.yaml` controls settings for various -tools including the lint tool and the reference -docs engine. Open it to find examples and -[read the docs](https://redoc.ly/docs/cli/configuration/) -for more information. - - -### Schemas - -#### Adding Schemas - -1. Navigate to the `openapi/components/schemas` folder. -2. Add a file named as you wish to name the schema. -3. Define the schema. -4. Refer to the schema using the `$ref` (see example below). - -##### Example Schema -This is a very simple schema example: -```yaml -type: string -description: The resource ID. Defaults to UUID v4 -maxLength: 50 -example: 4f6cf35x-2c4y-483z-a0a9-158621f77a21 -``` -This is a more complex schema example: -```yaml -type: object -properties: - id: - description: The customer identifier string - readOnly: true - allOf: - - $ref: ./ResourceId.yaml - websiteId: - description: The website's ID - allOf: - - $ref: ./ResourceId.yaml - paymentToken: - type: string - writeOnly: true - description: | - A write-only payment token; if supplied, it will be converted into a - payment instrument and be set as the `defaultPaymentInstrument`. The - value of this property will override the `defaultPaymentInstrument` - in the case that both are supplied. The token may only be used once - before it is expired. - defaultPaymentInstrument: - $ref: ./PaymentInstrument.yaml - createdTime: - description: The customer created time - allOf: - - $ref: ./ServerTimestamp.yaml - updatedTime: - description: The customer updated time - allOf: - - $ref: ./ServerTimestamp.yaml - tags: - description: A list of customer's tags - readOnly: true - type: array - items: - $ref: ./Tags/Tag.yaml - revision: - description: > - The number of times the customer data has been modified. - - The revision is useful when analyzing webhook data to determine if the - change takes precedence over the current representation. - type: integer - readOnly: true - _links: - type: array - description: The links related to resource - readOnly: true - minItems: 3 - items: - anyOf: - - $ref: ./Links/SelfLink.yaml - - $ref: ./Links/NotesLink.yaml - - $ref: ./Links/DefaultPaymentInstrumentLink.yaml - - $ref: ./Links/LeadSourceLink.yaml - - $ref: ./Links/WebsiteLink.yaml - _embedded: - type: array - description: >- - Any embedded objects available that are requested by the `expand` - querystring parameter. - readOnly: true - minItems: 1 - items: - anyOf: - - $ref: ./Embeds/LeadSourceEmbed.yaml - -``` - -##### Using the `$ref` - -Notice in the complex example above the schema definition itself has `$ref` links to other schemas defined. - -Here is a small excerpt with an example: - -```yaml -defaultPaymentInstrument: - $ref: ./PaymentInstrument.yaml -``` - -The value of the `$ref` is the path to the other schema definition. - -You may use `$ref`s to compose schema from other existing schema to avoid duplication. - -You will use `$ref`s to reference schema from your path definitions. - -#### Editing Schemas - -1. Navigate to the `openapi/components/schemas` folder. -2. Open the file you wish to edit. -3. Edit. - -### Paths - -#### Adding a Path - -1. Navigate to the `openapi/paths` folder. -2. Add a new YAML file named like your URL endpoint except replacing `/` with `@` and putting path parameters into curly braces like `{example}`. -3. Add the path and a ref to it inside of your `openapi.yaml` file inside of the `openapi` folder. - -Example addition to the `openapi.yaml` file: -```yaml -'/customers/{id}': - $ref: './paths/customers@{id}.yaml' -``` - -Here is an example of a YAML file named `customers@{id}.yaml` in the `paths` folder: - -```yaml -get: - tags: - - Customers - summary: Retrieve a list of customers - operationId: GetCustomerCollection - description: | - You can have a markdown description here. - parameters: - - $ref: ../components/parameters/collectionLimit.yaml - - $ref: ../components/parameters/collectionOffset.yaml - - $ref: ../components/parameters/collectionFilter.yaml - - $ref: ../components/parameters/collectionQuery.yaml - - $ref: ../components/parameters/collectionExpand.yaml - - $ref: ../components/parameters/collectionFields.yaml - responses: - '200': - description: A list of Customers was retrieved successfully - headers: - Rate-Limit-Limit: - $ref: ../components/headers/Rate-Limit-Limit.yaml - Rate-Limit-Remaining: - $ref: ../components/headers/Rate-Limit-Remaining.yaml - Rate-Limit-Reset: - $ref: ../components/headers/Rate-Limit-Reset.yaml - Pagination-Total: - $ref: ../components/headers/Pagination-Total.yaml - Pagination-Limit: - $ref: ../components/headers/Pagination-Limit.yaml - Pagination-Offset: - $ref: ../components/headers/Pagination-Offset.yaml - content: - application/json: - schema: - type: array - items: - $ref: ../components/schemas/Customer.yaml - text/csv: - schema: - type: array - items: - $ref: ../components/schemas/Customer.yaml - '401': - $ref: ../components/responses/AccessForbidden.yaml - x-code-samples: - - lang: PHP - source: - $ref: ../code_samples/PHP/customers/get.php -post: - tags: - - Customers - summary: Create a customer (without an ID) - operationId: PostCustomer - description: Another markdown description here. - requestBody: - $ref: ../components/requestBodies/Customer.yaml - responses: - '201': - $ref: ../components/responses/Customer.yaml - '401': - $ref: ../components/responses/AccessForbidden.yaml - '409': - $ref: ../components/responses/Conflict.yaml - '422': - $ref: ../components/responses/InvalidDataError.yaml - x-code-samples: - - lang: PHP - source: - $ref: ../code_samples/PHP/customers/post.php -``` - -You'll see extensive usage of `$ref`s in this example to different types of components including schemas. - -You'll also notice `$ref`s to code samples. - -### Code samples - -1. Navigate to the `openapi/code_samples` folder. -2. Navigate to the `` (e.g. PHP) sub-folder. -3. Navigate to the `path` folder, and add ref to the code sample. - -You can add languages by adding new folders at the appropriate path level. - -More details inside the `code_samples` folder README. +#### `npm run build-page` +Prepares the reference docs for deployment in dist folder. +Commit and push changes to GitHub to deploy to Github Pages. diff --git a/dist/favicon.png b/dist/favicon.png new file mode 100644 index 0000000000000000000000000000000000000000..962d8f38d62c884412567069fa29952bfb5b7a54 GIT binary patch literal 6318 zcmeHLOK4M35Ir|ZoB!);J}>bf6|pOcJW&t?tB7v3f`8~r!B4BAt12cgT)8QNrgbIS zS{2c>JG-#;v+z@Dl~z}-{G>^f##(e4=e~SMUh<0B)D+*q-1}zc+_`gyo6Af91|xz& z&}>1U0Bi&h2;^i7@R@X?D3aZTCI(#b0ZoLVC1@q)>lCtPCuJlYr-{o9nM?*BX->w! z;}gvfZgpbd{!MfrVVIpsW5+r>n#p105JUgHZbbXKFgVbQ@i4=5GLGoo2!8*X#Z>$o z2K##uIn2;S{J8f9Qd5)IwO&B;THxXBYuK^|coMxsK5d9yWq8zc9mzxtJA=+_K>Da> zK+nLuWnigJf1LrV!@|nQ;#{ufU`ZKRQPgSSS60TmwebGRc)u3D+IXz>mCozXJg?Ti zy1q6uV3PpvVv22%$5psWu4SvVqLo$<*~#iFp!r8Y3vb}~2C|l3RO6g@QyE^=!kf8& zFIgK);_+$WZDxZZdtRaFydKT-YWdOiwV46^eWu@mMSq{Gxt;S?Xz3eO%mD9G1H@a2 z3w^4IggoW?)Q;o3l|GgCsN*4q@Y#cC+YYo7htC|q&mYrBrxFOA-jA7d3Kvi9Rr=G3 zT#tIGeV@{wUO3r;#N=1BZ38+^>{0qr-iO9xU-CQZvz`Gx12vWbsYb|aEv_{ipbpDj zY-Y?~t=&=L-|AAYU+A(&FxE+u&7Mt@T~wb(@cE3AR4C}(mFC%saHl{4PorfGo{XW zKk@=k&oK-Wzk5BLU7#9|mQjl=Z{W(+vb?#>SfubDlQ(g(vsDfjsmng+_NNM`YVi+U CCemI2 literal 0 HcmV?d00001 diff --git a/dist/index.html b/dist/index.html new file mode 100644 index 0000000..ca3f12a --- /dev/null +++ b/dist/index.html @@ -0,0 +1,811 @@ + + + + API Reference | Termino.eu Hotel API + + + + + + + + + + + + +

Termino Hotel API (1.1.0)

Download OpenAPI specification:Download

This is pre-release version of API documentation. See https://docs.termino.eu for current documentation.

+

This document outlines the API of Termino, utilized by Slevomat to enable the sale of online bookings on Slevomat.cz and Zlavomat.sk. +This API is used for connecting channel management (CM) and property management systems (PMS).

+

Core Functions of the API Include:

+
    +
  • synchronization of hotel structure (room types and rooms) from CM/PMS to Termino or the other way around
  • +
  • synchronization of available capacities (free rooms) from CM/PMS to Termino
  • +
  • issuing reservations from Termino to CM/PMS
  • +
  • bi-directional editing and canceling of reservations created from Termino
  • +
+

Note: This API does not cover the synchronization of prices (rate plans), payments, or cancellation policies. These elements are beyond the scope of this API's functionalities.

+

👋 Basics

API Structure

+

This API is bi-directional, meaning both sides can request or push information to the other's API. Given that this API covers various system setups, there are multiple ways to establish communication. The synchronization of hotel structure and capacities is typically achieved by CM/PMS pushing information to Termino. A periodic pull of capacity information can also be configured, but push is preferred as it facilitates faster change propagation and reduces traffic between systems.

+

Typical usage for channel managers includes:

+
    +
  • Implementing the reservation and ping endpoints on your side
  • +
  • Calling the capacities-update endpoint to push capacity changes
  • +
  • Using the get-hotel endpoint to retrieve the hotel structure and set up the connection
  • +
+

For property management systems, the typical usage involves:

+
    +
  • Implementing the hotel, reservation, and get-reservation endpoints. The ping endpoint is not needed because the hotel endpoint should provide the same information (whether the hotel is active or not).
  • +
  • Depending on the pull or push style, implementing the capacities on your side or calling the capacities-update push endpoint on Termino to deliver updates.
  • +
+

🔑 Security and Authentication

All requests are required to communicate over HTTPS. Termino API endpoints support TLS protocol versions 1.2 and higher.

+

Authentication

+

All requests contain the property accessToken with a value assigned during the API verification process. These values identify the communicating parties - CM/PMS on one side and Termino on the other.

+

📡 Request and Response Format

Both sides accept only HTTP POST. Requests and responses are sent with the Content-Type header set to application/json and a JSON body depending on the operation to be performed. Content encoding is always UTF-8.

+

If a message is received and processed, the HTTP response code should be 200 OK for successful results and any 4xx for unsuccessful results (the concrete error type is described in the response body).

+

5xx response codes indicate unexpected and internal errors, and the request can be retried without change. No specific response should be expected for server errors (JSON is not guaranteed). The response header Retry-After (if present) should be respected for retrying the request.

+

The type of message is determined by the URL.

+

For push endpoints, the request should be repeated until it is successfully delivered to Termino. Similarly, Termino will repeat requests until they are accepted by your system. Successful delivery means either responding with success or an expected error described in the API specification.

+

Identifiers

+
    +
  • All identifiers (parameters named id) have to be unique for a given hotel, unless explicitly stated otherwise.
  • +
  • All identifiers generated on the Termino side are UUIDs.
  • +
  • All identifiers from your side can be either integers or strings.
  • +
+

Reservation ID

+

Each reservation has to have a unique ID for reference between systems. This identifier is later used in case of modification and cancellation of the reservation is needed. Termino can either generate and send our identifier with reservation creation, or it can accept and later use the reservation ID returned in response. +Using the ID from Termino is preferred because it allows us to reference the reservation even in case this create request fails with a timeout or other unexpected error. When using your ID, another system or manual intervention is needed in this case.

+

Basic request

+
{
+    "accessToken": "foobar",
+    // other properties
+}
+
+

Basic success response

+
{
+    "success": true,
+}
+
+

Basic error response

+
{
+    "error": {
+        "code": "invalid-access-token",
+        "message": "Access token not found."
+    }
+}
+
+

Common error codes

+

These errors can occur on any API endpoint.

+ + + + + + + + + + + + + + + + + + + + + + + +
CodeDescription
invalid-formatUnparsable JSON
missing-valueA required property is missing.
invalid-valueA property has invalid format (e.g., wrong date, time, datetime, interval, URL...).
invalid-access-tokenInvalid or expired access token
+

🆕 Changelog

Changes to API and its documentation

+

2023

+

x. x. 2023

+
    +
  • Deprecate occupations and occupations-update endpoints. 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
  • +
+

2021

+

24. 11. 2021

+
    +
  • Deprecate checkIn, checkOut and url parameters from hotel structure
  • +
+

2020

+

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

Information about hotel for registration process and structure of room type and rooms.

+

Usage:

+
    +
  • loading hotel info and structure when registering a new hotel
  • +
  • synchronizing hotel structure - infrequent polling and request when wrong synchronization is detected (unknown room etc.)
  • +
+
Request Body schema: application/json
accessToken
required
string

Access token for authorization

+
required
string or integer

Your hotel id

+

Responses

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

Synchronizing available space.

+

Usage:

+
    +
  • called when new hotel is registered
  • +
  • called after a new reservation is created or reservation fails
  • +
  • periodical synchronization of available space unless push endpoint is used
  • +
+
Request Body schema: application/json
required
accessToken
required
string

Access token to your API.

+
required
string or integer

Hotel id.

+
required
object (DateInterval)
Array of strings or integers

Requested room type ids. When not provided, return capacities for all room types of given hotel.

+

Responses

Request samples

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

Response samples

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

Create/update reservation

Creating new reservations, updating reservations, canceling reservations.

+

Behavior of this endpoint heavily depends on the agreed scheme of communication:

+

1 - Reservation Statuses:

+

The default scheme is "dual requests" - the first request contains status: option and does not contain customer data. The second request contains status: confirmed and includes customer data. This scheme allows more gradual control of the state of the reservation. Both statuses are expected to block the room for the reservation.

+

The second option is "single request" - in this scheme, even the first request with status: option contains all customer data and the voucher code. The confirmation request is sent also with the same data but does not have to be relayed to the hotel. Single-request mode is more suited for systems which do not support modifying existing reservations without canceling them and creating a new one (OTA-like behavior). You should specify which behavior better suits your system capabilities when consulting the integration with Termino.

+

2 - Reservation ID:

+

For referencing reservations between Termino and your system, either your ID or our ID can be used. In case your ID is used, the first (option) request does not contain the property id. You have to generate and send it in response.

+

In case our ID is used, the first (option) request contains the property id with our ID. You have to store it and use it in all subsequent requests.

+

Using your ID can be problematic in case communication during the first request fails due to any unexpected error (timeout, outage, etc.). This may cause a reservation being created in your system, but not in Termino. That's why we prefer using our ID, which we can use to check and remove such un-synced reservation.

+

Termino expects the room to be blocked for reservation when the option request is successfully processed.

+

Usage:

+
    +
  • Called with status option and then confirmed when creating a new reservation (see above)
  • +
  • Called with canceled status to cancel the reservation
  • +
  • Called when changing booking date on customer's request
  • +
+

Grouped reservations are currently not implemented; one request always contains only one reservation. Reservation group ID is the same as reservation ID. Reservation response should contain the same data as the request.

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

Access token to your API.

+
required
string or integer

Your hotel id.

+
required
object (ReservationGroup)

Responses

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 for current state of the reservation

+

Usage:

+
    +
  • queried by Termino when a reservation disappears from synchronized interval (moved to another room, term, room deleted etc.) without being updated first (failsafe).
  • +
+
Request Body schema: application/json
required
accessToken
required
string

Access token to your API.

+
required
string or integer

Hotel id.

+
required
string or integer

Reservation id.

+

Responses

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.

+

Usage:

+
    +
  • synchronizing occupation changes once a day
  • +
+
Request Body schema: application/json
required
accessToken
required
string

Access token to your API.

+
required
string or integer

Your hotel id.

+
required
object (DateInterval)
Array of strings or integers

Filter occupations on given room types.

+

Responses

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.

+

Usage:

+
    +
  • called periodically to check if hotels are still active
  • +
+
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
{
  • "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": [
    ]
}
+ + + diff --git a/dist/logo.svg b/dist/logo.svg new file mode 100644 index 0000000..59667b2 --- /dev/null +++ b/dist/logo.svg @@ -0,0 +1,19 @@ + + + + + + + + + diff --git a/dist/slevomat.svg b/dist/slevomat.svg new file mode 100644 index 0000000..1593689 --- /dev/null +++ b/dist/slevomat.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/docs/favicon.png b/docs/favicon.png index b5c1a2d8b44a7e0021d8ee7305a3570f7462c942..962d8f38d62c884412567069fa29952bfb5b7a54 100644 GIT binary patch literal 6318 zcmeHLOK4M35Ir|ZoB!);J}>bf6|pOcJW&t?tB7v3f`8~r!B4BAt12cgT)8QNrgbIS zS{2c>JG-#;v+z@Dl~z}-{G>^f##(e4=e~SMUh<0B)D+*q-1}zc+_`gyo6Af91|xz& z&}>1U0Bi&h2;^i7@R@X?D3aZTCI(#b0ZoLVC1@q)>lCtPCuJlYr-{o9nM?*BX->w! z;}gvfZgpbd{!MfrVVIpsW5+r>n#p105JUgHZbbXKFgVbQ@i4=5GLGoo2!8*X#Z>$o z2K##uIn2;S{J8f9Qd5)IwO&B;THxXBYuK^|coMxsK5d9yWq8zc9mzxtJA=+_K>Da> zK+nLuWnigJf1LrV!@|nQ;#{ufU`ZKRQPgSSS60TmwebGRc)u3D+IXz>mCozXJg?Ti zy1q6uV3PpvVv22%$5psWu4SvVqLo$<*~#iFp!r8Y3vb}~2C|l3RO6g@QyE^=!kf8& zFIgK);_+$WZDxZZdtRaFydKT-YWdOiwV46^eWu@mMSq{Gxt;S?Xz3eO%mD9G1H@a2 z3w^4IggoW?)Q;o3l|GgCsN*4q@Y#cC+YYo7htC|q&mYrBrxFOA-jA7d3Kvi9Rr=G3 zT#tIGeV@{wUO3r;#N=1BZ38+^>{0qr-iO9xU-CQZvz`Gx12vWbsYb|aEv_{ipbpDj zY-Y?~t=&=L-|AAYU+A(&FxE+u&7Mt@T~wb(@cE3AR4C}(mFC%saHl{4PorfGo{XW zKk@=k&oK-Wzk5BLU7#9|mQjl=Z{W(+vb?#>SfubDlQ(g(vsDfjsmng+_NNM`YVi+U CCemI2 literal 716 zcmV;-0yF)IP)%VB|+?Zc6U79Fd(~o z{D|pM53aYv*Xu*+;t;R ztxTS_#uaVTO10!N0#Td+sPZOI3}g;K7gmNv;&8mC}ovhoU7~Hk?V{(mxXdpITSDfy{OtD$)?{1ik>OE-luH zcgy2=!JC=`aq0k|)I?_Lm`LnXfmA*L+d4?EMnduYmsd90h0q**|exB8$z}aF>sLu4C9dhsv3+ zV=4O<7(1iQUpzOT!sZ7Nq(kL(ESf(QtyZ>>*}!!gN@a#PonP%;PEvbvSM)*{BZ#O0<&1RUAl#1Bq#zwj4wU+CUb5VXL6)`Ef<1vQcahkbbW(a@M1*!5nupxRRQ8B9DfM_0000 - API Reference | ReDoc - + API Reference | Termino.eu Hotel API + + +