Antero Connect Docs

#Availability and rates

How many rooms are free, what they cost, and what the rules are. This is what channels are told, so it is the heart of the API.

#The three numbers

For one room type on one night Antero Connect knows:

availablehow many rooms are free according to whoever counts: your system, or Antero Connect
heldrooms Antero Connect keeps back for bookings your system has not counted yet
effectivewhat channels are told: available − held, never below 0

Ask for all three, and for the reason behind them:

bash
export CHANNEL_MANAGER=https://api.anteromas.com   # the address of your Channel Manager service
export KEY=cm_prod_ab12cd34_0123456789abcdef0123456789abcdef   # your API key

curl -s -X GET "$CHANNEL_MANAGER/v1/properties/$PROPERTY_ID/availability/explain?room_type_id=$ROOM_TYPE_ID&date=2027-03-11" \
  -H "Authorization: Bearer $KEY"
python
import os
import requests

CHANNEL_MANAGER = os.environ["CHANNEL_MANAGER"]   # the address of your Channel Manager service
KEY = os.environ["KEY"]       # your API key

r = requests.get(
    f"{CHANNEL_MANAGER}/v1/properties/{PROPERTY_ID}/availability/explain?room_type_id={ROOM_TYPE_ID}&date=2027-03-11",
    headers={"Authorization": f"Bearer {KEY}"},
)
r.raise_for_status()
print(r.status_code, r.text)
javascript
// Node.js 18 or newer (fetch is built in); save as a .mjs file
const CHANNEL_MANAGER = process.env.CHANNEL_MANAGER; // the address of your Channel Manager service
const KEY = process.env.KEY;     // your API key
let r;                           // the last answer

r = await fetch(`${CHANNEL_MANAGER}/v1/properties/${PROPERTY_ID}/availability/explain?room_type_id=${ROOM_TYPE_ID}&date=2027-03-11`, {
  method: "GET",
  headers: { Authorization: `Bearer ${KEY}` },
});
if (!r.ok) throw new Error(await r.text());
console.log(r.status, await r.text());
php
<?php
$CHANNEL_MANAGER = getenv("CHANNEL_MANAGER"); // the address of your Channel Manager service
$KEY = getenv("KEY");     // your API key

$ch = curl_init("{$CHANNEL_MANAGER}/v1/properties/{$PROPERTY_ID}/availability/explain?room_type_id={$ROOM_TYPE_ID}&date=2027-03-11");
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => "GET",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => ["Authorization: Bearer {$KEY}"],
]);
$out = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
if ($status >= 400) { throw new RuntimeException($out); }
echo $status, " ", $out, "\n";
json
{"room_type_id": "…", "date": "2027-03-11", "available": 5, "source": "api", "holds": [{"reservation_id": "…", "external_id": "KN-G6MSB7", "connection_id": null, "qty": 1, "feed_seq": 1}], "held": 1, "effective": 4}

#Who counts the rooms

A property has one authority_mode, chosen when it is made and changeable later (the panel asks twice, because it changes how everything below behaves).

#pms_authoritative: your system counts

You push available per room type per night. A booking that arrives (from a channel, the booking page, or made in Antero Connect) is held until your system has taken it over: Antero Connect subtracts one room from what channels are told, now, but your own number does not change until you count the booking. When you have counted it you say so with feed_applied_through in your next push, and the hold goes.

  • Your number is the truth. Antero Connect never changes available by itself.
  • A hold is released by one thing only: your confirmation. Never by time. Selling a room twice is worse than selling it late.
  • If your system goes quiet, rooms stay held. Antero Connect sells less, never more, while it waits.
  • Each push carries a pms_version, a number that only goes up. See Conventions.

#channel_manager_authoritative: Antero Connect counts

There is no other system. A booking, from wherever, takes its room off sale for every night at once, in the same transaction, and gives it back when the booking is cancelled or shortened. You (or the panel) set how many rooms are on sale; Antero Connect does the rest.

Which one? If a hotel system already counts rooms (a PMS, a front desk), use pms_authoritative. If Antero Connect's panel is the hotel's only tool, use channel_manager_authoritative. Do not run two counters.

#Pushing availability

