Skip to content

Partner path · step 6 of 10

Create rate plans(the ways a room is sold)

One room can be sold in more than one way: room only, or with breakfast. Each way is a , with its own price. In this step you give each of your its rate plans.

Before you start

  • Your , from step 2.
  • The id of your test hotel, from step 4. In the example it is 9001.
  • The of each room type, from step 5. In the example: rt-deluxe and rt-suite.

What a rate plan is

The Lantern House sells its Deluxe Room in two ways. Room only costs 4,500 a night. With breakfast it costs 5,000. These are two rate plans of one room type. A guest on an chooses one of them.

A rate plan belongs to one room type
It never moves to another one. To move it, delete it and create it again.
A rate plan says which meals are in the price
This is its . EP: room only. CP: with breakfast. MAP: breakfast and one meal. AP: all meals.
A room type needs one rate plan or more
Without a rate plan it has no price, so it cannot be sold.

Room types, rate plans and rates explains it with a picture. Meal plans has more about EP, CP, MAP and AP.

What your test hotel has now

Deluxe Room
One rate plan, room only. It was made with the hotel. Its name is Deluxe EP (2 occ).
Suite
No rate plan yet.

So you create two rate plans now: Bed and breakfast for the Deluxe Room, and Room only for the Suite.

The three rate plan requests

Rate plans have three requests. They look different, so here they are side by side.

  • What you wantRead them
    How it names the rate planIt names none. It answers every one of the hotel.
    How many at onceAll
  • What you wantCreate or change
    How it names the rate planBy your own ref, in the body.
    How many at onceA list
  • What you wantDelete
    How it names the rate planBy 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 rate plan, in the address. It takes ZimmerStack's id or your ref. The id always works, because a rate plan that the hotel's owner made has no ref. Your ref works for a rate plan your software created. You get the id from the answer of the first two requests.

1. Write the body

The is a list named ratePlans. Each item is one rate plan. Save this example as create-rate-plans.json.

create-rate-plans.json
{
  "ratePlans": [
    {
      "ref": "rp-bb",
      "roomTypeRef": "rt-deluxe",
      "name": "Bed and breakfast",
      "mealPlan": "CP",
      "defaultRate": 5000
    },
    {
      "ref": "rp-suite",
      "roomTypeRef": "rt-suite",
      "name": "Room only",
      "mealPlan": "EP",
      "defaultRate": 9000
    }
  ]
}
ref
Needed. Your own id for this rate plan. A new ref creates a rate plan. A ref that exists changes that rate plan.
roomTypeRef
The ref you gave the room type of this rate plan. Send this, or roomTypeId.
roomTypeId
ZimmerStack's id of the room type, a whole number. Send this, or roomTypeRef.
name
Needed. The name of the rate plan.
mealPlan
You can leave it out. One of EP, CP, MAP or AP.
defaultRate
Needed for a new rate plan. The real price of one night that new dates start with. Send it as a guest reads it: 5000 means 5,000 rupees. Without it, a request that creates a rate plan answers 400 VALIDATION, and nothing is saved.
occupancy
You can leave it out. How many guests the price is for. This is called .
refundable
You can leave it out. false means: the guest gets no money back after a cancel. Left out, it is true.

2. Send the request

The request is PUT /catalog/rate-plans. It names the hotel in the , like the request of the step before.

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-rate-plans.json. Open a terminal in the same folder and run this. On Windows PowerShell, type curl.exe instead of curl.

terminal
curl -X PUT "https://api.zimmerstack.com/api/v1/connect-api/v1/catalog/rate-plans" -H "Authorization: Bearer zsk_test_YOUR_KEY" -H "X-ZS-Property: YOUR_PROPERTY_ID" -H "Content-Type: application/json" -d "@create-rate-plans.json"

What comes back

The is 200. It means: saved. The answer has one item for each rate plan you sent, in the same order.

