The updateType field is crucial in determining the action to be performed when pushing metadata to the client. This field is included in several metadata requests and helps define whether the data should be created, modified, enabled, or disabled.
Values for the updateType Field
The updateType field can have the following values, depending on the type of metadata being processed:
NEW
- Used when sending new data for creation.
- For example: If a new hotel, roomtype, or rateplan is being pushed to the client for the first time, this value is set.
UPDATE
- Used when modifying existing data.
- For example: If there is a modification to an existing hotel, roomtype, or rateplan (such as updating the rateplan name or modifying room amenities), this value is set to UPDATE.
DISABLE
- Used when disabling a piece of metadata.
- For example: If Hotel Trader decides to disable a tax, the updateType is set to DISABLE for the tax metadata.
ENABLE
- Used when enabling a previously disabled piece of metadata.
- For example: If a tax that was previously disabled is to be enabled again, the updateType is set to ENABLE.
Example Scenarios
Rateplan Creation (NEW)
When a rateplan does not exist on the client’s system, Hotel Trader sends a NEW updateType to create it for the first time.
Rateplan Modification (UPDATE)
If the rateplan name changes or any other modification occurs in an existing rateplan, the UPDATE value is sent, indicating that the metadata is being updated.
Tax Disable (DISABLE)
If a tax needs to be disabled, Hotel Trader will send the tax metadata with the DISABLE updateType.
Tax Enable (ENABLE)
If a previously disabled tax is to be re-enabled, the ENABLE value is sent, allowing the client to restore the tax in their system.
Usage with Different Metadata Types
Roomtype, Rateplan and Cancellation Policy
- For these metadata types, the possible values for updateType are NEW (for creating) and UPDATE (for modifications).
- DISABLE and ENABLE values aren't needed. These objects remain enabled on the client side. Rather than enabling or disabling them, ARI is enabled or closed for a rateplan, roomtype, or any combination of these on the Hotel Trader side.
- For the Cancellation Policy, the possible values are NEW and UPDATE.
Hotel and Tax
For the hotel and tax metadata, all four values—NEW, UPDATE, DISABLE, and ENABLE—are applicable.