Cancellation API
Document Hotel API Cancellation

Description of penalties for cancellation
If you do not check in, or if you cancel or modify this reservation after the check-in time, you may be subject to a penalty fee of up to 100% of the booking value.
Penalties
Example 1: Cancellation fee per night
Free cancellation before
2021-05-12T18:00:00.000+07:001 night fee for cancellation from
2021-05-12T18:00:00.000+07:00to2021-05-13T18:00:00.000+07:00
Example 2: Cancellation fee by price
Free cancellation before
2021-05-12T18:00:00.000+07:00Cancellation fee of 200,000 VND from May 12, 2021, 18:00 (GMT+7) to May 13, 2021, 18:00 (GMT+7).
Example 3: Cancellation fee by percentage
Free cancellation before
2021-05-12T18:00:00.000+07:00Cancellation fee 70% of room value from
2021-05-12T18:00:00.000+07:00to2021-05-13T18:00:00.000+07:00
Example 4: Various types of cancellation fees
Free cancellation before
2021-05-10T18:00:00.000+07:00Cancellation fee 50% of room value from
2021-05-10T18:00:00.000+07:00to2021-05-12T18:00:00.000+07:00Cancellation fee 70% of room value from
2021-05-12T18:00:00.000+07:00to2021-05-13T18:00:00.000+07:00
Example 5: Cancellation fee with various fee
Free cancellation before
2021-05-10T18:00:00.000+07:00Cancellation fee 50% of room value from
2021-05-10T18:00:00.000+07:00to2021-05-12T18:00:00.000+07:00with various fee.Cancellation fee of 25,000 VND from
2021-05-10T18:00:00.000+07:00to2021-05-12T18:00:00.000+07:00
Example 6: Free cancellation
Free cancellation before
2021-05-12T18:00:00.000+07:00
1. API to Check Cancellation Eligibility and Fees
POST: /api/v3/hotel/check-cancel-penalty
Returns room cancelability status information, and cancellation penalty information.
Request Body
Model
Example
Response
Code 200
OK
Model
result (CheckCancelPenaltyResult, Optional)
Returned result information
status (string, optional) = [‘ALLOW_CANCELLATION’, ‘NOT_ALLOW_CANCELLATION’, ‘UNKNOWN’]
Information to determine cancellation status
ALLOW_CANCELLATION: Chấp nhận huỷ phòngNOT_ALLOW_CANCELLATION: Không chấp nhận huỷ phòngUNKNOWN: Unable to determine status, needs to be rechecked.
cancelPenalties (Array[CancelPenalty], optional),
cancelPenaltyTotal (number, optional),
duration (Integer, Optional)
success (Integer, Bool)
infos (Array[InfosDTO], Optional)
errors (Array[ErrorsDTO], Optional)
textMessage (String, Optional)
2. API request to cancel hotel booking
POST: /api/partner/cancellation
API sends a cancellation request for a hotel booking and waits for a response from the provider
Notice:
Security Requirements: Data must be encrypted and include a digital signature.
Request: Encryption and digital signature are not required.
Response: Certain parts of the response must be encrypted and include a digital signature.
Request Body
Model
Key (string, required)
Decryption key for the encrypted data.
Data (string, required)
Encrypted data containing a digital signature.
Signature Data Schema:
Original Data Schema:
access_code (String, required) – Access code provided by Gotadi to the Partner.
bookingNumber (String, required) – Reference code for the booking.
cancel_penalty_amount (String, optional) – Cancellation penalty fee, formatted to two decimal places (0.00).
Response
Code 200
OK
Model
key (String, required) – Decryption key for the encrypted data.
data (String, required) – Encrypted data containing a digital signature.
Signature data schema:
Original data schema:
access_code (String, required) – Access code provided by Gotadi to the Partner.
booking_number (String, required) – Reference code for the booking.
error_code (String, required) – Error code.
product_type (String, optional) – Product type, with possible values:
AIR(flight) orHOTEL(hotel), corresponding to the purchased product.cancellation_status (String, optional) – Cancellation status information:
CANCEL_UNKNOWN – Status is unknown and requires rechecking.
CANCEL_PENALTY_MISMATCH – The cancellation penalty fee does not match. The API for checking cancellation eligibility and penalty fees should be called again before resubmitting the cancellation request.
CANCEL_WAITING_CONFIRM – Cancellation request sent successfully, waiting for confirmation from the provider.
CANCEL_CONFIRMED – Cancellation confirmed successfully.
CANCEL_EXPIRED – Cancellation request has expired.
3. API to Check Room Cancellation Status
POST: /api/partner/cancellation-check
API to check room cancellation status
Note
Security Requirements: Encryption and Digital Signature Required
Request: Encryption and digital signature are not required.
Response: Certain parts of the response must be encrypted and include a digital signature.
Request Body
Model
key (string, required),
data (string, required),
Signature data schema:
Original data schema:
access_code (String, required)
Gotadi provide
bookingNumber (String, required)
Reference code
Response
Code 200
OK
Model
key (String, required)
data (String, required)
Signature data schema:
Original data schema:
access_code (String, required) – Access code provided by Gotadi to the Partner.
booking_number (String, required) – Reference code for the booking.
error_code (String, required) – Error code.
product_type (String, optional) – Product type, with possible values:
AIR(flight) orHOTEL(hotel), corresponding to the purchased product.cancellation_status (String, optional) – Cancellation status information:
CANCEL_UNKNOWN – Status is unknown and requires rechecking.
CANCEL_PENALTY_MISMATCH – The cancellation penalty fee does not match. Call the API for checking cancellation eligibility and penalty fees before resubmitting the cancellation request.
CANCEL_WAITING_CONFIRM – Cancellation request sent successfully, waiting for confirmation from the provider.
CANCEL_CONFIRMED – Cancellation confirmed successfully.
CANCEL_EXPIRED – Cancellation request has expired.
product_type (String, optional) – Product type (
AIRfor flight,HOTELfor hotel).cancel_penalty_amount (String, optional) – Cancellation fee amount, formatted to two decimal places (0.00).
Last updated