response · status code 200
{
  "statuscode": 200,
  "message": "OK",
  "data": {
    "items": [
      {
        "ref": "rp-bb",
        "id": 901,
        "action": "created",
        "sync": "IN_SYNC",
        "notice": null
      },
      {
        "ref": "rp-suite",
        "id": 902,
        "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 rate plan. It is a whole number. A later request names the rate plan by your ref, or by this id as ratePlanId.
action
What was done. With created, the rate plan is new. With updated, something changed. With unchanged, nothing was different.
sync
Does our connectivity partner have this rate plan too? IN_SYNC means yes. A test hotel always says IN_SYNC. On a real hotel it can also say PENDING: it is on its way.
channelManager.enabled
true: the hotel can take your updates.

Change or delete a rate plan

To change a rate plan, send it again with the same ref. The answer says updated, and the id stays the same. To delete a rate plan, send Delete a rate plan with its id. This cannot be undone. Creating, changing and deleting work in the same way for a real hotel.

You can also name the rate plan by your ref, with ref: in front: the address then ends with ref:rp-bb in place of 901.

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 rate plan. Remove every match first, by API or in the partner portal. Delete a rate plan says how. Your test hotel has no OTA, so you do not see this here.

3. Read the ids back

Send GET /catalog again, as in the step before. The answer now lists every room type and every rate plan of your test hotel.

The next step names things by your refs, so it works without these ids. Read them to understand a booking, which names ZimmerStack's ids. Read them also if you prefer to send ids.

The ids you now hold

These are the ids of the example. Your own numbers are different.

  • WhatThe hotel
    NameThe Lantern House (sandbox)
    You send it asX-ZS-Property
    id9001
    Your refnone
  • WhatRoom type
    NameDeluxe Room
    You send it asroomTypeId
    id412
    Your refrt-deluxe
  • WhatRate plan
    NameDeluxe EP (2 occ), of the Deluxe Room
    You send it asratePlanId
    id900
    Your refnone
  • WhatRate plan
    NameBed and breakfast, of the Deluxe Room
    You send it asratePlanId
    id901
    Your refrp-bb
  • WhatRoom type
    NameSuite
    You send it asroomTypeId
    id413
    Your refrt-suite
  • WhatRate plan
    NameRoom only, of the Suite
    You send it asratePlanId
    id902
    Your refrp-suite

The next step names a room type and a rate plan by your ref. It can name them by these ids too. Deluxe EP (2 occ) was made with the hotel and has no ref of yours, so it is named by its id. Each kind of update names one kind of thing.

roomTypeRef or roomTypeId
For : how many rooms of a room type are free.
ratePlanRef or ratePlanId
For and : the price and the rules of one rate plan.

What you should see

The answer
Status code 200. Each item says created, and it has an id.
Get room types and rate plans
Two room types and three rate plans. The Suite now has a rate plan too.

If it does not work

400 UNKNOWN_ROOM_TYPE
The room type is not one of this hotel, or its ref was never sent. Create the room type first, in the step before.
400 VALIDATION
A value is missing or has the wrong type, or one ref is in the list two times. Each item needs roomTypeRef or roomTypeId. A new rate plan also needs defaultRate.
409 CATALOG_CONFLICT
The rate plan was sent for another room type than the one it has. Or its occupancy is above the adults of the room type.
409 CATALOG_LIMIT_REACHED
The hotel has as many rate plans 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.
400 PROPERTY_REQUIRED
The request did not say which hotel. Add the X-ZS-Property header with the id of your test hotel.

The action page Create or change rate plans has every field and every error of this request.

Words on this page

Rate plan
One way to sell a room type, with its own price. For example Room only, or With breakfast.
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.
OTA
Online travel agency: a website that sells hotel rooms, like Booking.com, MakeMyTrip or Agoda. Learn more
Meal plan
Which meals the price includes: none (EP), breakfast (CP), breakfast and one meal (MAP), or all meals (AP).
Body
The data you send inside a request, written in JSON.
Occupancy
How many guests stay in one room.
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.
Availability
How many rooms of one room type are free to sell on one night. Learn more
Rates
The price of a room for one night. Learn more
Restrictions
Stay rules for a night, like a minimum stay of 2 nights, or no arrival on that day. Learn more

Routes, samples, limits and codes on this page come from the API's public contract, read live, Sat, 05 Dec 2026 01:08:00 UTC.