Partner path · step 5 of 10
Create room types(the kinds of room the hotel sells)
A hotel sells kinds of room, not single rooms. Each kind is a . In this step you add a room type to your , and you read the ids of all its room types.
Before you start
What a room type is
The Lantern House has 10 rooms that are all alike. A guest does not book room 104. A guest books "a Deluxe Room". So the hotel has one room type, Deluxe Room, with 10 rooms.
Room types, rate plans and rates explains it with a picture.
What a ref is
Your own software already has an id or a name for each room type. You send it in the field ref. ZimmerStack saves this next to the room type.
- A ref that is new
- ZimmerStack creates a new room type.
- A ref that exists
- ZimmerStack changes that room type. No second one is made.
- So you can send the same list again
- The same list sent two times makes nothing two times.
- Never change a ref
- If you send a room type under a new ref, ZimmerStack takes it for a new room type.
The three room type requests
Room types have three requests. They look different, so here they are side by side.
| What you want | Request | How it names the room type | How many at once |
|---|---|---|---|
| Read them | GET /catalog | It names none. It answers every one of the hotel. | All |
| Create or change | PUT /catalog/room-types | By your own ref, in the body. | A list |
| Delete | DELETE /catalog/room-types/{roomTypeId} | By ZimmerStack's id, or by your own ref with ref: in front. In the address. | One |
- What you wantRead themRequestGET /catalogHow it names the room typeIt names none. It answers every one of the hotel.How many at onceAll
- What you wantCreate or changeRequestPUT /catalog/room-typesHow it names the room typeBy your own ref, in the body.How many at onceA list
- What you wantDeleteHow it names the room typeBy ZimmerStack's id, or by your own ref with ref: in front. In the address.How many at onceOne
A delete cannot be undone, so it names exactly one room type, in the address. It takes ZimmerStack's id or your ref. The id always works, because a room type that the hotel's owner made has no ref. Your ref works for a room type your software created. You get the id from the answer of the first two requests.
1. Write the body
The is a list named roomTypes. Each item is one room type. Save this example as create-room-types.json.
{
"roomTypes": [
{
"ref": "rt-suite",
"name": "Suite",
"roomCount": 2,
"adults": 3
}
]
}- ref
- Needed. Your own id for this room type. Letters, digits and the signs . _ : - are allowed.
- name
- Needed. The name of the room type. The hotel's owner sees it.
- roomCount
- Needed. How many rooms of this room type the hotel has. A whole number.
- adults
- Needed. The most adults one room takes.
- children
- You can leave it out. The most children one room takes. Left out, it is 0.
2. Send the request
The request is PUT /catalog/room-types. Your test key works for all your hotels. So this request must say which hotel it is for. You do that with the .
Choose your language. Put your own key in place of zsk_test_YOUR_KEY, and the id of your test hotel in place of YOUR_PROPERTY_ID.
Save the example above as create-room-types.json. Open a terminal in the same folder and run this. On Windows PowerShell, type curl.exe instead of curl.
curl -X PUT "https://api.zimmerstack.com/api/v1/connect-api/v1/catalog/room-types" -H "Authorization: Bearer zsk_test_YOUR_KEY" -H "X-ZS-Property: YOUR_PROPERTY_ID" -H "Content-Type: application/json" -d "@create-room-types.json"What comes back
The is 200. It means: saved. The answer has one item for each room type you sent.
{
"statuscode": 200,
"message": "OK",
"data": {
"items": [
{
"ref": "rt-suite",
"id": 413,
"action": "created",
"sync": "IN_SYNC",
"notice": null
}
],
"channelManager": {
"enabled": true,
"reason": null
}
}
}- ref
- Your own id, as you sent it.
- id
- ZimmerStack's id of the room type. It is a whole number. A later request names the room type by your ref, or by this id as roomTypeId.
- action
- What was done. With created, the room type is new. With updated, something changed. With unchanged, nothing was different. With adopted, the hotel had a room type of this name with no ref, and it is yours now.
- sync
- IN_SYNC on a test hotel. On a real hotel it says if our has the room type too.
- notice
- A sentence, when there is something to know. If not, it is null.
- channelManager.enabled
- true: the hotel can take your updates.
Change a room type
To change a room type, send it again with the same ref. An example: The Lantern House builds two more Deluxe Rooms. You send the ref rt-deluxe again, with roomCount 12. The answer says updated. The id stays the same.
Delete a room type
To delete a room type, send Delete a room type with its id. Its rate plans are deleted with it. This cannot be undone. Creating, changing and deleting work in the same way for a real hotel.
You can also name the room type by your ref, with ref: in front: the address then ends with ref:rt-suite in place of 413.
One thing is different on a real hotel with a connected OTA. The delete is refused while an OTA still has a match to the room type. Remove every match first, by API or in the partner portal. Delete a room type says how. Your test hotel has no OTA, so you do not see this here.
3. Read the ids back
To send updates you do not need the ids: a later request can name a room type by your ref. You need the ids for two things. One is to read a booking, because a booking names its room type by ZimmerStack's id. The other is to name a room type by id, if you prefer that.
The answer above gave you the id of the Suite. One request gives you all of them: GET /catalog.
Open a terminal and run this. On Windows PowerShell, type curl.exe instead of curl.
curl "https://api.zimmerstack.com/api/v1/connect-api/v1/catalog" -H "Authorization: Bearer zsk_test_YOUR_KEY" -H "X-ZS-Property: YOUR_PROPERTY_ID"The answer has two lists: roomTypes and ratePlans. For the example hotel they hold this.
- Deluxe Room
- A room type. id 412, ref rt-deluxe. It was made with the hotel.
- Suite
- A room type. id 413, ref rt-suite. You made it in this step.
- Deluxe EP (2 occ)
- A of the Deluxe Room. id 900. It was made with the hotel.
The action page Get room types and rate plans explains every field of the answer.
What you should see
- The answer of the first request
- Status code 200. The item for rt-suite says created, and it has an id.
- The answer of the second request
- Two room types. Each has its id and your ref.
- One thing is still missing
- The Suite has no rate plan yet. A room type without a rate plan has no price, so it cannot be sold. The next step adds one.
If it does not work
- 400 PROPERTY_REQUIRED
- The request did not say which hotel. Add the X-ZS-Property header with the id of your test hotel.
- 404 PROPERTY_NOT_FOUND
- The id in X-ZS-Property is not one of your test hotels. Read the ids again with List your hotels.
- 400 VALIDATION
- A value is missing or has the wrong type, or one ref is in the list two times. The message names it.
- 409 CATALOG_CONFLICT
- Another room type of this hotel has this name. Use each name one time.
- 409 CATALOG_LIMIT_REACHED
- The hotel has as many room types as it may have. Delete one that is not used.
- 409 CATALOG_BUSY
- Another request for the room types or rate plans of this hotel is still running. Wait a few seconds and send again.
The action page Create or change room types has every field and every error of this request.
Words on this page
- Room type
- A kind of room the hotel sells, like Deluxe Room or Family Suite. A hotel can have 12 rooms of one room type.
- Test hotel
- A hotel in your sandbox. It works like a real hotel, but no OTA can see it and nothing is billed.
- Test key
- A key that starts with zsk_test_. It works only on a sandbox, so it can never change a real hotel.
- Ref
- Your own name or id for a room type or a rate plan. You choose it, and ZimmerStack remembers it.
- Body
- The data you send inside a request, written in JSON.
- Availability
- How many rooms of one room type are free to sell on one night. Learn more
- X-ZS-Property
- The header that tells ZimmerStack which hotel a request is for. Its value is the property id.
- Header
- A small piece of extra information sent with a request, like your key.
- Status code
- A number in every response. 200 to 299 means it worked. 400 and above means there is a problem.
- Connectivity partner
- The company that carries ZimmerStack's numbers to each OTA and brings the bookings back. You never call it. Where an API name says channel manager, it means this last step. Learn more
- Rate plan
- One way to sell a room type, with its own price. For example Room only, or With breakfast.
Routes, samples, limits and codes on this page come from the API's public contract, read live, Sat, 05 Dec 2026 01:08:01 UTC.