bash
curl -s -X PUT "$CHANNEL_MANAGER/v1/properties/$PROPERTY_ID/availability" \
  -H "Authorization: Bearer $KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: av-2027-03-10-7" \
  -d @- <<EOF
{
  "items": [
    {
      "room_type_id": "$ROOM_TYPE_ID",
      "date_from": "2027-03-10",
      "date_to": "2027-03-16",
      "available": 5
    },
    {
      "room_type_id": "$SUITE_ID",
      "date_from": "2027-03-10",
      "date_to": "2027-03-16",
      "available": 2
    }
  ],
  "feed_applied_through": 1,
  "pms_version": 4
}
EOF
python
r = requests.put(
    f"{CHANNEL_MANAGER}/v1/properties/{PROPERTY_ID}/availability",
    headers={"Authorization": f"Bearer {KEY}", "Idempotency-Key": "av-2027-03-10-7"},
    json={
        "items": [
            {
                "room_type_id": f"{ROOM_TYPE_ID}",
                "date_from": "2027-03-10",
                "date_to": "2027-03-16",
                "available": 5,
            },
            {
                "room_type_id": f"{SUITE_ID}",
                "date_from": "2027-03-10",
                "date_to": "2027-03-16",
                "available": 2,
            },
        ],
        "feed_applied_through": 1,
        "pms_version": 4,
    },
)
r.raise_for_status()
print(r.status_code, r.text)
javascript
r = await fetch(`${CHANNEL_MANAGER}/v1/properties/${PROPERTY_ID}/availability`, {
  method: "PUT",
  headers: { Authorization: `Bearer ${KEY}`, "Content-Type": "application/json", "Idempotency-Key": "av-2027-03-10-7" },
  body: JSON.stringify({
    items: [
      {
        room_type_id: `${ROOM_TYPE_ID}`,
        date_from: "2027-03-10",
        date_to: "2027-03-16",
        available: 5,
      },
      {
        room_type_id: `${SUITE_ID}`,
        date_from: "2027-03-10",
        date_to: "2027-03-16",
        available: 2,
      },
    ],
    feed_applied_through: 1,
    pms_version: 4,
  }),
});
if (!r.ok) throw new Error(await r.text());
console.log(r.status, await r.text());
php
$ch = curl_init("{$CHANNEL_MANAGER}/v1/properties/{$PROPERTY_ID}/availability");
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => "PUT",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => ["Authorization: Bearer {$KEY}", "Content-Type: application/json", "Idempotency-Key: av-2027-03-10-7"],
    CURLOPT_POSTFIELDS => json_encode([
        "items" => [
            [
                "room_type_id" => "{$ROOM_TYPE_ID}",
                "date_from" => "2027-03-10",
                "date_to" => "2027-03-16",
                "available" => 5,
            ],
            [
                "room_type_id" => "{$SUITE_ID}",
                "date_from" => "2027-03-10",
                "date_to" => "2027-03-16",
                "available" => 2,
            ],
        ],
        "feed_applied_through" => 1,
        "pms_version" => 4,
    ]),
]);
$out = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
if ($status >= 400) { throw new RuntimeException($out); }
echo $status, " ", $out, "\n";
Field
items1 to 500. Each is a room type, a range of days (both ends included, at most 540 days) and available, a whole number from 0 to the room type's total_units.
pms_versionrequired for a property run by your system; must not decrease
feed_applied_throughthe feed number your numbers already count; required for a property run by your system that has a feed; never above head (400 feed_applied_through_ahead), never below what you confirmed before (409 stale_feed_applied_through)

The answer says what happened:

json
{"changed_days": 14, "unchanged_days": 0, "derived_changed_days": 0, "pms_version": 1, "released_holds": 0}

unchanged_days counts days you pushed that were already like that: pushing the same picture again is free and changes nothing. released_holds is how many holds your feed_applied_through released.

Push what changed, or push the whole picture. Both are safe. A system that has been down should push the whole picture for the nights it sells; a system that is up pushes only what changed since its last push.

#Prices

A rate plan is how a room type is sold. Prices are per plan per day, in the smallest unit of the property's currency.

bash
curl -s -X PUT "$CHANNEL_MANAGER/v1/properties/$PROPERTY_ID/rates" \
  -H "Authorization: Bearer $KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: rt-2027-03-10-1" \
  -d @- <<EOF
{
  "items": [
    {
      "rate_plan_id": "$RATE_PLAN_ID",
      "date_from": "2027-03-10",
      "date_to": "2027-03-16",
      "amount": 12000
    }
  ],
  "pms_version": 5
}
EOF
python
r = requests.put(
    f"{CHANNEL_MANAGER}/v1/properties/{PROPERTY_ID}/rates",
    headers={"Authorization": f"Bearer {KEY}", "Idempotency-Key": "rt-2027-03-10-1"},
    json={
        "items": [
            {
                "rate_plan_id": f"{RATE_PLAN_ID}",
                "date_from": "2027-03-10",
                "date_to": "2027-03-16",
                "amount": 12000,
            },
        ],
        "pms_version": 5,
    },
)
r.raise_for_status()
print(r.status_code, r.text)
javascript
r = await fetch(`${CHANNEL_MANAGER}/v1/properties/${PROPERTY_ID}/rates`, {
  method: "PUT",
  headers: { Authorization: `Bearer ${KEY}`, "Content-Type": "application/json", "Idempotency-Key": "rt-2027-03-10-1" },
  body: JSON.stringify({
    items: [
      {
        rate_plan_id: `${RATE_PLAN_ID}`,
        date_from: "2027-03-10",
        date_to: "2027-03-16",
        amount: 12000,
      },
    ],
    pms_version: 5,
  }),
});
if (!r.ok) throw new Error(await r.text());
console.log(r.status, await r.text());
php
$ch = curl_init("{$CHANNEL_MANAGER}/v1/properties/{$PROPERTY_ID}/rates");
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => "PUT",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => ["Authorization: Bearer {$KEY}", "Content-Type: application/json", "Idempotency-Key: rt-2027-03-10-1"],
    CURLOPT_POSTFIELDS => json_encode([
        "items" => [
            [
                "rate_plan_id" => "{$RATE_PLAN_ID}",
                "date_from" => "2027-03-10",
                "date_to" => "2027-03-16",
                "amount" => 12000,
            ],
        ],
        "pms_version" => 5,
    ]),
]);
$out = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
if ($status >= 400) { throw new RuntimeException($out); }
echo $status, " ", $out, "\n";

