Skip to content

API action

Change the mapping of one OTA(re-map)

Save the whole matching of one connected OTA again. Each room and rate of the OTA gets one of the hotel's rate plans, or none. People also call this a re-map.

About this action

What it does
Saves the of one . You send every line you want matched, each with one of the hotel's . The save is checked in the same way as a save on ZimmerStack's own mapping screen.
When to use it
When a line of the must get another rate plan, or a line has no match yet. Let a person choose each match on a screen in your software.
Who can use it
A only. The key needs the channels:connect.
Address
PUT https://api.zimmerstack.com/api/v1/connect-api/v1/properties/{propertyId}/channels/{channelId}/mapping
Before this
Read the mapping first, with Get the mapping of one OTA. It gives each lineId, the rate plans a line can take, and the two rules of this OTA: mapEveryLine and usesPrimary. The scope channels:connect is never ticked by itself: someone in your company must give it to the key.

What you send

In the address:

propertyId
The id of the hotel, a number. Get it with List your hotels.
channelId
The id of the channel, from the answer of List the connected OTAs. That request names the hotel with the X-ZS-Property header.

You send a list named lines. It is the whole matching of this connection, not only the lines you change.

lines
List of 1 to 2,000 lines. Required. Every line you want matched.
lineId
Text. Required. The id of a line, from the answer of Get the mapping of one OTA.
ratePlanId
Whole number above 0, or null. Required. The hotel's rate plan for this line. Send null to leave the line with no match.
primary
Send true or false. Optional. Only where usesPrimary is true: with true, this line carries the rate's and . Leave it out on every line of a rate to take the default.
example: both lines of the first room get rate plan 901, and the Family Suite gets 902
{
  "lines": [
    {
      "lineId": "46777651::2001::2",
      "ratePlanId": 901,
      "primary": true
    },
    {
      "lineId": "46777651::2001::1",
      "ratePlanId": 901,
      "primary": false
    },
    {
      "lineId": "46777652::2002::4",
      "ratePlanId": 902
    }
  ]
}

Things to know

  1. A line you leave out loses its match. The list replaces the whole matching. A line that can be matched and is not in the list is unmatched by the save. So is a line you send with ratePlanId as null. A line that is blocked is never changed.
  2. Each OTA has its own rules. Where mapEveryLine is true, every line that can be matched must be matched. Where usesPrimary is true, each rate has exactly one primary line: send primary as true on it. Or leave primary out on every line of the rate. The default is then the line with the most guests. And one room of the OTA takes rate plans of one of your only.
  3. A save sends no price. After a save that changed something, ask for a of this channel. Only then do the newly matched rates get their prices and their numbers of free rooms.
  4. Airbnb saves one listing for each request. On Airbnb, one is matched to one rate plan. One request makes one change, and it takes about half a minute. Read remaining in the answer, and send the same body again until it is 0. Use a new each time, or none.

The request, in your language

Put your key in place of zsk_live_YOUR_KEY.

Save the example above as change-the-mapping-of-one-ota.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/properties/61/channels/7c1d8a3e-5f2b-4d6a-9e0c-1b2a3c4d5e6f/mapping" -H "Authorization: Bearer zsk_live_YOUR_KEY" -H "Content-Type: application/json" -d "@change-the-mapping-of-one-ota.json"

What comes back

The is 200. Read changed first. In this example the save changed the matching, and three lines are matched now.

response · status code 200
{
  "statuscode": 200,
  "message": "Mapping saved",
  "data": {
    "channelId": "7c1d8a3e-5f2b-4d6a-9e0c-1b2a3c4d5e6f",
    "changed": true,
    "mapped": 3,
    "removed": 0,
    "kept": 0,
    "unmatched": [],
    "remaining": 0,
    "waiting": false,
    "next": "Send POST /channels/{channelId}/full-sync for this connection so the newly matched rates receive their prices and room counts."
  }
}
changed
With true, the matching was changed. With false, the connection already had exactly this matching, and nothing was sent.
mapped
How many lines are matched after the save.
removed
How many lines the save unmatched.
kept
How many lines cannot be matched here. They were left as they were.
unmatched
The lines that were left out, where the OTA allows it. They keep selling on the OTA's own availability.
remaining
Always 0, except on Airbnb. There, send the same body again until it is 0.
waiting
With true, Airbnb is still confirming a removal. Wait a few seconds before the next request.
next
One sentence: what to do after a save that changed something.

Then ask for a full sync of that OTA

A new matching sends no price by itself. When changed is true, send Send everything to one OTA again with the same channelId. That request names the hotel with the . The newly matched rates then get their prices and their numbers of free rooms. Each saved matching is on the hotel's activity log, with the name of your key.

