HAPI version 1 to version 2 Migration Guide


This guide is intended to help Holidu API (HAPI) partners transition from version 1 to version 2. The new version includes a range of new features, improvements, and bug fixes, and is designed to make the API easier and more efficient to use.

Before You Begin:

Before you begin the migration process, please make sure to read the Release Notes for version 2 of the API. This will give you a detailed overview of all changes and new features, as well as any breaking changes or deprecated functionality.

Step 1: Review your Code

Before making any changes to your code, take a moment to review it and make sure that you understand how your current implementation uses HAPI version 1. This will help you identify any areas of your code that will need to be updated to work with version 2.

Step 2: Update your Endpoints

In HAPI version 2, the base endpoint has changed. In HAPI version 1, the base endpoint is /rest/public/integration/{operation}. However, the base endpoint for HAPI version 2, will be /v2/apartment/{operation}.

Step 3: Update your API operations

One of the most significant changes in this release is the addition of a granular endpoint for apartment management. This new endpoint will give you more control over your apartment listings, allowing you to manage your information in a more efficient and accurate way.

If you use /apartment endpoint to push facilities, extra costs, photos, reviews and more

Kindly make use of the granular endpoints for each operation, and do not push all those data through the apartment endpoint.

If you use /facilities endpoint to push extra costs information

Please only use the new /extracosts endpoint to push the information. You can still however use the /facilities endpoint to indicate if your facility requires additional fees, or if it is a private usage.

Step 4: Update your code to adapt to API response

In version 2 of the API, some of the parameters and responses have changed. For example, the response format for retrieving apartment information has been updated. In HAPI version 1, when you perform GET operation of an apartment, you will get all the information, such as extraCosts, customerReviews, facilities, and many more. In HAPI version 2, the response data has been trimmed down to only include basic information, keeping a slim response.

Review the API Reference for version 2 to see the updated parameters and responses, and make any necessary changes to your code.

Step 5: Test your Code

After making any necessary changes to your code, make sure to thoroughly test it to ensure that everything is working as expected.

Step 6: Deploy your Changes

Once you have thoroughly tested your code, you can deploy your changes and start using HAPI version 2.


By following these steps, you can easily and smoothly transition from HAPI version 1 to version 2. If you have any questions or concerns about the migration process, please don't hesitate to reach out to our support team for assistance.