Apartment
Deactivate apartment for provider
Takes the apartment offline: it is no longer visible or bookable on Holidu. Holidu does not deactivate an apartment because its calendar is closed or empty, so deactivate every apartment that can no longer be booked on your side (for example a closed calendar) instead of only removing its availability. Deactivating an inactive apartment changes nothing.
Activate apartment for provider
Activates the apartment; it is shown on Holidu once its data passes validation. Call it once all data (descriptions, photos, facilities, prices and availability) has been pushed, and check GET /v2/apartment/validation for data problems, because activation does not validate the apartment. Apartments that Holidu has delisted (for example as duplicates) stay inactive although the call answers OK; the `active` flag of GET /v2/apartment shows the real state.
Get an apartment
Returns the core data of the apartment as stored at Holidu, plus its `holiduApartmentId` and `active` flag. Identify the apartment with `providerApartmentId` or `holiduApartmentId` (the latter wins if both are sent); API keys of channel managers must also send `provider`.
Create or update an apartment
Creates the apartment on the first call for a `providerApartmentId` and updates it on later calls; call it first, because all other apartment endpoints need the apartment to exist. Updates are not partial: always send the complete apartment object, as most omitted fields are cleared (leaving out `providerApartmentGroupId` removes a unit from its multi-unit). New apartments are inactive until you call PUT /v2/apartment/activate; on creation `providerApartmentId` may only contain letters, digits and `._:-` (at most 120 characters).
Get basic information about all apartments
Lists all apartments of the provider page by page, active and inactive, with `holiduApartmentId`, `active` and the last update time; multi-units without units appear as inactive `STAND_IN-<providerGroupId>` entries. `pageNumber` starts at 0 and `pageSize` defaults to 20. `lastUpdate` is formatted `yyyy-MM-dd HH:mm:ss` and `holiduApartmentId` is a string here.
Get validation result of apartment
Returns Holidu's latest validation result for the apartment: `valid` and the problems in your data as `errorCode` and `message` (the codes are explained in the Validation guide); `valid` can be false with an empty list when Holidu-side checks fail or data is incomplete. Call it after pushing all data or when an active apartment is not bookable. It returns the stored result and runs a validation on the spot only if none exists yet, so data you have just pushed may not be reflected yet. `lastValidatedAt` is formatted `yyyy-MM-dd HH:mm:ss`.