Common mistakes

400 VALIDATION
The body has a wrong shape, or the matching breaks a rule of the OTA. Nothing was changed. For a broken rule, data.details.problems lists each problem, with a code and the lineId it is about. The next seven rows have each code.
Problem NOTHING_MAPPED
No line has a rate plan.
Problem UNKNOWN_SLOT
The OTA does not list this lineId now. Read the mapping again.
Problem BLOCKED_SLOT
This line cannot be matched: its blocked has a value.
Problem UNMAPPED
This OTA wants the line matched, and you gave it no rate plan.
Problem UNKNOWN_RATE_PLAN or UNKNOWN_PLAN
The rate plan is not one of this hotel's rate plans on the . Use an id from ratePlans in the mapping.
Problem ROOM_SPLIT
One room of the OTA got rate plans of two of your room types. The field otaRoomCode names the room.
Problem PRIMARY_MISSING or PRIMARY_MULTIPLE
A rate needs exactly one primary line. The field lineIds names the lines of that rate.
403 COMPANY_KEY_REQUIRED
You used a hotel key. This request works with a company key only.
404 PROPERTY_NOT_FOUND
The propertyId is not a hotel your key may act on. Use an id from List your hotels.
404 CHANNEL_NOT_FOUND
This hotel has no channel with this channelId. Read the ids again with List the connected OTAs.
409 LIVE_KEY_REQUIRED
You used a test key. A sandbox has no real OTA. Use a live key.
409 CHANNEL_NOT_AVAILABLE
Read data.details.reason. With not_in_your_access, managing connections is not part of your access to this hotel: open a support ticket. With not_matched_here, our matching does not cover this OTA: use the channel console. The other reasons are switched_off and test_account.
409 CHANNEL_MANAGER_DISABLED
The hotel is not on the .
409 PROPERTY_UNAVAILABLE
The hotel's service is paused or has ended.
502 CHANNEL_MANAGER_ERROR
Our did not accept the new matching. Nothing was changed. If it said why, the reasons are in data.details.reasons. This answer is never kept under an idempotency key, so you can send the request again.
Other errors this request can give
401 API_KEY_INVALID
The key is not right. Copy it again, all of it, with no space before or after.
403 SCOPE_MISSING
The key is not allowed to do this. It needs the scope channels:connect.
403 IP_NOT_ALLOWED
The key only works from the addresses its owner allowed.
429 RATE_LIMITED
Too many requests in a short time. Wait the number of seconds in the Retry-After header, then send again.
401 API_KEY_REVOKED
The key was switched off, or it was replaced and its extra 24 hours are over. Ask the key's owner for the new key. Nothing else makes this key work.

Try it

This page has no box to try the action. This request changes a connection to a real OTA, and a has none. So it works with a only. Send it from your own code or from Postman. Never type a live key into a web page.

Go deeper

  • Connect an OTA: First the OTA accepts our connectivity partner. Then a link: the hotel's id, the mapping, Start selling.

Words on this page

Mapping
Saying which room and price in one system is which room and price in another system. For an OTA: each of its rooms and rates is matched to one of the hotel's rate plans. A person makes the first matching. Changing it later is called a re-map. Learn more
Channel
One connection between a hotel and one OTA. Hotel people say channel and OTA for nearly the same thing.
OTA
Online travel agency: a website that sells hotel rooms, like Booking.com, MakeMyTrip or Agoda. Learn more
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.
Availability
How many rooms of one room type are free to sell on 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
Full sync
Our connectivity partner sends one OTA everything it holds for the hotel again: availability, rates and restrictions, for every date. An OTA takes one an hour. Learn more
Listing
A hotel's own page on an OTA, with its rooms, photos and prices.
Idempotency key
A code you choose and send with an update. If the same update is sent twice by mistake, it is done only once.
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.
Channel manager
Software that keeps a hotel's rooms and prices the same on every OTA. Learn more
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
Company key
The key of a software company. One key works for all the hotels of that company.
Scope
One permission of a key. For example ari:write lets the key update availability, rates and restrictions.
Sandbox
Your test hotel. It works like a real hotel, but no OTA can see it and it costs nothing.
Live key
A key that starts with zsk_live_. It works on real hotels.
Status code
A number in every response. 200 to 299 means it worked. 400 and above means there is a problem.

New here? Start with the partner path or the one-hotel path.

Routes, samples, limits and codes on this page come from the API's public contract, read live, Fri, 04 Dec 2026 22:53:40 UTC.