Manage Hotels
Create and edit your own hotels: the property itself, its images, its booking contact, its descriptions and its promotions.
These endpoints are for DMC keys. A hotel belongs to the DMC that owns it, so a tour operator key can read hotels but not change them. A hotel belonging to another organization answers 404, not 403 — we never confirm that a resource you cannot reach exists.
For the full request and response schemas, see the complete API Reference.
The shape of it
One endpoint per thing you edit:
| What | Endpoint |
|---|---|
| The hotel | POST /api/v3/hotels, PUT / PATCH / DELETE /api/v3/hotels/{id} |
| Its images | GET / POST /api/v3/hotels/{id}/images, PATCH / DELETE .../images/{imageId} |
| Its rooms | GET / POST /api/v3/hotels/{id}/rooms, PUT / PATCH / DELETE .../{roomId} |
| Its room images | GET / POST .../rooms/{roomId}/images, PATCH / DELETE .../images/{imageId} |
| Its contact | GET / PUT /api/v3/hotels/{id}/contact |
| Its descriptions | GET / PUT /api/v3/hotels/{id}/descriptions |
| Its promotions | GET / POST /api/v3/hotels/{id}/promotions, PUT / PATCH / DELETE .../{promotionId} |
The hotel body carries scalars and id arrays only. Nothing that has its own id — an image, a description — travels inside it, so changing one image is one small call rather than a resend of the whole property.
Create a hotel
POST /api/v3/hotels — the owning organization comes from your key, so there is no organizationId in the body.
{
"name": "Bali Beach Resort & Spa",
"cityId": "3411",
"currency": "USD",
"address": "Jl. Pantai 12, Sanur",
"lat": -8.6785,
"lon": 115.2621,
"stars": 5,
"styleIds": ["8"],
"kindIds": ["2"],
"categoryIds": ["5"],
"dmcReference": "BALI-SANUR-01",
"timezone": "Asia/Makassar"
}name, cityId and currency are required; everything else is optional. Leave lat/lon out and the hotel takes the city centre, so it still shows up in map searches. An unknown or archived id in styleIds, kindIds, categoryIds or locationIds returns 400 INVALID_FILTER_VALUE, and nothing is saved.
The response is 201 with the created hotel, in the same shape GET /api/v3/hotels/{id} returns:
{
"data": {
"id": "4242",
"name": "Bali Beach Resort & Spa",
"city": { "id": "3411", "name": "Sanur" },
"country": { "id": "102", "name": "Indonesia" },
"stars": 5,
"currency": "USD",
"styles": [{ "id": "8", "name": "Beach" }],
"kinds": [{ "id": "2", "name": "Resort" }],
"categories": [{ "id": "5", "name": "Palace" }],
"images": [],
"state": "in_progress",
"showcased": false,
"showToTa": true,
"priceLevel": null,
"dmcReference": "BALI-SANUR-01",
"timezone": "Asia/Makassar"
}
}A new hotel starts in_progress. It becomes sellable when you set "state": "available" — until then it stays out of the catalog and out of availability, though you can always read it back yourself.
Change a hotel
Two verbs, and the difference matters.
PATCH /api/v3/hotels/{id} changes only the keys you send. An absent key is left alone; an explicit null clears the value. Use this for everyday edits.
{ "stars": 4, "priceLevel": "medium", "timezone": null }That request sets the rating and the price level, clears the timezone, and touches nothing else.
PUT /api/v3/hotels/{id} replaces the whole hotel. Any field you leave out goes back to its default, so send the complete representation or use PATCH.
Prefer PATCH
PUT is there when you keep a full local copy of the hotel and want the server to match it exactly. If you are changing one or two fields, PATCH is what you want — it cannot wipe something you forgot to include.
Both return the updated hotel, so there is no follow-up GET.
Styles, kinds, categories and locations
These are id arrays, and each one is authoritative: the list you send becomes the list on the hotel. Send "styleIds": [] to clear them, or leave the key out (on PATCH) to leave them alone.
Currency
The currency is frozen once the hotel has a published contract — signed rates are denominated in it. Trying to change it then answers 409 with HOTEL_CURRENCY_LOCKED.
Delete a hotel
DELETE /api/v3/hotels/{id} archives the hotel and returns 204. It leaves the catalog, availability and search; bookings already made keep referring to it. While a booking on the hotel has not ended, the delete answers 409 with HOTEL_HAS_ACTIVE_BOOKINGS.
Rooms
Rooms have their own page: Hotel rooms.
Images
One image per call, each addressed by its own id. Send the file as a base64 data URI; a remote URL is rejected rather than silently ignored.
POST /api/v3/hotels/4242/images
{
"name": "lobby.jpg",
"data": "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQ...",
"primary": false
}PATCH .../images/{imageId}renames an image or makes it the main one. The file itself never changes — to replace a picture, add the new one and delete the old.DELETE .../images/{imageId}removes exactly that image and returns204.primary: truedemotes whichever image was main before, so there is always at most one.
Adding an image never removes another
The v1 attachment endpoints replace the whole collection, so anything you do not resend is deleted. These endpoints do not: adding, renaming or deleting one image leaves the rest untouched.
Contact
The hotel has one booking contact, so PUT /api/v3/hotels/{id}/contact creates or replaces it. emailsCc is a list of addresses copied on booking mail.
{
"firstName": "Made",
"lastName": "Wirawan",
"email": "reservations@bali-beach.example",
"emailsCc": ["ops@bali-beach.example"],
"phoneNumber": "+62 361 123456",
"job": "Reservations manager"
}Being a PUT, this is the whole contact: a field you leave out is cleared, not kept.
Descriptions
Descriptions are grouped by category and written per language. Pass the language in locale; other languages are untouched.
PUT /api/v3/hotels/4242/descriptions?locale=en
{
"descriptions": [
{ "categoryId": "3", "content": "<p>A beachfront resort on the Sanur shore.</p>" }
]
}The list is authoritative for that language: a category you leave out loses its entry. One entry per category — sending the same categoryId twice answers 400 with DUPLICATE_REFERENCE.
GET /api/v3/hotels/{id}/descriptions?locale=en returns them with the category as a { id, name } reference, and that id is what you send back as categoryId.
Promotions
Read, create, change and archive the hotel's promotions. Only the DMC that owns the hotel reaches them: a tour operator key, or another DMC (a partner included), gets 404 on every promotion route. How you build a discount is yours.
GET /api/v3/hotels/1042/promotions?states=operational&activeOn=2027-02-10&sort=-updatedAt
GET /api/v3/hotels/1042/promotions/8812
POST /api/v3/hotels/1042/promotions
PUT /api/v3/hotels/1042/promotions/8812
PATCH /api/v3/hotels/1042/promotions/8812
DELETE /api/v3/hotels/1042/promotions/8812The list takes states (draft, operational, archived), types (the benefit types below), activeOn (a night: the promotions with a stay window covering it) and sort (name, createdAt, updatedAt, - for descending; ascending id by default).
{
"id": "8790",
"name": "Honeymoon upgrade",
"cancellationPolicy": null,
"state": "operational",
"recipients": [
{ "id": "19", "name": "Wanderlust Tours" },
{ "id": "212", "name": "Lotus DMC" }
],
"benefit": {
"type": "upgrade",
"amount": null,
"percent": null,
"freeNights": null,
"basis": null,
"compulsory": null,
"extraBeds": "excluded",
"upgradedFromRoom": { "id": "5521", "name": "Deluxe Garden View" },
"upgradedToRoom": { "id": "5530", "name": "Pool Villa" },
"ageGroups": [],
"paxGroups": [],
"rooms": [],
"amenities": []
},
"cumulation": {
"order": 2,
"promotions": [
{ "promotion": { "id": "8812", "name": "Early booker 15%" }, "order": 1 }
]
},
"minNights": 3,
"minRooms": null,
"minPax": 2,
"maxPax": 2,
"minDaysBeforeArrival": null,
"maxDaysBeforeArrival": null,
"periods": [
{
"id": "30098",
"stays": [
{ "startAt": "2027-02-01", "endAt": "2027-04-30", "weekdays": [] }
],
"booking": {
"startAt": "2026-10-01",
"endAt": "2026-11-30",
"weekdays": []
}
}
],
"createdAt": "2026-08-21T13:05:44.000Z",
"updatedAt": "2026-08-21T13:05:44.000Z"
}stateis the only lifecycle field: only anoperationalpromotion applies. A draft never applies, whatever its dates.recipientslists every organization the promotion is offered to, your own DMC included (your own quotes and bookings). Write it asrecipientIds: your organization and/or tour operators connected to the hotel.periods: each period says which nights it covers (stays) and, for a book-by offer, when the booking must be made (booking,null= any time). Bounds are inclusive;weekdaysholds ISO day numbers, 1 for Monday through 7 for Sunday, and[]means every day. A period withoutbookingcovers exactly one stay window.minDaysBeforeArrivalmakes an early booker (booked at least N days before check-in),maxDaysBeforeArrivala last minute (at most N days). Send one at most.cumulationlists the promotions applied together with this one, each ranked (order, 1 = applied first). An operational cumulative promotion ranks itself and every member.
The benefit
benefit.type decides which value fields it takes. Any other value field sent is a 400 PROMOTION_INVALID_BENEFIT.
type | Takes |
|---|---|
discount | percent or amount; basis room_night or traveler_night |
free_night | freeNights; basis room_night or traveler_night; minNights above freeNights |
supplement | percent (with a _night basis) or amount (any basis); compulsory |
early_check_in, late_check_out | as a supplement, per room (room_night or room_stay); no minNights, no booking lead time |
upgrade | upgradedFromRoomId and upgradedToRoomId; no basis |
amenity | amenityIds; no basis (each amenity is priced per room or per person by its own kind) |
basis says what the money is counted on: room_night, traveler_night, room_stay or traveler_stay (a _stay basis charges once per stay). A supplement, early check-in or late check-out is compulsory (inside every offer's price) or not (an add-on the traveler picks). amount is in the hotel's currency. roomIds names the rooms the promotion applies to; an operational promotion needs at least one, except an upgrade, which applies to upgradedFromRoomId. ageGroups give a value by age, with a traveler_ basis only: each group has one open bound ("below 12" is { "maxAge": 11 }, "12 and above" is { "minAge": 12 }), groups do not overlap, and each takes percent or amount like the benefit.
{ "type": "discount", "amount": { "currency": "EUR", "amount": 20 }, "basis": "room_night", "roomIds": ["5521"] }
{ "type": "free_night", "freeNights": 1, "basis": "room_night", "roomIds": ["5521"] }
{ "type": "supplement", "amount": { "currency": "EUR", "amount": 45 }, "basis": "traveler_stay", "compulsory": true, "roomIds": ["5521"] }
{ "type": "late_check_out", "percent": 50, "basis": "room_night", "compulsory": false, "roomIds": ["5521"] }
{ "type": "upgrade", "upgradedFromRoomId": "5521", "upgradedToRoomId": "5530" }
{ "type": "amenity", "amenityIds": ["77"], "roomIds": ["5521"] }
{ "type": "discount", "percent": 10, "basis": "traveler_night", "roomIds": ["5521"], "ageGroups": [{ "maxAge": 11, "percent": 50 }] }Writes
POST answers 201 with the promotion. PUT takes the whole promotion: a key left out goes back to its default. PATCH changes only the keys sent; benefit, cumulation and periods are replaced whole when sent.
{
"name": "Early booker 15%",
"state": "operational",
"recipientIds": ["19"],
"benefit": {
"type": "discount",
"percent": 15,
"basis": "room_night",
"roomIds": ["5521"]
},
"cumulation": {
"order": 1,
"promotions": [{ "promotionId": "8790", "order": 2 }]
},
"minDaysBeforeArrival": 60,
"periods": [
{
"stays": [
{ "startAt": "2027-01-05", "endAt": "2027-03-31", "weekdays": [] }
],
"booking": null
}
]
}An operational promotion needs a benefit, at least one period and at least one recipient. The refusals are typed 400s: INVALID_PERIOD, INVALID_PAX (minPax above maxPax), PROMOTION_INVALID_BENEFIT, PROMOTION_INVALID_RECIPIENT (with the refused ids), INVALID_ROOM_ID (a room of another hotel), INVALID_FIELD_VALUE (a cumulation that lists a promotion twice, itself, a promotion of another product or one of the same family, or lacks an order; details.field names the field).
PATCH leaves out what it is not sent. null clears a nullable field (cancellationPolicy, benefit, cumulation, the conditions); on name, state, recipientIds and periods it is a 400.
DELETE archives the promotion and answers 200 with it, state: archived. Bookings refer to their promotions, so a promotion is never erased; it stays readable.
A promotion id belonging to another hotel answers 404.
What a tour operator sees
Two read-only ways to check your hotels as a partner tour operator sees them. Both take viewAs, the tour operator's id. The tour operator must have a confirmed hotel connection with you, or be listed on an enabled partnership of yours; anyone else answers 403 VIEW_AS_NOT_ALLOWED.
- Add
viewAstoGET /api/v3/hotels/availabilityorGET /api/v3/hotels/{id}/rooms/availabilityto get the tour operator's response for your own hotels, at its price. Other DMCs' hotels are left out (404on their rooms). The roomsrequestIdcannot be booked, andtripIdorreplaceBookingIdcannot be sent withviewAs(400 VIEW_AS_WITH_TRIP). GET /api/v3/hotels/{id}/availability/explain?viewAs=…&checkIn=…&checkOut=…&rooms[0][adults]=2runs the same search and says why. WithoutviewAsit explains your own search.access: whether the tour operator sees the hotel, and each access rule it passes or fails.listPricesand each room'sprices: the price, withlineswhose amounts add up to it (net, promotions, margins, conversion, rounding).- each room's
allotments: instant, on request or closed, one line per night (pool, count, rooms needed, release window). reasonson every room left out, or on request, with the data behind them (code+details).
Explain only covers your own hotels and your own inventory: another DMC's hotel answers 404, and bed-bank offers on your hotel are left out.
Migrating from v1
| v1 | v3 |
|---|---|
POST /api/v1/hotels/create | POST /api/v3/hotels |
PUT /api/v1/hotels/{id} | PATCH /api/v3/hotels/{id} |
hotelInformation.* | top-level fields |
primaryAttachment / secondaryAttachments | /images sub-resource, primary: true for the main one |
contact | /contact sub-resource |
hotelDescriptions | /descriptions sub-resource |
GET /api/v1/promotions/{hotelId}/list | GET /api/v3/hotels/{id}/promotions |
POST / PUT /api/v1/promotions | POST / PUT / PATCH .../promotions |
empty 200 response | the updated hotel in { "data": ... } |
The v1 endpoints keep working and are marked deprecated in the reference. Two things they got wrong are worth knowing if you are porting:
PUT /api/v1/hotels/{id}nulls any scalar left out ofhotelInformation.PATCH /api/v3/hotels/{id}leaves absent fields alone.- v1 returned an empty body, so you needed a second call to see the result. v3 returns the hotel.