This page describes the rules that your server must follow for all endpoints of the SIHOT.PMS Gift Voucher Interface.
SIHOT.PMS appends the endpoint name to the base URL that is configured for your server:
| Endpoint | URL |
|---|---|
| Token | <base URL>/S_AUTHENTICATE |
| Get voucher | <base URL>/S_EXTERNAL_GIFTVOUCHER_GET |
| Redeem voucher | <base URL>/S_EXTERNAL_GIFTVOUCHER_REDEEM |
The base URL can contain a path, for example https://giftvoucher.example.com/sihot. Provide it without a trailing slash: SIHOT.PMS adds the / before the endpoint name itself.
Provide your endpoints via HTTPS.
POST.Content-Type: application/x-www-form-urlencoded. See Authentication.Content-Type: application/json and the header Authorization: Bearer <access_token>.X-SIHOT-Env with the environment of the calling SIHOT.PMS installation (PROD, LAB, QA or DEV). Your server must check it, see Environment Check.transactionId (a GUID). Return it unchanged in your response. SIHOT.PMS does not compare it.Your server must check the header X-SIHOT-Env and accept requests only from a SIHOT.PMS installation of the same environment as your system. For example, your production system accepts only requests with PROD, and your test system only requests from the corresponding test environment. This ensures that a test system never communicates with a production system, and vice versa.
S_AUTHENTICATE. If the environment does not match, do not issue a token and answer with an error status, for example 403. SIHOT.PMS then shows the user that the authentication with the partner system failed.403.env. See Authentication.X-SIHOT-Env as of version 1100.06.02. Requests from earlier versions do not contain it.
| Status | Meaning for SIHOT.PMS |
|---|---|
200 (or 201) |
The response body is evaluated. result.success decides whether the operation was successful. |
400 |
The response body is evaluated as well. Use it for business errors, with result.success = false. |
| Any other status | The operation failed. SIHOT.PMS shows the HTTP status to the user and does not evaluate the body. |
200 and 400, SIHOT.PMS decides only by result.success. A 400 response with result.success = true is treated as success. Always set result.success = false for errors.
Every response of S_EXTERNAL_GIFTVOUCHER_GET and S_EXTERNAL_GIFTVOUCHER_REDEEM must contain the following fields, also when the operation failed:
| Field | Rule |
|---|---|
transactionId |
String, the transactionId of the request. Must not be null. |
giftVoucher |
Array of vouchers. Can be empty if the operation failed. |
result |
Object with the boolean success. If success is false, SIHOT.PMS shows errorCode and errorMessage to the user. |
The field names are case-sensitive.
Sample Error Response
If the response does not have this structure, SIHOT.PMS shows an error and does not continue.
Each voucher in giftVoucher must contain all of the following fields with the given JSON types. A voucher with a missing field or a wrong type is ignored.
| Field | JSON type |
|---|---|
status |
string |
externalVoucherNumber |
string, identical to the requested voucher number (case-sensitive) |
originalAmount |
number |
remainingAmount |
number |
partialRedemptionAllowed |
boolean |
sellDate |
string, YYYY-MM-DD |
expiryDate |
string, YYYY-MM-DD |
status, sellDate, expiryDate or partialRedemptionAllowed. If a voucher cannot be redeemed, for example because it is expired, blocked or not valid, answer with result.success = false and an errorMessage.
60.00. Return amounts with at most two decimals.YYYY-MM-DD. revenueDate is the business date of the hotel.