#Mistyped prices are refused

A wrong price reaches the booking sites in seconds, and a room sold at a tenth of its price cannot be taken back. So Antero Connect looks at every price before it saves anything:

  • Price limits. PUT /v1/properties/{id}/price-guard with {"floor": 5000, "ceiling": 50000} (minor units; null = no limit). A price outside is 409 price_guard and nothing in the request is saved. No flag lifts it: change the limits first.
  • Large changes. A price more than five times above, or less than a fifth of, what the plan has in the same days is 409 price_change_large. If it is meant, send the same request again with "confirm_large_change": true. A plan with no price yet has nothing to jump from.

The check runs in dry_run too, so a preview shows the refusal.

#Derived plans

A plan can be derived from another: its price is the parent's price changed by a rule, worked out when the parent's price is written. Then you set one price, and the non-refundable rate follows.

json
{"room_type_id": "…", "name": "Non-refundable", "code": "NRF", "parent_rate_plan_id": "…",
 "derivation": {"type": "percent", "basis_points": -1000, "round_to": 100}}

basis_points is hundredths of a percent (-1000 is −10.00%); type: "amount" adds a signed amount in the smallest unit instead (give one or the other). round_to rounds to a multiple (default 1; 100 rounds to whole dollars). You cannot push a price to a derived plan (400: set it on its parent): it follows the parent. Plans can be derived from derived plans, at most 3 deep. Restrictions are independent, so you can set them on a derived plan. The answer's derived_changed_days says how many days of derived plans moved.

#Restrictions

Rules for selling a night, per rate plan per day:

FieldMeaning
min_staythe fewest nights that may be booked when arriving on this day (1 to 365, or null for no rule)
max_staythe most nights (1 to 365, or null); never below min_stay
closed_to_arrivalno new stay may start this day
closed_to_departureno stay may end this day
stop_sellthe plan is not sold this day

Each push sets all five for the days it names. To change only min_stay, send the other four as they are now. Read them first with GET …/restrictions.

json
{"items": [{"rate_plan_id": "…", "date_from": "2027-03-12", "date_to": "2027-03-13", "min_stay": 2, "max_stay": null,
            "closed_to_arrival": false, "closed_to_departure": false, "stop_sell": false}], "pms_version": 6}

Who has to keep to them. Channels get the restrictions Antero Connect sends. The booking page enforces them: a guest cannot book a stay that breaks one (409 not_sellable), and the page says in plain words what to change ("needs a stay of at least 3 nights"). A quote made with a key lists the rules a stay breaks in restrictions, but the hotel itself may still book it: a rule is a policy for guests and channels, not a lock on the hotel. The rules are the usual ones: stop_sell on any night of the stay; closed_to_arrival on the arrival day; closed_to_departure on the day of leaving; min_stay and max_stay as set on the arrival day.

#Reading

CallGivesRange
GET …/availabilityavailable, held, effective per room type per dayup to 540 days
GET …/ratesprices per plan per dayup to 540 days
GET …/restrictionsthe five rules per plan per dayup to 540 days
GET …/calendarall of it in one reading, plus per channel how far each room has gotup to 62 days
GET …/availability/explainwhy one number is what it isone day

calendar is what a screen needs: one call instead of dozens.

#Try first

Every push takes ?dry_run=true: Antero Connect answers what would change and writes nothing. Use it for "are you sure?" screens, and to check a batch before you send it.

#What channels see, and how far they have got

Antero Connect sends channels only what changed, selling less before selling more, and reads each channel back to check that it kept it. A day sent to a channel goes through three states:

StateMeaning
waitingAntero Connect wants it sent and has not yet
sentthe channel said OK
confirmedAntero Connect read the channel back and it holds the value

See Channels to read them.

#Recipes

Sell out a room type for a night. Push available: 0 for that day. Channels are told 0 on their next pass.

Close a room type at one OTA only. Do not push 0: use a closure, which says which OTA and checks that the OTA really did it.

Open a season. Push available and amount for the range in one call each. Use dry_run first to see affected_connections.

A booking arrived and your number should drop. In pms_authoritative this is the loop in Integrating a PMS: take over the feed entry, count it in your own number, push with feed_applied_through.

A channel shows a number you did not expect. GET …/availability/explain: it says what you pushed, what is held and why, and what channels are told.